/* Vineyard Hero Widget Styles */

.vineyard-hero-section {
    position: relative;
    min-height: 600px;
    overflow: hidden;
}

/* Background Images with Ken Burns Effect */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    will-change: transform;
}

.bg-image.active {
    opacity: 1;
    z-index: 2;
    animation: kenburns var(--kenburns-speed, 20s) ease-in-out infinite alternate;
}

@keyframes kenburns {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(var(--kenburns-scale, 1.1));
    }
}

/* Dark Overlay */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
}

/* Main Content Container */
.hero-content {
    position: relative;
    z-index: 4;
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

/* Left Side - Text Content */
.text-content {
    flex: 1;
    max-width: 600px;
    color: white;
    position: relative;
    min-height: 400px;
}

.slide-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 1s ease-in-out, transform 1s ease-in-out;
    pointer-events: none;
    visibility: hidden;
}

.slide-text.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    visibility: visible;
    z-index: 2;
}

.slide-text.exit {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
}

.eyebrow {
    font-size: 14px;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-weight: 400;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-text.active .eyebrow {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

.vineyard-hero-heading {
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.1;
    margin-bottom: 24px;
    font-weight: 400;
    letter-spacing: -1px;
    overflow: hidden;
}

/* Blurred Staggered Word Effect */
.word {
    display: inline-block;
    margin-right: 0.3em;
    opacity: 0;
    filter: blur(10px);
    transform: translateY(20px);
}

/* Remove any margin from first word and ensure no leading space */
.vineyard-hero-heading .word:first-child {
    margin-left: 0 !important;
}

.slide-text.active .word {
    animation: wordReveal 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes wordReveal {
    to {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);
    }
}

.italic-accent {
    font-style: italic;
}

.subtext {
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.6;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-text.active .subtext {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 1.8s;
}

.cta-button {
    display: inline-block;
    padding: 18px 45px;
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
    border-style: solid;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
}

.slide-text.active .cta-button {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease 2.2s, transform 0.6s ease 2.2s, background 0.3s ease, color 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
}

/* Right Side - Card Slider with Infinite Loop */
.card-slider-container {
    flex: 1;
    max-width: 550px;
    position: relative;
    align-self: flex-end;
    margin-bottom: 60px;
    display: flex;
    flex-direction: column;
}

.slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    order: 2;
}

.slider-arrow {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-arrow:hover {
    transform: scale(1.2);
}

.slider-counter {
    font-size: 14px;
    letter-spacing: 2px;
    font-weight: 400;
}

.card-slider-wrapper {
    position: relative;
    overflow: hidden;
    padding: 20px 0;
    order: 1;
}

.card-slider {
    display: flex;
    gap: 20px;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slide-card {
    min-width: calc((100% - 20px) / 2);
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.slide-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}

.slide-card.active {
    transform: scale(1.02) translateY(-3px);
}

.card-image {
    width: 100%;
    padding-top: 120%;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: transform 0.6s ease;
}

.slide-card:hover .card-image {
    transform: scale(1.05);
}

.card-content {
    padding: 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 100%);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.card-subtitle {
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.9;
}

/* Bottom Repeating Image */
.bottom-repeating-image {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 5;
    background-repeat: repeat-x;
    background-position: center;
    background-size: auto 100%;
    pointer-events: none;
}

/* Responsive Design */
/* Tablet View (769px - 1024px) - Text on top, 2 cards on bottom */
@media (max-width: 1024px) and (min-width: 769px) {
    .vineyard-hero-section {
        height: 100vh;
    }

    .hero-content {
        flex-direction: column;
        justify-content: space-between;
        padding: 40px 30px;
        height: 100%;
    }

    .text-content {
        max-width: 100%;
        text-align: center;
        flex: 0 0 auto;
    }

    .card-slider-container {
        max-width: 100%;
        width: 100%;
        flex: 0 0 auto;
        align-self: center;
        margin-bottom: 0;
    }

    .slide-card {
        min-width: calc((100% - 20px) / 2);
    }

    /* Reduce card height on tablet */
    .card-image {
        padding-top: 100%;
    }
}

/* Mobile View (≤768px) - Text on top, 1 card on bottom */
@media (max-width: 768px) {
    .vineyard-hero-section {
        min-height: 100vh;
        height: auto;
    }

    .hero-content {
        flex-direction: column;
        justify-content: flex-start;
        padding: 40px 20px 30px;
        min-height: 100vh;
    }

    .text-content {
        max-width: 100%;
        width: 100%;
        text-align: center;
        flex: 0 0 auto;
        padding: 0 10px;
        min-height: auto;
    }

    .card-slider-container {
        max-width: 100%;
        width: 100%;
        flex: 0 0 auto;
        align-self: center;
        margin-bottom: 0;
        margin-top: auto;
    }

    .card-slider {
        gap: 0;
    }

    .vineyard-hero-heading {
        font-size: clamp(32px, 8vw, 48px);
        margin-bottom: 16px;
    }

    .subtext {
        font-size: clamp(14px, 3vw, 18px);
        margin-bottom: 30px;
        line-height: 1.5;
    }

    .slide-card {
        min-width: 100%;
    }

    /* CRITICAL FIX: Reduce card height on mobile */
    .card-image {
        padding-top: 85%;
    }

    .card-content {
        padding: 14px;
    }

    .card-title {
        font-size: 15px;
    }

    .card-subtitle {
        font-size: 11px;
    }

    .cta-button {
        padding: 14px 30px;
        font-size: 12px;
    }

    .eyebrow {
        font-size: 12px;
        letter-spacing: 2px;
        margin-bottom: 12px;
    }

    .slider-controls {
        margin-top: 20px;
    }
}

@media (max-width: 480px) {
    .hero-content {
        padding: 30px 15px 20px;
    }

    .vineyard-hero-heading {
        font-size: 28px;
        letter-spacing: -0.5px;
    }

    .eyebrow {
        font-size: 11px;
        letter-spacing: 2px;
    }

    .slider-controls {
        gap: 15px;
        margin-top: 15px;
    }

    .hero-content {
        padding: 30px 15px 20px;
        gap: 15px;
    }

    /* Even smaller cards on very small screens */
    .card-image {
        padding-top: 75%;
    }

    .subtext {
        font-size: 14px;
        margin-bottom: 25px;
    }
}

/* Print Styles */
@media print {
    .vineyard-hero-section {
        page-break-inside: avoid;
    }

    .slider-controls,
    .bottom-repeating-image {
        display: none;
    }
}