/* Barn Community Design System - Core Look */
:root {
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Raleway', sans-serif;
    --color-primary: #017559;
    --color-primary-dark: #015944;
    --color-text-dark: #2d2d2d;
    --color-text-light: #ffffff;

    /* Glass Background Variables */
    --color-card-bg: rgba(255, 255, 255, 0.65);
    --color-card-bg-hover: rgba(255, 255, 255, 0.85);
    --color-border: rgba(255, 255, 255, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-dark);
    background: url('background-C1rXCpYp.png') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* 2. THE BACKGROUND (Glass Effect) */
.barn-glass-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    max-width: 900px;
    width: 100%;
    position: relative;
    overflow: hidden;
    transition: height 0.3s ease;
    display: block !important;
    z-index: 100000;
}

/* 3. THE SHADOWS (3D Depth) */
.barn-shadow-depth {
    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.08),
        0 4px 6px rgba(0, 0, 0, 0.04),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
    transition: box-shadow 300ms ease, transform 300ms ease;
}

.barn-shadow-depth:hover {
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.12),
        0 8px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

/* General UI Elements */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--color-primary);
}

.logo-container {
    text-align: center;
    margin-bottom: 10px;
}

.logo-container img {
    max-width: 120px;
    height: auto;
}

.btn {
    display: inline-block;
    background-color: var(--color-primary);
    color: white;
    padding: 14px 32px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    margin-top: 20px;
}

.btn:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(1, 117, 89, 0.3);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background-color: rgba(1, 117, 89, 0.1);
}

.step-hero {
    text-align: center;
    padding: 40px 20px;
}

.step-hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.step-hero p {
    font-size: 1.25rem;
    color: #4a4a4a;
    max-width: 600px;
    margin: 0 auto 30px;
}

/* CARDS & CAROUSEL */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card-option {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    overflow: hidden;
    cursor: default;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
}

.card-option.selected {
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 4px rgba(1, 117, 89, 0.1);
}

.carousel-container {
    position: relative;
    height: 200px;
    width: 100%;
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: opacity 0.5s ease;
    opacity: 0;
}

.carousel-slide.active {
    opacity: 1;
}

.card-content {
    padding: 20px;
    cursor: pointer;
}

.card-content h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.card-content p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0;
    line-height: 1.5;
}


/* CARD ACTIONS */
.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.card-actions .btn {
    margin-top: 0;
    flex: 1;
    text-align: center;
    padding: 10px 15px;
    font-size: 0.9rem;
}

/* STICKY FOOTER */
.sticky-footer {
    position: fixed;
    bottom: -100px;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 15px 20px;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    justify-content: center;
}

.sticky-footer.visible {
    bottom: 0;
}

.footer-content {
    max-width: 900px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-content .btn {
    margin: 0;
}

/* DETAILS & FORMS */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--color-primary);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.8);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(1, 117, 89, 0.1);
}

.flex-row {
    display: flex;
    gap: 20px;
}

.flex-col {
    flex: 1;
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .step-hero h1 {
        font-size: 2rem;
    }

    .flex-row {
        flex-direction: column;
        gap: 15px;
    }

    .footer-content {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .footer-content .btn {
        width: 100%;
    }

    .footer-content .btn {
        width: 100%;
    }

    /* Mobile Optimizations */
    .barn-glass-card {
        padding-top: 25px !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
        padding-bottom: 40px !important;
        /* Standard padding, footer is now below */
    }

    .card-actions {
        flex-direction: column;
        gap: 10px;
    }

    .card-actions .btn {
        width: 100%;
    }

    /* Make Footer Static on Mobile */
    .sticky-footer {
        position: relative !important;
        bottom: auto !important;
        transform: none !important;
        box-shadow: none !important;
        padding: 20px !important;
        margin-top: 20px;
        background: transparent !important;
        /* Optional: blend with body or keep white */
        border-top: none !important;
    }

    .sticky-footer.visible {
        bottom: auto !important;
    }

    /* Ensure white background for better contrast if transparent above looks bad */
    .sticky-footer {
        background: rgba(255, 255, 255, 0.9) !important;
        border-radius: 12px;
    }

    .carousel-arrow {
        opacity: 1 !important;
        /* Always show arrows on mobile */
        width: 36px;
        height: 36px;
    }
}

/* MODAL FIX EXTENSION */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200000;
    /* Above everything */
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: white;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-image-header {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    /* SCROLLABLE */
    flex: 1;
}

.modal-title {
    font-size: 1.8rem;
    margin-bottom: 5px;
    color: var(--color-primary);
}

.modal-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-weight: 600;
    color: #666;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.modal-description {
    line-height: 1.6;
    margin-bottom: 20px;
    color: #4a4a4a;
}

/* ITINERARY STYLES */
.summary-box {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* MODAL FOOTER */
.modal-footer {
    padding: 30px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ACTIVITY CARD STYLES */
.activity-card {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    overflow: hidden;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.activity-img-placeholder {
    height: 120px;
    background-color: #ddd;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

.activity-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: all 0.2s;
    z-index: 5;
}

.activity-card.selected .activity-overlay {
    background: var(--color-primary);
    color: white;
}

.activity-content {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: white;
}

.activity-content span {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-text-dark);
}

.activity-card.selected {
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 12px rgba(1, 117, 89, 0.15);
}

.summary-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.summary-thumb {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
}

.day-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
    align-items: baseline;
    /* Allow wrapping */
}

.day-title {
    flex: 0 0 150px;
    /* Fixed width 150px, no grow, no shrink */
    font-weight: 700;
    color: var(--color-primary);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    padding-right: 15px;
    word-wrap: break-word;
}

.day-content {
    flex: 2 1 200px;
    /* Take up twice as much space, min 200px */
    font-size: 0.9rem;
    color: #444;
    line-height: 1.5;
}