/* RESET y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background-color: #fff;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    background: #1e6086;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 0;
    padding-bottom: 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 24px;
}

.logo-img {
    height: 50px;
    width: auto;
    max-height: 50px;
    object-fit: contain;
}

/* WhatsApp en el header */
.header-whatsapp {
    margin-left: auto;
    margin-right: 1rem;
}

.whatsapp-link {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #25D366;
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.whatsapp-link:hover {
    background: #128C7E;
    transform: scale(1.05);
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #f97316;
}

.btn-cotizar {
    background: #f97316;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    color: white !important;
}

.btn-cotizar:hover {
    background: #ea580c;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ========== CARRUSEL CON EFECTO FADE ========== */
.hero {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    background-color: #ffffff;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
    z-index: 1;
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Efecto de zoom lento mientras está activo */
.carousel-slide.active .slide-bg {
    animation: slowZoom 8s ease-out forwards;
}

@keyframes slowZoom {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.08);
    }
}

/* Contenido del carrusel */
.slide-content {
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 800px;
    text-align: center;
    color: white;
    z-index: 3;
    background-color: rgba(30, 103, 158, 0.4);
    padding: 30px 40px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

.slide-content h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.slide-content p {
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    margin-bottom: 1.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary {
    background: #f97316;
    color: white;
}

.btn-primary:hover {
    background: #ea580c;
    transform: translateY(-3px);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #0f172a;
}

.btn-outline {
    background: transparent;
    color: #f97316;
    border: 2px solid #f97316;
}

.btn-outline:hover {
    background: #f97316;
    color: white;
}

/* Botones del carrusel */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    color: #0f172a;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 20;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.carousel-btn:hover {
    background-color: #f97316;
    color: white;
}

.prev {
    left: 20px;
}
.next {
    right: 20px;
}

/* Puntos indicadores */
.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 20;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dot.active {
    background-color: #f97316;
    transform: scale(1.2);
}

/* Servicios Grid */
.servicios {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #0f172a;
}

.section-subtitle {
    text-align: center;
    color: #4b5563;
    margin-bottom: 3rem;
    font-size: 1.2rem;
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.servicio-card {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.servicio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 30px -10px rgba(0,0,0,0.1);
}

.servicio-card i {
    font-size: 3rem;
    color: #f97316;
    margin-bottom: 1rem;
}

.servicio-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

/* Portafolio */
.portafolio {
    padding: 80px 0;
    background-color: #f8fafc;
}

.portafolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.8rem;
}

.portafolio-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
}

.portafolio-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.4s;
}

.portafolio-item:hover img {
    transform: scale(1.05);
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, #0f172a, transparent);
    color: white;
    padding: 1rem;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.portafolio-item:hover .overlay {
    transform: translateY(0);
}

/* Sobre Nosotros */
.nosotros {
    padding: 80px 0;
}

.nosotros-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.nosotros-texto h2 {
    font-size: 2rem;
    color: #f97316;
    margin-bottom: 0.5rem;
}

.nosotros-texto h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.nosotros-texto p {
    margin-bottom: 2rem;
    color: #4b5563;
}

.nosotros-buttons {
    display: flex;
    gap: 1rem;
}

.nosotros-foto img {
    width: 100%;
    border-radius: 24px;
    box-shadow: 0 20px 30px -10px rgba(0,0,0,0.2);
}

/* Footer */
.footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 3rem 0 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-info h3, .footer-contacto h4, .footer-redes h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-contacto i, .footer-redes i {
    margin-right: 8px;
    color: #f97316;
}

.footer-redes a {
    color: #cbd5e1;
    font-size: 1.5rem;
    margin-right: 1rem;
    transition: color 0.3s;
}

.footer-redes a:hover {
    color: #f97316;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #1e293b;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background: #0f172a;
        transition: left 0.3s;
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu ul {
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
    }
    
    .header-whatsapp span {
        display: none;
    }
    
    .whatsapp-link {
        background: transparent;
        padding: 8px;
    }
    
    .whatsapp-link i {
        color: #25D366;
        font-size: 1.5rem;
    }
    
    .hero {
        height: 400px;
    }
    
    .slide-content {
        width: 90%;
        padding: 15px 20px;
        bottom: 10%;
    }
    
    .slide-content h2 {
        font-size: 1.2rem;
    }
    
    .slide-content p {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .servicios-grid {
        grid-template-columns: 1fr;
    }
    
    .nosotros-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons .btn {
        padding: 8px 20px;
        font-size: 0.8rem;
    }
    
    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .prev { left: 10px; }
    .next { right: 10px; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .hero {
        height: 500px;
    }
}