/* GLOBAL RESET & VARIABLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0b3c5d;
    --secondary: #328cc1;
    --accent: #d96c75;
    --highlight: #f2c94c;
    --soft: #f4f7fb;
    --dark: #1e1e1e;
    --white: #fff;
}

body {
    font-family: system-ui, sans-serif;
    background: var(--soft);
    color: var(--dark);
    line-height: 1.6;
}

/* NAVIGATION */
header {
    position: sticky;
    top: 0;
    background: rgba(11, 60, 93, 0.95);
    color: white;
    padding: 1rem;
    z-index: 999;
}

nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    height: 2px;
    width: 0;
    bottom: -4px;
    left: 0;
    background: var(--highlight);
    transition: .3s;
}

nav a:hover::after {
    width: 100%;
}
/* HERO LAYOUT UPDATE */
.hero {
    height: 70vh;
    display: flex;
    flex-direction: row; /* Changed to row for side-by-side */
    justify-content: center;
    align-items: center;
    text-align: left; /* Align text to the left for better grouping */
    gap: 3rem; /* Space between logo and text group */
    color: white;
    padding: 0 2rem;
    background: linear-gradient(rgba(0,0,0,.5), rgba(0,0,0,.5)),
                url("img/banner.jpg") center/cover;
}

.hero-logo {
    width: 180px; /* Increased slightly for horizontal layout */
    height: auto;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
}

.hero-text {
    display: flex;
    flex-direction: column;
}

.hero h1 { 
    font-size: 3.5rem; 
    line-height: 1.1;
}

/* MOBILE RESPONSIVENESS */
@media (max-width: 768px) {
    .hero {
        flex-direction: column; /* Stack them back on small screens */
        text-align: center;
        gap: 1.5rem;
    }
    .hero h1 { font-size: 2.5rem; }
}

/* BUTTONS */
.btn {
    background: var(--accent);
    padding: .8rem 1.5rem;
    color: white;
    border-radius: 6px;
    margin-top: 1rem;
    display: inline-block;
    text-decoration: none;
    transition: .3s;
}

.btn:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

/* IMPROVED SECTIONS */
.section {
    padding: 2.5rem 1.5rem; /* Reduced from 5rem to 2.5rem */
    max-width: 1100px;
    margin: auto;
    background: transparent;
}


/* TITLES */
h2 {
    color: var(--primary);
    font-size: 2rem; /* Slightly smaller for better fit */
    margin-bottom: 1.5rem; /* Reduced from 2rem to 1.2rem */
    text-align: center;
}

h2::after {
    content: '';
    display: block;
    width: 80%;      /* Relative to the screen width */
    max-width: 500px; /* Limits size on desktop */
    height: 4px;
    background: var(--highlight);
    margin: 10px auto;
}

h3 {
    color: var(--secondary); /* Uses your blue secondary color */
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em; /* Makes the title look "tighter" and more modern */
}


/* SECTION CONTENT (The Card Container) */
.section-content {
    background: var(--white);
    padding: 2rem; /* Reduced from 2.5rem to 2rem */
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.04); /* Softer shadow looks better closer together */
    border: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 1rem;
}

/* Optional: Remove margin from the very last card in a section */
.section-content:last-child {
    margin-bottom: 0;
}



/* GRIDS & CARDS */
.grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    transition: all .3s ease;
    border: 1px solid transparent;
    box-shadow: 0 6px 20px rgba(0,0,0,.05);
    margin-bottom: 1.2rem; /* Adjust this value to get the desired gap */
}



.card:hover {
    transform: translateY(-6px);
    border-color: var(--secondary);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.card img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* BOOK LAYOUTS */
/* REUSABLE SPLIT LAYOUT */
/* Adjust the Split Layout Gap */
.split-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem; /* Reduced from 3rem to 2rem */
    align-items: start;
}

.split-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Optional: Add a small decorative element to h3 in split sections */
.split-text h3 {
    border-left: none;
    padding-left: 10px;
    margin-left: -14px; /* Pulls it back so the text stays aligned */
}

.split-text p {
    margin-bottom: 1rem;
}

.split-text ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.split-text li {
    margin-bottom: 0.5rem;
    padding-left: 1.2rem;
    position: relative;
}

.split-text li::before {
    content: '•';
    color: var(--secondary);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* MOBILE ADJUSTMENT */
@media (max-width: 768px) {
    /* SMART NAVBAR */
    nav {
        gap: 1rem;       /* Reduced spacing */
        flex-wrap: wrap; /* Allows links to move to a second row if needed */
        font-size: 0.9rem;
    }

    header {
        padding: 0.8rem 0.5rem;
    }

    /* Keep your existing hero/split-content fixes here as well */
    .hero {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    .hero h1 { font-size: 2.2rem; }
    
    .split-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}



/* FOOTER */
footer {
    background: var(--primary);
    color: white;
    text-align: center;
    padding: 2rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .gramatica { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.5rem; }
}



/* CHARACTER STYLING */
.footer-character {
    text-align: center;
    padding: 2rem 0; /* Space above and below the character */
    margin-top: 1rem;
    background: #fff;
}

.footer-character img {
    max-width: 300px; /* Adjust this to make the character bigger or smaller */
    height: auto;
    display: block;
    margin: 0 auto;
}



/* GRID STYLES */
.vocab-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    margin-top: 1.5rem;
}
.vocab-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}
.vocab-item img:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}


.set-title {
    border-bottom: 2px solid var(--highlight);
    display: inline-block;
    margin-bottom: 1rem;
}


/* POPUP (MODAL) STYLES */
.modal {
    display: none; 
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
}
.modal-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255,255,255,0.2);
}
.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}