/* --- Header & Footer Styles --- */
.main-header {
    background-color: #03033A;
    color: #FFFFFF;
    position: sticky; /* Makes it stick to the top */
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-link {
    text-decoration: none; /* Removes underline */
    color: inherit; /* Inherits text color */
    display: block; /* Makes the link fill the header space */
    padding: 15px 40px; 
}

.header-content {
    display: flex;
    justify-content: flex-start; /* Aligns to the left */
    align-items: center;
    width: 100%;
    text-align: left; 
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px; 
    line-height: 1.2;
}

.logo-image {
    height: 50px; 
    width: auto;
    transition: height 0.3s ease; /* Smooth resize on mobile */
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    margin: 0;
    font-size: 1.5rem; 
    font-weight: 700;
    color: #FFFFFF;
    transition: font-size 0.3s ease; /* Smooth resize on mobile */
}

.logo-subtitle {
    margin: 0;
    font-size: 0.9rem; 
    font-weight: 400;
    color: #DDDDDD; 
    transition: font-size 0.3s ease; /* Smooth resize on mobile */
}

.main-footer {
    background-color: #03033A;
    color: #CCCCCC;
    padding: 30px 40px; 
    font-size: 0.9rem;
    line-height: 1.6; 
}

.footer-container {
    display: flex;
    flex-wrap: wrap; /* Allows stacking */
    justify-content: space-between;
    align-items: flex-start; /* Align items to the top */
    gap: 30px;
    margin-bottom: 20px;
}

.footer-logo-container {
    flex-shrink: 0; /* Prevents logo from shrinking */
    margin-right: 30px; /* Space between logo and text */
}
.footer-logo-image {
    height: 180px; 
    width: auto;
    display: block;
}

.footer-content {
    display: flex;
    flex-direction: column; /* Stacks description and contact */
    flex-grow: 1; /* Takes remaining space */
    flex-basis: 300px; /* Minimum width */
    gap: 15px;
}

.footer-content p {
    margin: 0;
}

.footer-contact {
    font-style: normal;
}

.footer-contact p {
    margin-bottom: 15px; /* Space between address/phone and WhatsApp button */
}

.footer-contact strong {
    color: #FFFFFF;
}

.footer-contact a {
    color: #FFFFFF; 
    text-decoration: none;
    font-weight: 600;
}
.footer-contact a:hover {
    text-decoration: underline;
}

.whatsapp-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #25D366; /* WhatsApp Green */
    color: #FFFFFF;
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.2s ease;
}
.whatsapp-link svg {
    display: inline-block;
    vertical-align: middle;
}
.whatsapp-link:hover {
    background-color: #1DAE53;
    text-decoration: none;
}


.footer-copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #2a2a5a; /* Separator line */
    font-size: 0.85rem;
    color: #AAAAAA;
}


/* --- Global Styles --- */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0; 
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7fa; 
    color: #333;
}

/* --- Layout Containers --- */
.page-container {
    width: 100%; 
    min-height: 100vh;
    margin: 0; 
    background-color: #ffffff; 
    border-radius: 0; 
    box-shadow: none; 
    overflow-x: hidden; 
}

.page-header {
    padding: 20px 40px; 
    border-bottom: 1px solid #eef2f7;
    background-color: #fff;
}

.page-header h3 {
    margin: 0;
    font-size: 1.4rem;
    color: #03033A;
    font-weight: 700; 
}

form {
    padding-bottom: 20px;
}

.form-content {
    padding: 0 40px; 
}

.form-section {
    padding: 30px 0;
    border-bottom: 1px dashed #dcdfe6;
}
.form-section:last-of-type {
    border-bottom: none;
}

h3 {
    font-size: 1.1rem;
    border-bottom: 1px solid #eef2f7;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-weight: 600;
}

h4 {
    font-size: 1.1rem;
    color: #03033A;
    margin-top: 0;
    margin-bottom: 25px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Form Grids & Layout --- */
.details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Enforce 2 equal columns */
    gap: 25px; /* More breathing room */
}

/* --- SPECIAL OVERRIDE: Make Move Date Full Screen Width --- */
#move-details-section .details-grid {
    grid-template-columns: 1fr; /* Forces single column layout for this section only */
}

/* Mobile Responsive Grid */
@media (max-width: 768px) {
    .details-grid, 
    .address-grid,
    .sub-grid,
    .conditional-fields-container {
        grid-template-columns: 1fr !important;
    }
    
    /* Make checkboxes stack on mobile */
    #terms-section {
        grid-template-columns: 1fr !important;
    }

    /* --- RESPONSIVE HEADER ADJUSTMENTS --- */
    .header-link {
        padding: 15px 20px; /* Reduce padding on mobile */
    }
    
    .logo-image {
        height: 35px; /* Smaller logo on mobile */
    }
    
    .logo-title {
        font-size: 1.1rem; /* Smaller title */
    }
    
    .logo-subtitle {
        font-size: 0.75rem; /* Smaller subtitle */
    }
    
    .logo-container {
        gap: 10px; /* Reduce gap */
    }
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label,
.address-column label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sub-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

/* ========================================= */
/* ===    PERFECT CHECKBOX ALIGNMENT     === */
/* ========================================= */

.checkbox-group {
    /* Relative positioning is key for the absolute box */
    position: relative;
    margin-bottom: 15px;
    padding-left: 0; /* Reset padding */
}

/* 1. Hide Default Input */
.checkbox-group input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* 2. The Label: The wrapper for text */
.checkbox-group label {
    display: block; /* Ensures it behaves like a block for padding */
    position: relative;
    padding-left: 35px; /* Space specifically for the custom box */
    margin-bottom: 0;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
    line-height: 1.5; /* Good line height helps alignment */
    text-transform: none; 
    user-select: none;
}

/* 3. The Custom Box (Pseudo-element) */
.checkbox-group label::before {
    content: "";
    position: absolute;
    left: 0;
    /* ALIGNMENT MAGIC: 
       Top: 0 aligns with the top of the label text.
       If text line-height is ~22px, this sits perfectly. 
    */
    top: 0; 
    height: 22px;
    width: 22px;
    background-color: #fff;
    border: 2px solid #dcdfe6;
    border-radius: 4px;
    transition: all 0.2s ease;
}

/* 4. The Checkmark (Pseudo-element) */
.checkbox-group label::after {
    content: "";
    position: absolute;
    /* Position relative to the label's padding area */
    left: 8px;
    top: 4px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: all 0.2s ease;
}

/* Interaction States */
.checkbox-group label:hover::before {
    border-color: #03033A;
}

.checkbox-group input:checked + label::before {
    background-color: #03033A;
    border-color: #03033A;
    box-shadow: 0 2px 5px rgba(3, 3, 58, 0.2);
}

.checkbox-group input:checked + label::after {
    opacity: 1;
}

/* Specific Layout for the Terms Section */
#terms-section {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two columns for Services */
    column-gap: 30px;
    row-gap: 15px;
    padding: 30px 0;
    border-bottom: 1px dashed #dcdfe6;
}

/* Force the Terms Agreement to span both columns (Full width at bottom) */
#terms-agreement-group {
    grid-column: 1 / -1;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

/* Make the Terms text smaller/lighter as requested previously */
#terms-agreement-group label {
    font-size: 0.85rem;
    color: #555;
}


/* --- Form Input Styling --- */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select {
    width: 100%;
    height: 50px; /* Taller inputs for modern feel */
    padding: 0 15px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    background-color: #ffffff; 
    color: #333;
    font-family: 'Poppins', sans-serif; 
    transition: all 0.2s ease;
    appearance: none; /* Removes default OS styling */
    -webkit-appearance: none;
}

/* Add a custom arrow for selects since we removed appearance */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8.825L1.175 4 2.238 2.938 6 6.7l3.763-3.762L10.825 4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
}

input:focus, select:focus {
    border-color: #03033A;
    outline: none;
    box-shadow: 0 0 0 3px rgba(3, 3, 58, 0.1); /* Subtle blue glow */
}

input::placeholder {
    color: #a0a0a0;
}

/* --- Address Section --- */
.address-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.manual-address {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* --- Conditional Fields Layout --- */
.conditional-fields-container {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 25px;
    padding-top: 25px;
    margin-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.conditional-field {
    display: none; 
}

#bedrooms-field {
    grid-column: 1 / -1; /* Spans across both columns */
}

#to-property-field {
    margin-top: 20px;
}


/* --- Cubic Sheet (Hidden Wrapper) --- */
#cubic-sheet-wrapper {
    display: none; 
    border-top: 2px solid #03033A;
    border-bottom: 2px solid #03033A;
    background-color: #fdfdff;
    margin-top: 20px;
}
.cubic-sheet {
    padding: 25px 40px; 
}


/* ======================================= */
/* ===    VERTICAL TAB LAYOUT          === */
/* ======================================= */

.cubic-sheet-body {
    display: flex;
    flex-direction: row; 
    gap: 25px; 
}

.tab-nav {
    display: flex;
    flex-direction: column; 
    flex-wrap: nowrap;
    border-bottom: none; 
    border-right: 2px solid #eef2f7; 
    margin-bottom: 0;
    padding-right: 20px; 
    flex-basis: 220px; 
    flex-shrink: 0;
}

.tab-btn {
    padding: 12px 15px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: #003366;
    border-bottom: none; 
    margin-bottom: 4px; 
    font-family: 'Poppins', sans-serif;
    width: 100%; 
    text-align: left; 
    border-left: 4px solid transparent; 
    border-radius: 4px;
    transition: all 0.2s ease;
}
.tab-btn:hover {
    background-color: #f4f7fa; 
    color: #0056b3;
}
.tab-btn.active {
    color: #0056b3;
    border-left-color: #0056b3; 
    font-weight: 600;
    background-color: #f8faff; 
}

.tab-content {
    flex-grow: 1;
    min-width: 0; 
}

.tab-pane { 
    display: none; 
}
.tab-pane.active {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.inventory-item {
    display: flex;
    flex-direction: column; 
    align-items: center; 
    gap: 8px; 
    padding: 15px 10px; 
    border: 1px solid #eef2f7;
    border-radius: 5px;
    background-color: #fdfdfd;
}
.inventory-item label { 
    font-size: 0.85rem; 
    font-weight: 500;
    margin-right: 0;
    line-height: 1.3;
    text-align: center; 
}

.item-controls { 
    display: flex; 
    align-items: center; 
    flex-shrink: 0; 
}
.item-controls input {
    width: 45px;
    height: 30px; 
    text-align: center;
    margin: 0 5px;
    padding: 5px;
    border-radius: 4px;
}
.btn-minus, .btn-plus {
    width: 28px;
    height: 28px;
    border: 1px solid #dcdfe6;
    background-color: #fbfcfd;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: bold;
    color: #0056b3; 
    cursor: pointer;
    line-height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-minus { color: #d9534f; }

/* --- Summary & Buttons --- */
.quote-summary {
    background-color: #f4f7fa;
    padding: 25px 40px; 
}
.quote-summary h3 {
    border-bottom: none;
    margin: 0 0 10px 0;
}
.quote-summary p {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0056b3;
    margin: 0;
}

/* Button Container */
.button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding-top: 30px;
}
/* Specific style for the bottom button to align it */
#bottom-button-container {
    justify-content: flex-end; /* Aligns button to the right */
    padding-right: 40px; /* Aligns with form content padding */
    padding-top: 20px;
    border-top: 1px dashed #dcdfe6;
}


.btn-primary {
    background-color: #03033A; 
    color: #ffffff; 
    border: none;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-family: 'Poppins', sans-serif;
}
.btn-primary:hover {
    background-color: #002a5c; 
}
.btn-large {
    font-size: 1.2rem;
    padding: 15px 40px;
}

.btn-secondary {
    background-color: #f0f4f8;
    color: #03033A; 
    border: 1px solid #dcdfe6;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-family: 'Poppins', sans-serif;
}
.btn-secondary:hover {
    background-color: #e4e9ef;
}

/* --- Thank You Page Styles --- */
#thank-you-page {
    display: none; 
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 40px;
    min-height: 70vh; 
}

.thank-you-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
}

#thank-you-page h2 {
    font-size: 2.5rem;
    color: #03033A;
    margin: 0 0 10px 0;
}

#thank-you-page p {
    font-size: 1.1rem;
    color: #333;
    max-width: 450px;
    margin-bottom: 30px;
}

.thank-you-actions {
    display: flex;
    gap: 15px;
}


/* --- On-Page Summary Display Styles --- */
#summary-display {
    width: 100%;
    max-width: 600px;
    background-color: #f9faff;
    border: 1px solid #eef2f7;
    border-radius: 8px;
    padding: 25px;
    text-align: left;
    margin-bottom: 30px;
}

#summary-display h3 {
    font-size: 1.3rem;
    color: #03033A;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #eef2f7;
    padding-bottom: 10px;
}

#summary-display h4 {
    font-size: 1.1rem;
    color: #002a5c;
    margin-top: 20px;
    margin-bottom: 10px;
}

#summary-display p {
    font-size: 0.95rem;
    color: #333;
    margin: 0 0 8px 0;
    max-width: 100%;
}

#summary-display p strong {
    color: #555;
    font-weight: 600;
    min-width: 120px;
    display: inline-block;
}

#summary-display ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

#summary-display li {
    font-size: 0.95rem;
    color: #333;
    padding: 5px 0;
    border-bottom: 1px solid #f0f4f8;
}

#summary-display li strong {
    color: #0056b3;
    font-weight: 600;
}

/* --- PDF / Print Styles --- */
#pdf-content-wrapper {
    display: none;
    font-family: Arial, sans-serif;
    color: #000;
}

@media print {
    body > * {
        display: none !important;
        visibility: hidden !important;
    }

    #pdf-content-wrapper,
    #pdf-content-wrapper * {
        display: block !important;
        visibility: visible !important;
    }

    #pdf-content-wrapper {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        padding: 40px;
        font-size: 12px;
        line-height: 1.4;
    }
    
    #pdf-content-wrapper h1 {
        font-size: 24px;
        color: #03033A;
        margin-bottom: 0;
    }

    #pdf-content-wrapper h2 {
        font-size: 18px;
        color: #002a5c;
        border-bottom: 1px solid #ccc;
        padding-bottom: 5px;
        margin-top: 20px;
        margin-bottom: 10px;
    }

    #pdf-content-wrapper p {
        margin: 0 0 5px 0;
    }

    #pdf-content-wrapper p strong {
        font-weight: bold;
        min-width: 120px;
        display: inline-block;
    }

    #pdf-content-wrapper ul {
        list-style-type: none;
        padding-left: 0;
        margin-top: 10px;
    }
    
    #pdf-content-wrapper li {
        padding: 3px 0;
    }

    #pdf-content-wrapper li strong {
        font-weight: bold;
        color: #000;
    }

    .btn-primary, .btn-secondary {
        display: none !important;
    }
} 

/* === REVISED: Checkbox & Image Layout === */
/* 2. Image Section */
.partners-section-container {
    padding: 0 40px;
    padding-top: 20px;
    padding-bottom: 40px;
    display: flex;
    justify-content: center;
}

#insurance-partners-img {
    display: block;
    max-width: 100%; 
    height: auto;
}

/* ========================================= */
/* ===  MOBILE RESPONSIVE INVENTORY FIX  === */
/* ========================================= */

@media (max-width: 768px) {
    
    /* 1. Stack the Nav and Content vertically instead of side-by-side */
    .cubic-sheet-body {
        flex-direction: column;
        gap: 15px;
    }

    /* 2. Turn the Vertical Sidebar into a Horizontal Scrollbar */
    .tab-nav {
        flex-direction: row;       /* Lay buttons out horizontally */
        overflow-x: auto;          /* Allow scrolling left/right */
        white-space: nowrap;       /* Prevent buttons from stacking/wrapping */
        flex-basis: auto;          /* Reset the fixed 220px width */
        width: 100%;               /* Take full screen width */
        border-right: none;        /* Remove the desktop right border */
        border-bottom: 2px solid #eef2f7; /* Add a bottom border instead */
        padding-right: 0;
        padding-bottom: 0;
        margin-bottom: 15px;
        
        /* Smooth scrolling on iOS */
        -webkit-overflow-scrolling: touch;
        /* Hide scrollbar for a cleaner look (optional) */
        scrollbar-width: none; 
    }
    
    /* Hide scrollbar for Chrome/Safari */
    .tab-nav::-webkit-scrollbar { 
        display: none; 
    }

    /* 3. Adjust the Buttons for Horizontal Layout */
    .tab-btn {
        width: auto;               /* Let width be determined by text length */
        flex: 0 0 auto;            /* Don't shrink */
        margin-bottom: 0;
        margin-right: 15px;        /* Spacing between tabs */
        border-left: none;         /* Remove desktop blue line on left */
        border-bottom: 3px solid transparent; /* Prepare bottom blue line */
        padding: 10px 5px;
        text-align: center;
        border-radius: 0;          /* Remove border radius for bottom-tab look */
    }

    /* 4. Mobile Active State (Blue line on bottom instead of left) */
    .tab-btn.active {
        background-color: transparent; 
        border-left-color: transparent; 
        border-bottom-color: #03033A; /* Active line on bottom */
        color: #03033A;
    }
    
    /* 5. Force Inventory Grid to be 1 Column */
    .tab-pane.active {
        grid-template-columns: 1fr; 
    }
    
    /* 6. Reduce padding on the container so it fits better */
    .cubic-sheet {
        padding: 20px 15px; 
    }
    
    /* 7. Make the + / - buttons easier to tap */
    .btn-minus, .btn-plus {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
}