.banner{
    height: 100vh;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    display: none;
}

footer {
    display: none !important;
}

.content{
    top: 45%;
}

html {
    margin: 0;
    padding: 0;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

/* ========== PORTRAIT ORIENTATION OVERLAY ========== */
.rotate-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.rotate-message {
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.rotate-message i {
    font-size: 80px;
    opacity: 0.9;
    animation: bounce 2s infinite;
}

.rotate-message h2 {
    font-size: 32px;
    margin: 0;
    font-weight: 700;
}

.rotate-message p {
    font-size: 18px;
    margin: 0;
    opacity: 0.9;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ========== MOBILE/TABLET ONLY (Max 1024px width) ========== */

/* Portrait mode (height > width) - MOBILE/TABLET ONLY */
@media screen and (orientation: portrait) and (max-width: 1024px) {
    .rotate-overlay {
        display: flex;
    }
    
    .quiz-wrapper {
        display: none;
    }
    
    html, body {
        margin: 0;
        padding: 0;
        overflow: hidden;
        width: 100vw;
        height: 100vh;
    }
}

/* Landscape mode (width > height) - MOBILE/TABLET ONLY */
@media screen and (orientation: landscape) and (max-width: 1024px) {
    .rotate-overlay {
        display: none;
    }
    
    .quiz-wrapper {
        display: flex;
        width: 100vw;
        height: 100vh;
        overflow: hidden;
    }
}

/* ========== DESKTOP DEVICES (1025px and above) ========== */
/* Desktop should never see the rotation overlay, regardless of orientation */
@media screen and (min-width: 1025px) {
    .rotate-overlay {
        display: none !important;
    }
    
    .quiz-wrapper {
        display: flex !important;
        width: 100vw;
        height: 100vh;
        overflow: hidden;
    }
}

.quiz-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    overflow: hidden;
}

.quiz-section {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    align-items: center;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
}

.quiz-section h1 {
    text-align: center;
    font-size: clamp(28px, 8vw, 45px);
    margin-bottom: 30px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    padding-bottom: 20px;
    cursor: pointer;
    transition: transform 0.3s ease, letter-spacing 0.3s ease, filter 0.3s ease;
}

.quiz-section h1:hover {
    transform: scale(1.05) translateY(-3px);
    letter-spacing: 3px;
    filter: drop-shadow(0 6px 20px rgba(84, 104, 255, 0.3));
}

.quiz-frame {
    border: none;
    border-radius: 0;
    padding: 0;
    background: transparent;
    width: 100%;
    height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-sizing: border-box;
    overflow: hidden;
}

.quiz-display {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.quiz-section-panel {
    padding: 0;
    border-radius: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.quiz-section-panel h1,
.quiz-section-panel h2 {
    color: #0689ce;
    margin-bottom: 20px;
    font-size: clamp(18px, 5vw, 28px);
}

.quiz-section-panel h2.question-overlay {
    position: fixed;
    top: 20px;
    left: 5px;
    transform: none;
    color: white;
    font-weight: bold;
    font-size: clamp(14px, 3vw, 18px);
    z-index: 100;
    background: rgba(0, 0, 0, 0.4);
    padding: clamp(10px, 2vw, 15px) clamp(15px, 3vw, 25px);
    border-radius: 8px;
    opacity: 0.95;
    text-align: left;
    max-width: 70%;
    margin: 0;
    flex: none;
}

.quiz-section-panel p {
    color: #666;
    margin-bottom: 25px;
    font-size: clamp(14px, 3vw, 16px);
    line-height: 1.6;
}

/* Next button: fixed bottom-right for all image sections (1-6) */
div:has(> #nextBtn1), div:has(> #nextBtn2), div:has(> #nextBtn3),
div:has(> #nextBtn4), div:has(> #nextBtn5), div:has(> #nextBtn6) {
    position: fixed !important;
    bottom: 15px !important;
    right: 20px !important;
    left: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: right !important;
    z-index: 201 !important;
    background: transparent !important;
}

div:has(> [id^="nextBtn"]) {
    margin-top: 0 !important;
    position: static;
    background: transparent;
}

div:has(> [id^="nextBtn"]) button[id^="nextBtn"] {
    position: relative;
    z-index: 15;
    margin: 0 !important;
    overflow: hidden;
}

/* Quiz context: strip default button-29 margins, square corners */
.quiz-section-panel .button-29,
#quizSection0 .button-29 {
    margin: 0 !important;
    border-radius: 4px !important;
}

/* Force nextBtn0 (section 0 NEXT) to match quiz button style */
#nextBtn0 {
    border-radius: 4px !important;
    margin: 0 !important;
    height: auto !important;
}

@keyframes counterGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(59, 130, 246, 0.35), 0 2px 12px rgba(0, 0, 0, 0.12);
    }
    50% {
        box-shadow: 0 0 24px rgba(59, 130, 246, 0.75), 0 0 48px rgba(59, 130, 246, 0.3), 0 2px 16px rgba(0, 0, 0, 0.15);
    }
}

.choice-counter {
    position: fixed;
    top: 20px;
    right: 5px;
    left: auto;
    transform: none;
    padding: clamp(10px, 2vw, 15px) clamp(15px, 3vw, 25px);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 2px solid rgba(59, 130, 246, 0.4);
    border-radius: 8px;
    margin: 0;
    font-weight: bold;
    font-size: clamp(14px, 3vw, 18px);
    font-family: 'Poppins', sans-serif;
    color: #3B82F6;
    letter-spacing: 0.03rem;
    z-index: 100;
    white-space: nowrap;
    animation: counterGlow 2s ease-in-out infinite;
}


.quiz-slideshow {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin: 0;
    background: black;
    padding: 0;
    border-radius: 0;
    z-index: 5;
    overflow: hidden;
}

.slide-nav {
    background: rgba(84, 104, 255, 0.35);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: clamp(40px, 12vw, 56px);
    height: clamp(40px, 12vw, 56px);
    font-size: clamp(16px, 4vw, 20px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    transition: background 0.3s ease;
    pointer-events: auto;
}

.slide-nav:hover {
    background: rgba(84, 104, 255, 0.8);
}

.slide-nav-prev {
    left: 20px;
}

.slide-nav-next {
    right: 20px;
    left: auto;
}

.slide-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    flex: 1;
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: auto;
    position: relative;
    pointer-events: auto;
}

.slide-viewer {
    width: 100%;
    height: 100%;
    max-width: 100%;
    margin: 0;
    background: black;
    border: none;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex: 1;
}

.slide-viewer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Ensure image fills entire container without scrolling */
}

.slide-label {
    display: none !important;
}

.slide-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 0;
    margin-bottom: 0;
    padding: 0;
    flex-wrap: wrap;
    width: auto;
    position: fixed;
    bottom: 15px;
    left: 20px;
    right: auto;
    transform: none;
    background: none;
    border-radius: 0;
    z-index: 100;
}

.slide-select-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: #008ad2;
    color: #ffffff;
    border: 2px solid #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(12px, 2.8vw, 15px);
    font-weight: 600;
    letter-spacing: 0.15rem;
    text-transform: uppercase;
    white-space: nowrap;
    padding: 12px 28px;
    position: relative;
    overflow: hidden;
    z-index: 15;
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1;
    appearance: none;
    margin: 0;
}

.slide-select-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    z-index: 2;
    pointer-events: none;
}

.slide-select-btn:hover {
    color: #ffffff;
    border-color: #ffffff;
    transform: scale(1.05);
}

.slide-select-btn:hover::before {
    animation: shine 0.6s ease-in-out infinite;
}

.slide-select-btn.selected {
    background: #00457a;
    border-color: #ffffff;
    color: #ffffff;
}

.slide-select-btn.selected:hover {
    background: #005a9e;
    color: #ffffff;
    transform: scale(1.05);
}

.slide-counter {
    display: none;
}


.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    color: #333;
    font-size: clamp(14px, 3vw, 16px);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: clamp(8px, 2vw, 12px);
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: clamp(14px, 3vw, 16px);
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #5468ff;
    box-shadow: 0 0 0 3px rgba(84, 104, 255, 0.1);
}


/* Disabled quiz NEXT/SUBMIT buttons: faded brand blue (keeps brand identity) */
button[onclick*="nextQuizSection"]:disabled,
button[onclick*="showQuizReview"]:disabled {
    background: rgba(0, 138, 210, 0.3) !important;
    background-image: none !important;
    color: rgba(255,255,255,0.55) !important;
    border-color: rgba(255,255,255,0.35) !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    transform: none !important;
}


.validation-message {
    margin-top: 10px;
    color: #5468ff;
    font-size: 14px;
    display: none;
}

.validation-message.show {
    display: block;
}

.m1{
    padding: 80px 50px;
    margin-top: 60px;
}

.t1{
    width: 100%;
    text-align: center;
    margin-bottom: 40px;
}

.t1 p{
    font-size: 30px;
    margin-top: 30px;
}

.d1{
    margin: 60px 0 0 0;
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
}

.d1 div{
    width: 550px;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3), 0 1px 4px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    text-align: center;
    padding: 0 0 10px 0;
    margin: 0 0 70px 0;
}

.d1 div img{
    display: block;
    width: inherit;
    transition: .5s;
    cursor: pointer;
}

.d1 img:hover{
    transform: scale(1.05);
}

.d1 div h2{
    margin: 20px 0 10px 0;
    text-align: center;
    font-size: 18px;
    font-weight: normal;
}

/* RESPONSIVE MEDIA QUERIES FOR QUIZ PAGE */

/* Mobile-specific optimizations (max-width: 600px) */
@media (max-width: 600px) {
    body, html {
        overflow: auto;
        height: auto;
    }

    .quiz-section {
        height: auto;
        min-height: 100vh;
    }

    .quiz-section-panel {
        height: auto;
        min-height: 100vh;
        padding: clamp(20px, 5vw, 30px) clamp(15px, 4vw, 20px);
    }

    .quiz-slideshow {
        height: auto;
        min-height: clamp(300px, 70vw, 500px);
    }

    .slide-container {
        height: auto;
        min-height: clamp(250px, 60vw, 450px);
    }

    .slide-viewer {
        min-height: clamp(250px, 60vw, 450px);
    }

    .slide-nav {
        width: clamp(35px, 10vw, 45px);
        height: clamp(35px, 10vw, 45px);
        left: clamp(5px, 2vw, 10px);
    }

    .slide-nav-next {
        right: clamp(5px, 2vw, 10px);
    }

    .slide-controls {
        position: fixed !important;
        bottom: 15px !important;
        left: 20px !important;
        right: auto !important;
        justify-content: flex-start !important;
        width: auto !important;
    }

    .slide-select-btn {
        position: relative;
        margin-top: 0;
        width: auto;
        padding: clamp(10px, 2vw, 14px) clamp(20px, 5vw, 30px);
    }

    .quiz-section-panel h2.question-overlay {
        max-width: 90%;
        font-size: clamp(13px, 3vw, 16px);
    }

    button[onclick*="nextQuizSection"],
    button[onclick*="showQuizReview"] {
        width: clamp(150px, 80vw, 250px);
        padding: clamp(10px, 2vw, 14px) clamp(20px, 5vw, 40px);
        font-size: clamp(14px, 3vw, 18px);
    }

    #quizSection0 {
        padding: clamp(15px, 4vw, 25px) !important;
    }

    #quizSection0 > div {
        grid-template-columns: 1fr !important;
    }

    input, select {
        padding: clamp(8px, 2vw, 12px) !important;
        font-size: clamp(14px, 3vw, 16px) !important;
    }

    label {
        font-size: clamp(13px, 2.5vw, 16px) !important;
    }
}

/* Landscape orientation on mobile devices - small height adjustments already handled by dvh */
@media screen and (orientation: landscape) and (max-height: 600px) {
    .quiz-section-panel h2.question-overlay {
        font-size: clamp(12px, 2vw, 14px);
        padding: clamp(8px, 1.5vw, 12px) clamp(12px, 2vw, 20px);
    }

    .choice-counter {
        font-size: clamp(10px, 2vw, 12px);
        padding: clamp(8px, 1.5vw, 12px) clamp(12px, 2vw, 20px);
        right: 5px;
        left: auto;
        transform: none;
    }
}

/* Tablet and larger (600px+) */
@media (min-width: 600px) {
    .slide-nav {
        width: clamp(45px, 10vw, 56px);
        height: clamp(45px, 10vw, 56px);
    }

    .slide-select-btn {
        position: relative;
    }
}

/* ========== LANDSCAPE MOBILE OPTIMIZATION (max-width: 1024px, landscape) ========== */
@media screen and (orientation: landscape) and (max-width: 1024px) {
    /* Core: everything clips cleanly at 100dvh, no outer scrolling */
    .quiz-section,
    .quiz-frame,
    .quiz-display {
        height: 100dvh !important;
        overflow: hidden !important;
        background: transparent !important;
    }

    /* All panels start hidden cleanly */
    .quiz-section-panel {
        height: 100dvh !important;
        overflow: hidden !important;
        justify-content: flex-start !important;
    }

    /* -------- Section 0: Property Info (scrolls within itself) -------- */
    #quizSection0 {
        padding: 16px 20px !important;
        max-width: 100% !important;
        margin: 0 !important;
        background: white !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        height: 100dvh !important;
        box-sizing: border-box !important;
    }

    #quizSection0 h2 {
        font-size: 18px !important;
        margin: 0 0 4px 0 !important;
    }

    #quizSection0 > p {
        font-size: 12px !important;
        margin: 0 0 10px 0 !important;
    }

    #quizSection0 label {
        font-size: 13px !important;
        margin-bottom: 4px !important;
    }

    #quizSection0 input,
    #quizSection0 select {
        padding: 6px 8px !important;
        font-size: 13px !important;
    }

    #nextBtn0 {
        padding: 7px 28px !important;
        font-size: 13px !important;
    }

    #validationMsg0 {
        font-size: 10px !important;
        margin-top: 3px !important;
    }

    /* -------- Image sections 1-6: fullscreen fixed slideshow -------- */
    /* .quiz-slideshow is already position:fixed globally — no overrides needed */

    /* Select button: fixed bottom-left */
    .slide-controls {
        position: fixed !important;
        bottom: 10px !important;
        left: 20px !important;
        padding: 0 !important;
        z-index: 201 !important;
    }

    .slide-select-btn {
        padding: 8px 24px !important;
        font-size: 14px !important;
    }

    /* Next button: fixed bottom-right (for image sections only) */
    #quizSection1 > div:last-child,
    #quizSection2 > div:last-child,
    #quizSection3 > div:last-child,
    #quizSection4 > div:last-child,
    #quizSection5 > div:last-child,
    #quizSection6 > div:last-child {
        position: fixed !important;
        bottom: 10px !important;
        right: 20px !important;
        margin: 0 !important;
        padding: 0 !important;
        text-align: right !important;
        z-index: 201 !important;
    }

    #nextBtn1, #nextBtn2, #nextBtn3,
    #nextBtn4, #nextBtn5, #nextBtn6 {
        padding: 8px 24px !important;
        font-size: 14px !important;
        box-shadow: none !important;
        background: #008ad2 !important;
        background-image: none !important;
        border-radius: 4px !important;
    }

    /* -------- Review section: scrolls within itself -------- */
    #quizReviewSection {
        height: 100dvh !important;
        overflow: hidden !important;
        background: white !important;
    }

    #reviewSliderView {
        overflow-y: auto !important;
        height: 100dvh !important;
        box-sizing: border-box !important;
        padding: 16px 20px !important;
    }
}

/* ========== DESKTOP LARGE SCREEN — section 0 property basics ========== */
@media screen and (min-width: 1025px) {
    #quizSection0 {
        padding: 50px 80px !important;
    }

    #quizSection0 h2 {
        font-size: 36px !important;
        margin-bottom: 10px !important;
    }

    #quizSection0 > p,
    #quizSection0 .section-subtitle {
        font-size: 18px !important;
        margin-bottom: 32px !important;
    }

    #quizSection0 .form-group label,
    #quizSection0 label {
        font-size: 16px !important;
        margin-bottom: 8px !important;
    }

    #quizSection0 input,
    #quizSection0 select {
        padding: 14px 18px !important;
        font-size: 16px !important;
    }

    #quizSection0 .budget-options {
        gap: 16px !important;
    }

    #quizSection0 .budget-options label,
    #quizSection0 .budget-options .budget-option {
        font-size: 15px !important;
        padding: 16px 20px !important;
    }

    #nextBtn0 {
        padding: 14px 60px !important;
        font-size: 16px !important;
    }
}