/* =========================================
   ESTILOS DE SECCIONES INTERNAS
========================================= */

/* Utilidades generales */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

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

.relative {
    position: relative;
}

.text-gold {
    color: var(--color-gold);
}

.m-0 {
    margin: 0;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mb-4 {
    margin-bottom: 4rem;
}

/* Baroque Dividers */
.baroque-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.baroque-divider::before,
.baroque-divider::after {
    content: '';
    height: 1px;
    width: clamp(50px, 15vw, 150px);
    background: linear-gradient(to right, transparent, var(--color-gold), transparent);
}

.baroque-divider span {
    color: var(--color-gold-light);
    font-size: 2rem;
    line-height: 1;
    filter: drop-shadow(0 0 5px rgba(201, 168, 76, 0.5));
}

/* Background Patterns */
.versailles-pattern-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    opacity: 0.05;
    /* Un patrón SVG sutil tipo damasco/tapiz */
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C9A84C' fill-opacity='1'%3E%3Cpath d='M50 50c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10s-10-4.477-10-10 4.477-10 10-10zM10 10c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10S0 25.523 0 20s4.477-10 10-10zm10 8c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zm40 40c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8z' /%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 0;
}

.versailles-pattern-overlay.light {
    opacity: 0.03;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
    letter-spacing: 4px;
}

.section-subtitle {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    color: var(--color-bone);
    opacity: 0.9;
}

/* --- Countdown Section --- */
.countdown-section {
    background-color: var(--color-black);
    background-image: radial-gradient(circle at center, rgba(107, 15, 26, 0.2) 0%, var(--color-black) 70%);
    padding: 4rem 1rem;
    position: relative;
    border-top: 1px solid rgba(201, 168, 76, 0.2);
    border-bottom: 1px solid rgba(201, 168, 76, 0.2);
    text-align: center;
}

.countdown-container {
    max-width: 800px;
    margin: 0 auto;
}

.countdown-container h3 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.countdown-container .subtitle {
    font-size: 1.1rem;
    margin-bottom: 3rem;
    color: rgba(245, 240, 232, 0.7);
}

.timer {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(20, 10, 10, 0.8);
    padding: 1.5rem;
    border: 2px solid var(--color-gold);
    outline: 1px solid var(--color-gold-light);
    outline-offset: -6px;
    border-radius: 4px;
    min-width: 100px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(107, 15, 26, 0.4);
    backdrop-filter: blur(5px);
    position: relative;
}

.time-block::before {
    /* Esquinas ornamentales */
    content: '⚜';
    position: absolute;
    top: 5px;
    left: 5px;
    font-size: 0.8rem;
    color: var(--color-gold);
    opacity: 0.5;
}

.time-block::after {
    content: '⚜';
    position: absolute;
    bottom: 5px;
    right: 5px;
    font-size: 0.8rem;
    color: var(--color-gold);
    opacity: 0.5;
}

.time-block .number {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--color-bone);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.time-block .label {
    font-size: 0.9rem;
    color: var(--color-gold);
    letter-spacing: 2px;
}

/* --- Album Section --- */
.album-section {
    position: relative;
    border-top: 1px solid rgba(201, 168, 76, 0.2);
    overflow: hidden;
    background-color: var(--color-wine-dark);
}

.album-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4rem;
    margin-top: 3rem;
}

@media (min-width: 900px) {
    .album-content {
        flex-direction: row;
        justify-content: center;
        gap: 6rem;
    }
}

/* Vinyl Container Effect */
.vinyl-container {
    position: relative;
    width: clamp(220px, 65vw, 300px);
    /* Más grande en móviles */
    height: clamp(220px, 65vw, 300px);
    perspective: 1000px;
    margin: 0 auto;
    cursor: pointer;
}

@media (min-width: 900px) {
    .vinyl-container {
        width: 350px;
        height: 350px;
        margin: 0;
    }
}

.album-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
    border-radius: 4px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8), -5px 0 15px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.vinyl-record {
    position: absolute;
    top: 2%;
    left: 2%;
    width: 96%;
    height: 96%;
    background: #050505;
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Grooves effect */
    background-image:
        repeating-radial-gradient(#111 0px,
            #111 2px,
            #050505 3px,
            #050505 4px);
}

.vinyl-center {
    width: 35%;
    height: 35%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #222;
}

/* Desktop: Hover desliza disco a la derecha */
@media (min-width: 901px) {
    .vinyl-container:hover .album-cover {
        transform: translateX(-50px) rotateY(-12deg);
    }

    .vinyl-container:hover .vinyl-record {
        transform: translateX(120px);
        animation: spinRecord 4s linear infinite;
    }
}

/* Móvil: el disco siempre asoma por debajo de la portada */
@media (max-width: 900px) {
    .vinyl-container {
        margin-bottom: 6rem;
        /* espacio para el disco que asoma */
    }

    .album-cover {
        transform: translateY(-20px) rotateX(8deg);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.9);
    }

    .vinyl-record {
        transform: translateY(90%);
        animation: spinRecord 6s linear infinite;
    }
}

.album-info {
    text-align: center;
    max-width: 500px;
    z-index: 3;
    position: relative;
}

@media (min-width: 900px) {
    .album-info {
        text-align: left;
    }
}

.block-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 2.5rem;
}

/* --- Tour Section --- */
.tour-section {
    background: var(--color-black);
    position: relative;
}

.tour-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-top: 3rem;
    position: relative;
    z-index: 1;
}

@media (min-width: 900px) {
    .tour-grid {
        grid-template-columns: 1.5fr 1fr;
    }
}

.tour-card {
    position: relative;
    padding: 4rem 3rem;
    background: linear-gradient(135deg, rgba(30, 10, 10, 0.9) 0%, rgba(10, 10, 10, 0.95) 100%);
    border: 3px solid var(--color-gold);
    outline: 1px solid var(--color-gold-light);
    outline-offset: -10px;
    border-radius: 2px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
}

.tour-card.main-card {
    border-width: 4px;
    outline-offset: -12px;
    box-shadow: 0 0 30px rgba(201, 168, 76, 0.2), inset 0 0 40px rgba(107, 15, 26, 0.3);
}

.tour-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(201, 168, 76, 0.25);
}

.tour-card .card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(201, 168, 76, 0.1), transparent 60%);
    z-index: 0;
}

.tour-card .badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.4rem 1rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 20px;
    z-index: 2;
}

.badge.available {
    background: var(--color-wine);
    color: white;
    box-shadow: 0 0 10px rgba(139, 26, 42, 0.5);
}

.card-content {
    position: relative;
    z-index: 1;
}

.card-content h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.card-content .venue {
    font-size: 1.5rem;
    color: var(--color-bone);
    margin-bottom: 0.5rem;
}

.card-content .date {
    font-size: 1.1rem;
    color: rgba(245, 240, 232, 0.6);
    margin-bottom: 2rem;
}

.btn-secondary {
    display: inline-block;
    padding: 1rem 2rem;
    background: transparent;
    border: 1px solid var(--color-gold);
    color: var(--color-gold);
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--color-gold);
    color: var(--color-black);
}

/* --- Dresscode Section --- */
.dresscode-section {
    position: relative;
    background-color: var(--color-wine-dark);
    overflow: hidden;
}

.velvet-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(ellipse at center, transparent 0%, rgba(10, 10, 10, 0.8) 100%),
        repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.05) 0px, rgba(0, 0, 0, 0.05) 2px, transparent 2px, transparent 4px);
    opacity: 0.8;
    z-index: 0;
}

.dresscode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    z-index: 1;
    position: relative;
}

.dresscode-card {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    border: 4px solid var(--color-gold);
    outline: 2px solid var(--color-wine-dark);
    outline-offset: -8px;
    border-radius: 2px;
    cursor: pointer;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.9);
}

.dresscode-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.dresscode-card:hover img {
    transform: scale(1.1);
}

.dresscode-card .card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem 1rem 1rem;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.9), transparent);
    text-align: center;
}

.dresscode-card .card-overlay span {
    font-size: 1.2rem;
    color: var(--color-gold);
    letter-spacing: 2px;
}

/* --- Gallery Section --- */
.gallery-section {
    background: var(--color-black);
    position: relative;
    overflow: hidden; /* contiene el marco barroco que sobresale */
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
        max-width: 360px;
        margin: 0 auto;
    }
}

.gallery-item {
    position: relative;
    overflow: visible;
    /* permite que el marco PNG sobresalga */
    border-radius: 2px;
    aspect-ratio: 3/4;
    /* todas iguales */
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9);
    transition: transform 0.4s ease;
}

.gallery-item:hover {
    transform: translateY(-6px) scale(1.02);
}

.gallery-item img:not(.baroque-frame-overlay) {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease, filter 0.6s ease;
    filter: grayscale(10%) contrast(1.1);
    display: block;
    border-radius: 2px;
}

.gallery-item:hover img:not(.baroque-frame-overlay) {
    transform: scale(1.04);
    filter: grayscale(0%) contrast(1.2) brightness(1.05);
}

/* Marco barroco PNG superpuesto */
.baroque-frame-overlay {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    object-fit: fill;
    pointer-events: none;
    z-index: 3;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.8));
}

/* Foto dentro del marco — inset para que quede dentro de la apertura del frame */
.gallery-photo {
    position: absolute;
    top: 8%;
    left: 8%;
    width: 84%;
    height: 84%;
    overflow: hidden;
    z-index: 1;
}

.gallery-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease, filter 0.6s ease;
    filter: grayscale(10%) contrast(1.1);
    display: block;
}

.gallery-item:hover .gallery-photo img {
    transform: scale(1.05);
    filter: grayscale(0%) contrast(1.2) brightness(1.05);
}


.hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover .hover-overlay {
    opacity: 1;
}

/* --- Footer --- */
.footer {
    background: var(--color-black);
    padding: 4rem 2rem;
    border-top: 1px solid rgba(201, 168, 76, 0.2);
}

.logo-large {
    font-size: 3rem;
    letter-spacing: 4px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border: 1px solid var(--color-gold);
    border-radius: 50%;
    color: var(--color-gold);
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 700;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--color-gold);
    color: var(--color-black);
    transform: translateY(-3px);
}

/* Botón Volver Arriba */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(10, 10, 10, 0.85);
    border: 1px solid var(--color-gold);
    color: var(--color-gold);
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
    backdrop-filter: blur(6px);
    box-shadow: 0 0 15px rgba(201, 168, 76, 0.3);
    pointer-events: none;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:hover {
    background: var(--color-gold);
    color: var(--color-black);
    box-shadow: 0 0 25px rgba(201, 168, 76, 0.7);
}

/* Nav link activo */
.nav-link--active {
    color: var(--color-gold) !important;
    opacity: 1 !important;
}

.nav-link--active::after {
    width: 100% !important;
}

.legal {
    color: rgba(245, 240, 232, 0.5);
    font-size: 0.9rem;
}

/* Responsividad general para componentes */
@media (max-width: 768px) {
    .timer {
        gap: 1rem;
    }

    .time-block {
        padding: 1rem;
        min-width: 70px;
    }

    .time-block .number {
        font-size: 2rem;
    }

    .dresscode-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .dresscode-grid {
        grid-template-columns: 1fr;
    }
}

/* Prevenir flicker del back-to-top en carga inicial */
.back-to-top {
    transition: none !important;
}
body.page-loaded .back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease !important;
}