/* ========================================
   CHECKLIST.CSS - Travel Checklist Styling
   ======================================== */

/* CSS Variables for Image Width Control */
:root {
    /* Card 1 (Flu Shot) - Image width */
    --card1-image-width: 350px;
    
    /* Cards 2-5 - Image max width */
    --cards-image-max-width: 100%;
}

/* Page 4 Initial State */
#page4 {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

/* Checklist Page Background */
.checklist-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #E5CDF5 0%, #FFFFFF 100%);
    padding-bottom: 0;
}

/* Checklist Section */
.checklist-section {
    max-width: 600px;
    margin: 0 auto;
    padding: 60px 20px 0;
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
}

.checklist-1 {
    max-width: 715px !important;
}

/* Checklist Header */
.checklist-header {
    text-align: center;
    margin-bottom: 30px;
}

.checklist-main-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: #1E1E1E;
    margin-bottom: 20px;
    line-height: 1.4;
}

/* Progress Indicator */
.checklist-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
}

.progress-line {
    flex: 1;
    height: 2px;
    background-color: #1E1E1E;;
    /* max-width: 150px; */
    max-width: 232px;
}

.progress-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #1E1E1E;
    white-space: nowrap;
}

/* Checklist Cards Container */
.checklist-cards-container {
    position: relative;
    flex: 1;
    margin-bottom: 0;
}

/* Individual Checklist Card */
.checklist-card {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    position: relative;
}

.checklist-card.active {
    display: block;
    opacity: 1;
}

/* Card Badge - Positioned ON TOP of border */
.card-badge {
    background-color: white;
    color: #A080E2;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 20px;
    padding: 12px 30px;
    border-radius: 50px;
    display: inline-block;
    box-shadow: 0 4px 10px rgba(160, 128, 226, 0.2);
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

/* Card Content Wrapper - Complete bordered container INCLUDING navigation */
.card-content-wrapper {
    border: 2px solid #5C4F9D;
    border-radius: 50px 50px 20px 20px;
    background-color: transparent;
    position: relative;
    padding-top: 60px;
    display: flex;
    flex-direction: column;
    min-height: 600px;
}

/* Card Title */
.card-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #5C4F9D;
    margin-bottom: 15px;
    line-height: 1.4;
    padding: 0 30px;
}

/* Card Description */
.card-description {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #2D2D2D;
    line-height: 1.6;
    margin-bottom: 30px;
    padding: 0 100px 0 30px;
}

/* Card 1 Split Layout (Image + Bullet Points) */
.card-content-split {
    display: flex;
    /* gap: 20px; */
    align-items: center;
    /* padding: 0 30px; */
    flex: 1;
}

.content-image {
    flex: 0 0 var(--card1-image-width);
    position: relative;
    top: 8px;
    left: -4px;
}

.content-image img {
    width: 100%;
    height: auto;
    display: block;
}

.content-points {
    flex: 1;
    border: 1px dashed #A080E2;
    border-radius: 10px;
    padding: 20px;
    margin: 0 25px 0 0;
}

.content-points ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.content-points ul li {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #2D2D2D;
    line-height: 1.5;
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
}

.content-points ul li:last-child {
    margin-bottom: 0;
}

.content-points ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #A080E2;
    font-weight: bold;
    font-size: 16px;
}

/* Cards 2-5 Centered Image Layout */
.card-content-centered {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 30px;
    flex: 1;
}

.card-content-centered img {
    max-width: var(--cards-image-max-width);
    height: auto;
    display: block;
}

/* Navigation Buttons - INSIDE the border at bottom */
.checklist-navigation {
    background-color: #5C4F9D;
    padding: 17px 49px;
    display: flex;
    justify-content: center;
    gap: 20px;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    margin: 0 auto 0;
    max-width: 420px;
    margin-top: auto;
    position: relative;
}

.checklist-btn {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 16px;
    padding: 12px 40px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.back-btn {
    background-color: white;
    color: #5C4F9D;
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.next-btn {
    background-color: #A080E2;
    color: white;
}

.next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(160, 128, 226, 0.4);
}

/* ========================================
   WIDTH ADJUSTMENT CLASSES (Optional)
   ======================================== */

/* Adjust Card 1 image width if needed */
.card-content-split.narrow-image .content-image {
    flex: 0 0 40%;
}

.card-content-split.wide-image .content-image {
    flex: 0 0 50%;
}

/* Adjust Cards 2-5 image width if needed */
.card-content-centered.small-image img {
    max-width: 70%;
}

.card-content-centered.medium-image img {
    max-width: 85%;
}

.card-content-centered.large-image img {
    max-width: 100%;
}

/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */

/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */

/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */

@media (max-width: 768px) {
    /* Hide header on mobile */
    .checklist-page .desktop-only {
        display: none !important;
    }

    /* Ensure body doesn't scroll horizontally */
    body {
        overflow-x: hidden;
    }

    /* Section container */
    .checklist-section {
        padding: 30px 0 0;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }

    /* Header with padding */
    .checklist-header {
        margin-bottom: 0;
        padding: 0 15px;
    }

    .checklist-main-title {
        font-size: 20px;
        padding: 0 10px;
        text-align: start;
    }

    .progress-line {
        max-width: 150px;
    }

    .checklist-progress {
        margin-bottom: 30px;
    }

    /* Card badge */
    .card-badge {
        position: static;
        transform: none;
        font-size: 20px;
        padding: 10px 25px;
        margin-bottom: 25px;
        display: block;
        text-align: center;
        max-width: fit-content;
        margin-left: 15px;
    }

    /* Wrapper - Ensure space for fixed footer */
    .card-content-wrapper {
        border: none;
        border-radius: 0;
        padding: 0; /* Space for fixed footer + margin */
        background-color: transparent;
        min-height: auto;
        overflow: visible;
    }

    .card-title {
        font-size: 16px;
        padding: 0 75px 0 15px;
    }

    .card-description {
        font-size: 14px;
        margin-bottom: 25px;
        padding: 0 50px 0 15px;
    }

    /* ===== CARD 1: Side-by-side Layout ===== */
    .checklist-card[data-card="1"] .card-content-split {
        flex-direction: row;
        gap: 0;
        position: relative;
        padding: 0;
        align-items: flex-start;
        margin-bottom: 20px;
        overflow: visible;
    }

    /* Image container - Controlled height */
    .checklist-card[data-card="1"] .content-image {
        flex: 0 0 180px;
        width: 180px;
        height: 280px; /* Fixed controlled height */
        position: relative;
        z-index: 2;
        margin: 0;
    }

    .checklist-card[data-card="1"] .content-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        display: block;
        position: relative;
        left: -24px;
        top: 14px;
        z-index: 2;
        overflow: visible;
    }

    /* Content box overlapping */
    .checklist-card[data-card="1"] .content-points {
        flex: 1;
        border: 1px dashed #A080E2;
        border-radius: 10px;
        background: white;
        padding: 30px 15px 20px;
        z-index: 1;
        position: relative;
        margin: 0 15px 0 -15px;
    }

    .checklist-card[data-card="1"] .content-points ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .checklist-card[data-card="1"] .content-points ul li {
        font-size: 11px;
        margin-bottom: 10px;
        padding-left: 15px;
        line-height: 1.4;
    }

    .checklist-card[data-card="1"] .content-points ul li::before {
        left: 0;
        font-size: 14px;
    }

    /* ===== CARDS 2-5: Centered Images ===== */
    .card-content-centered {
        padding: 0 15px 20px;
        margin-top: 10px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .card-content-centered img {
        width: 450px;
        /* max-width: 450px; */
        height: 377px;
        /* height: auto; */
        display: block;
    }

    /* Fixed Footer - At bottom with margins */
    .checklist-navigation {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 0;
        padding: 15px 20px;
        box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.1);
        background-color: #5C4F9D;
        margin: 0 10px 0 10px;
        z-index: 100;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
    }

    .checklist-btn {
        font-size: 14px;
        padding: 10px 30px;
        min-width: 100px;
    }
}

/* Tablet and larger mobile (401px - 768px) */
@media (min-width: 401px) and (max-width: 768px) {
    .checklist-card[data-card="1"] .content-image {
        flex: 0 0 220px;
        width: 252px;
        height: 329px;
    }

    .checklist-card[data-card="1"] .content-points {
        padding: 35px 20px 20px;
        margin: 50px 15px 0 -60px;
    }

    .checklist-card[data-card="1"] .content-points ul li {
        font-size: 12px;
    }
}

/* Standard mobile (376px - 400px) */
@media (min-width: 376px) and (max-width: 400px) {
    .checklist-card[data-card="1"] .content-image {
        flex: 0 0 180px;
        width: 252px;
        height: 329px;
    }

    .checklist-card[data-card="1"] .content-points ul li {
        font-size: 12px;
    }
}

/* iPhone SE and similar (361px - 375px) */
@media (min-width: 361px) and (max-width: 375px) {
    .checklist-card[data-card="1"] .content-image {
        flex: 0 0 170px;
        width: 252px;
        height: 329px;
    }

    .checklist-card[data-card="1"] .content-points {
        padding: 30px 12px 15px;
        margin: 40px 10px 0 -45px;
    }

    .checklist-card[data-card="1"] .content-points ul li {
        font-size: 12px;
        margin-bottom: 8px;
        padding-left: 12px;
    }
}

/* Very small devices (360px and below) */
@media (max-width: 360px) {
    .checklist-main-title {
        font-size: 18px;
    }

    .progress-line {
        max-width: 100px;
    }

    .card-badge {
        font-size: 18px;
        padding: 8px 20px;
    }

    .card-title {
        font-size: 15px;
    }

    .card-description {
        font-size: 13px;
    }

    .checklist-card[data-card="1"] .content-image {
        flex: 0 0 160px;
        width: 160px;
        height: 260px;
    }

    .checklist-card[data-card="1"] .content-points {
        padding: 25px 10px 15px;
        margin: 35px 10px 0 -40px;
    }

    .checklist-card[data-card="1"] .content-points ul li {
        font-size: 10px;
        margin-bottom: 8px;
        padding-left: 12px;
    }

    .checklist-btn {
        font-size: 13px;
        padding: 8px 25px;
        min-width: 90px;
    }
}