/*
Theme Name: Ed4Every1
Theme URI: https://ed4every1.com
Author: Ed4Every1
Description: A custom bilingual educational WordPress theme for apps, resources, and education content.
Version: 1.0.0
Text Domain: ed4every1
Requires at least: 6.4
Requires PHP: 8.0
License: GPL-2.0-or-later
*/

:root {
  --ink: #12356b;
  --blue: #2f6fd5;
  --green: #48a833;
  --yellow: #f5b51b;
  --orange: #ef6f2e;
  --purple: #6d43a6;
  --red: #e63b34;
  --cream: #fffdf7;
  --paper: #ffffff;
  --muted: #637083;
  --line: #dbe5f0;
  --shadow: 0 16px 45px rgba(18, 53, 107, .10);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: "Nunito Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.site-main { overflow: hidden; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 253, 247, .92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(18,53,107,.08);
}
.header-inner { min-height: 82px; display: flex; align-items: center; gap: 28px; }
.site-branding img { width: 168px; display: block; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0; padding: 0; font-weight: 800; }
.site-nav a:hover { color: var(--blue); }
.header-actions { display: flex; gap: 12px; align-items: center; }
.lang-switcher { font-size: .9rem; font-weight: 900; }
.menu-toggle { display: none; border: 0; background: transparent; font-size: 1.5rem; color: var(--ink); }

.button, .wp-element-button, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: white;
  font-weight: 900;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(18,53,107,.18); }
.button.secondary { background: white; color: var(--ink); }
.button.sunny { background: var(--yellow); border-color: var(--yellow); color: #553b00; }
.button.small { min-height: 40px; padding: 0 16px; font-size: .9rem; }

.hero { padding: 86px 0 60px; position: relative; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 999px; opacity: .14; filter: blur(2px); }
.hero::before { width: 320px; height: 20px; background: var(--yellow); transform: rotate(-6deg); right: 4%; top: 17%; }
.hero::after { width: 260px; height: 18px; background: var(--purple); transform: rotate(5deg); left: 5%; bottom: 12%; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; color: var(--purple); font-weight: 1000; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; }
.hero h1 { font-size: clamp(3.2rem, 7vw, 6.2rem); line-height: .94; letter-spacing: -.065em; margin: 18px 0 24px; max-width: 820px; }
.crayon-word { position: relative; color: var(--blue); }
.crayon-word::after { content: ""; position: absolute; left: 0; right: 0; bottom: -.08em; height: .13em; background: repeating-linear-gradient(0deg, var(--yellow) 0 3px, transparent 3px 5px); transform: rotate(-1.5deg); opacity: .9; }
.hero p { font-size: 1.2rem; color: var(--muted); max-width: 680px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-art { background: white; border-radius: 34px; box-shadow: var(--shadow); padding: 22px; transform: rotate(1.5deg); border: 3px solid rgba(47,111,213,.13); }
.hero-art img { border-radius: 22px; display: block; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-badges span { padding: 8px 13px; border-radius: 999px; background: white; border: 1px solid var(--line); font-weight: 800; font-size: .9rem; }

.section { padding: 88px 0; }
.section.alt { background: white; }
.section-heading { display: flex; justify-content: space-between; gap: 30px; align-items: end; margin-bottom: 34px; }
.section-heading h2 { font-size: clamp(2.3rem, 4vw, 4rem); line-height: 1; letter-spacing: -.045em; margin: 0; }
.section-heading p { color: var(--muted); max-width: 620px; margin: 0; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: 0 8px 24px rgba(18,53,107,.06); position: relative; }
.card::before { content: ""; position: absolute; inset: 12px auto auto 18px; width: 52px; height: 5px; border-radius: 20px; background: var(--accent, var(--yellow)); transform: rotate(-3deg); opacity: .8; }
.card h3 { font-size: 1.45rem; line-height: 1.15; margin: 20px 0 10px; }
.card p { color: var(--muted); }
.card-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; background: color-mix(in srgb, var(--accent, var(--yellow)) 18%, white); font-size: 1.7rem; }

.app-card { display: grid; grid-template-columns: 130px 1fr; gap: 24px; align-items: center; }
.app-icon { aspect-ratio: 1; border-radius: 28px; background: linear-gradient(145deg, #e7f0ff, white); display: grid; place-items: center; border: 2px solid var(--line); font-size: 3rem; }
.app-meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 18px; }
.badge { display: inline-flex; padding: 6px 10px; border-radius: 999px; background: #eef4fb; font-size: .78rem; font-weight: 900; }
.store-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.store-button { padding: 10px 14px; border-radius: 12px; background: #111; color: white; font-size: .84rem; font-weight: 800; }

.resource-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.resource-card { border-radius: 22px; padding: 24px; min-height: 220px; display: flex; flex-direction: column; justify-content: space-between; background: white; border: 1px solid var(--line); }
.resource-card:nth-child(1) { border-top: 7px solid var(--blue); }
.resource-card:nth-child(2) { border-top: 7px solid var(--green); }
.resource-card:nth-child(3) { border-top: 7px solid var(--orange); }
.resource-card:nth-child(4) { border-top: 7px solid var(--purple); }

.values { display: grid; grid-template-columns: .85fr 1.15fr; gap: 54px; align-items: center; }
.values-list { display: grid; gap: 18px; }
.value { display: grid; grid-template-columns: 52px 1fr; gap: 16px; }
.value strong { display: block; font-size: 1.12rem; }
.value span { color: var(--muted); }

.newsletter { background: var(--ink); color: white; border-radius: 34px; padding: 48px; position: relative; overflow: hidden; }
.newsletter::after { content: ""; position: absolute; width: 280px; height: 20px; background: var(--yellow); right: -30px; top: 38px; transform: rotate(-8deg); opacity: .9; }
.newsletter h2 { font-size: clamp(2.2rem, 4vw, 4rem); line-height: 1; margin: 0 0 16px; }
.newsletter p { color: #d9e6fa; max-width: 620px; }
.newsletter-form { display: flex; gap: 12px; margin-top: 24px; max-width: 720px; }
.newsletter-form input { flex: 1; min-height: 54px; border-radius: 999px; border: 0; padding: 0 20px; font: inherit; }

.site-footer { background: #0d2953; color: white; padding: 58px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 38px; }
.footer-grid h4 { margin-top: 0; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; color: #c7d7ef; }
.footer-bottom { margin-top: 42px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.14); color: #aebfda; font-size: .9rem; }

.page-hero { padding: 72px 0 36px; }
.page-hero h1 { font-size: clamp(3rem, 6vw, 5.5rem); letter-spacing: -.055em; line-height: .95; margin: 0; }
.content-wrap { padding: 30px 0 80px; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card { background: white; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.post-card .content { padding: 22px; }
.post-card h2 { font-size: 1.35rem; line-height: 1.2; }
.entry-content { max-width: 820px; margin: 0 auto; font-size: 1.08rem; }
.entry-content h2, .entry-content h3 { line-height: 1.15; margin-top: 2em; }

@media (max-width: 900px) {
  .site-nav { display: none; position: absolute; left: 20px; right: 20px; top: 74px; background: white; border-radius: 20px; box-shadow: var(--shadow); padding: 20px; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: flex-start; }
  .menu-toggle { display: block; margin-left: auto; }
  .header-actions .button { display: none; }
  .hero-grid, .values { grid-template-columns: 1fr; }
  .cards, .post-grid { grid-template-columns: 1fr 1fr; }
  .resource-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .container { width: min(100% - 28px, 1180px); }
  .hero { padding-top: 54px; }
  .hero h1 { font-size: 3.25rem; }
  .cards, .post-grid, .resource-grid, .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 14px; }
  .app-card { grid-template-columns: 1fr; }
  .app-icon { width: 110px; }
  .newsletter { padding: 34px 24px; }
  .newsletter-form { flex-direction: column; }
}
