@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&family=Merriweather:wght@700&display=swap');

:root {
    --bg: #f4efe4;
    --ink: #1a2a24;
    --board: #1a3a2a;
    --chalk: #e8f0c8;
    --terra: #c45c26;
    --card: #fffaf1;
    --line: #ddd2bc;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Cairo', Tahoma, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.75;
    padding-bottom: 78px;
}
img { max-width: 100%; display: block; }
a { color: var(--board); text-decoration: none; }
.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

.header { position: sticky; top: 0; z-index: 50; background: var(--board); color: var(--chalk); }
.nav { display: flex; align-items: center; gap: 12px; min-height: 74px; }
.logo { font-family: 'Merriweather', serif; color: var(--chalk); letter-spacing: .04em; }
.nav-links { display: flex; gap: 14px; margin-inline-start: auto; align-items: center; }
.nav-links a { color: var(--chalk); font-weight: 700; white-space: nowrap; }
.nav-links a:hover { color: #fff; }
.lang { border: 1px solid var(--chalk); color: var(--chalk); padding: 2px 8px; border-radius: 999px; font-size: .8rem; }
.nav > .lang { display: none; }

.hero {
    background: radial-gradient(circle at 15% 20%, #2d5a40, var(--board) 55%);
    color: var(--chalk);
    min-height: 68vh;
    display: grid;
    align-items: end;
    padding: 70px 0 50px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: 'A² + B² = C²';
    position: absolute;
    inset-inline-end: 8%;
    top: 22%;
    font-family: 'Merriweather', serif;
    font-size: 1.4rem;
    opacity: .25;
    animation: write 4s ease-in-out infinite alternate;
}
@keyframes write { to { letter-spacing: .2em; opacity: .45; } }
.hero h1 { font-family: 'Merriweather', serif; font-size: clamp(2rem, 6vw, 3.5rem); max-width: 16ch; }

.section { padding: 44px 0; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.card { background: var(--card); border: 1px solid var(--line); overflow: hidden; animation: lift .45s ease both; }
@keyframes lift { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.card img { width: 100%; height: 150px; object-fit: cover; }
.card .pad { padding: 12px; }
.meta { color: var(--terra); font-weight: 800; }

.btn { display: inline-block; background: var(--terra); color: #fff; border: 0; padding: 10px 14px; font-family: inherit; font-weight: 800; cursor: pointer; }
.btn.line { background: transparent; color: var(--board); border: 1px solid var(--board); }
.form { display: grid; gap: 10px; max-width: 440px; }
label { display: grid; gap: 4px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid var(--line); padding: 10px; font-family: inherit; background: #fff; }
.alert { padding: 10px 14px; margin: 10px 0; background: #e8dcc4; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 8px; border-bottom: 1px solid var(--line); text-align: start; }
.video-box { background: #111; color: #fff; border-radius: 8px; overflow: hidden; }
.video-box video, .video-box img { width: 100%; max-height: 420px; object-fit: cover; }

.footer { background: #12201a; color: #d7e4c8; padding: 26px 0 90px; }
.m-foot { position: fixed; bottom: 0; inset-inline: 0; display: flex; background: #fffaf1; border-top: 1px solid var(--line); z-index: 55; }
.m-foot a { flex: 1; text-align: center; font-size: .66rem; padding: 8px 0 10px; color: var(--ink); }
.m-foot span { display: block; font-size: 1.05rem; }

@media (min-width: 961px) {
    body { padding-bottom: 0; }
    .m-foot { display: none; }
    .footer { padding-bottom: 26px; }
}
@media (max-width: 960px) {
    .nav-links { display: none; }
    .nav > .lang { display: inline-block; margin-inline-start: auto; }
    .grid { grid-template-columns: 1fr; }
}
