/* Builder Layout */
.builder-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    padding: 4rem 2rem 6rem;
    align-items: start;
}

@media (max-width: 900px) {
    .builder-container {
        grid-template-columns: 1fr;
        padding: 2rem 1rem;
    }
    .builder-sidebar {
        position: static; /* Remove sticky on mobile */
        margin-top: 2rem;
    }
    .region-tab {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Region Tabs */
.region-tabs {
    display: flex;
    flex-wrap: wrap; /* Ensure tabs wrap on mobile */
    gap: 0.75rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 1rem;
}

.region-tab {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.region-tab.active {
    background: var(--brushed-gold);
    color: var(--deep-emerald);
    border-color: var(--brushed-gold);
}

.region-tab:hover:not(.active) {
    border-color: var(--brushed-gold);
    color: var(--brushed-gold);
}

/* Activity Grid */
.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.activity-card {
    background: var(--emerald-light);
    border: 2px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.activity-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    border-color: rgba(212, 175, 55, 0.5);
}

.activity-card.selected {
    border-color: var(--rasta-green);
    box-shadow: 0 0 20px rgba(27, 94, 32, 0.2);
}

.activity-card.selected::after {
    content: '✓ Added';
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--rasta-green);
    color: var(--white);
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    z-index: 10;
}

.activity-img-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    background-size: cover;
    background-position: center;
    background-color: #000;
}

.activity-img-container::before {
    content: "";
    position: absolute;
    top: -10%; left: -10%; right: -10%; bottom: -10%;
    background-image: inherit;
    background-size: cover;
    background-position: center;
    filter: blur(20px) brightness(0.6);
    z-index: 1;
}

.activity-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 2;
}

.activity-info {
    padding: 1.5rem;
}

.activity-info h4 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.activity-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-main);
    opacity: 0.7;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Sidebar Itinerary */
.builder-sidebar {
    position: sticky;
    top: 100px;
    margin-top: 6.5rem; /* Aligns with activity cards below tabs */
}

.itinerary-card {
    background: var(--emerald-light);
    border: 1px solid var(--brushed-gold);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.itinerary-list {
    list-style: none;
    margin-bottom: 2rem;
}

.itinerary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px dashed rgba(255,255,255,0.1);
    color: var(--white);
}

.itinerary-item-title {
    font-weight: 600;
}

.itinerary-item-meta {
    font-size: 0.8rem;
    opacity: 0.6;
}

.remove-btn {
    background: transparent;
    border: none;
    color: var(--hibiscus-coral);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
}

.remove-btn:hover {
    opacity: 0.8;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--white);
}

/* Progress Stepper */
.stepper-container {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 800px;
    margin: 2rem auto 0;
    padding: 0;
    gap: 4px;
}

.stepper-item {
    position: relative;
    flex: 1;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    background: var(--brushed-gold); /* Gold border for active/completed/hover states */
    color: var(--white);
    z-index: 1;
    cursor: pointer;
}

/* Default inner dark background for inactive steps */
.stepper-item::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: var(--deep-emerald); /* Matches body background */
    z-index: -1;
    transition: all 0.3s ease;
}

/* Step 1: Left rounded, right pointed */
.stepper-item.step-1 {
    clip-path: polygon(0% 0%, calc(100% - 12px) 0%, 100% 50%, calc(100% - 12px) 100%, 0% 100%);
    border-top-left-radius: 24px;
    border-bottom-left-radius: 24px;
    padding-left: 8px;
}
.stepper-item.step-1::before {
    border-top-left-radius: 22px;
    border-bottom-left-radius: 22px;
}

/* Step 2: Left indented, right pointed */
.stepper-item.step-2 {
    clip-path: polygon(0% 0%, calc(100% - 12px) 0%, 100% 50%, calc(100% - 12px) 100%, 0% 100%, 12px 50%);
    padding-left: 16px;
}

/* Step 3: Left indented, right rounded */
.stepper-item.step-3 {
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%, 12px 50%);
    border-top-right-radius: 24px;
    border-bottom-right-radius: 24px;
    padding-left: 16px;
}
.stepper-item.step-3::before {
    border-top-right-radius: 22px;
    border-bottom-right-radius: 22px;
}

/* Stepper States */

/* Inactive State */
.stepper-item.inactive {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.4);
}
.stepper-item.inactive::before {
    background: #0d0d0d;
}

/* Active State (Yellow background, dark text) */
.stepper-item.active {
    background: var(--rasta-yellow);
    color: var(--deep-emerald);
}
.stepper-item.active::before {
    background: var(--rasta-yellow);
}

/* Completed State (Green background, white text) */
.stepper-item.completed {
    background: var(--rasta-green);
    color: var(--white);
}
.stepper-item.completed::before {
    background: var(--rasta-green);
}

/* Hover effect for inactive steps to feel interactive */
.stepper-item.inactive:hover {
    background: var(--brushed-gold);
    color: var(--white);
}
.stepper-item.inactive:hover::before {
    background: rgba(255, 255, 255, 0.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .stepper-container {
        gap: 2px;
        margin: 1.5rem auto 0;
    }
    .stepper-item {
        height: 38px;
        font-size: 0.75rem;
        letter-spacing: 0px;
    }
    .stepper-item.step-1 {
        clip-path: polygon(0% 0%, calc(100% - 8px) 0%, 100% 50%, calc(100% - 8px) 100%, 0% 100%);
        border-top-left-radius: 19px;
        border-bottom-left-radius: 19px;
        padding-left: 4px;
    }
    .stepper-item.step-1::before {
        border-top-left-radius: 17px;
        border-bottom-left-radius: 17px;
    }
    .stepper-item.step-2 {
        clip-path: polygon(0% 0%, calc(100% - 8px) 0%, 100% 50%, calc(100% - 8px) 100%, 0% 100%, 8px 50%);
        padding-left: 10px;
    }
    .stepper-item.step-3 {
        clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%, 8px 50%);
        border-top-right-radius: 19px;
        border-bottom-right-radius: 19px;
        padding-left: 10px;
    }
    .stepper-item.step-3::before {
        border-top-right-radius: 17px;
        border-bottom-right-radius: 17px;
    }
}

