/* =======================================================
   GALERÍA TRAVESÍA REGIL 2026
   CSS principal
   ======================================================= */

body {
    background: #f5f5f5;
    color: #1f1f1f;
}

/* =======================================================
   HEADER
   ======================================================= */

.site-header {
    background: #fff;
    border-bottom: 1px solid #e7e7e7;
    padding: 14px 0;
    margin-bottom: 26px;
    position: relative;
    z-index: 1030;
}

.brand-block {
    min-width: 0;
}

.site-logo {
    max-height: 62px;
    width: auto;
}

.header-title {
    font-size: clamp(1.25rem, 2.3vw, 2rem);
    font-weight: 850;
    letter-spacing: -0.045em;
    margin: 0;
    line-height: 1.05;
}

.header-subtitle {
    font-size: .92rem;
    color: #777;
    margin-top: 3px;
}

/* Si quedara algún h1 antiguo en main, lo ocultamos */
.page-title {
    display: none;
}

/* =======================================================
   INTRO
   ======================================================= */

.intro-block {
    margin-bottom: 18px;
}

.page-intro {
    color: #666;
    margin-bottom: 0;
}

/* =======================================================
   NAVEGACIÓN DE SERIES / PÍLDORAS
   ======================================================= */

.folder-nav-wrap {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: rgba(245,245,245,.92);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0,0,0,.04);
    border-bottom: 1px solid rgba(0,0,0,.08);
    padding: 12px 0 10px;
    margin-bottom: 34px;
}

.folder-pills {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin-bottom: 9px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.folder-pill {
    flex: 0 0 auto;
    border: 1px solid #d5d5d5;
    background: #fff;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: .9rem;
    color: #222;
    text-decoration: none;
    transition: all .18s ease;
    white-space: nowrap;
}

.folder-pill:hover {
    background: #111;
    border-color: #111;
    color: #fff;
}

.folder-pill:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,0,0,.12);
}

.global-counter {
    color: #666;
    font-size: .88rem;
    margin-bottom: 0;
}

/* =======================================================
   GALERÍAS
   ======================================================= */

.gallery-section {
    margin-bottom: 58px;
    scroll-margin-top: 135px;
}

.gallery-head {
    margin-bottom: 20px;
}

.gallery-title {
    font-size: 1.55rem;
    font-weight: 750;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.gallery-count {
    display: inline-block;
    font-size: .9rem;
    font-weight: 400;
    color: #777;
    margin-left: 8px;
}

.gallery-info {
    max-width: 850px;
    color: #555;
    font-size: .98rem;
    line-height: 1.55;
    margin-top: 8px;
    white-space: pre-line;
}

/* =======================================================
   TARJETAS DE FOTO
   ======================================================= */

.photo-card {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: #ddd;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    cursor: pointer;
}

.photo-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform .25s ease, filter .25s ease;
}

.photo-card:hover img {
    transform: scale(1.045);
    filter: brightness(.88);
}

.photo-actions {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    display: flex;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity .2s ease;
    pointer-events: none;
}

.photo-card:hover .photo-actions {
    opacity: 1;
}

.photo-actions button,
.photo-actions a {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 0;
    background: rgba(0,0,0,.58);
    color: #fff;
    text-decoration: none;
    backdrop-filter: blur(4px);
    pointer-events: auto;
}

.photo-actions button:hover,
.photo-actions a:hover {
    background: rgba(0,0,0,.84);
    color: #fff;
}

/* =======================================================
   PIE DE CADA GALERÍA
   ======================================================= */

.gallery-footer {
    margin-top: 22px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.gallery-status {
    color: #666;
    font-size: .95rem;
}

.loading-page {
    text-align: center;
    color: #666;
    padding: 42px 0;
}

/* =======================================================
   BOTÓN SUBIR ARRIBA
   ======================================================= */

.back-to-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1000;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 0;
    background: rgba(0,0,0,.72);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
}

.back-to-top:hover {
    background: #000;
}

/* =======================================================
   MODAL GALERÍA
   ======================================================= */

.modal-content {
    background: #101010;
    color: #fff;
}

.modal-header {
    border-bottom-color: rgba(255,255,255,.1);
}

.modal-image {
    max-width: 100%;
    max-height: 78vh;
    object-fit: contain;
}

.btn-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    border: 0;
    background: rgba(255,255,255,.16);
    color: #fff;
    font-size: 32px;
    line-height: 1;
}

.btn-gallery-nav:hover {
    background: rgba(255,255,255,.32);
}

.btn-gallery-nav.disabled {
    opacity: .32;
    cursor: not-allowed;
}

.btn-prev {
    left: 18px;
}

.btn-next {
    right: 18px;
}

.modal-counter {
    font-size: .9rem;
    color: rgba(255,255,255,.65);
}

.modal-notice {
    position: absolute;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
    background: rgba(0,0,0,.72);
    color: #fff;
    border-radius: 999px;
    padding: 9px 16px;
    font-size: .9rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    z-index: 40;
    white-space: nowrap;
}

.modal-notice.show {
    opacity: 1;
}

/* =======================================================
   RESPONSIVE
   ======================================================= */

@media (max-width: 991px) {
    .photo-card img {
        height: 205px;
    }
}

@media (max-width: 767px) {
    .site-header {
        padding: 12px 0;
        margin-bottom: 20px;
    }

    .brand-block {
        flex: 1 1 100%;
    }

    .site-logo {
        max-height: 50px;
    }

    .header-title {
        font-size: 1.2rem;
    }

    .header-subtitle {
        font-size: .82rem;
    }

    .folder-nav-wrap {
        padding: 10px 0 8px;
        margin-bottom: 26px;
    }

    .folder-pills {
        gap: 7px;
    }

    .folder-pill {
        padding: 6px 12px;
        font-size: .84rem;
    }

    .global-counter {
        font-size: .82rem;
    }

    .gallery-section {
        margin-bottom: 48px;
        scroll-margin-top: 122px;
    }

    .gallery-title {
        font-size: 1.35rem;
    }

    .gallery-count {
        display: block;
        margin-left: 0;
        margin-top: 3px;
    }

    .gallery-info {
        font-size: .94rem;
    }

    .photo-card img {
        height: 175px;
    }

    .photo-actions {
        opacity: 1;
    }

    .gallery-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .btn-gallery-nav {
        width: 44px;
        height: 44px;
        font-size: 26px;
    }

    .btn-prev {
        left: 8px;
    }

    .btn-next {
        right: 8px;
    }

    .modal-header {
        align-items: flex-start;
        gap: 12px;
    }

    .modal-header .btn-light {
        font-size: .82rem;
    }

    .modal-notice {
        bottom: 24px;
        max-width: calc(100vw - 32px);
        white-space: normal;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .photo-card img {
        height: 150px;
    }

    .header-title {
        font-size: 1.08rem;
    }

    .header-subtitle {
        display: none;
    }
}

/* =======================================================
   FOOTER
   ======================================================= */

.site-footer {
    background: #181818;
    color: #fff;
    margin-top: 44px;
    padding: 34px 0;
    border-top: 4px solid rgba(255,255,255,.08);
}

.footer-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 34px;
}

.footer-brand {
    display: flex;
    align-items: center;
}

.footer-logo {
    max-height: 80px;
    width: auto;
    display: block;
    filter: brightness(1.05);
}

.footer-content {
    max-width: 820px;
}

.footer-title {
    font-size: 1.18rem;
    font-weight: 850;
    letter-spacing: -0.025em;
    margin-bottom: 8px;
    color: #fff;
}

.footer-content p {
    color: rgba(255,255,255,.72);
    margin-bottom: 7px;
    line-height: 1.55;
    font-size: .95rem;
}

.footer-content strong {
    color: #fff;
    font-weight: 750;
}

.footer-highlight {
    color: rgba(255,255,255,.88) !important;
    margin-bottom: 0 !important;
}

.footer-action {
    display: flex;
    justify-content: flex-end;
}

.footer-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border-radius: 999px;
    background: #fff;
    color: #181818;
    text-decoration: none;
    font-weight: 750;
    font-size: .9rem;
    padding: 10px 17px;
    white-space: nowrap;
    transition: transform .18s ease, background .18s ease, color .18s ease;
}

.footer-btn:hover {
    background: #f1f1f1;
    color: #000;
    transform: translateY(-1px);
}

.footer-btn i {
    font-size: .85rem;
}

@media (max-width: 991px) {
    .footer-inner {
        grid-template-columns: auto 1fr;
        gap: 22px;
    }

    .footer-action {
        grid-column: 2;
        justify-content: flex-start;
    }
}

@media (max-width: 767px) {
    .site-footer {
        margin-top: 34px;
        padding: 30px 0;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .footer-logo {
        max-height: 38px;
    }

    .footer-title {
        font-size: 1.08rem;
    }

    .footer-content p {
        font-size: .92rem;
    }

    .footer-action {
        grid-column: auto;
        justify-content: flex-start;
    }

    .footer-btn {
        width: 100%;
        justify-content: center;
    }
}