/* ===========================================
   RESPONSIVE DESIGN - Mobile & Tablet
   =========================================== */

/* ---------- Menú Hamburguesa (solo móvil) ---------- */
.nav__toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.nav__toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--color-text-inverted);
    transition: all var(--transition-normal);
    border-radius: 2px;
}

.nav__toggle--active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.nav__toggle--active span:nth-child(2) {
    opacity: 0;
}

.nav__toggle--active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ---------- Tablet (1024px y menos) ---------- */
@media screen and (max-width: 1024px) {
    :root {
        --container-max: 960px;
        --font-size-display: 5rem;
        --font-size-hero: 4rem;
    }

    .nav__link {
        padding: 0 var(--spacing-sm);
        font-size: 0.8125rem;
    }

    .logo img,
    .logo svg {
        height: 50px;
    }
}

/* ---------- Mobile Large (768px y menos) ---------- */
@media screen and (max-width: 768px) {
    :root {
        --font-size-display: 3.5rem;
        --font-size-hero: 3rem;
        --font-size-3xl: 2rem;
        --font-size-2xl: 1.75rem;
        --font-size-xl: 1.5rem;
        --spacing-2xl: 3rem;
        --spacing-xl: 2rem;
    }

    /* Header móvil */
    .header__container {
        padding: 0 var(--spacing-md);
    }

    .logo {
        padding: 0;
    }

    .logo img,
    .logo svg {
        height: 45px;
    }

    /* Menú hamburguesa visible */
    .nav__toggle {
        display: flex;
    }

    /* Navegación móvil */
    .nav {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        width: 280px;
        height: calc(100vh - var(--header-height));
        background-color: var(--color-primary);
        transition: right var(--transition-slow);
        overflow-y: auto;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    }

    .nav--open {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        padding: var(--spacing-lg) 0;
    }

    .nav__item {
        height: auto;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav__link {
        padding: var(--spacing-md) var(--spacing-lg);
        justify-content: flex-start;
        text-align: left;
    }

    .nav__link::after {
        display: none;
    }

    /* Secciones */
    .section {
        padding: var(--spacing-xl) 0;
    }

    .section--hero {
        min-height: 70vh;
    }

    .section--featured {
        min-height: 50vh;
    }

    /* Hero */
    .hero__content {
        max-width: 100%;
    }

    .heading-display {
        font-size: var(--font-size-display);
        line-height: 1.1;
    }

    .hero__description {
        font-size: var(--font-size-lg);
    }

    /* Títulos con decoración */
    .section-title {
        gap: var(--spacing-sm);
    }

    .section-title__text {
        font-size: var(--font-size-xl);
    }

    .section-title__line {
        max-width: 50px;
    }

    .heading-hero {
        font-size: var(--font-size-hero);
    }

    /* Logo grid */
    .logo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }

    .logo-grid__item {
        min-height: 100px;
    }

    /* Footer */
    .footer__main {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        text-align: center;
    }

    .footer__section {
        align-items: center;
    }

    .footer__bottom {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }

    /* Texto rotado oculto en móvil */
    .rotated-text {
        display: none;
    }

    /* Social links */
    .social-links {
        justify-content: center;
    }

    /* Clients intro */
    .clients__intro {
        font-size: var(--font-size-sm);
        padding: 0 var(--spacing-md);
    }
}

/* ---------- Mobile Small (480px y menos) ---------- */
@media screen and (max-width: 480px) {
    :root {
        --font-size-display: 2.5rem;
        --font-size-hero: 2.25rem;
        --font-size-3xl: 1.75rem;
        --font-size-2xl: 1.5rem;
        --font-size-xl: 1.25rem;
        --spacing-xl: 1.5rem;
    }

    .logo img,
    .logo svg {
        height: 40px;
    }

    .container {
        padding: 0 var(--spacing-md);
    }

    .section {
        padding: var(--spacing-lg) 0;
    }

    .section--hero {
        min-height: 60vh;
    }

    .heading-display {
        font-size: var(--font-size-display);
    }

    .heading-hero {
        font-size: var(--font-size-hero);
    }

    .hero__description {
        font-size: var(--font-size-base);
    }

    .section-title__text {
        font-size: var(--font-size-lg);
        white-space: normal;
    }

    .clients__heading {
        font-size: var(--font-size-2xl);
    }

    .clients__intro br {
        display: none;
    }

    /* Logo grid en una columna para móviles muy pequeños */
    .logo-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .logo-grid__item {
        min-height: 80px;
    }

    /* Botones más pequeños */
    .btn {
        font-size: 0.75rem;
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    /* Vector logo más pequeño */
    .vector-logo img {
        width: 80px;
        height: auto;
    }

    /* Footer links más pequeños */
    .footer__link {
        font-size: var(--font-size-xs);
    }

    .footer__copyright {
        font-size: 0.75rem;
    }
}

/* ---------- Landscape móvil ---------- */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .section--hero {
        min-height: 100vh;
    }

    .section--featured {
        min-height: 100vh;
    }
}

/* ---------- Utilidades responsive ---------- */
@media screen and (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

@media screen and (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}
