/*
Theme Name: Kitu San Jose
Theme URI: https://example.com
Author: ST
Description: Tema base para la web de San José del Quinche.
Version: 0.1
Text Domain: kitu-sanjose
*/

/*
Theme Name: Kitu San José
... (tu header actual)
*/

:root {
    --color-primario: #2E6E6E;
    --color-secundario: #E4B35F;
    --color-oscuro: #1e1e1e;
    --color-claro: #ffffff;
    --verde-texto: #00434c;
    --footer-alpha: 0.40;
    --celeste: #27c7e2;
    --color-back: #eff8e3;
    /* opacidad por defecto del footer en home */
    --radius: 14px;
}

:root {
    --font-body: 'Hanken Grotesk', sans-serif;
    --font-title: 'Amatic SC', cursive;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    color: var(--color-oscuro);
    background: var(--color-back);
}

html {
    margin-top: 0 !important;
}

/* ========== HEADER FLOTANTE ========== */
:root {
    --header-h: 84px;
    /* alto escritorio */
    --header-h-sm: 56px;
    /* alto móvil */
}

body:not(.home) {
    padding-top: var(--header-h);
}

@media (max-width: 860px) {
    body:not(.home) {
        padding-top: var(--header-h-sm);
    }
}

.site-header {
    position: fixed;
    /* ¡flotante! */
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--color-back);

    font-family: var(--font-title);
    font-size: 1.8rem;

}

/* Contenedor y menú (los que ya tenías) */
.site-header .container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    /* laterales */
    min-height: var(--header-h);
    /* altura visual */
    display: flex;
    align-items: center;
    gap: 16px;
}

.main-nav {
    margin-left: auto;
}

.main-nav .menu {
    display: flex;
    gap: clamp(18px, 3.2vw, 40px);
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    justify-content: flex-end;
}


.main-nav .menu a {
    color: var(--verde-texto);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 12px 0;
    /* área clicable vertical */
    transition: color .15s ease, border-color .15s ease;
}

.main-nav .menu a:hover,
.main-nav .menu a:focus {
    color: var(--celeste);
}

/* Activo */
.main-nav .menu .current-menu-item>a,
.main-nav .menu .current-menu-ancestor>a {
    color: var(--celeste) !important;
    border: none !important;

}

.main-nav .menu .current-menu-item>a,
.main-nav .menu .current-menu-ancestor>a {
    color: #9ad1c0;
    border-bottom: 2px solid #9ad1c0;
    padding-bottom: 2px;
}

/* Compensación del contenido por header fijo (todas las páginas menos Home) */
body:not(.home) {
    padding-top: var(--header-h);
}

/* Footer global (se sobreescribe en home) */
.site-footer {
    width: 100%;
    text-align: center;
    color: #fff;
    background: #00434ca8;
    padding: 14px 16px;
    font-size: 14px;
}

/* Utilidades */
.btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: var(--radius);
    border: 2px solid #222;
    background: #fff;
    color: #222;
    text-decoration: none;
    font-weight: 600;
    transition: transform .2s ease, background .2s ease;
}

.btn:hover {
    transform: scale(1.04);
}



/* Estado scrolled (opcional, lo activa el JS de abajo) */
.site-header.is-scrolled {
    background: var(--color-back);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .20);
}

/* Toggle móvil si usas el botón hamburguesa */
.menu-toggle {
    display: none;
    width: 40px;
    height: 32px;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 3px;
    margin: 6px 0;
    background: #fff;
}

/* Móvil */
@media (max-width: 860px) {
    body:not(.home) {
        padding-top: var(--header-h-sm);
    }

    .site-header .container {
        min-height: var(--header-h-sm);
        padding: 0 16px;
    }

    .menu-toggle {
        display: block;
        width: 40px;
        height: 32px;
        background: transparent;
        border: 0;
        padding: 0;
        cursor: pointer;
    }

    .menu-toggle span {
        display: block;
        height: 3px;
        margin: 6px 0;
        background: #fff;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(34, 34, 34, .96);
        padding: 10px 16px;
    }

    .main-nav.open {
        display: block;
    }

    .main-nav .menu {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

/* Admin bar (logueado) */
#wpadminbar {
    position: fixed;
    top: 0;
}

body.admin-bar .site-header {
    top: 32px;
}

@media (max-width:782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}

/* Home sin header */
body.home {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* ===== Fullscreen Carousel Viewer ===== */
.carousel-viewer {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .92);
    z-index: 9999;
    display: none;
}

.carousel-viewer.open {
    display: block;
}

.carousel-viewer .cv-viewport {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    outline: none;
}

.carousel-viewer img,
.carousel-viewer video {
    max-height: 100vh;
    max-width: 100%;
    height: auto;
    width: auto;
    object-fit: contain;
    object-position: center center;
    display: block;
    background: #000;
}

/* Botones */
.carousel-viewer .cv-btn {
    position: absolute;
    z-index: 10001;
    /* encima del viewport y de la imagen/video */
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background .15s ease, transform .1s ease;
    user-select: none;
    pointer-events: auto;
    /* asegura que reciben clicks */
}

.carousel-viewer .cv-btn:hover {
    background: rgba(255, 255, 255, .18);
    transform: translateY(-1px);
}

.carousel-viewer .cv-close {
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
}

.carousel-viewer .cv-prev {
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 36px;
    width: 48px;
    height: 48px;
}

.carousel-viewer .cv-next {
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 36px;
    width: 48px;
    height: 48px;
}

.carousel-viewer .cv-idx {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    color: #e0f0ed;
    font-size: 14px;
    letter-spacing: .3px;
    background: rgba(0, 0, 0, .4);
    padding: 6px 12px;
    border-radius: 999px;
}