/* Galería de Fotos */
.galeria-fotos-page {
    background-color: #000;
    color: #fff;
    padding-top: 90px;
    min-height: 100vh;
    font-family: 'Montserrat', sans-serif;
}

.galeria-container {
    width: min(1400px, 95vw);
    margin: 0 auto;
    padding-bottom: 80px;
}

/* Banner */
.galeria-banner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, rgba(227, 64, 40, 0.15), rgba(0, 0, 0, 0.95));
    border-radius: 16px;
    margin: 0 auto 48px;
    width: min(1400px, 95vw);
    overflow: hidden;
}

.galeria-banner__overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(227, 64, 40, 0.2), transparent 70%);
    z-index: 0;
}

.galeria-banner__content {
    position: relative;
    z-index: 1;
    padding: 48px 24px;
    max-width: 640px;
}

.galeria-banner__eyebrow {
    letter-spacing: 3.2px;
    text-transform: uppercase;
    color: #e34028;
    margin-bottom: 13px;
    font-size: 0.82rem;
    font-weight: 800;
}

.galeria-banner__title {
    font-size: clamp(2.2rem, 4.5vw, 3.1rem);
    text-transform: uppercase;
    letter-spacing: 4.8px;
    margin-bottom: 15px;
    line-height: 1.08;
    font-weight: 900;
}

.galeria-banner__subtitle {
    font-size: 0.95rem;
    color: #d6d6d6;
    line-height: 1.5;
    font-weight: 400;
}

/* Sección de evento */
.galeria-event {
    margin-bottom: 60px;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(227, 64, 40, 0.3);
}

.event-header__content {
    flex: 1;
}

.event-title {
    font-size: 1.8rem;
    color: #fff;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 800;
}

.event-meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 0.95rem;
    color: #c0c0c0;
}

.event-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.event-meta i {
    color: #e34028;
    font-size: 0.9rem;
}

.event-date,
.event-location {
    font-weight: 600;
}

.event-photo-count {
    background: rgba(227, 64, 40, 0.15);
    padding: 12px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    border: 1px solid rgba(227, 64, 40, 0.3);
}

.event-photo-count i {
    color: #e34028;
}

/* Grid de fotos */
.photos-grid {
    margin-bottom: 40px;
}

.photo-card-wrapper--hidden,
.photo-card-wrapper--stack {
    display: none;
}

.photo-stacks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: clamp(24px, 4vw, 48px);
    margin: clamp(32px, 5vw, 72px) 0;
}

.photo-stack-wrapper {
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: clamp(18px, 3vw, 32px);
    margin: 0;
    overflow: visible;
}

.photo-stack {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 12px;
    overflow: visible;
    background: #0d0d0d;
    border: 1px solid rgba(227, 64, 40, 0.3);
    color: #fff;
    min-height: 100%;
    box-shadow: 0 10px 24px rgba(227, 64, 40, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo-stack:hover {
    box-shadow: 0 16px 32px rgba(227, 64, 40, 0.25);
}

.photo-stack:focus-within {
    outline: 2px solid rgba(227, 64, 40, 0.6);
    outline-offset: 4px;
}

.photo-stack__preview {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: visible;
    padding: clamp(18px, 3vw, 32px);
}


.photo-stack__layer {
    position: absolute;
    inset: 24px;
    border-radius: 22px;
    overflow: visible;
    box-shadow: 0 20px 32px rgba(0, 0, 0, 0.45);
    background: #111;
    transform-origin: center;
    transition: transform 0.45s ease, opacity 0.35s ease;
}


.photo-stack__layer[data-layer="1"] {
    z-index: 3;
    transform: translate(-3px, -5px) rotate(-2deg) scale(1.01);
}

.photo-stack__layer[data-layer="2"] {
    z-index: 2;
    transform: translate(6px, 3px) rotate(1.5deg) scale(0.975);
}

.photo-stack__layer[data-layer="3"] {
    z-index: 1;
    transform: translate(10px, 8px) rotate(-3deg) scale(0.96);
}

.photo-stack__layer img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 100%;
    width: auto;
    max-width: none;
    display: block;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}



.photo-stack__layer--hidden {
    opacity: 0;
    pointer-events: none;
}

@keyframes stackFloatPrimary {
    0%, 100% {
        transform: translate(-9px, -15px) rotate(-4deg) scale(1.03);
    }
    45% {
        transform: translate(-11px, -20px) rotate(-3deg) scale(1.04);
    }
    70% {
        transform: translate(-7px, -13px) rotate(-5deg) scale(1.02);
    }
}

.photo-stack__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}


.photo-stack__controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: clamp(14px, 2.8vw, 22px);
    background: rgba(13, 13, 13, 0.96);
    border-radius: 0 0 12px 12px;
    box-shadow: inset 0 1px 0 rgba(227, 64, 40, 0.2);
}


.photo-stack__position {
    font-size: clamp(0.85rem, 2.2vw, 1rem);
    font-weight: 700;
    color: #fff;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    min-width: 82px;
    text-align: center;
}


.photo-stack__nav {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(227, 64, 40, 0.55);
    background: rgba(227, 64, 40, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff775d;
    cursor: pointer;
    transition: all 0.28s ease;
    position: relative;
    z-index: 30;
}

.photo-stack__nav:hover {
    background: rgba(227, 64, 40, 0.95);
    border-color: rgba(227, 64, 40, 0.85);
    color: #fff;
    transform: translateY(-2px) scale(1.08);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
}

.photo-stack__nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: scale(1);
    box-shadow: none;
}

.photo-stack__nav:focus-visible {
    outline: 2px solid rgba(227, 64, 40, 0.75);
    outline-offset: 3px;
}

@media (hover: none) and (pointer: coarse) {
    .photo-stack__controls {
        display: none;
    }
}

.photo-stack__details {
    background: linear-gradient(180deg, rgba(13, 13, 13, 0.98) 0%, rgba(8, 8, 8, 0.95) 100%);
    border-radius: 0 0 12px 12px;
    padding: clamp(16px, 3vw, 24px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid rgba(227, 64, 40, 0.25);
}

.photo-stack__title {
    font-size: clamp(1.1rem, 2.8vw, 1.4rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    margin: 0;
    color: #fff;
}

.photo-stack__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    font-size: 0.92rem;
    color: #d7d7d7;
}

.photo-stack__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.4px;
}

.photo-stack__meta-item i {
    color: #e34028;
}

.photo-stack--disabled {
    opacity: 0.4;
    pointer-events: none;
}

@keyframes heartbeat {
    0%,
    100% {
        transform: scale(1);
    }
    20% {
        transform: scale(1.08);
        box-shadow: 0 0 18px rgba(227, 64, 40, 0.45);
    }
    40% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(227, 64, 40, 0.2);
    }
    60% {
        transform: scale(1.05);
        box-shadow: 0 0 14px rgba(227, 64, 40, 0.35);
    }
    80% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(227, 64, 40, 0.25);
    }
}

/* Modales de Bootstrap personalizados */
.photo-modal .modal-content {
    background: #000;
    border: 1px solid rgba(227, 64, 40, 0.3);
    border-radius: 16px;
}

.photo-modal .modal-header {
    border-bottom: 1px solid rgba(227, 64, 40, 0.3);
    padding: 10px 22px;
}

.photo-modal__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.photo-modal__counter {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #cfcfcf;
    min-width: 60px;
    justify-content: center;
}

.photo-modal__separator {
    opacity: 0.6;
}

.photo-modal__counter.d-none {
    display: none !important;
}

.photo-modal__nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(227, 64, 40, 0.6);
    background: radial-gradient(circle, rgba(227, 64, 40, 0.45), rgba(227, 64, 40, 0.15));
    color: #fff;
    transition: all 0.3s ease;
    animation: heartbeat 2.4s ease-in-out infinite;
}

.photo-modal__nav:hover {
    background: radial-gradient(circle, rgba(227, 64, 40, 0.7), rgba(227, 64, 40, 0.25));
    border-color: rgba(227, 64, 40, 0.8);
    animation-play-state: paused;
}

.photo-modal__nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    animation: none;
}

.photo-modal__nav i {
    font-size: 1.1rem;
}

.photo-modal__actions .btn-close {
    animation: none !important;
    border: none;
    width: auto;
    height: auto;
    padding: 0;
    color: #fff;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.photo-modal__actions .btn-close:hover,
.photo-modal__actions .btn-close:focus {
    opacity: 1;
}

.photo-modal .modal-title {
    font-size: 1.3rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #fff;
}

.photo-modal .modal-body {
    padding: 0;
}

.modal-photo {
    width: 100%;
    height: auto;
    display: block;
}

.modal-caption {
    padding: 20px 24px;
    margin: 0;
    color: #c0c0c0;
    font-size: 1rem;
    line-height: 1.6;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-caption.d-none {
    display: none !important;
}

/* Estado vacío */
.empty-state {
    text-align: center;
    padding: 100px 20px;
    color: #666;
}

.empty-state i {
    font-size: 5rem;
    color: #444;
    margin-bottom: 24px;
    display: block;
}

.empty-state h3 {
    font-size: 1.8rem;
    color: #888;
    margin-bottom: 12px;
    font-weight: 800;
}

.empty-state p {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .galeria-fotos-page {
        padding-top: 63px;
    }

    .galeria-banner {
        margin-bottom: 32px;
    }

    .event-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .event-title {
        font-size: 1.4rem;
    }

    .event-meta {
        gap: 16px;
        font-size: 0.9rem;
    }

    .event-photo-count {
        align-self: flex-start;
    }

    .photos-grid {
        gap: 0.75rem !important;
    }
}

@media (max-width: 480px) {
    .galeria-banner__title {
        letter-spacing: 3px;
    }

    .event-title {
        font-size: 1.2rem;
        letter-spacing: 1px;
    }

    .event-meta {
        flex-direction: column;
        gap: 8px;
    }

    .photos-grid .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}
