
/* Start page header styling - recreating exact original styling */
.start-page-header {
    background: #FFFFFF;
    width: 100%;
    position: relative;
    z-index: 10;
}

/* Fix for debug/staging banner covering header */
.debug-banner ~ .start-page-header,
.staging-banner ~ .start-page-header {
    margin-top: 1.75rem;
}

/* Additional safety margin when debug banners are present */
body:has(.debug-banner) .start-page-header,
body:has(.staging-banner) .start-page-header {
    margin-top: 1.75rem;
}

.start-page-container-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.start-page-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 75px;
}

.start-nav-left {
    display: flex !important;
    align-items: center !important;
    visibility: visible !important;
}

.start-nav-left a {
    display: flex !important;
    align-items: center !important;
}

.start-nav-right {
    display: flex;
    align-items: center;
    gap: 30px;
    font-family: 'Lexend', sans-serif;
    font-weight: 600;
    font-size: 18px;
    color: #15202C;
}

.start-page-header .start-page-logo {
    height: 40px !important;
    width: auto !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    max-width: none !important;
    object-fit: contain !important;
}

.start-schedule-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border: 2px solid #FA7268;
    border-radius: 25px;
    text-decoration: none;
    color: #15202C;
    font-family: 'Lexend', sans-serif;
    font-size: 16px;
    font-weight: 400;
    transition: all 0.2s ease;
    background: transparent;
}

.start-schedule-button:hover {
    background: #FA7268;
    color: white;
}

.start-schedule-button:hover .start-button-icon {
    fill: white;
}

.start-button-text {
    font-family: 'Lexend', sans-serif;
    font-size: 16px;
    font-weight: 400;
}

.start-button-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: fill 0.2s ease;
}

/* Clean split-screen layout */
.start-page-container {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 75px); /* Account for header only, no progress bar */
}

.split-container {
    display: flex;
    flex: 1;
    min-height: 600px;
}

/* Left content area */
.left-content {
    background: #17484E;
    width: 625px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 75px;
    gap: 60px;
    position: relative;
    overflow: hidden;
}

/* Leaf background masking effect - responsive */
.left-content::before {
    content: '';
    position: absolute;
    bottom: -200px; /* Position at the bottom for masking effect */
    left: clamp(150px, 25%, 300px); /* Extend more to the left */
    width: clamp(500px, 60vw, 850px); /* Wider to show more of the leaf */
    height: clamp(800px, 80vh, 1113px);
    background-image: url('/static/images/book-start-leaf-bg.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 1;
    transform: rotate(0deg);
    z-index: 1;
    pointer-events: none;
}

/* Ensure text content is above the leaf background */
.left-content > * {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-family: "Newsreader", serif;
    font-size: 55px;
    font-weight: 400;
    line-height: 1.45;
    color: #FFFFFF;
    margin: 0;
}

.hero-description {
    font-family: 'Lexend', sans-serif;
    font-size: 25px;
    font-weight: 300;
    line-height: 1.5;
    color: #FFFFFF;
    margin: 0;
}

.next-button {
    background: #FA7268;
    color: #FFFFFF;
    border: none;
    border-radius: 100px;
    padding: 20px 40px;
    font-family: 'Lexend', sans-serif;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    min-width: 180px;
    height: 54px;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.next-button:hover {
    background: #e55a4a;
}

/* Right image area */
.right-image {
    flex: 1;
    min-width: 815px;
    /* Ensure container maintains quality */
    overflow: hidden;
    position: relative;
}

.right-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Optimize for high-quality image rendering */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimizeQuality;
    image-rendering: -o-crisp-edges;
    image-rendering: crisp-edges;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Override global footer styling for start page */
footer {
    background: transparent !important;
    padding: 0 !important;
    color: #15202C !important;
}

/* Ensure footer text is dark on start page */
.emergency-footer .emergency-content span {
    color: #15202C !important;
}


/* Error styling */
.error-alert {
    background: rgba(244, 67, 54, 0.1);
    color: #d32f2f;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid rgba(244, 67, 54, 0.3);
    font-size: 14px;
}

/* Responsive leaf positioning for different screen sizes */
@media (max-width: 1440px) {
    .left-content::before {
        bottom: -180px; /* Keep at bottom for masking effect */
        left: clamp(100px, 20%, 250px); /* More to the left */
        width: clamp(450px, 55vw, 700px); /* Wider */
        height: clamp(700px, 75vh, 1000px);
    }
}

@media (max-width: 1200px) {
    .split-container {
        flex-direction: column;
    }
    
    .left-content {
        width: 100%;
        text-align: center;
        padding: 60px 40px;
    }
    
    /* Adjust leaf for stacked layout - keep bottom position */
    .left-content::before {
        bottom: -150px; /* Keep at bottom for masking effect */
        left: clamp(50px, 15%, 150px); /* More to the left for mobile */
        width: clamp(400px, 50vw, 600px); /* Wider on mobile */
        height: clamp(600px, 70vh, 800px);
    }
    
    .right-image {
        min-width: auto;
        height: 400px;
    }
    
    .emergency-footer {
        padding-left: 40px;
    }
}

@media (max-width: 768px) {
    /* Header adjustments for mobile */
    .start-page-nav {
        height: 60px;
        padding: 0 10px;
    }
    
    .start-page-container-inner {
        padding: 0 15px;
    }
    
    .start-page-header .start-page-logo {
        height: 32px !important;
    }
    
    .start-nav-right {
        font-size: 14px;
        gap: 15px;
    }
    
    .start-schedule-button {
        padding: 8px 16px;
        font-size: 14px;
        border-radius: 20px;
    }
    
    .start-button-text {
        font-size: 14px;
    }
    
    /* Main content adjustments */
    .split-container {
        flex-direction: column;
        min-height: calc(100vh - 60px); /* Account for smaller header */
    }
    
    .left-content {
        padding: 30px 20px;
        order: 1;
    }
    
    .right-image {
        order: 2;
        height: 250px;
        min-height: 250px;
    }
    
    .right-image img {
        object-fit: cover;
        height: 100%;
        width: 100%;
    }
    
    /* Typography adjustments */
    .hero-title {
        font-size: 32px;
        line-height: 1.2;
        margin-bottom: 20px;
    }
    
    .hero-description {
        font-size: 18px;
        line-height: 1.4;
        margin-bottom: 30px;
    }
    
    /* Button adjustments */
    .next-button {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        padding: 16px 24px;
        font-size: 18px;
    }
    
    /* Background leaf adjustments */
    .left-content::before {
        bottom: -80px;
        left: clamp(-50px, 5%, 50px);
        width: clamp(300px, 40vw, 400px);
        height: clamp(400px, 60vh, 600px);
        opacity: 0.3; /* Make it more subtle on mobile */
    }
    
    /* Emergency footer adjustments */
    .emergency-footer {
        padding: 20px 15px;
        padding-left: 20px;
    }
    
    .emergency-content {
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .emergency-content span {
        font-size: 16px;
        text-align: center;
    }
}

/* Extra small screens (phones in portrait) */
@media (max-width: 480px) {
    .start-page-container-inner {
        padding: 0 10px;
    }
    
    .start-nav-right {
        font-size: 12px;
        gap: 10px;
    }
    
    .start-schedule-button {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .start-button-text {
        font-size: 12px;
    }
    
    .left-content {
        padding: 20px 15px;
    }
    
    .hero-title {
        font-size: 28px;
        margin-bottom: 16px;
    }
    
    .hero-description {
        font-size: 16px;
        margin-bottom: 25px;
    }
    
    .next-button {
        padding: 14px 20px;
        font-size: 16px;
    }
    
    .right-image {
        height: 200px;
        min-height: 200px;
    }
    
    .emergency-footer {
        padding: 15px 10px;
    }
    
    .emergency-content span {
        font-size: 14px;
    }
    
    /* Hide "Need Help?" text on very small screens */
    .start-nav-right > :first-child {
        display: none;
    }
}