/* Fonts */
@import url('https://fonts.cdnfonts.com/css/glacial-indifference-2');

/* Variables */
:root {
    --primary: #101a2b;
    --white: #ffffff;
    --black: #000000;
    --text: #353535;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth !important;
}

body {
    font-family: 'Glacial Indifference', 'Helvetica', Arial, sans-serif;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--black);
    font-weight: 600;
    line-height: 1.2;
}

a {
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Form Validation */
.text-danger {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.form-control.input-validation-error {
    border-color: #dc3545;
}

.alert {
    border-radius: 8px;
    margin-bottom: 2rem;
}

/* Navbar */
.navbar {
    padding: 1.5rem 0;
    transition: var(--transition);
    background: transparent;
    z-index: 1000;
}

    .navbar.scrolled {
        background: var(--black) !important;
        padding: 1rem 0;
        box-shadow: var(--shadow-md);
    }

.navbar-brand {
    font-family: 'Helvetica', Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--white) !important;
}

    .navbar-brand:hover {
        opacity: 0.8;
    }

.navbar-nav .nav-link {
    color: var(--white) !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem !important;
    margin: 0 0.2rem;
    letter-spacing: 0.5px;
    position: relative;
}

    .navbar-nav .nav-link::after {
        content: '';
        position: absolute;
        bottom: -10px;
        left: 50%;
        transform: translateX(-50%) rotate(45deg);
        width: 8px;
        height: 8px;
        background: var(--white);
        opacity: 0;
        transition: var(--transition);
    }

    .navbar-nav .nav-link:hover::after,
    .navbar-nav .nav-link.active::after {
        opacity: 1;
        bottom: -5px;
    }

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
}

    .navbar-toggler:focus {
        box-shadow: none;
    }

/* Hero */
.hero-section {
    position: relative;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    /* FIX: will-change solo cuando la animación está activa.
       Aplicarlo permanentemente en todos los slides reserva capas
       de composición GPU innecesarias. Se activa desde JS solo en
       el slide activo (ver script.js). */
}

    .hero-slide.active {
        opacity: 1;
    }

    /* will-change se aplica solo al slide que va a transicionar */
    .hero-slide.will-animate {
        will-change: opacity;
    }

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), rgba(16, 26, 43, 0.8));
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 1.5rem;
    color: var(--white) !important;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.3rem);
    font-weight: 300;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    line-height: 1.8;
    color: var(--white) !important;
}

.hero-cta {
    background: transparent !important;
    border: 2px solid var(--white);
    color: var(--white);
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    border-radius: 50px !important;
}

    .hero-cta::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: var(--white);
        transition: var(--transition);
        z-index: -1;
    }

    .hero-cta:hover {
        color: var(--black);
        border-color: var(--white);
    }

        .hero-cta:hover::before {
            left: 0;
        }

.hero-indicators {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 15px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.2s ease;
}

    .indicator.active,
    .indicator:hover {
        background: var(--white);
        transform: scale(1.2);
    }

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

.delay-4 {
    animation-delay: 0.8s;
}

.delay-5 {
    animation-delay: 1s;
}

.delay-6 {
    animation-delay: 1.2s;
}

.delay-7 {
    animation-delay: 1.4s;
}

.delay-8 {
    animation-delay: 1.6s;
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

    .fade-in.visible {
        opacity: 1;
        transform: translateY(0);
    }

/* Services */
.services-section {
    background: var(--white);
    padding: 6rem 0;
    /* FIX: content-visibility permite al navegador saltarse el
       layout/paint de secciones fuera del viewport, reduciendo
       el tiempo de renderizado inicial (~200ms en páginas largas). */
    content-visibility: auto;
    contain-intrinsic-size: 0 600px;
}

.service-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    transition: var(--transition);
    height: 100%;
    border: 1px solid transparent;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

    .service-card:hover {
        transform: translateY(-8px);
        box-shadow: var(--shadow-lg);
        border-color: var(--primary);
    }

.service-icon {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    border-radius: 50%;
    color: var(--white);
    font-size: 1.5rem;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-content {
    flex: 1;
}

.service-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--black);
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.service-description {
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.6;
}

/* Why Section */
.why-section {
    background: #f8f9fa;
    padding: 6rem 0;
    content-visibility: auto;
    contain-intrinsic-size: 0 700px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: 2px;
    color: var(--black);
    margin-bottom: 100px;
}

.why-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    max-height: 600px;
}

.why-image {
    width: 100%;
    transition: var(--transition);
}

.why-image-wrapper:hover .why-image {
    transform: scale(1.05);
}

.why-content {
    padding-left: 2rem;
}

.why-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    align-items: flex-start;
}

.why-number {
    min-width: 35px;
    height: 35px;
    background: var(--primary);
    color: var(--white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
}

.why-text h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--black);
}

.why-text p {
    font-size: 1rem;
    color: var(--text);
    line-height: 1.7;
}

/* Portfolio */
.portfolio-section {
    background: var(--white);
    padding: 6rem 0;
    content-visibility: auto;
    contain-intrinsic-size: 0 900px;
}

/* Wrapper que contiene tabs + botón "···" en la misma fila */
.portfolio-tabs-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 3rem;
    overflow: visible;
}

.portfolio-tabs {
    border: none;
    gap: 0.6rem;
    flex-wrap: nowrap;
    overflow: visible;
    flex: 0 1 auto;
    min-width: 0;
    justify-content: center;
}

    .portfolio-tabs .nav-link {
        border: 2px solid #dee2e6;
        border-radius: 50px;
        padding: 0.7rem 2rem;
        color: var(--text);
        font-weight: 600;
        letter-spacing: 1px;
        background: transparent;
        transition: all 0.2s ease;
        white-space: nowrap;
    }

        .portfolio-tabs .nav-link:hover {
            border-color: var(--primary);
            color: var(--primary);
        }

        .portfolio-tabs .nav-link.active {
            background: var(--black);
            border-color: var(--black);
            color: var(--white);
        }

/* Botón "···" */
.portfolio-more {
    position: relative;
    flex-shrink: 0;
    align-items: center;
}

.portfolio-more-btn {
    border: 2px solid #dee2e6;
    border-radius: 50px;
    padding: 0.7rem 1.2rem;
    background: transparent;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    letter-spacing: 2px;
    line-height: 1;
    transition: all 0.2s ease;
    white-space: nowrap;
}

    .portfolio-more-btn:hover,
    .portfolio-more-btn[aria-expanded="true"] {
        border-color: var(--primary);
        color: var(--primary);
    }

    .portfolio-more-btn.has-active {
        background: var(--black);
        border-color: var(--black);
        color: var(--white);
    }

/* Dropdown del "···" */
.portfolio-more-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--white);
    border: 2px solid var(--primary);
    border-radius: 10px;
    list-style: none;
    padding: 0.4rem 0;
    margin: 0;
    min-width: 200px;
    z-index: 200;
    box-shadow: var(--shadow-md);
}

    .portfolio-more-dropdown.open {
        display: block;
    }

.portfolio-more-item {
    padding: 0.75rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

    .portfolio-more-item:hover {
        background: #f8f9fa;
        color: var(--primary);
    }

    .portfolio-more-item.active {
        color: var(--primary);
        font-weight: 700;
    }

.portfolio-grid {
    columns: 3;
    column-gap: 0.6rem;
    orphans: 1;
    widows: 1;
}

.portfolio-item-wrapper {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    display: inline-block;
    width: 100%;
    margin-bottom: 0.6rem;
    border-radius: 6px;
    overflow: hidden;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 6px;
    display: block;
}

.portfolio-image {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: rgba(16, 26, 43, 0.88);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    color: var(--white);
    text-align: center;
    padding: 2rem;
}

.portfolio-item:hover .portfolio-image {
    transform: scale(1.06);
    filter: brightness(0.85);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3,
.portfolio-overlay h4,
.portfolio-overlay-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--white);
    letter-spacing: 1px;
}

.portfolio-overlay p,
.portfolio-overlay-location {
    font-size: 1rem;
    opacity: 0.9;
    color: var(--white);
}

.btn-outline-dark {
    border: 2px solid var(--black);
    color: var(--black);
    padding: 0.8rem 3rem;
    font-weight: 600;
    letter-spacing: 1px;
    border-radius: 50px;
    transition: all 0.2s ease;
}

    .btn-outline-dark:hover {
        background: var(--black);
        color: var(--white);
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

.btn-ver-mas--disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Companies */
.companies-section {
    background: #f8f9fa;
    padding: 6rem 0;
    content-visibility: auto;
    contain-intrinsic-size: 0 400px;
}

.companies-slider-wrapper {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.companies-slider {
    overflow: hidden;
    padding: 2rem 0;
}

.companies-track {
    display: flex;
    gap: 3rem;
    transition: transform 0.5s ease;
}

.company-slide {
    flex: 0 0 auto;
    width: 200px;
}

.company-logo {
    background: var(--white);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 2rem;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

    .company-logo:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-md);
        border-color: var(--primary);
    }

.company-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--black);
    letter-spacing: 2px;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

    .slider-btn:hover {
        background: var(--primary);
        color: var(--white);
        border-color: var(--primary);
    }

.prev-btn {
    left: -60px;
}

.next-btn {
    right: -60px;
}

.team-image-wrapper.no-transition .team-image,
.team-image-wrapper.no-transition .team-overlay {
    transition: none !important;
}

/* Team */
.team-section {
    background: var(--white);
    padding: 6rem 0;
    content-visibility: auto;
    contain-intrinsic-size: 0 600px;
}

.section-subtitle {
    font-size: 0.95rem;
    color: var(--text);
    letter-spacing: 0.5px;
    line-height: 1.8;
}

.team-image-wrapper {
    position: relative;
    border-radius: 8px;
    height: 450px;
    overflow: hidden;
    /* FIX: will-change removido del estado base.
       Aplicarlo a TODAS las tarjetas permanentemente crea una capa
       de composición GPU por cada imagen incluso cuando no están
       en hover, consumiendo memoria de video innecesariamente.
       Se activa únicamente durante el hover via :hover. */
}

.team-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1);
    transform: scale(1);
    transform-origin: center center;
    transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1), filter 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    /* FIX: will-change activado solo en hover (ver abajo), no aquí */
}

.team-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    padding: 2rem;
    transform: translateY(100%);
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    /* FIX: ídem */
}

/* Activar will-change SOLO durante el hover, no de forma permanente */
.team-image-wrapper:hover .team-image {
    transform: scale(1.06);
    filter: grayscale(0);
    will-change: transform, filter;
}

.team-image-wrapper:hover .team-overlay {
    transform: translateY(0);
    will-change: transform;
}

.team-info h3,
.team-info h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.3rem;
    letter-spacing: 1px;
}

.team-info p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.5px;
}

/* Contact */
.contact-section {
    background: #f8f9fa;
    padding: 6rem 0;
    content-visibility: auto;
    contain-intrinsic-size: 0 600px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 1.5rem;
    background: var(--white);
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
    height: 100%;
}

    .contact-item:hover {
        border-color: var(--primary);
        box-shadow: var(--shadow-sm);
    }

    .contact-item i {
        font-size: 1.5rem;
        color: var(--primary);
        flex-shrink: 0;
        width: 40px;
        text-align: center;
    }

.contact-text h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--black);
    line-height: 1.5;
    margin: 0;
}

.contact-form .form-control {
    border: 1px solid #dee2e6;
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    max-width: 1000px;
}

    .contact-form .form-control:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 0.2rem rgba(16, 26, 43, 0.1);
    }

.contact-form textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.contact-form .btn-primary {
    background: var(--primary);
    border: 2px solid var(--primary);
    padding: 1rem 2rem;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.2s ease;
}

    .contact-form .btn-primary:hover {
        background: var(--black);
        border-color: var(--black);
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

/* Footer */
.footer {
    background: var(--primary);
    color: var(--white);
    padding: 4rem 0 2rem;
}

    .footer h2,
    .footer h5 {
        font-size: 1.2rem;
        font-weight: 700;
        margin-bottom: 1.5rem;
        color: var(--white);
        letter-spacing: 1px;
    }

.footer-brand {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--white);
    letter-spacing: 1px;
}

.footer-heading {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    color: var(--white);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.footer-subheading {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
}

.footer-contact {
    font-size: 0.9rem;
    opacity: 0.85;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

    .footer-contact i {
        margin-top: 3px;
        flex-shrink: 0;
    }

    .footer-contact a {
        color: rgba(255, 255, 255, 0.85);
        transition: all 0.2s ease;
    }

        .footer-contact a:hover {
            color: var(--white);
        }

.footer-opening-hours p {
    font-size: 0.9rem;
    opacity: 0.85;
}

.footer p {
    opacity: 0.8;
    line-height: 1.8;
}

.footer-links {
    list-style: none;
    padding: 0;
}

    .footer-links li {
        margin-bottom: 0.8rem;
    }

    .footer-links a {
        color: rgba(255, 255, 255, 0.8);
        transition: all 0.2s ease;
    }

        .footer-links a:hover {
            color: var(--white);
            padding-left: 5px;
        }

.social-links {
    display: flex;
    gap: 1rem;
}

    .social-links a {
        width: 45px;
        height: 45px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--white);
        font-size: 1.2rem;
        transition: all 0.2s ease;
    }

        .social-links a:hover {
            background: var(--white);
            color: var(--primary);
            transform: translateY(-3px);
        }

.footer hr {
    border-color: rgba(255, 255, 255, 0.2);
}

/* WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
}

    .whatsapp-float a {
        width: 60px;
        height: 60px;
        background: #25D366;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--white);
        font-size: 2rem;
        box-shadow: var(--shadow-lg);
        transition: all 0.2s ease;
        animation: pulse 2s infinite;
    }

        .whatsapp-float a:hover {
            transform: scale(1.1);
        }

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    50% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
}

.whatsapp-tooltip {
    position: absolute;
    right: 75px;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background: var(--white);
    color: var(--black);
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

    .whatsapp-tooltip::after {
        content: '';
        position: absolute;
        right: -8px;
        top: 50%;
        transform: translateY(-50%);
        width: 0;
        height: 0;
        border-left: 8px solid var(--white);
        border-top: 8px solid transparent;
        border-bottom: 8px solid transparent;
    }

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

/* Responsive */
@media (max-width: 1199px) {
    .prev-btn {
        left: -25px;
    }

    .next-btn {
        right: -25px;
    }
}

@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(0, 0, 0, 0.95);
        padding: 1.5rem;
        margin-top: 1rem;
        border-radius: 8px;
    }

    .why-content {
        padding-left: 0;
        margin-top: 2rem;
    }

    .slider-btn {
        display: none;
    }

    .portfolio-grid {
        columns: 2;
    }

    .portfolio-item-wrapper:nth-child(n) {
        grid-column: unset;
        grid-row: unset;
    }
}

@media (max-width: 767px) {
    .services-section,
    .why-section,
    .portfolio-section,
    .companies-section,
    .team-section,
    .faq-section,
    .contact-section {
        padding: 4rem 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .service-card {
        padding: 1.5rem;
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .service-icon {
        margin: 0 auto 1rem;
    }

    .why-number {
        min-width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .portfolio-grid {
        columns: 1;
    }

    .team-image-wrapper {
        height: 400px;
    }

    .whatsapp-float {
        bottom: 20px;
        right: 20px;
    }

        .whatsapp-float a {
            width: 55px;
            height: 55px;
            font-size: 1.8rem;
        }

    .whatsapp-tooltip {
        display: none;
    }

    /* En móvil, content-visibility puede causar saltos de scroll.
       Lo desactivamos en secciones pequeñas para evitar el efecto. */
    .services-section,
    .contact-section {
        content-visibility: visible;
    }
}

/* =============================================
   FAQ Section
   ============================================= */
.faq-section {
    background: var(--white);
    padding: 6rem 0;
    content-visibility: auto;
    contain-intrinsic-size: 0 500px;
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid #e9ecef;
}

.faq-item {
    border-bottom: 1px solid #e9ecef;
}

    .faq-item:last-child {
        border-bottom: none;
    }

.faq-question {
    margin: 0;
}

.faq-toggle {
    width: 100%;
    background: var(--white);
    border: none;
    padding: 1.4rem 1.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease, color 0.2s ease;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--black);
    letter-spacing: 0.3px;
    line-height: 1.4;
}

    .faq-toggle:hover {
        background: #f8f9fa;
        color: var(--primary);
    }

    .faq-toggle:not(.collapsed) {
        background: var(--primary);
        color: var(--white);
    }

        .faq-toggle:not(.collapsed) .faq-icon {
            color: var(--white);
            transform: rotate(45deg);
        }

.faq-icon {
    flex-shrink: 0;
    font-size: 0.85rem;
    color: var(--primary);
    transition: transform 0.3s ease, color 0.2s ease;
}

.faq-answer {
    background: var(--white);
}

.faq-answer-inner {
    padding: 1.2rem 1.8rem 1.5rem;
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.75;
    border-top: 1px solid #e9ecef;
}

@media (max-width: 767px) {
    .faq-section {
        padding: 4rem 0;
    }

    .faq-toggle {
        padding: 1.2rem 1.2rem;
        font-size: 0.9rem;
    }

    .faq-answer-inner {
        padding: 1rem 1.2rem 1.2rem;
    }
}

/* contact-text con h3/h4 — compatibilidad */
.contact-text h3,
.contact-text h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--black);
    line-height: 1.5;
    margin: 0;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--black);
    }
