/* =========================================
   MAISON DISEÑAJE - Shared Pages Styles
   ========================================= */

/* =========================================
   PAGE HERO SECTION
   ========================================= */
.page-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 100px;
}

.page-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.page-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: grayscale(20%);
    animation: heroImageZoom 20s ease-in-out infinite alternate;
}

.page-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.3) 40%, rgba(0, 0, 0, 0.5) 70%, rgba(15, 44, 36, 0.95) 100%),
        radial-gradient(ellipse at 50% 50%, rgba(212, 175, 154, 0.1) 0%, transparent 60%);
}

.page-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 var(--container-padding);
    max-width: 900px;
}

.page-hero-title {
    font-size: clamp(48px, 10vw, 100px);
    font-weight: 300;
    letter-spacing: 10px;
    color: var(--gold-primary);
    margin-bottom: 20px;
    text-shadow: 0 0 60px rgba(212, 175, 154, 0.4);
}

.page-hero-subtitle {
    font-size: clamp(18px, 3vw, 24px);
    font-weight: 300;
    color: var(--cream-soft);
    line-height: 1.8;
    letter-spacing: 1px;
}

/* =========================================
   PAGE INTRO SECTION
   ========================================= */
.page-intro {
    padding: 100px 0 80px;
    position: relative;
    background: var(--brown-deep);
}

.intro-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.intro-text {
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 300;
    color: var(--cream);
    line-height: 1.6;
    margin-bottom: 24px;
}

.intro-text strong {
    color: var(--gold-primary);
    font-weight: 400;
}

.intro-description {
    font-size: 20px;
    font-weight: 300;
    color: var(--cream-soft);
    line-height: 1.8;
    margin-bottom: 20px;
}

.intro-highlight {
    font-size: 20px;
    font-weight: 300;
    font-style: italic;
    color: var(--gold-light);
    line-height: 1.8;
    margin-top: 30px;
}

.intro-highlight strong {
    font-weight: 400;
}

.intro-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
}

/* =========================================
   COLLECTIONS SECTION (Colecciones Page)
   ========================================= */
.collections-section {
    padding: 50px 0 62px;
    background: var(--brown-deep);
}

.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

@media (min-width: 1200px) {
    .collections-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.collection-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.95) 0%, rgba(10, 10, 10, 0.98) 100%);
    border: 1px solid var(--gold-subtle);
    transition: all var(--transition-smooth);
}

.collection-card:hover {
    border-color: var(--gold-primary);
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(212, 175, 154, 0.2);
}

.collection-card-image {
    position: relative;
    height: 280px;
    overflow: hidden;
}

.collection-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.collection-card:hover .collection-card-image img {
    transform: scale(1.08);
}

.collection-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(26, 15, 8, 0.95) 0%, rgba(26, 15, 8, 0.4) 50%, transparent 100%);
}

.collection-card-content {
    padding: 30px;
    position: relative;
    z-index: 1;
    margin-top: -80px;
}

.collection-title {
    font-size: 28px;
    font-weight: 400;
    letter-spacing: 4px;
    color: var(--gold-primary);
    margin-bottom: 12px;
}

.collection-subtitle {
    font-size: 18px;
    font-weight: 400;
    color: var(--cream);
    margin-bottom: 8px;
}

.collection-description {
    font-size: 15px;
    font-weight: 300;
    color: var(--cream-soft);
    font-style: italic;
}

.collection-card-featured {
    grid-column: span 1;
}

@media (min-width: 1200px) {
    .collection-card-featured {
        grid-column: 2;
    }
}

/* =========================================
   CONNECTION SECTION
   ========================================= */
.connection-section {
    padding: 100px 0;
    background: radial-gradient(ellipse at center, rgba(30, 20, 12, 1) 0%, var(--brown-deep) 100%);
}

.connection-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.connection-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 300;
    color: var(--gold-primary);
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.connection-text {
    font-size: 24px;
    font-weight: 300;
    color: var(--cream);
    line-height: 1.6;
    margin-bottom: 20px;
}

.connection-text strong {
    color: var(--gold-light);
    font-weight: 400;
}

.connection-description {
    font-size: 18px;
    font-weight: 300;
    color: var(--cream-soft);
    line-height: 1.8;
}

/* =========================================
   ELYS CTA SECTION
   ========================================= */
.elys-cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, rgba(201, 169, 98, 0.08) 0%, transparent 50%);
    border-top: 1px solid var(--gold-subtle);
    border-bottom: 1px solid var(--gold-subtle);
}

.elys-cta-content {
    text-align: center;
}

.elys-cta-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 300;
    color: var(--cream);
    margin-bottom: 16px;
}

.elys-cta-text {
    font-size: 20px;
    font-weight: 300;
    color: var(--cream-soft);
    line-height: 1.8;
    margin-bottom: 30px;
}

/* =========================================
   DUAL CTA SECTION (Colecciones)
   ========================================= */
.dual-cta-section {
    padding: 100px 0;
    background: radial-gradient(ellipse at center, rgba(30, 20, 12, 1) 0%, var(--brown-deep) 100%);
    border-top: 1px solid var(--gold-subtle);
    border-bottom: 1px solid var(--gold-subtle);
    overflow: hidden;
}

.dual-cta-container {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    gap: 0;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.cta-column {
    padding: 0 60px;
    text-align: center;
    opacity: 0;
    /* Will be handled by intersection observer or specific animation classes */
}

/* Reusing animate-left/right from maison-dual-section if available or defining here */
.cta-column.animate-left {
    animation: slideInLeft 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s forwards;
}

.cta-column.animate-right {
    animation: slideInRight 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.4s forwards;
}

.cta-separator {
    width: 1px;
    height: 100%;
    min-height: 250px;
    background: var(--gold-subtle);
    position: relative;
    opacity: 0.6;
}

/* Decorative dots for separator */
.cta-separator::before,
.cta-separator::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    background: var(--gold-primary);
    border-radius: 50%;
}

.cta-separator::before {
    top: 0;
}

.cta-separator::after {
    bottom: 0;
}

@media (max-width: 900px) {
    .dual-cta-container {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .cta-column {
        padding: 0 20px;
    }

    .cta-separator {
        width: 100%;
        height: 1px;
        min-height: 1px;
    }

    .cta-separator::before {
        left: 0;
        top: 50%;
        transform: translateY(-50%);
    }

    .cta-separator::after {
        right: 0;
        left: auto;
        top: 50%;
        transform: translateY(-50%);
    }
}

/* =========================================
   PAGE CLOSING SECTION
   ========================================= */
.page-closing {
    padding: 120px 0 150px;
    background: var(--brown-deep);
}

.page-closing .closing-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.page-closing .closing-title {
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 300;
    line-height: 1.4;
    margin-bottom: 20px;
}

.page-closing .closing-title span {
    display: block;
    color: var(--cream);
}

.page-closing .closing-title .accent {
    color: var(--gold-primary);
    font-style: italic;
}

.page-closing .closing-text {
    font-size: 20px;
    font-weight: 300;
    color: var(--cream-soft);
    margin-bottom: 40px;
}

.page-closing .closing-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

/* =========================================
   EDITIONS PAGE SPECIFIC STYLES
   ========================================= */
.editions-carousel-section {
    padding: 60px 0;
    background: var(--brown-deep);
}

.editions-carousel {
    max-width: 1000px;
    margin: 0 auto;
}

.carousel-placeholder {
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.8) 0%, rgba(10, 10, 10, 0.9) 100%);
    border: 1px dashed var(--gold-border);
    border-radius: 20px;
    padding: 80px 40px;
    text-align: center;
}

.carousel-message {
    color: var(--cream-soft);
}

.carousel-icon {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--gold-primary);
    opacity: 0.6;
}

.carousel-message h3 {
    font-size: 24px;
    font-weight: 400;
    color: var(--gold-light);
    margin-bottom: 12px;
}

.carousel-message p {
    font-size: 16px;
    font-weight: 300;
    color: var(--cream-soft);
    opacity: 0.8;
}

.editions-description {
    padding: 80px 0;
    background: var(--brown-deep);
}

.description-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.description-text {
    font-size: 22px;
    font-weight: 300;
    color: var(--cream);
    line-height: 1.8;
    margin-bottom: 24px;
}

.description-highlight {
    font-size: 20px;
    font-weight: 300;
    color: var(--gold-light);
    font-style: italic;
    line-height: 1.8;
}

.description-highlight strong {
    font-weight: 400;
}

/* =========================================
   ELYS PAGE SPECIFIC STYLES
   ========================================= */
.elys-hero .page-hero-title {
    letter-spacing: 20px;
    text-shadow: 0 0 80px rgba(212, 175, 154, 0.5);
}

.elys-intro-section {
    padding: 80px 0;
    background: var(--brown-deep);
}

.elys-intro-content {
    text-align: center;
}

.elys-features {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.elys-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.feature-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--gold-border);
    transition: all var(--transition-medium);
}

.elys-feature:hover .feature-icon {
    border-color: var(--gold-primary);
    box-shadow: 0 0 30px rgba(212, 175, 154, 0.3);
}

.feature-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feature-text {
    font-size: 20px;
    font-weight: 400;
    color: var(--gold-light);
    letter-spacing: 1px;
}

.elys-tagline {
    font-size: 24px;
    font-weight: 300;
    color: var(--cream-soft);
    font-style: italic;
}

.elys-philosophy-section {
    padding: 80px 0;
    background: radial-gradient(ellipse at center, rgb(30 20 12 / 0%), var(--brown-deep) 100%);
}

.philosophy-content {
    max-width: 700px;
    margin: 0 auto 40px;
    text-align: center;
}

.philosophy-main {
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 300;
    color: var(--cream);
    line-height: 1.6;
    margin-bottom: 20px;
}

.philosophy-main strong {
    color: var(--gold-primary);
    font-weight: 400;
}

.philosophy-sub {
    font-size: 20px;
    font-weight: 300;
    color: var(--gold-light);
    font-style: italic;
}

.philosophy-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.elys-what-section {
    padding: 100px 0;
    background: var(--brown-deep);
}

.what-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.what-card {
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.8) 0%, rgba(10, 10, 10, 0.9) 100%);
    border: 1px solid var(--gold-subtle);
    border-radius: 20px;
    padding: 40px;
    transition: all var(--transition-smooth);
}

.what-card:hover {
    border-color: var(--gold-primary);
    transform: translateY(-4px);
}

.what-title {
    font-size: 24px;
    font-weight: 400;
    color: var(--gold-primary);
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.what-text {
    font-size: 17px;
    font-weight: 300;
    color: var(--cream-soft);
    line-height: 1.8;
    margin-bottom: 16px;
}

.what-highlight {
    font-size: 17px;
    font-weight: 300;
    color: var(--gold-light);
    font-style: italic;
    line-height: 1.8;
    margin-top: 20px;
}

.what-highlight strong {
    font-weight: 400;
}

/* =========================================
   LA MAISON PAGE SPECIFIC STYLES
   ========================================= */
.maison-about-section {
    padding: 100px 0;
    background: radial-gradient(ellipse at center, rgba(30, 20, 12, 1) 0%, var(--brown-deep) 100%);
}

.about-intro {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-statement {
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 300;
    color: var(--cream);
    line-height: 1.5;
    margin-bottom: 30px;
}

.about-statement strong {
    color: var(--gold-primary);
    font-weight: 400;
}

.about-origin {
    font-size: 22px;
    font-weight: 300;
    color: var(--cream-soft);
    line-height: 1.7;
}

.about-origin strong {
    color: var(--gold-light);
    font-weight: 400;
}

/* =========================================
   MAISON & PHILOSOPHY DUAL SECTION
   ========================================= */
.maison-dual-section {
    padding: 120px 0;
    background: radial-gradient(ellipse at center, rgba(30, 20, 12, 1) 0%, var(--brown-deep) 100%);
    overflow: hidden;
}

.dual-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px;
    align-items: stretch;
}

.info-card {
    background: linear-gradient(135deg, rgba(26, 15, 8, 0.6) 0%, rgba(10, 10, 10, 0.8) 100%);
    border: 1px solid var(--gold-subtle);
    border-radius: 30px;
    padding: 60px 50px;
    position: relative;
    transition: all var(--transition-smooth);
    display: flex;
    flex-direction: column;
    justify-content: center;
    backdrop-filter: blur(10px);
    opacity: 0;
    /* For animation */
}

/* Card Hover Effects */
.info-card:hover {
    transform: translateY(-10px);
    border-color: var(--gold-primary);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.info-card:hover .card-title {
    color: var(--gold-primary);
    text-shadow: 0 0 20px rgba(212, 175, 154, 0.2);
}

.card-title {
    font-size: 36px;
    font-weight: 300;
    color: var(--gold-light);
    margin-bottom: 30px;
    transition: all var(--transition-smooth);
    letter-spacing: 1px;
}

.card-text {
    font-size: 19px;
    font-weight: 300;
    color: var(--cream-soft);
    line-height: 1.8;
    margin-bottom: 20px;
}

.card-highlight {
    font-size: 22px;
    font-weight: 300;
    color: var(--gold-light);
    font-style: italic;
    margin-top: auto;
    /* Push to bottom */
    padding-top: 30px;
    border-top: 1px solid var(--gold-subtle);
}

.card-highlight strong {
    font-weight: 400;
    color: var(--gold-primary);
    display: block;
    font-size: 26px;
    margin-top: 8px;
}

/* Entrance Animations */
.animate-left {
    animation: slideInLeft 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s forwards;
}

.animate-right {
    animation: slideInRight 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.4s forwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 900px) {
    .dual-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .info-card {
        padding: 40px 30px;
    }
}

.maison-process-section {
    padding: 100px 0;
    background: var(--brown-deep);
}

.process-title {
    font-size: 32px;
    font-weight: 400;
    color: var(--gold-primary);
    text-align: center;
    margin-bottom: 16px;
    letter-spacing: 2px;
}

.process-intro {
    font-size: 20px;
    font-weight: 300;
    color: var(--cream-soft);
    text-align: center;
    margin-bottom: 60px;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto 60px;
}

.process-step {
    text-align: center;
    padding: 40px 30px;
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.6) 0%, rgba(10, 10, 10, 0.8) 100%);
    border: 1px solid var(--gold-subtle);
    border-radius: 20px;
    transition: all var(--transition-smooth);
}

.process-step:hover {
    border-color: var(--gold-primary);
    transform: translateY(-4px);
}

.step-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--gold-border);
    transition: all var(--transition-medium);
}

.process-step:hover .step-icon {
    border-color: var(--gold-primary);
    box-shadow: 0 0 40px rgba(212, 175, 154, 0.3);
}

.step-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.step-title {
    font-size: 24px;
    font-weight: 400;
    color: var(--gold-light);
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.step-text {
    font-size: 16px;
    font-weight: 300;
    color: var(--cream-soft);
    line-height: 1.7;
}

.process-closing {
    font-size: 20px;
    font-weight: 300;
    color: var(--gold-light);
    font-style: italic;
    text-align: center;
}

/* =========================================
   ACTIVE NAV LINK
   ========================================= */
.nav-link.active {
    color: var(--gold-primary);
}

.nav-link.active::after {
    width: 100%;
}

/* =========================================
   RESPONSIVE ADJUSTMENTS
   ========================================= */
@media (max-width: 768px) {
    .page-hero {
        min-height: 80vh;
        padding-top: 80px;
    }

    .page-hero-title {
        letter-spacing: 5px;
    }

    .page-intro {
        padding: 60px 0 50px;
    }

    .intro-text {
        font-size: 22px;
    }

    .intro-description,
    .intro-highlight {
        font-size: 17px;
    }

    .collections-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .collection-card-image {
        height: 220px;
    }

    .elys-features {
        gap: 30px;
    }

    .feature-icon {
        width: 80px;
        height: 80px;
    }

    .process-steps {
        grid-template-columns: 1fr;
    }

    .step-icon {
        width: 100px;
        height: 100px;
    }

    .what-content {
        grid-template-columns: 1fr;
    }

    .page-closing {
        padding: 80px 0 100px;
    }

    .closing-buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .elys-features {
        flex-direction: column;
        gap: 24px;
    }

    .collection-title {
        font-size: 24px;
    }
}

/* =========================================
   CAROUSEL STYLES (Migrated from client-form)
   ========================================= */

.carousel-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 20px 60px;
    overflow: hidden;
}

.carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 20px 5px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.carousel::-webkit-scrollbar {
    display: none;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
    border: none;
    color: var(--brown-deep);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 4px 20px rgba(212, 175, 154, 0.4);
    opacity: 1;
}

.carousel-btn:hover {
    background: var(--gold-primary);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 6px 30px rgba(212, 175, 154, 0.6);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-btn.prev {
    left: 5px;
}

.carousel-btn.next {
    right: 5px;
}

/* Carousel Indicators/Dots */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(212, 175, 154, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-dot.active {
    background: var(--gold-primary);
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(212, 175, 154, 0.5);
}

.carousel-dot:hover {
    background: rgba(212, 175, 154, 0.6);
}

.carousel-note {
    font-size: 0.85rem;
    color: var(--cream-soft);
    font-style: italic;
    margin-top: 15px;
    margin-bottom: 40px;
    text-align: center;
    opacity: 0.7;
}

/* ============ FLIP CARDS ============ */
.flip-card {
    flex: 0 0 calc((100% - 40px) / 3);
    min-width: 280px;
    height: 450px;
    perspective: 1000px;
    scroll-snap-align: center;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

@media (max-width: 900px) {
    .flip-card {
        flex: 0 0 calc((100% - 20px) / 2);
    }
}

@media (max-width: 600px) {
    .flip-card {
        flex: 0 0 100%;
    }
}

.flip-card:hover {
    transform: translateY(-5px);
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

/* Touch device flip class */
.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

/* Tablet and Mobile: Disable hover flip, use tap instead (matches JS breakpoint of 1024px) */
@media (max-width: 1023px) {
    .flip-card:hover .flip-card-inner {
        transform: rotateY(0deg);
    }

    .flip-card.flipped .flip-card-inner {
        transform: rotateY(180deg);
    }
}

/* Touch device optimizations - ensures tap-to-flip works on all touch devices regardless of viewport */
@media (hover: none) and (pointer: coarse) {
    .flip-card:hover .flip-card-inner {
        transform: rotateY(0deg) !important;
    }

    .flip-card.flipped .flip-card-inner {
        transform: rotateY(180deg) !important;
    }
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.flip-card-front {
    background: var(--brown-deep);
}

.flip-card-back {
    background: linear-gradient(135deg, rgba(28, 21, 16, 0.98) 0%, rgba(10, 9, 8, 0.98) 100%);
    transform: rotateY(180deg);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    border: 1px solid var(--gold-border);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.card-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Card Images */
.historia-sabor {
    background: url('https://cdn.prod.website-files.com/696741f4daff1fc6ce093366/69674802e6d1e1cb275e4ebf_Entre%20Historia%20y%20Sabor.png') center/cover;
}

.cafe-pablo {
    background: url('https://cdn.prod.website-files.com/696741f4daff1fc6ce093366/696748023f48d4a7f45ab71a_Anado%20el%20Cafe%2C%20Odiando%20a%20Pablo.png') center/cover;
}

.masquerada {
    background: url('https://cdn.prod.website-files.com/696741f4daff1fc6ce093366/69674803eae077b876e9f802_La%20Masquerada.png') center/cover;
}

.noche-blanca {
    background: url('https://cdn.prod.website-files.com/696741f4daff1fc6ce093366/696748032d8d29db306dea44_La%20Noche%20Blanca.png') center/cover;
}

.concorso {
    background: url('https://cdn.prod.website-files.com/696741f4daff1fc6ce093366/6967480282f5796ae6cfa54c_Il%20Concorso.png') center/cover;
}

.historia-familiar {
    background: url('https://cdn.prod.website-files.com/696741f4daff1fc6ce093366/6967480342a4c142634fa785_Entre%20Historia%20y%20Sabor%20-%20Edicion%20familiar.png') center/cover;
}

.card-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 25px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 70%, transparent 100%);
}

.card-label h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    letter-spacing: 1px;
    margin-bottom: 0;
    color: var(--gold-primary);
    line-height: 1.3;
}

.flip-card-back h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    color: var(--gold-primary);
    letter-spacing: 2px;
    margin-bottom: 10px;
    line-height: 1.3;
}

.flip-card-back .temporada {
    font-size: 0.95rem;
    color: var(--gold-light);
    margin-bottom: 12px;
    font-style: italic;
    line-height: 1.5;
}

.flip-card-back .temporada .nota-familia {
    font-size: 0.85rem;
    text-transform: lowercase;
    opacity: 0.8;
}

.flip-card-back .concepto {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--cream-soft);
    margin-bottom: 12px;
    flex-grow: 1;
    align-content: center;
}

.flip-card-back .estado {
    font-size: 0.9rem;
    color: var(--gold-primary);
    padding: 8px 12px;
    background: rgba(212, 175, 154, 0.15);
    border: 1px solid rgba(212, 175, 154, 0.3);
    border-radius: 4px;
    margin-bottom: 15px;
    line-height: 1.5;
}

/* Updated Button Styles for Card Back */
.flip-card-back .btn-primary {
    transform: scale(0.9);
    width: 100%;
}

.flip-card-back .btn-primary .btn-inner {
    font-size: 16px;
    padding: 12px 20px;
}