/* Template 51 - Chalkboard School / Nostalgic Academic */
@import url('https://fonts.googleapis.com/css2?family=Architects+Daughter&family=Patrick+Hand&family=Caveat:wght@400;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
    --chalk-green: #2d4a3e;
    --chalk-dark: #1e332a;
    --chalk-frame: #5c4033;
    --chalk-white: #f5f5f0;
    --chalk-cream: #e8e4d9;
    --chalk-yellow: #f7e98e;
    --chalk-pink: #f4a7b9;
    --chalk-blue: #7ec8e3;
    --chalk-orange: #f5b971;
    --wood-brown: #8b5a2b;
    --wood-dark: #654321;
    --text-chalk: #f0ebe0;
    --text-dim: #c5c0b5;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    font-family: 'Patrick Hand', cursive;
    line-height: 1.8;
    color: var(--text-chalk);
    background: var(--chalk-dark);
    font-weight: 400;
    overflow-x: hidden;
    font-size: 1.1rem;
}

/* Chalkboard texture */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)'/%3E%3C/svg%3E"),
        linear-gradient(135deg, var(--chalk-green) 0%, var(--chalk-dark) 100%);
    opacity: 0.15;
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header - Wooden Frame Top */
.site-header {
    background: linear-gradient(180deg, var(--wood-brown) 0%, var(--wood-dark) 100%);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4), inset 0 -3px 10px rgba(0,0,0,0.3);
    border-bottom: 8px solid var(--chalk-green);
}

/* Wood grain texture */
.site-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent 0px,
        transparent 30px,
        rgba(0,0,0,0.1) 30px,
        rgba(0,0,0,0.1) 32px
    );
    pointer-events: none;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    position: relative;
}

.site-logo a {
    font-family: 'Architects Daughter', cursive;
    font-size: 1.8rem;
    color: var(--chalk-cream);
    text-decoration: none;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    position: relative;
}

.site-logo a::before {
    content: '✎';
    margin-right: 10px;
    font-size: 1.2rem;
}

.site-logo a:hover {
    color: var(--chalk-yellow);
    text-shadow: 2px 2px 0 rgba(0,0,0,0.4), 0 0 10px rgba(247, 233, 142, 0.3);
}

.site-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.site-nav a {
    color: var(--chalk-cream);
    text-decoration: none;
    font-family: 'Caveat', cursive;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    position: relative;
}

.site-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--chalk-yellow);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    opacity: 0.8;
}

.site-nav a:hover {
    color: var(--chalk-yellow);
}

.site-nav a:hover::after {
    transform: scaleX(1);
}

/* Hero Section - Main Chalkboard */
.section.head {
    padding: 5rem 0;
    text-align: center;
    position: relative;
    background: var(--chalk-green);
    margin: 2rem;
    border-radius: 4px;
    box-shadow: 
        inset 0 0 50px rgba(0,0,0,0.3),
        0 0 0 15px var(--wood-brown),
        0 0 0 18px var(--wood-dark),
        0 10px 30px rgba(0,0,0,0.4);
}

.section.head::before {
    content: 'TODAY\'S LESSON';
    display: block;
    font-family: 'Caveat', cursive;
    font-size: 1rem;
    color: var(--chalk-blue);
    letter-spacing: 2px;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.section.head h1 {
    font-family: 'Architects Daughter', cursive;
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--chalk-white);
    text-shadow: 2px 2px 0 rgba(0,0,0,0.2);
    position: relative;
}

/* Underline effect like chalk */
.section.head h1::after {
    content: '';
    display: block;
    width: 200px;
    height: 4px;
    background: var(--chalk-yellow);
    margin: 1rem auto 0;
    border-radius: 2px;
    opacity: 0.9;
}

.section.head p {
    font-family: 'Patrick Hand', cursive;
    font-size: 1.25rem;
    color: var(--text-chalk);
    max-width: 700px;
    margin: 0 auto;
    padding: 1.5rem;
    position: relative;
}

/* Chalk dust effect */
.section.head p::before {
    content: '"';
    font-size: 3rem;
    color: var(--chalk-pink);
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0.6;
}

.section.head p::after {
    content: '"';
    font-size: 3rem;
    color: var(--chalk-pink);
    position: absolute;
    right: 0;
    bottom: -1rem;
    opacity: 0.6;
}

/* Section Styling */
.section {
    padding: 4rem 0;
}

.section header {
    text-align: center;
    margin-bottom: 3rem;
}

.section header h2 {
    font-family: 'Architects Daughter', cursive;
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    color: var(--chalk-white);
    text-shadow: 2px 2px 0 rgba(0,0,0,0.2);
    position: relative;
    display: inline-block;
}

.section header h2::before {
    content: '★';
    position: absolute;
    left: -2.5rem;
    color: var(--chalk-yellow);
    font-size: 1.5rem;
    animation: starTwinkle 2s ease-in-out infinite;
}

@keyframes starTwinkle {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

.section header p {
    font-family: 'Patrick Hand', cursive;
    font-size: 1.15rem;
    color: var(--text-dim);
    max-width: 550px;
    margin: 0 auto;
}

/* Footer - Bottom Frame */
.footer {
    background: linear-gradient(0deg, var(--wood-brown) 0%, var(--wood-dark) 100%);
    padding: 0;
    margin-top: 3rem;
    box-shadow: 0 -8px 20px rgba(0,0,0,0.3), inset 0 3px 10px rgba(0,0,0,0.3);
    border-top: 8px solid var(--chalk-green);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent 0px,
        transparent 30px,
        rgba(0,0,0,0.1) 30px,
        rgba(0,0,0,0.1) 32px
    );
    pointer-events: none;
}

.footer-columns {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 2.5rem 2rem;
    gap: 3rem;
    position: relative;
}

.footer-about {
    flex: 1;
    max-width: 400px;
}

.footer-tagline {
    font-family: 'Patrick Hand', cursive;
    color: var(--chalk-cream);
    line-height: 1.9;
    font-size: 1.05rem;
}

.footer-links ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    font-family: 'Caveat', cursive;
    color: var(--chalk-cream);
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    position: relative;
}

.footer-links a::before {
    content: '→';
    margin-right: 6px;
    color: var(--chalk-yellow);
    transition: transform 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--chalk-yellow);
}

.footer-links a:hover::before {
    transform: translateX(4px);
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem;
    border-top: 2px dashed rgba(245, 245, 240, 0.2);
    position: relative;
}

.footer-bottom::before {
    content: '— Class Dismissed! —';
    display: block;
    font-family: 'Architects Daughter', cursive;
    color: var(--chalk-cream);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.copyright a {
    font-family: 'Patrick Hand', cursive;
    color: var(--text-dim);
    font-size: 0.95rem;
}

/* Chalk dust particles */
.chalk-dust {
    position: fixed;
    width: 4px;
    height: 4px;
    background: var(--chalk-white);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    z-index: 9999;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: chalkFadeIn 0.6s ease forwards;
}

@keyframes chalkFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

body:not(.faq) h3,
:not(section.faq) h3 {
    font-family: 'Architects Daughter', cursive;
    font-size: 1.6rem;
    color: var(--chalk-white);
    margin-top: 15px;
    margin-bottom: 10px;
    text-align: left;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
}
