/* ========================
   GRAMOND QUIZ - Pixel-Perfect Figma Design
   Font: Poppins
   ======================== */

:root {
    /* Colors from Figma */
    --bg-white: #FFFFFF;
    --bg-light: #F8F8F8;
    --nav-dark: #2D2D2D;
    --gold: #EBBE27;
    --gold-light: #E5C55A;
    --text-black: #1A1A1A;
    --text-gray: #666666;
    --border-dark: #1A1A1A;
    --correct-green: #4CAF50;
    --incorrect-red: #E53935;

    /* Typography - Poppins */
    --font-body: 'Poppins', sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-white);
    color: var(--text-black);
}

/* ========================
   Screen System
   ======================== */
.screen {
    display: none;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    animation: fadeIn 0.5s ease;
    position: relative;
}

.screen.active {
    display: block;
}

.screen.active:not(.context-screen):not(.correct-screen):not(.confirmation-screen) {
    background-image: url("../images/g.png");
    background-size: 40%;
    background-repeat: no-repeat;
    background-position: bottom 0px left 0px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ========================
   TOP NAVIGATION BAR - Scrolling Marquee
   ======================== */
.top-nav {
    background-color: var(--nav-dark);
    padding: 15px 0;
    position: relative;
    overflow: hidden;
}

/* Marquee Animation */
.marquee-wrapper {
    width: 100%;
    overflow: hidden;
}

.marquee-content {
    display: flex;
    animation: marquee 40s linear infinite;
    white-space: nowrap;
}

.marquee-content span {
    color: white;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 0.5px;
    padding-right: 0;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* G Logo under navbar - overlapping with negative margin */
.nav-logo {
    display: flex;
    justify-content: center;
    margin-top: -10px;
    position: relative;
    z-index: 10;
}

.g-logo-img {
    width: 66px;
    height: 60px;
    display: block;
}

/* ========================
   LANDING PAGE
   ======================== */
.landing-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 40px 40px;
    height: calc(100vh - 100px);
    overflow: visible;
    position: relative;
}

/* BD Book on the left side */
#screen-landing {
    overflow: visible;
}

.landing-book {
    position: absolute;
    left: 30px;
    top: 60%;
    transform: translateY(-50%) rotate(-8deg);
    z-index: 100;
}

.landing-book-img {
    width: 250px;
    height: auto;
    filter: drop-shadow(5px 5px 15px rgba(0, 0, 0, 0.3));
}

/* Hide book on smaller screens to avoid overlapping text */
@media (max-width: 1600px) {
    .landing-book {
        display: none;
    }
}

.landing-left {
    flex: 1;
    max-width: 550px;
    position: relative;
    padding-left: 60px;
}

.landing-right {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Shadow under Palais de Justice */
.palais-shadow {
    position: absolute;
    bottom: -130px;
    left: 50%;
    transform: translateX(-50%);
    width: 180%;
    height: auto;
    z-index: 0;
    pointer-events: none;
}

.palais-img {
    position: relative;
    z-index: 1;
}

/* Circular Badge Image - Rotating */
.badge-container {
    position: absolute;
    left: -30px;
    top: -100px;
}

.badge-img {
    width: 130px;
    height: auto;
    animation: rotateBadge 20s linear infinite;
}

@keyframes rotateBadge {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Landing Title - Poppins */
.landing-title {
    font-family: var(--font-body);
    font-size: 55px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--gold);
    margin-bottom: 25px;
}

/* Subtitle */
.landing-subtitle {
    font-family: var(--font-body);
    font-size: 19px;
    font-weight: 400;
    line-height: 1.8;
    color: var(--text-black);
    margin-bottom: 40px;
}

.landing-subtitle strong {
    font-weight: 600;
}

/* Palais Illustration */
.palais-img {
    max-width: 900px;
    width: 100%;
    height: auto;
}

/* ========================
   BUTTONS
   ======================== */
.btn-enter {
    font-family: var(--font-body);
    font-size: 20px;
    font-weight: 500;
    padding: 16px 32px;
    background-color: transparent;
    color: var(--text-black);
    border: 2px solid var(--border-dark);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0px 5px 0px var(--border-dark);
}

.btn-enter:hover {
    background-color: #fff;
    border: 2px solid var(--gold);
    color: var(--gold);
    box-shadow: none;
    transform: translateY(8px);
}

.btn-next {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    padding: 16px 40px;
    background-color: var(--gold);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 30px;
}

.btn-next:hover {
    background-color: #B8921F;
}

/* ========================
   HALL SCREENS
   ======================== */
.hall-content,
.hall-choice-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 60px 40px;
    text-align: center;
}

.hall-illustration {
    margin-bottom: 40px;
}

.palais-hall {
    max-width: 400px;
    width: 100%;
    opacity: 0.9;
}

.hall-title,
.choice-title {
    font-family: var(--font-display);
    font-size: 36px;
    color: var(--gold);
    margin-bottom: 15px;
}

.hall-subtitle {
    font-size: 16px;
    color: var(--text-gray);
    margin-bottom: 40px;
}

/* Room Selection */
.rooms-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 400px;
    margin-top: 40px;
}

.room-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 30px;
    background-color: var(--bg-light);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-body);
}

.room-btn:hover:not(.disabled) {
    border-color: var(--gold);
    background-color: white;
}

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

.room-year {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 5px;
}

.room-name {
    font-size: 14px;
    color: var(--text-gray);
}

/* ========================
   QUESTION SCREENS
   ======================== */
.question-screen {
    background-color: var(--bg-light);
}

.question-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 80px 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.question-header {
    text-align: center;
    margin-bottom: 50px;
}

.room-indicator {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.trial-name {
    font-family: var(--font-display);
    font-size: 28px;
    color: var(--text-black);
}

.question-content {
    flex: 1;
}

.question-text {
    font-family: var(--font-body);
    font-size: 20px;
    font-weight: 500;
    color: var(--text-black);
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.5;
}

/* Answer Buttons */
.answers-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.answer-btn {
    width: 100%;
    padding: 20px 25px;
    background-color: white;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text-black);
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.answer-btn:hover:not(.selected):not(.correct):not(.incorrect) {
    border-color: var(--gold);
    background-color: #FFFDF5;
}

.answer-btn.selected {
    border-color: var(--gold);
    background-color: #FFFDF5;
}

.answer-btn.correct {
    background-color: var(--correct-green);
    border-color: var(--correct-green);
    color: white;
}

.answer-btn.incorrect {
    background-color: var(--incorrect-red);
    border-color: var(--incorrect-red);
    color: white;
}

.answer-btn.disabled {
    pointer-events: none;
}

.answer-btn.show-correct {
    border-color: var(--correct-green);
    background-color: #E8F5E9;
}

/* Feedback */
.feedback-container {
    text-align: center;
    margin-top: 30px;
}

.feedback-text {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.feedback-text.correct {
    color: var(--correct-green);
}

.feedback-text.incorrect {
    color: var(--incorrect-red);
}

/* ========================
   RESULTS SCREEN
   ======================== */
.results-container,
.reward-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 60px 40px;
    text-align: center;
}

.results-title,
.reward-title {
    font-family: var(--font-display);
    font-size: 42px;
    color: var(--gold);
    margin-bottom: 15px;
}

.results-subtitle {
    font-size: 16px;
    color: var(--text-gray);
    margin-bottom: 40px;
}

.score-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
    margin-bottom: 25px;
}

.score-value {
    font-family: var(--font-display);
    font-size: 80px;
    font-weight: 600;
    color: var(--gold);
}

.score-total {
    font-family: var(--font-display);
    font-size: 40px;
    color: var(--text-gray);
}

.score-message {
    font-size: 15px;
    color: var(--text-black);
    max-width: 300px;
    margin-bottom: 40px;
    line-height: 1.6;
}

/* ========================
   REWARD SCREEN
   ======================== */
.reward-content {
    max-width: 400px;
    margin-bottom: 40px;
}

.reward-text {
    font-size: 16px;
    margin-bottom: 25px;
    line-height: 1.7;
}

.reward-instructions {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
}

.reward-instructions a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
}

.reward-instructions a:hover {
    text-decoration: underline;
}

/* ========================
   RESPONSIVE DESIGN
   ======================== */
@media (max-width: 992px) {
    .landing-content {
        flex-direction: column;
        text-align: center;
        padding: 80px 30px 40px;
    }

    .landing-left {
        max-width: 100%;
        margin-bottom: 50px;
    }

    .badge-container {
        display: flex;
        justify-content: center;
    }

    .landing-title {
        font-size: 40px;
    }

    .landing-subtitle br {
        display: none;
    }

    .palais-img {
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .top-nav {
        padding: 12px 0;
    }

    .marquee-content span {
        font-size: 11px;
    }

    .landing-title {
        font-size: 32px;
    }

    .landing-subtitle {
        font-size: 14px;
    }

    .question-text {
        font-size: 18px;
    }

    .answer-btn {
        padding: 16px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .landing-title {
        font-size: 28px;
    }

    .badge-img {
        width: 100px;
    }

    .palais-img {
        max-width: 300px;
    }

    .room-year {
        font-size: 26px;
    }

    .question-container {
        padding: 60px 25px;
    }

    .trial-name {
        font-size: 22px;
    }

    .score-value {
        font-size: 60px;
    }
}

/* ========================
   MOBILE / TABLET PORTRAIT MESSAGE
   ======================== */

.mobile-message {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #EBBE27;
    background-image: url('../images/bg-gold-g.png');
    background-size: 40%;
    background-repeat: no-repeat;
    background-position: bottom left;
    z-index: 99999;
    justify-content: center;
    align-items: center;
}

.mobile-message-content {
    text-align: center;
    padding: 40px;
    max-width: 400px;
}

.mobile-logo {
    width: 80px;
    height: auto;
    margin-bottom: 30px;
}

.mobile-title {
    font-family: Poppins;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-black);
    margin-bottom: 20px;
}

.mobile-text {
    font-family: var(--font-body);
    font-size: 18px;
    color: var(--text-black);
    margin-bottom: 20px;
    line-height: 1.6;
}

.mobile-hint {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-black);
    opacity: 0.7;
    font-style: italic;
}

/* Show on mobile and tablet portrait */
@media screen and (max-width: 768px),
screen and (max-width: 1024px) and (orientation: portrait) {
    .mobile-message {
        display: flex;
    }

    .screen,
    #animation-overlay {
        display: none !important;
    }
}

/* ========================
   FORCE POPPINS - HIGH SPECIFICITY OVERRIDES
   Ensures Poppins is applied over WordPress theme fonts
   ======================== */
.gramond-quiz-fullscreen,
.gramond-quiz-fullscreen *,
.gramond-quiz-content,
.gramond-quiz-content *,
body.gramond-quiz-fullscreen,
.screen,
.screen * {
    font-family: 'Poppins', sans-serif !important;
}

/* Specific text elements with highest priority */
.gramond-quiz-fullscreen .landing-title,
.gramond-quiz-fullscreen .landing-subtitle,
.gramond-quiz-fullscreen .hall-title,
.gramond-quiz-fullscreen .hall-subtitle,
.gramond-quiz-fullscreen .context-title,
.gramond-quiz-fullscreen .question-text-new,
.gramond-quiz-fullscreen .trial-title,
.gramond-quiz-fullscreen .correct-title,
.gramond-quiz-fullscreen .wrong-title,
.gramond-quiz-fullscreen .correct-text,
.gramond-quiz-fullscreen .email-title,
.gramond-quiz-fullscreen .email-subtitle,
.gramond-quiz-fullscreen .confirmation-title,
.gramond-quiz-fullscreen .confirmation-text,
.gramond-quiz-fullscreen .reward-title,
.gramond-quiz-fullscreen .reward-text,
.gramond-quiz-fullscreen .btn-enter,
.gramond-quiz-fullscreen .btn-next,
.gramond-quiz-fullscreen input,
.gramond-quiz-fullscreen button,
.gramond-quiz-fullscreen p,
.gramond-quiz-fullscreen span,
.gramond-quiz-fullscreen h1,
.gramond-quiz-fullscreen h2,
.gramond-quiz-fullscreen h3 {
    font-family: 'Poppins', sans-serif !important;
}