:root {
    --primary-font: 'Playfair Display', serif;
    --secondary-font: 'Lora', serif;
    --background-color: #f0f4f8;
    --text-color: #333;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 8px rgba(0,0,0,0.1);
    --card-hover-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px; /* Adjust this value based on nav height */
}

body {
    margin: 0;
    font-family: var(--secondary-font);
    background-image: url('il_570xN.4661792042_hs2n.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-color: var(--background-color);
    color: var(--text-color);
    text-align: center;
}

#page-index {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: rgba(0, 90, 141, 0.95); /* A darker blue from the theme */
    padding: 0.75rem 0;
    z-index: 1001; /* Higher than pointing hand */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#page-index ul {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;
}

#page-index li {
    margin: 0.25rem 1.5rem;
}

#page-index a {
    text-decoration: none;
    color: white;
    font-family: var(--primary-font);
    font-size: 1.2rem;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: border-bottom-color 0.3s ease;
}

#page-index a:hover {
    border-bottom-color: white;
}

header {
    padding: 2rem 1rem;
    background: linear-gradient(to bottom, rgba(135, 206, 235, 0.8), rgba(240, 244, 248, 0.8));
}

h1 {
    font-family: var(--primary-font);
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #005a8d;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

#main-balloon {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
}

#pointing-hand {
    position: fixed; /* Allow positioning relative to the viewport */
    z-index: 1000;   /* Keep it on top of other elements */
    width: 150px;    /* A fixed size so it's not too big */
    height: auto;
    pointer-events: none; /* Prevent it from blocking clicks on elements underneath */
    transition: transform 0.5s ease-out; /* Smooth rotation */
}

#moving-text-container {
    padding: 1rem 0;
}

.moving-text {
    font-family: var(--primary-font);
    font-size: 2.5rem;
    font-weight: bold;
    color: #c0392b; /* A strong red color */
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin: 0.5rem 0;
    animation: shake 0.8s cubic-bezier(.36,.07,.19,.97) both infinite;
}

#moving-text-2 {
    animation-delay: 0.2s;
}

@keyframes shake {
    10%, 90% {
        transform: translate3d(-1px, 0, 0);
    }
    20%, 80% {
        transform: translate3d(2px, 0, 0);
    }
    30%, 50%, 70% {
        transform: translate3d(-4px, 0, 0);
    }
    40%, 60% {
        transform: translate3d(4px, 0, 0);
    }
}


#scenario-text {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 1rem auto 0;
    line-height: 1.6;
    color: #333;
    text-align: left;
}

main {
    padding: 2rem 1rem;
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
}

.gallery-card img {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-card figcaption {
    padding: 1rem;
    font-weight: bold;
    font-size: 1.1rem;
}

.celebrity-description {
    padding: 0 1rem 1rem;
    font-size: 0.9rem;
    line-height: 1.4;
    text-align: left;
    color: #555;
    margin: 0;
}

.examples-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

.examples-container p {
    font-size: 1.2rem;
    line-height: 1.7;
    text-align: left;
    margin: 0 0 1rem 0;
    font-family: var(--secondary-font);
    font-style: italic;
    color: #444;
}

.examples-container p:last-child {
    margin-bottom: 0;
}

#facts-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 1rem;
    text-align: left;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    background-color: transparent;
    box-shadow: none;
    border-radius: 0;
}

#facts-container h2 {
    font-family: var(--primary-font);
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    color: #005a8d;
    grid-column: 1 / -1; /* Make title span all columns */
}

.facts-category {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 5px solid;
}

.facts-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
}

.facts-category:nth-of-type(1) { border-color: #e74c3c; } /* Humanitarian */
.facts-category:nth-of-type(2) { border-color: #3498db; } /* Science */
.facts-category:nth-of-type(3) { border-color: #9b59b6; } /* Culture */
.facts-category:nth-of-type(4) { border-color: #1abc9c; } /* Contemporary */


.facts-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.facts-icon {
    width: 40px;
    height: 40px;
}

#facts-container h3 {
    font-family: var(--primary-font);
    font-size: 1.5rem;
    margin: 0;
    color: #333;
    border-bottom: none;
    padding-bottom: 0;
}

#facts-container p {
    font-style: italic;
    color: #555;
    margin-bottom: 1rem;
}

#facts-container ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

#facts-container li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    padding-left: 1.5rem;
    position: relative;
}

#facts-container li::before {
    content: '•';
    position: absolute;
    left: 0;
    font-size: 1.2rem;
    line-height: 1.6;
}

.facts-category:nth-of-type(1) li::before { color: #e74c3c; }
.facts-category:nth-of-type(2) li::before { color: #3498db; }
.facts-category:nth-of-type(3) li::before { color: #9b59b6; }
.facts-category:nth-of-type(4) li::before { color: #1abc9c; }


#fill-gaps-exercise {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem 2rem 2rem 4rem;
    background-color: #fff;
    background-image: url('notebook_paper.png');
    background-size: 100% auto;
    border-radius: 3px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    text-align: left;
    border: 1px solid #ddd;
}

#fill-gaps-exercise h2 {
    font-family: 'Indie Flower', cursive;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
    color: #333;
}

.fill-gaps-item {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    line-height: 2.5;
    font-family: 'Indie Flower', cursive;
    color: #002d62; /* Blue ink color */
}

.fill-gaps-item input {
    font-family: 'Indie Flower', cursive;
    font-size: 1.2rem;
    border: none;
    border-bottom: 2px solid #777;
    border-radius: 0;
    padding: 0.1rem 0.3rem;
    margin: 0 0.3rem;
    width: 180px;
    transition: border-color 0.3s ease;
    background: transparent;
    color: #002d62;
}

.fill-gaps-item input:focus {
    outline: none;
    border-color: #005a8d;
}

.verb-hint {
    font-style: normal;
    font-weight: bold;
    color: #c0392b; /* Red ink for hints */
    margin-left: 0.2rem;
}

.fill-gaps-item input.correct {
    border-color: #28a745;
    background-color: rgba(40, 167, 69, 0.1);
}

.fill-gaps-item input.incorrect {
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

#check-answers-btn {
    display: block;
    margin: 2rem auto 1rem;
    padding: 0.8rem 1.5rem;
    font-family: var(--primary-font);
    font-size: 1.2rem;
    background-color: #005a8d;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#check-answers-btn:hover {
    background-color: #00456b;
}

#feedback-message {
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 1rem;
    min-height: 1.5rem;
}

#choices-exercise {
    max-width: 900px;
    margin: 4rem auto;
    padding: 2rem;
    background-color: #fffaf0;
    border: 1px solid #ddd;
    box-shadow: var(--card-shadow);
    text-align: left;
    border-radius: 8px;
}

#choices-exercise h2 {
    font-family: var(--primary-font);
    font-size: 2.2rem;
    text-align: center;
    color: #005a8d;
    margin-bottom: 1rem;
}

#choices-exercise h3 {
    font-family: var(--primary-font);
    font-size: 1.5rem;
    margin-top: 2rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
    color: #333;
}

#choices-exercise p, #choices-exercise li {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #333;
}

#choices-exercise > p {
    font-family: var(--secondary-font);
    font-style: italic;
    text-align: center;
    margin-bottom: 2rem;
}


#choices-exercise ol, #choices-exercise ul {
    padding-left: 2rem;
    list-style-position: outside;
}

#choices-exercise ol > li {
    margin-bottom: 1.5rem;
    padding-left: 0.5rem;
}

#choices-exercise ul > li {
    margin-bottom: 0.75rem;
}

#choices-exercise li p:first-of-type {
    font-weight: bold;
}

#choices-exercise li p {
    margin: 0.3rem 0;
    font-family: 'Indie Flower', cursive;
    color: #002d62;
}