/* Reset and Base Styles */
.language-switcher {display:none;}
.wine-finder {
    box-sizing: border-box;
    margin: 0 auto;
    padding: 40px 20px;
    max-width: 1200px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.4;
    color: #333;
    position: relative;
}

.wine-finder * {
    box-sizing: border-box;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Hero Section */
.wine-finder-hero {
    position: relative;
    min-height: 400px;
    padding: 60px 20px;
    text-align: left;
    background-color: #faf7f2;
    border-radius: 8px;
    margin-bottom: 2rem;
    display: flex;
    gap: 2rem;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-headshot {
    flex: 0 0 400px;
    height: 400px;
    overflow: hidden;
    border-radius: 8px;
}

.hero-headshot img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.wine-finder-hero h1 {
    font-family: "Playfair Display", serif;
    color: #E8B883;
    font-style: italic;
    font-size: 4rem;
    line-height: 1.2;
    margin-bottom: 1.3rem;
}

.wine-finder-hero p {
    font-size: 1.25rem;
    color: #333;
    max-width: 600px;
    margin: 0 0 2rem;
    line-height: 1.4;
}

.wine-finder-start-button {
    display: inline-block;
    padding: 18px 40px;
    font-size: 1.2rem;
    color: #fff;
    background-color: #722F37;
    border: 3px solid #e8b883;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.wine-finder-start-button:hover {
    background-color: #8B4E57;
    text-decoration: none;
    color: #fff;
}

/* Language Link */
.language-link {
    display: block;
    margin-top: 1rem;
    color: #722F37;
    text-decoration: none;
    font-size: 1rem;
    font-style: italic;
    transition: color 0.3s ease;
}

.language-link:hover {
    color: #8B4E57;
    text-decoration: underline;
}

/* View All Wines Link */
.view-all-wines {
    text-align: center;
    margin-top: 1.5rem;
}

.view-all-wines .language-link {
    display: inline-block;
    margin: 0;
}

/* Path Selection Layout */
#path-content-container {
    display: grid;
    grid-template-columns: 66% 33%;
    gap: 1rem;
    background-color: inherit;
}

.path-content-left {
    display: flex;
    flex-direction: column;
    min-height: 400px;
    padding-right: 2rem;
    z-index: 2;
}

.path-content-right {
    position: relative;
    height: 400px;
}

.path-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.path-button {
    background: #faf7f2;
    border: 3px solid #E8B883;
    padding: 1.5rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
}

.path-button:hover {
    border-color: #722F37;
    transform: translateY(-2px);
}

.path-button .path-icon {
    font-size: 0rem;
    margin-bottom: 1rem;
    display: none;
}

.path-button h3 {
    margin: 0 0 0.5rem;
    color: #2d3436;
    font-size: 1.5rem;
}

.path-button p {
    margin: 0;
    color: #636e72;
    font-size: .7rem;
}

/* Video Containers */
.path-intro-video-container,
.video-container.corner {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    /* background: #f8f9fa; */
}

.path-intro-video-container video,
.video-container.corner video {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    min-width: 70%;
    max-height: 100%;
    width: 60%;
    height: auto;
    object-fit: cover;
    object-position: bottom center;
}

.video-container.corner video {
    bottom: 0px;
}

video.landscape {
    width: auto;
    height: 100%;
    min-width: 100%;
}
/* Steps Interface */
.wine-finder-steps {
    max-width: 1200px;
    margin: 0 auto;
    padding: .5rem;
    background-color: inherit;
}

#step-content-container {
    display: grid;
    grid-template-columns: 66% 33%;
    gap: 1rem;
    background-color: inherit;
}

.step-content-left {
    display: flex;
    flex-direction: column;
    min-height: 400px;
    padding-right: 2rem;
    z-index: 2;
}

.step-content-right {
    position: relative;
    height: 400px;
}

.step-title {
    font-family: "Playfair Display", serif;
    margin: 0 0 4rem;
    color: #9CAF96;
    font-size: 2.5rem;
    text-align: left;
}

/* Options Grid */
.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 3rem;
}

.option-button {
    background: #faf7f2;
    color: #333 !important;
    border: 3px solid #E8B883;
    font-weight: bold;
    font-family: "playfair display";
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.option-button:hover {
    border-color: #722F37;
    transform: translateY(-2px);
}

.option-button.selected {
    background: #722F37;
    border-color: #722F37;
    color: #fff !important;
}

/* Navigation */
.navigation-buttons {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.prev-button,
.next-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "playfair display";
    font-size: 1.5rem;
}

.prev-button {
    background: #d1ddcc;
}

.next-button {
    background: #9CAF96;
}

.prev-button:hover,
.next-button:hover {
    background: #8B9A87;
}

.prev-button:disabled,
.next-button:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Video Controls */
.video-controls {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 10;
    padding: 0.5rem;
    border-radius: 2rem;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-container:hover .video-controls,
.path-intro-video-container:hover .video-controls,
.video-controls:hover {
    opacity: 1;
}

.mute-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.mute-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.mute-button svg {
    fill: currentColor;
    width: 24px;
    height: 24px;
}

/* Muted Indicator */
.muted-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(102, 102, 102, 0.85);
    color: white;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 5px;
    pointer-events: none;
    opacity: 0.9;
    transition: opacity 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.muted-overlay svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.video-container:hover .muted-overlay,
.path-intro-video-container:hover .muted-overlay {
    opacity: 0.7;
}

.unmuted .muted-overlay {
    display: none;
}

.volume-slider {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    transition: all 0.3s ease;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border: none;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.volume-slider::-webkit-slider-thumb:hover,
.volume-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
}
/* Results Section */
.wine-finder-results {
    padding: 2rem 0;
}

.wine-finder-results h2 {
    font-family: "Playfair Display", serif;
    color: #E8B883 !important;
    font-style: italic;
    font-size: 3rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.results-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}
.explanation-content{margin:2rem;font-style:italic;color:#722f37; font-size:1rem;}
/* Wine Result Cards */
.wine-result {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.wine-result:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.wine-result .wine-content {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 2rem;
    align-items: start;
}

.wine-result .wine-image {
    width: 100%;
    height: 300px;
}

.wine-result .wine-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: top center;
}

.wine-result .wine-details {
    display: flex;
    flex-direction: column;
}

.wine-result .wine-name {
    font-family: "Playfair Display", serif;
    color: #722F37 !important;
    margin: 0 0 0.5rem 0;
    line-height: .1;
}

.wine-result .wine-name .brand-name {
    font-size: 1.4rem !important;
    font-weight: 300;
    display: block;
    margin: 0 0 0.25rem;
    color: #722F37 !important;
    font-style: italic;
    line-height: 1;
}

.wine-result .wine-name .varietal-name {
    font-size: 2.3rem;
    display: block;
    margin: 0;
    color: #722F37 !important;
    font-style: italic;
    line-height: 1;
}

.wine-result .wine-origin {
    font-size: 1.1rem;
    color: #9CAF96;
    font-style: italic;
}

.wine-result .wine-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    margin: 0 0 2rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wine-result .taste-profiles {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.4rem;
    justify-content: flex-start;
    width: 100%
}

.wine-result .taste-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 25%
}

.wine-result .taste-profile span {
    color: #aabca3 !important;
    font-size: 0.85rem;
    text-align: center;
}

.wine-result .taste-profile img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    opacity: 0.8;
    transition: all 0.3s ease;
    filter: drop-shadow(0px 1000000px 0 #aabca3);
    transform: translateY(-1000000px);
}

.wine-result .taste-profile:hover img {
    opacity: 1;
}

.wine-result .wine-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.wine-result .learn-more,
.wine-result .find-near-you {
    color: #333;
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: 2px solid #EDC685;
    border-radius: 0px;
    font-family: "Playfair Display", serif;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
}

.wine-result .learn-more:hover,
.wine-result .find-near-you:hover {
    color: #000;
    font-weight: bold;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(114, 47, 55, 0.15);
    text-decoration: none;
    border: 2px solid #722F37;
}

/* Loading State */
.wine-finder-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(250, 247, 242, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #722F37;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* Videos Section */
.videos-section {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.video-field-group {
    margin-bottom: 15px;
}

.video-upload-container {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.video-upload-container input[type="url"] {
    flex: 1;
}

.video-preview-en,
.video-preview-es {
    margin-top: 10px;
    padding: 10px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.video-preview-en video,
.video-preview-es video {
    max-width: 100%;
    height: auto;
}

/* Language Switcher */
.language-button {
    padding: 1px 20px;
    margin-left: 8px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.language-button.active {
    background: #9caf96;
    color: white;
}

/* Only show language switcher in hero section */
.wine-finder-paths .language-switcher,
.wine-finder-steps .language-switcher,
.wine-finder-results .language-switcher {
    display: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .wine-finder {
        padding: 20px 15px;
    }
}

/* Mobile styles */
@media screen and (max-width: 768px) {
    .wine-finder {
        padding: 0;
    }

    /* Hero mobile */
    .wine-finder-hero {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        margin-bottom: 0;
    }

    .hero-content {
        max-width: 100%;
        order: 0;
    }

    .hero-headshot {
        order: 1;
        flex: 0 0 300px;
        width: 300px;
        margin: 2rem auto;
    }

    .wine-finder-hero h1 {
        font-size: 3rem;
    }

    /* Path Selection mobile */
    #path-content-container,
    #step-content-container {
        display: flex;
        flex-direction: column;
        padding: 0;
        gap: 0;
    }

    /* On mobile, we flatten the structure to directly control child order */
    .path-content-left,
    .step-content-left,
    .path-content-right,
    .step-content-right {
        display: contents;
    }

    /* Reset all ordering first */
    h2, .step-title, 
    .path-intro-video-container, .video-container.corner,
    .path-buttons, .options-grid,
    .view-all-wines, .navigation-buttons {
        order: initial;
    }
    
    /* Set specific order for mobile layout */
    h2,
    .step-title {
        margin: 1rem;
        font-size: 2rem;
        order: 1;
    }
    
.wine-finder-steps {
 padding:.5rem;
}
    .path-intro-video-container,
    .video-container.corner {
        height: 300px;
        width: 100%;
        margin: 0;
        order: 2;
    }

    .path-buttons,
    .options-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding: 1rem;
        margin: 0;
        order: 3;
    }
    
    /* Reposition view all wines link on mobile */
    .view-all-wines {
        order: 4;
        width: 100%;
        padding: 0.5rem 1rem 1.5rem;
        margin-top: 0;
    }

    .navigation-buttons {
        /* padding: 1rem; */
        margin: 0;
    }

    .results-container {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .wine-result {
        padding: 1rem;
    }

    .wine-result .wine-content {
        grid-template-columns: 33.333% 65%;
        gap: 0.5rem;
    }

    .wine-result .wine-details {
        gap: 0.75rem;
    }

    .wine-result .wine-name .brand-name {
        font-size: 1rem !important;
    }

    .wine-result .wine-name .varietal-name {
        font-size: 1.6rem;
    }

    .wine-result .taste-profiles {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0.5rem 0;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    .wine-result .taste-profile {
        flex: 0 0 auto;
        gap: 0.25rem;
    }

    .wine-result .taste-profile span {
        font-size: 0.6rem;
        white-space: nowrap;
    }

    .wine-result .wine-actions {
        flex-direction: column;
    }

    .wine-result .learn-more,
    .wine-result .find-near-you {
        width: 100%;
    }
}

@media screen and (max-width: 480px) {
    .path-button {
        padding: 0.4rem;
        text-align: center;
        min-height: 90px;
        max-height: 110px;
    }
    .wine-finder-hero {
        gap: 0rem;
 
    }
    .path-button h3 {
        margin: 0 0 0 .2rem;
        font-size: 1.1rem;
        line-height: 1.4rem;
    }

    .option-button {
        padding: 0.8rem !important;
        font-size: 1.2rem;
        height: 90px;
    }

    .step-title {
        margin: 1rem;
    }
    .path-intro-video-container video, .video-container.corner video {
      min-width: 50%;
      width: 50%;
    }


    .wine-result {
        padding: 1rem;
    }

    .wine-result .wine-image {
        height: 240px;
    }

    .wine-result .wine-name .brand-name {
        font-size: 1.1rem;
    }

    .wine-result .wine-name .varietal-name {
        font-size: 1.4rem;
    }

    .wine-result .taste-profile span {
        font-size: 0.5rem;
    }
}

/* Accessibility */
.wine-finder button:focus,
.wine-finder a:focus {
    outline: 2px solid #722F37;
    outline-offset: 2px;
}

.wine-finder button:focus:not(:focus-visible),
.wine-finder a:focus:not(:focus-visible) {
    outline: none;
}

/* Base video styles */
video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Scrollbar Styles */
.wine-finder ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.wine-finder ::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.wine-finder ::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.wine-finder ::-webkit-scrollbar-thumb:hover {
    background: #555;
}
/* Tablet Portrait Fix */
@media screen and (max-width: 1024px) and (orientation: portrait) {
    .results-container {
        grid-template-columns: 1fr; /* Change to single column for tablet portrait */
        padding: 0 1rem;
        gap: 1rem;
    }

    .wine-result {
        max-width: 100%; /* Ensure wine cards don't overflow */
    }

    .wine-result .wine-content {
        grid-template-columns: 120px 1fr; /* Adjust image size for tablet */
        gap: 1rem;
    }

    .wine-result .wine-image {
        width: 120px;
        height: 240px;
    }
}