html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
}

.titulos-seccion-container {
    max-width: 100%;
}

.titulos-seccion-container p {
    display: block;
    width: auto;
    max-width: 500px;
}

.card-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.card-grid > .card {
    width: 100%;
    justify-self: center;
}

.contactanos-container,
.contactanos-mapa {
    min-width: min(320px, 100%);
}

.lista-contactos li a,
.footer-redes ul li a {
    overflow-wrap: anywhere;
}

#captcha-login {
    max-width: 100%;
    overflow-x: auto;
}

.footer-contenido-container img {
    align-self: flex-start;
    width: auto;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}



@media (min-width: 1600px) {
    .tu-guia-container {
        justify-content: center;
        gap: 120px;
    }
}



@media (max-width: 1100px) {
    section {
        padding: 50px 28px;
    }

    .hero-logo-img {
        max-width: 200px;
    }

    .hero-texto {
        padding: 14px;
    }
}



@media (max-width: 900px) {
    header {
        left: var(--page-margin);
        right: var(--page-margin);
        margin-left: 0;

        gap: 12px;
        padding: 8px 14px;
        border-radius: 18px;
    }

    header nav {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 6px;
    }

    .header-btn {
        padding: 8px 10px;
    }

    #tu-guia,
    #salidas,
    #trayectos,
    #expediciones,
    #contactanos {
        scroll-margin-top: 120px;
    }

    section {
        padding: 40px 20px;
    }

    .breadcrumb {
        margin-top: 80px;
    }

    #hero {
        --hero-pt: 100px;
        --hero-px: 20px;
        --hero-pb: 40px;

        padding: var(--hero-pt) var(--hero-px) var(--hero-pb);
    }

    .hero-img {
        width: 100%;
        height: clamp(520px, 110vw, 640px);
        max-height: none;
    }

    .hero-informacion {
        inset: calc(var(--hero-pt) + 16px)
                calc(var(--hero-px) + 16px)
                calc(var(--hero-pb) + 16px);
        justify-content: center;
        gap: 16px;
    }

    .hero-logo-texto {
        flex: 0;
        flex-direction: column-reverse;
        justify-content: center;
        align-items: center;
        gap: 16px;
    }

    .hero-logo-img {
        width: clamp(90px, 22vw, 140px);
        height: auto;
        align-self: center;
    }

    .hero-texto {
        width: 100%;
    }

    .hero-texto h1 {
        margin: 0;
    }

    .hero-botones {
        gap: 10px;
    }

    .hero-btn {
        flex: 1;
        text-align: center;
    }

    .tu-guia-container {
        flex-direction: column;
        align-items: stretch;
        gap: 30px;
    }

    .guia-texto {
        flex: none;
        max-width: none;
    }

    .guia-img {
        flex: none;
        max-width: 100%;
        max-height: 360px;
    }

    #contactanos {
        gap: 40px;
    }

    .contactanos-container {
        width: 100%;
        gap: 28px;
    }

    .contactanos-mapa {
        flex: 1 1 100%;
    }

    .contactanos-mapa iframe {
        aspect-ratio: 4 / 3;
    }

    .footer-contenido-container {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 30px 40px;
    }

    .footer-contenido-container img {
        max-height: 110px;
    }
}



.menu-toggle {
    display: none;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;

    width: 44px;
    height: 44px;
    padding: 0;

    color: white;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;

    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;

    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.3),
        inset 0 -1px 1px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(230, 166, 13, 0.15);

    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
}

.menu-toggle:focus-visible {
    outline: 2px solid var(--orange-2);
    outline-offset: 2px;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.3s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
    header {
        flex-wrap: wrap;
        row-gap: 0;
    }

    .header-logo {
        flex: 1 1 auto;
    }

    .menu-toggle {
        display: inline-flex;
    }

    header nav#menu-principal {
        flex: 1 1 100%;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        justify-content: flex-start;
        gap: 4px;

        max-height: 0;
        margin-top: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;

        transition:
            max-height 0.35s ease,
            margin-top 0.35s ease,
            opacity 0.25s ease,
            visibility 0s linear 0.35s;
    }

    .menu-toggle[aria-expanded="true"] ~ nav#menu-principal {
        max-height: 400px;
        margin-top: 8px;
        opacity: 1;
        visibility: visible;

        transition:
            max-height 0.35s ease,
            margin-top 0.35s ease,
            opacity 0.25s ease,
            visibility 0s;
    }

    header nav#menu-principal .header-btn {
        justify-content: center;
        padding: 14px 16px;
    }
}



@media (max-width: 700px) {
    .expedicion {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 16px;
    }

    .expedicion h3 {
        flex-wrap: wrap;
        gap: 8px 12px;
    }

    .expedicion ul {
        gap: 24px;
        margin: 0;
        padding-left: 0;
    }

    .form-fila {
        grid-template-columns: 1fr;
    }
}



@media (max-width: 600px) {
    :root {
        --page-margin: 10px;
    }

    section {
        padding: 36px 12px;
    }

    #hero {
        --hero-px: 12px;
        --hero-pb: 36px;
    }

    .hero-botones {
        flex-direction: column;
    }

    .hero-btn {
        flex: none;
    }

    #tu-guia,
    #salidas,
    #trayectos,
    #expediciones,
    #contactanos {
        scroll-margin-top: 100px;
    }

    header {
        padding: 6px 10px;
        border-radius: 16px;
    }

    .header-logo-img-pircas {
        width: 48px;
    }

    .pircas-titulo {
        padding: 7px;
    }

    .card img {
        height: 220px;
    }

    .card h3 {
        top: 12px;
        left: 12px;
        max-width: calc(100% - 24px);
        padding: 8px 10px;
    }

    dialog.modal-glass[open] {
        width: 94%;
        max-height: 90dvh;
        padding: 8px;
        border-radius: 18px;
    }

    dialog.modal-glass h3 {
        max-width: calc(100% - 56px);
        padding: 6px 12px;
    }

    .modal-cerrar {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
    }

    .expedicion-informacion {
        padding: 8px;
    }

    .footer-contenido-container {
        flex-direction: column;
        gap: 28px;
    }

    .footer-aclaraciones {
        text-align: center;
    }

    .whatsapp-flotante {
        width: 48px;
        height: 48px;
    }
}



@media (max-width: 360px) {
    .header-logo-img-pircas {
        width: 42px;
    }

    .card img {
        height: 190px;
    }
}



@media (max-height: 480px) {
    header {
        position: absolute;
    }

    dialog.modal-glass[open] {
        max-height: 95dvh;
    }
}



@media (hover: none) {
    .card:hover,
    .btn-detalles:hover,
    .hero-btn:hover,
    .modal-cerrar:hover,
    .whatsapp-flotante:hover,
    .lista-contactos li:hover,
    .footer-redes ul li:hover,
    .footer-secciones li:hover,
    .expedicion ul li:hover {
        transform: none;
    }
}