.hero-section {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 2rem 0 3rem;
    background: linear-gradient(135deg, #2c1810 0%, #722f37 50%, #8b4513 100%);
    color: #fff;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/wine-hero-bg.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    z-index: 1;
}
.hero-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}
.hero-content {
    text-align: left;
}
.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.95;
    max-width: 500px;
}
.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.hero-products {
    text-align: center;
}
.hero-products-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #f8f8f8;
}
.hero-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}
.hero-product-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
}
.hero-product-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(255,255,255,0.15);
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
}

/* Animation delay support for staggered entrance */
.hero-product-card.animate-in {
    animation-delay: var(--animation-delay, 0ms);
}
.product-image-wrapper {
    position: relative;
    margin-bottom: 1rem;
    aspect-ratio: 1 / 1.3;
    overflow: hidden;
    contain: layout;
}
.product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}
.hero-product-card:hover .product-image-wrapper img {
    transform: scale(1.05);
}
.sale-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e74c3c;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}
.product-info {
    text-align: center;
}
.product-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}
.product-title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}
.product-title a:hover {
    color: #d4af37;
}
.product-price {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #722f37;
}
.product-region {
    font-size: 0.9rem;
    opacity: 0.9;
    font-style: italic;
    color: #d4af37;
}
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    border-radius: 50px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.btn-primary {
    background: linear-gradient(45deg, #722f37, #8b1538);
    color: #fff;
    box-shadow: 0 4px 15px rgba(114, 47, 55, 0.3);
}
.btn-primary:hover {
    background: linear-gradient(45deg, #8b1538, #4a1c20);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(114, 47, 55, 0.4);
    color: #fff;
}
.btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.5);
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.8);
    color: #fff;
    transform: translateY(-2px);
}
.btn-outline {
    background: transparent;
    color: #722f37;
    border: 2px solid #722f37;
}
.btn-outline:hover {
    background: #722f37;
    color: #fff;
    transform: translateY(-2px);
}
.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
}
.countries-section,
.food-pairings-section,
.newsletter-section {
    padding: 80px 0;
}
.countries-section {
    background: linear-gradient(135deg, #faf9f7 0%, #f6f4f1 100%);
}
.food-pairings-section {
    background: linear-gradient(180deg, #fff 0%, #fdfcfb 50%, #f9f7f5 100%);
}
.newsletter-section {
    background: linear-gradient(135deg, #722f37 0%, #2c1810 100%);
    color: #fff;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #3d2c27;
    position: relative;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(45deg, #d4af37, #b8941f);
    border-radius: 2px;
}
.newsletter-section .section-title,
.newsletter-title {
    color: #fff;
}
.section-subtitle {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #6b5b55;
    max-width: 600px;
    margin: 0 auto;
}
.newsletter-section .section-subtitle,
.newsletter-subtitle {
    color: rgba(255,255,255,0.9);
}
.countries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.country-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}
.country-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}
.country-image-wrapper {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    position: relative;
    contain: layout;
}
.country-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.country-card:hover .country-image {
    transform: scale(1.05);
}
.country-info {
    padding: 2rem;
}
.country-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #3d2c27;
}
.country-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #6b5b55;
    margin-bottom: 1.5rem;
}
.country-stats {
    margin-bottom: 1.5rem;
}
.wine-count {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #722f37;
    font-weight: 600;
}
/* Premium Bento Grid for Food Pairings */
.pairings-bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(280px, auto);
    gap: 1.5rem;
}

/* Featured cards span 2 columns */
.pairing-card--featured {
    grid-column: span 2;
    grid-row: span 1;
}

/* Base Card Styles */
.pairing-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    min-height: 300px;
}

.pairing-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 60px rgba(61, 44, 39, 0.25);
}

/* Card Background Layer */
.pairing-card__background {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

.pairing-card__bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.pairing-card:hover .pairing-card__bg-image {
    transform: scale(1.1);
}

/* Gradient Overlay */
.pairing-card__gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.1) 30%,
        rgba(0, 0, 0, 0.6) 70%,
        rgba(0, 0, 0, 0.85) 100%
    );
    transition: opacity 0.4s ease;
}

.pairing-card--featured .pairing-card__gradient {
    /* Fallback gradient for browsers without color-mix support */
    background: linear-gradient(
        135deg,
        rgba(114, 47, 55, 0.85) 0%,
        rgba(61, 28, 32, 0.9) 50%,
        rgba(26, 10, 10, 0.95) 100%
    );
}

@supports (color: color-mix(in srgb, red 50%, blue)) {
    .pairing-card--featured .pairing-card__gradient {
        background: linear-gradient(
            135deg,
            color-mix(in srgb, var(--pairing-accent) 85%, transparent) 0%,
            color-mix(in srgb, var(--pairing-accent) 60%, #1a0a0a) 50%,
            rgba(26, 10, 10, 0.95) 100%
        );
    }
}

.pairing-card:hover .pairing-card__gradient {
    opacity: 0.95;
}

/* Card Content Layer */
.pairing-card__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.75rem;
    color: #fff;
}

/* Card Header */
.pairing-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: auto;
}

.pairing-card__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.pairing-card:hover .pairing-card__badge {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.pairing-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #d4af37, #b8941f);
    border-radius: 50%;
    color: #2c1810;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pairing-card:hover .pairing-card__icon {
    transform: rotate(15deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

/* Card Body */
.pairing-card__body {
    margin-top: auto;
    padding-top: 1.5rem;
}

.pairing-card__title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 0.75rem;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.pairing-card--featured .pairing-card__title {
    font-size: 1.75rem;
}

.pairing-card__description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 1.25rem;
    max-width: 90%;
}

.pairing-card--featured .pairing-card__description {
    max-width: 70%;
}

/* Card Footer / CTA */
.pairing-card__footer {
    margin-top: 0.5rem;
}

.pairing-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50px;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.pairing-card__cta:hover {
    background: #fff;
    color: var(--pairing-accent, #722f37);
    border-color: #fff;
    transform: translateX(4px);
    text-decoration: none;
}

.pairing-card__cta svg {
    transition: transform 0.3s ease;
}

.pairing-card__cta:hover svg {
    transform: translateX(4px);
}

/* Featured Card Enhancements */
.pairing-card--featured {
    min-height: 340px;
}

.pairing-card--featured .pairing-card__content {
    padding: 2rem;
}

.pairing-card--featured .pairing-card__cta {
    padding: 1rem 2rem;
    font-size: 0.9rem;
}

/* Standard Card Adjustments */
.pairing-card--standard {
    min-height: 280px;
}

.pairing-card--standard .pairing-card__description {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Animation - visible by default to prevent CLS */
.pairing-card {
    opacity: 1;
    transform: translateY(0);
    contain: layout style;
}

/* Subtle entrance animation only for users who prefer motion */
@media (prefers-reduced-motion: no-preference) {
    .pairing-card.animate-in {
        animation: pairingCardReveal 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    }

    @keyframes pairingCardReveal {
        from {
            opacity: 0.8;
            transform: translateY(10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Animation delays for staggered effect */
.pairing-card[data-pairing-index="0"] { animation-delay: 0ms; }
.pairing-card[data-pairing-index="1"] { animation-delay: 100ms; }
.pairing-card[data-pairing-index="2"] { animation-delay: 200ms; }
.pairing-card[data-pairing-index="3"] { animation-delay: 250ms; }
.pairing-card[data-pairing-index="4"] { animation-delay: 300ms; }
.pairing-card[data-pairing-index="5"] { animation-delay: 350ms; }
.pairing-card[data-pairing-index="6"] { animation-delay: 400ms; }
.pairing-card[data-pairing-index="7"] { animation-delay: 450ms; }

/* Fallback for browsers without backdrop-filter */
@supports not (backdrop-filter: blur(10px)) {
    .pairing-card__badge {
        background: rgba(60, 40, 35, 0.85);
    }
    .pairing-card__cta {
        background: rgba(60, 40, 35, 0.9);
    }
}
.newsletter-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}
.newsletter-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.newsletter-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}
.newsletter-form {
    margin-bottom: 3rem;
}
.newsletter-form input[type="email"] {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 50px;
    width: 300px;
    margin-right: 1rem;
    outline: none;
}
.newsletter-form button {
    padding: 1rem 2rem;
    font-size: 1rem;
    background: linear-gradient(45deg, #d4af37, #b8941f);
    color: #2c1810;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}
.newsletter-form button:hover {
    background: linear-gradient(45deg, #b8941f, #a0801b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}
.social-title {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: rgba(255,255,255,0.95);
}
.social-links-wrapper {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}
.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255,255,255,0.1);
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
}
.social-link:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
    color: #fff;
}
.social-icon {
    width: 20px;
    height: 20px;
    display: block;
}
.smooth-scroll {
    scroll-behavior: smooth;
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
/* Cards visible by default to prevent CLS */
.country-card,
.hero-product-card {
    opacity: 1;
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    contain: layout style;
}

/* Subtle entrance animation only for users who prefer motion */
@media (prefers-reduced-motion: no-preference) {
    .country-card.animate-in {
        animation: fadeInUp 0.4s ease-out forwards;
    }
    .hero-product-card.animate-in {
        animation: fadeInScale 0.4s ease-out forwards;
    }
}
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 0.5rem;
}
@media (max-width: 1024px) {
    .pairings-bento {
        grid-template-columns: repeat(2, 1fr);
    }
    .pairing-card--featured {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: 1.5rem 0 2rem;
    }
    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-subtitle {
        font-size: 1.1rem;
        max-width: none;
    }
    .hero-actions {
        justify-content: center;
    }
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
    .btn-large {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    .section-title {
        font-size: 2rem;
    }
    .section-subtitle {
        font-size: 1.1rem;
    }
    .countries-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .pairings-bento {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .pairing-card--featured,
    .pairing-card--standard {
        min-height: 260px;
    }
    .pairing-card--featured .pairing-card__content,
    .pairing-card--standard .pairing-card__content {
        padding: 1.5rem;
    }
    .pairing-card--featured .pairing-card__title {
        font-size: 1.5rem;
    }
    .pairing-card--featured .pairing-card__description,
    .pairing-card--standard .pairing-card__description {
        max-width: 100%;
    }
    .country-info {
        padding: 1.5rem;
    }
    .newsletter-form input[type="email"] {
        width: 100%;
        margin-right: 0;
        margin-bottom: 1rem;
    }
    .social-links-wrapper {
        flex-wrap: wrap;
        gap: 1rem;
    }
}
@media (max-width: 480px) {
    .hero-section {
        padding: 1rem 0 1.5rem;
    }
    .hero-container {
        gap: 1.5rem;
    }
    .hero-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    .btn {
        width: 100%;
        max-width: 280px;
    }
    .section-title {
        font-size: 1.75rem;
    }
    .countries-section,
    .food-pairings-section,
    .newsletter-section {
        padding: 50px 0;
    }
    .container {
        padding: 0 15px;
    }
    /* Pairing cards mobile optimization */
    .pairings-bento {
        gap: 1rem;
    }
    .pairing-card--featured,
    .pairing-card--standard {
        min-height: 240px;
    }
    .pairing-card__content {
        padding: 1.25rem;
    }
    .pairing-card__title {
        font-size: 1.25rem;
    }
    .pairing-card--featured .pairing-card__title {
        font-size: 1.35rem;
    }
    .pairing-card__description {
        font-size: 0.875rem;
        -webkit-line-clamp: 2;
    }
    .pairing-card__cta {
        padding: 0.75rem 1.25rem;
        font-size: 0.8rem;
    }
    .pairing-card__badge {
        padding: 0.4rem 0.75rem;
        font-size: 0.7rem;
    }
    .pairing-card__icon {
        width: 32px;
        height: 32px;
    }
    .pairing-card__icon svg {
        width: 16px;
        height: 16px;
    }
}