/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #ffffff;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Scroll offset for sticky header anchor links */
#inspection-options,
#contact {
    scroll-margin-top: 90px;
}

/* Landing Page Styles */
.landing-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header - Standard bar layout */
.landing-header {
    background: #ffffff;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-wordmark {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #EE9844;
}

.logo {
    width: 48px;
    height: 48px;
}

.brand {
    font-size: 2.5rem;
    color: #EE9844;
    font-weight: 700;
    margin: 0;
}

.brand sup {
    font-size: 1rem;
    margin-left: 2px;
}

/* Hero - Promoted headline with modern type scale */
.landing-main {
    flex: 1;
    width: 100%;
}

.hero {
    background: linear-gradient(135deg, #FFF5ED 0%, #ffffff 100%);
    padding: 48px 40px 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-content {
    max-width: 680px;
    text-align: center;
}

.hero-headline {
    font-size: 48px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.2;
    margin: 0 0 12px 0;
    letter-spacing: -0.02em;
}

.hero-subhead {
    font-size: 18px;
    color: #1a1a1a;
    line-height: 1.5;
    margin: 0 0 20px 0;
    font-weight: 400;
}

.hero-cta {
    display: inline-block;
    background: #EE9844;
    color: #ffffff;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(238, 152, 68, 0.25);
}

.hero-cta:hover {
    background: #D17A2F;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(238, 152, 68, 0.35);
}

/* Primary CTA button (used in header and throughout site) */
.cta-primary {
    display: inline-block;
    background: #EE9844;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(238, 152, 68, 0.25);
}

.cta-primary:hover {
    background: #D17A2F;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(238, 152, 68, 0.35);
}

.options-section {
    padding: 40px 40px 80px;
    max-width: 1200px;
    margin: 0 auto;
}

.options-section h3 {
    text-align: center;
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 40px;
    font-weight: 600;
}

.option-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.option-card {
    background: #ffffff;
    border: 2px solid #EE9844;
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.option-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(238, 152, 68, 0.2);
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    background: #FFF5ED;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.icon-wrapper svg {
    width: 40px;
    height: 40px;
    color: #EE9844;
}

.option-card h4 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}

.option-card p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 20px;
    flex: 1;
}

.timeline {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #EE9844;
    font-weight: 500;
    margin-bottom: 25px;
}

.timeline svg {
    width: 20px;
    height: 20px;
}

.cta-button {
    background: #EE9844;
    color: #ffffff;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.option-card:hover .cta-button {
    background: #D17A2F;
}

.quick-links-section {
    padding: 0 40px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.quick-links-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.quick-link-tab {
    background: #FFF5ED;
    border: 2px solid #EE9844;
    border-radius: 12px;
    padding: 25px 20px;
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.quick-link-tab:hover {
    background: #EE9844;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(238, 152, 68, 0.3);
}

.quick-link-tab svg {
    width: 32px;
    height: 32px;
    color: #EE9844;
    transition: color 0.3s ease;
}

.quick-link-tab:hover svg {
    color: #ffffff;
}

.quick-link-tab span {
    font-size: 1.1rem;
    font-weight: 600;
}

.contact-section {
    text-align: center;
    padding: 40px;
    background: #FFF5ED;
    border-radius: 12px;
}

.contact-info {
    font-size: 1.1rem;
    color: #333;
    line-height: 1.8;
}

.contact-info a {
    color: #EE9844;
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

.landing-footer {
    background: #f8f8f8;
    padding: 30px;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* Form Pages Styles */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 20px;
    overflow-x: hidden; /* Prevent horizontal scroll on mobile */
}

.page-header {
    background: #ffffff;
    padding: 20px 40px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 20px;
}

.page-header .logo-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #EE9844;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.back-link:hover {
    gap: 12px;
}

.form-section {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 30px;
}

.form-section h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.form-section .section-description {
    color: #666;
    margin-bottom: 30px;
    font-size: 1rem;
}

.form-grid {
    display: grid;
    gap: 20px;
    min-width: 0; /* Prevent grid children from overflowing */
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%; /* Prevent inputs from overflowing container */
    max-width: 100%; /* Ensure inputs never exceed container */
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Include padding and border in width calculation */
}

/* Specific fixes for date inputs on mobile */
.form-group input[type="date"] {
    min-width: 0; /* Allow date input to shrink if needed */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Ensure scheduling section doesn't overflow */
#schedulingSection {
    max-width: 100%;
    overflow-x: hidden;
}

#schedulingSection .form-group {
    width: 100%;
    max-width: 100%;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #EE9844;
    box-shadow: 0 0 0 3px rgba(238, 152, 68, 0.1);
}

/* Camera Start Button */
.camera-start-btn {
    width: 100%;
    background: #EE9844;
    color: white;
    border: none;
    padding: 20px 30px;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.camera-start-btn:hover {
    background: #D17A2F;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(238, 152, 68, 0.3);
}

/* Swatch Choice Button Styles */
.swatch-choice-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Photo Upload Styles */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.photo-upload {
    position: relative;
    border: 2px dashed #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.photo-upload:hover {
    border-color: #EE9844;
    background: #FFF5ED;
}

.photo-upload.has-image {
    border-style: solid;
    border-color: #EE9844;
    background: #FFF5ED;
}

.photo-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
}

.photo-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #666;
    font-size: 0.9rem;
}

.photo-icon {
    width: 40px;
    height: 40px;
    color: #EE9844;
}

.photo-preview {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-top: 10px;
}

.submit-section {
    text-align: center;
    margin-top: 40px;
}

.submit-btn {
    background: #EE9844;
    color: #ffffff;
    border: none;
    padding: 16px 50px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover:not(:disabled) {
    background: #D17A2F;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(238, 152, 68, 0.3);
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
}

/* Success Message */
.success-message {
    background: #ffffff;
    border: 2px solid #4CAF50;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    margin: 20px 0;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    color: #4CAF50;
}

.success-message h3 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 15px;
}

.success-message p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 15px;
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.alert-error {
    background: #FFEBEE;
    border: 1px solid #EF5350;
    color: #C62828;
}

.alert-info {
    background: #E3F2FD;
    border: 1px solid #42A5F5;
    color: #1565C0;
}

.alert-success {
    background: #E8F5E9;
    border: 1px solid #66BB6A;
    color: #2E7D32;
}

/* Animations */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile sticky bottom bar */
.mobile-sticky-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
    padding: 12px 20px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 101;
}

.mobile-sticky-bar .cta-group {
    display: flex;
    gap: 12px;
}

.mobile-sticky-bar .cta-primary,
.mobile-sticky-bar .cta-call {
    flex: 1;
    text-align: center;
}

.mobile-sticky-bar .cta-call {
    background: #4CAF50;
    color: #ffffff;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile-sticky-bar .cta-call:hover {
    background: #388E3C;
}

/* Photo Thumbnail Styles */
.photo-thumbnail-item {
    animation: thumbnailFadeIn 0.3s ease;
}

@keyframes thumbnailFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#photoProgressContainer {
    animation: slideUp 0.4s ease;
}

/* Camera Mode Specific Styles */
#cameraMode {
    overflow: hidden;
}

#cameraMode video {
    object-fit: cover;
}

#cameraMode #captureBtn:active {
    transform: scale(0.95);
}

#cameraMode #nextPhotoBtn:hover {
    background: #D17A2F;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(238, 152, 68, 0.4);
}

/* Camera Bottom Overlay - Smooth gradient transition */
#cameraBottomOverlay {
    transition: all 0.3s ease;
}

/* Landscape mode adjustments for camera */
@media (orientation: landscape) {
    #cameraBottomOverlay {
        background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 50%, transparent 100%) !important;
        display: flex !important;
        align-items: center !important;
        padding: 20px !important;
    }
    
    #cameraMode #photoInstruction {
        font-size: 0.95rem !important;
    }
}

/* Portrait mode optimizations */
@media (orientation: portrait) {
    #cameraBottomOverlay {
        background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 40%, rgba(0,0,0,0.4) 70%, transparent 100%) !important;
    }
    
    #cameraMode #photoInstruction {
        font-size: 1rem !important;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Center header on mobile, hide nav */
    .landing-header {
        padding: 16px 0;
    }
    
    .header-content {
        padding: 0 20px;
        justify-content: center;
    }
    
    .header-nav {
        display: none;
    }
    
    .logo {
        width: 40px;
        height: 40px;
    }
    
    .brand {
        font-size: 1.75rem;
    }
    
    /* Show mobile sticky bar */
    .mobile-sticky-bar {
        display: block;
    }
    
    /* Add bottom padding to body to account for sticky bar */
    .landing-main {
        padding-bottom: 80px;
    }
    
    /* Hero mobile typography */
    .hero {
        padding: 32px 20px 48px;
    }
    
    .hero-headline {
        font-size: 32px;
    }
    
    .hero-subhead {
        font-size: 16px;
    }
    
    /* Section spacing */
    .options-section {
        padding: 32px 20px 60px;
    }
    
    .options-section h3 {
        font-size: 1.5rem;
    }
    
    .option-cards {
        grid-template-columns: 1fr;
    }
    
    .quick-links-section {
        padding: 0 20px 60px;
    }
    
    .quick-links-tabs {
        grid-template-columns: 1fr;
    }
    
    .form-section {
        padding: 30px 20px;
    }
    
    .form-group {
        min-width: 0; /* Prevent form groups from overflowing */
    }
    
    .form-group input[type="date"] {
        padding: 10px 12px; /* Reduce padding on mobile */
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    #photoThumbnails {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .hero-headline {
        font-size: 28px;
    }
    
    .hero-subhead {
        font-size: 16px;
    }
    
    .option-card {
        padding: 30px 20px;
    }
    
    .form-section h2 {
        font-size: 1.5rem;
    }
}

