/* =====================================================
   MASTER STYLESHEET - Our Construction
   ===================================================== */

/* =====================================================
   1. RESET & BASE STYLES
   ===================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    font-family: Arial, sans-serif;
    background-color: #0a1b2d;
    color: white;
    overflow-x: hidden;
}

/* =====================================================
   2. LAYOUT CONTAINERS
   ===================================================== */
.split-container,
.quiz-container,
.results-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Index page specific container fix */
.container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Left/Right Pane Base */
.left-pane,
.left-section {
    flex: 1;
    background-color: #0a1b2d;
    color: white;
    display: flex;
    flex-direction: column;
    padding: 40px;
    z-index: 2;
}

.right-pane,
.right-section {
    flex: 1;
    position: relative;
    overflow: hidden;
}

/* =====================================================
   3. HEADER & NAVIGATION
   ===================================================== */
.left-pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 18px;
}

.logo svg {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.logo img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

/* Phone CTAs */
.phone-cta,
.phone-number-button,
.phone-button {
    background-color: #fbbd00;
    color: black;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.phone-cta:hover,
.phone-number-button:hover,
.phone-button:hover {
    background-color: #e5ac00;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(251, 189, 0, 0.3);
}

.phone-cta a,
.phone-number-button a {
    color: black;
    text-decoration: none;
    font-weight: bold;
}

/* =====================================================
   4. TYPOGRAPHY
   ===================================================== */
h1 {
    font-size: 48px;
    line-height: 1.2;
    margin-bottom: 30px;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #fbbd00;
}

.subheading {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.description {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 40px;
    opacity: 0.8;
}

.question {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 30px;
    line-height: 1.3;
}

/* =====================================================
   5. COMPONENTS
   ===================================================== */

/* Progress Bar */
.progress-container {
    margin-bottom: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    background-color: #fbbd00;
    height: 100%;
    width: 25%;
    transition: width 0.3s ease;
}

/* Main Content Areas */
.main-content,
.quiz-content,
.thank-you-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 600px;
}

/* Timer */
.timer,
.takes-time {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
    opacity: 0.7;
}

.timer::before,
.takes-time::before {
    content: "⏱";
    margin-right: 8px;
}

/* CTA Buttons */
.cta-button {
    background-color: #fbbd00;
    color: #0a1b2d;
    padding: 15px 40px;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.cta-button:hover {
    background-color: #e5ac00;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(251, 189, 0, 0.3);
}

/* Quiz Steps */
.quiz-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.quiz-step.active {
    display: block;
}

/* Options */
.options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option-button {
    background-color: white;
    color: #0a1b2d;
    border: 2px solid transparent;
    padding: 20px;
    font-size: 1.1rem;
    border-radius: 8px;
    text-align: left;
    transition: all 0.3s ease;
    cursor: pointer;
    font-weight: 500;
}

.option-button:hover {
    background-color: #f5f5f5;
    border-color: #fbbd00;
    transform: translateX(5px);
}

/* =====================================================
   6. FORMS
   ===================================================== */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    opacity: 0.9;
}

.form-group input,
.form-group select {
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #fbbd00;
    background-color: rgba(255, 255, 255, 0.15);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group select option {
    background-color: #0a1b2d;
    color: white;
}

.tcpa-text {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-bottom: 20px;
    line-height: 1.4;
}

/* =====================================================
   7. VIDEO & MEDIA
   ===================================================== */
.right-pane video,
.right-section video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.right-pane::after,
.right-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, #0a1b2d 0%, transparent 20%);
    pointer-events: none;
}

/* =====================================================
   8. SPECIAL SECTIONS
   ===================================================== */

/* Results/Thank You Page */
#result,
#contact-form,
.thank-you-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

#result.active,
#contact-form.active,
.thank-you-content {
    display: block;
}

.result-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #fbbd00;
}

.savings-text,
.main-message {
    font-size: 1.3rem;
    margin-bottom: 30px;
    line-height: 1.5;
}

.icon-success {
    font-size: 5rem;
    color: #fbbd00;
    margin-bottom: 30px;
    animation: pulse 2s infinite;
}

.next-steps {
    background-color: rgba(255, 255, 255, 0.05);
    border-left: 4px solid #fbbd00;
    padding: 25px;
    margin: 30px 0;
    border-radius: 8px;
}

.next-steps h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #fbbd00;
}

.next-steps ul {
    list-style: none;
    padding: 0;
}

.next-steps li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    font-size: 1.1rem;
    opacity: 0.9;
}

.next-steps li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #fbbd00;
    font-weight: bold;
    font-size: 1.2rem;
}

.contact-reminder {
    margin-top: 40px;
    padding: 20px;
    background-color: rgba(251, 189, 0, 0.1);
    border-radius: 8px;
    text-align: center;
}

/* Loading State */
.loading {
    display: none;
    text-align: center;
    padding: 40px;
}

.loading.active {
    display: block;
}

.loading i {
    font-size: 3rem;
    color: #fbbd00;
    animation: spin 1s linear infinite;
}

/* =====================================================
   9. FOOTER
   ===================================================== */
footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 12px;
    padding: 20px;
    opacity: 0.6;
    z-index: 3;
}

footer a {
    color: white;
    text-decoration: none;
    margin: 0 10px;
}

footer a:hover {
    text-decoration: underline;
}

/* =====================================================
   10. ANIMATIONS
   ===================================================== */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =====================================================
   11. MOBILE STYLES
   ===================================================== */
@media only screen and (max-width: 768px) {
    /* Layout */
    .split-container,
    .quiz-container,
    .results-container,
    .container {
        flex-direction: column;
        min-height: 100vh;
    }
    
    /* Video Header Section */
    .right-pane,
    .right-section {
        display: block;
        position: relative;
        height: 200px;
        width: 100%;
        order: -1; /* Put video at top */
        margin-bottom: 0;
    }
    
    /* Remove gradient on mobile for cleaner look */
    .right-pane::after,
    .right-section::after {
        background: linear-gradient(to bottom, 
            transparent 0%, 
            transparent 70%, 
            #0a1b2d 100%);
    }
    
    .left-pane,
    .left-section {
        padding: 20px;
        padding-top: 0;
        min-height: auto;
        flex: 1;
    }
    
    /* Fixed Mobile Header - now overlays video */
    .left-pane-header,
    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background-color: rgba(10, 27, 45, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 15px 20px;
        z-index: 1000;
        box-shadow: 0 2px 10px rgba(0,0,0,0.3);
        margin-bottom: 0;
    }
    
    /* Hide desktop phone button on mobile */
    .phone-number {
        display: none;
    }
    
    /* Logo adjustments */
    .logo {
        font-size: 16px;
    }
    
    .logo svg,
    .logo img {
        width: 30px;
        height: 30px;
        margin-right: 8px;
    }
    
    /* Content spacing - account for video header */
    .main-content,
    .quiz-content,
    .thank-you-wrapper {
        margin-top: 20px;
        padding-bottom: 100px;
    }
    
    /* Progress bar mobile - under video */
    .progress-container {
        margin: 20px 0;
        position: relative;
        top: auto;
    }
    
    /* Typography scaling */
    h1 {
        font-size: 32px;
        margin-bottom: 20px;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .subheading {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .description {
        font-size: 16px;
        line-height: 1.5;
        margin-bottom: 30px;
    }
    
    .question {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }
    
    .savings-text,
    .main-message {
        font-size: 1.1rem;
    }
    
    /* Buttons */
    .option-button {
        padding: 15px;
        font-size: 1rem;
    }
    
    .cta-button {
        width: 100%;
        padding: 15px;
        font-size: 16px;
    }
    
    /* Forms */
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    /* Mobile Call Bar */
    .call-bar {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: #fbbd00;
        color: black;
        text-align: center;
        padding: 15px 0;
        font-size: 16px;
        font-weight: bold;
        z-index: 1001;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
    }
    
    .call-bar a {
        color: black;
        text-decoration: none;
    }
    
    /* Footer on mobile */
    footer {
        position: relative;
        margin-top: 40px;
        padding: 20px;
    }
    
    /* Thank you page mobile */
    .contact-reminder {
        margin-top: 30px;
        padding: 15px;
    }
    
    .phone-button {
        width: 100%;
        padding: 15px;
    }
    
    .icon-success {
        font-size: 4rem;
        margin-bottom: 20px;
    }
    
    /* Special handling for index page on mobile */
    body:has(.container) .right-section {
        height: 250px; /* Slightly taller for landing page */
    }
    
    /* Adjust quiz content to not overlap with video */
    #quiz-steps {
        background-color: #0a1b2d;
        padding: 20px 0;
        margin-top: -20px; /* Pull up slightly to connect with video */
        position: relative;
        z-index: 1;
    }
}

/* Desktop-only call bar hidden */
@media (min-width: 769px) {
    .call-bar {
        display: none;
    }
}

/* =====================================================
   12. MICRO-ADJUSTMENTS FOR SMALL SCREENS
   ===================================================== */
@media only screen and (max-width: 375px) {
    /* Video header height adjustment */
    .right-pane,
    .right-section {
        height: 150px;
    }
    
    h1 {
        font-size: 28px;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .subheading {
        font-size: 16px;
    }
    
    .description {
        font-size: 14px;
    }
    
    .question {
        font-size: 1.3rem;
    }
    
    .option-button {
        font-size: 0.95rem;
        padding: 12px;
    }
    
    .savings-text,
    .main-message {
        font-size: 1rem;
    }
}

/* =====================================================
   13. UTILITY CLASSES
   ===================================================== */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}

/* HVAC-specific grid for system types */
#step-4 .options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

#step-4 .option-button {
    padding: 15px;
    font-size: 1rem;
}

@media only screen and (max-width: 768px) {
    #step-4 .options {
        grid-template-columns: 1fr;
    }
}