/*
Theme Name: Greenfield Public School
Theme URI: https://greenfieldschool.edu
Author: Custom Build
Author URI: https://greenfieldschool.edu
Description: A clean, professional WordPress theme for Greenfield Public School. Converted from a static design with full theme customizer, custom menus, widgets, and editable content.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: greenfield
Tags: education, school, custom-colors, custom-menu, custom-logo, featured-images, threaded-comments
*/

/* ============================= Design Tokens ============================= */
:root {
  --gf-green-900: #1b4d29;
  --gf-green-800: #205c31;
  --gf-green-700: #2a7a3f;
  --gf-green-600: #2f8a45;
  --gf-green-500: #3a9d52;
  --gf-green-050: #eef5ef;
  --gf-cream: #f5f7f2;
  --gf-cream-2: #f0f3ec;
  --gf-ink: #2c332c;
  --gf-muted: #6b756c;
  --gf-line: #e2e7dd;
  --gf-white: #ffffff;
  --gf-topbar: #164023;

  --gf-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --gf-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --gf-radius: 6px;
  --gf-radius-lg: 10px;
  --gf-container: 1180px;
  --gf-shadow: 0 8px 30px rgba(27, 77, 41, 0.08);
  --gf-shadow-sm: 0 3px 14px rgba(27, 77, 41, 0.06);
}

/* ============================= Reset / Base ============================= */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--gf-sans);
  color: var(--gf-ink);
  background: var(--gf-white);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gf-green-700); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--gf-green-900); }
h1, h2, h3, h4 { font-family: var(--gf-serif); color: var(--gf-green-900); line-height: 1.15; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }

.gf-container { max-width: var(--gf-container); margin: 0 auto; padding: 0 24px; }
.gf-eyebrow-rule { width: 54px; height: 3px; background: var(--gf-green-600); border: 0; margin: 14px 0 0; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* ============================= Buttons ============================= */
.gf-btn {
  display: inline-block; font-family: var(--gf-sans); font-weight: 600; font-size: 15px;
  padding: 13px 26px; border-radius: var(--gf-radius); cursor: pointer;
  border: 1.5px solid transparent; transition: all .2s ease; line-height: 1;
}
.gf-btn-primary { background: var(--gf-green-700); color: #fff; }
.gf-btn-primary:hover { background: var(--gf-green-900); color: #fff; }
.gf-btn-outline { background: transparent; color: var(--gf-green-800); border-color: var(--gf-line); }
.gf-btn-outline:hover { border-color: var(--gf-green-700); color: var(--gf-green-900); }

/* ============================= Top Bar ============================= */
.gf-topbar { background: var(--gf-topbar); color: #d7e3d9; font-size: 13.5px; }
.gf-topbar .gf-container { display: flex; align-items: center; justify-content: space-between; min-height: 40px; gap: 16px; flex-wrap: wrap; }
.gf-topbar-left { display: flex; gap: 26px; flex-wrap: wrap; align-items: center; }
.gf-topbar-item { display: inline-flex; align-items: center; gap: 8px; }
.gf-topbar-item svg { width: 15px; height: 15px; opacity: .85; }
.gf-topbar-right { display: flex; align-items: center; gap: 16px; }
.gf-topbar-links { display: flex; gap: 8px; align-items: center; }
.gf-topbar-links a { color: #d7e3d9; }
.gf-topbar-links a:hover { color: #fff; }
.gf-topbar-links .sep { opacity: .4; }
.gf-topbar-social { display: flex; gap: 12px; align-items: center; }
.gf-topbar-social a { color: #d7e3d9; display: inline-flex; }
.gf-topbar-social a:hover { color: #fff; }
.gf-topbar-social svg { width: 16px; height: 16px; }

/* ============================= Header ============================= */
.gf-header { background: #fff; border-bottom: 1px solid var(--gf-line); position: sticky; top: 0; z-index: 200; }
.gf-header .gf-container { display: flex; align-items: center; justify-content: space-between; min-height: 82px; gap: 24px; }
.gf-brand { display: flex; align-items: center; gap: 12px; }
.gf-brand-mark { width: 42px; height: 48px; flex: none; }
.gf-brand-text .name { font-family: var(--gf-serif); font-size: 25px; font-weight: 700; color: var(--gf-green-900); line-height: 1; }
.gf-brand-text .sub { font-family: var(--gf-sans); font-size: 11px; letter-spacing: 3px; color: var(--gf-muted); text-transform: uppercase; margin-top: 3px; }
.gf-brand img.custom-logo { max-height: 54px; width: auto; }

.gf-nav { display: flex; align-items: center; gap: 30px; }
.gf-menu { display: flex; align-items: center; gap: 28px; list-style: none; }
.gf-menu a { font-size: 15px; font-weight: 500; color: var(--gf-ink); position: relative; padding: 4px 0; }
.gf-menu a:hover { color: var(--gf-green-700); }
.gf-menu .current-menu-item > a,
.gf-menu .current_page_item > a { color: var(--gf-green-700); }
.gf-menu .current-menu-item > a::after,
.gf-menu .current_page_item > a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px; background: var(--gf-green-700);
}
.gf-menu .sub-menu {
  position: absolute; top: 100%; left: 0; background: #fff; list-style: none;
  min-width: 200px; box-shadow: var(--gf-shadow); border-radius: var(--gf-radius);
  padding: 8px 0; opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: all .18s ease; border: 1px solid var(--gf-line);
}
.gf-menu li { position: relative; }
.gf-menu li:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.gf-menu .sub-menu a { display: block; padding: 9px 18px; font-size: 14px; }
.gf-menu .sub-menu a:hover { background: var(--gf-green-050); }

.gf-nav-cta { display: flex; align-items: center; gap: 16px; }
.gf-menu-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: 8px; flex-direction: column; gap: 5px;
}
.gf-menu-toggle span { width: 24px; height: 2px; background: var(--gf-green-900); display: block; transition: .2s; }

/* ============================= Hero ============================= */
.gf-hero { background: linear-gradient(180deg, var(--gf-cream) 0%, var(--gf-cream-2) 100%); position: relative; overflow: hidden; }
.gf-hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 0; align-items: center; min-height: 460px; }
.gf-hero-copy { padding: 60px 48px 60px 0; max-width: 560px; }
.gf-hero-copy h1 { font-size: 52px; font-weight: 800; line-height: 1.05; margin-bottom: 22px; }
.gf-hero-copy p { font-size: 16.5px; color: var(--gf-muted); margin-bottom: 30px; max-width: 460px; }
.gf-hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.gf-hero-media { position: relative; align-self: stretch; min-height: 380px; }
.gf-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.gf-hero-media.no-img { background: linear-gradient(135deg, var(--gf-green-600), var(--gf-green-800)); }
.gf-hero-leaf { position: absolute; left: -10px; bottom: -6px; width: 110px; opacity: .9; pointer-events: none; }

/* ============================= Feature Strip ============================= */
.gf-features { background: var(--gf-cream); padding: 44px 0; }
.gf-features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.gf-feature { display: flex; gap: 16px; align-items: flex-start; padding: 0 26px; position: relative; }
.gf-feature + .gf-feature::before {
  content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 1px; background: var(--gf-line);
}
.gf-feature-icon {
  width: 50px; height: 50px; border-radius: 50%; background: var(--gf-green-700);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.gf-feature-icon svg { width: 24px; height: 24px; color: #fff; }
.gf-feature h3 { font-family: var(--gf-sans); font-size: 15.5px; font-weight: 700; color: var(--gf-ink); margin: 2px 0 4px; }
.gf-feature p { font-size: 13px; color: var(--gf-muted); margin: 0; line-height: 1.5; }

/* ============================= Sections ============================= */
.gf-section { padding: 72px 0; }
.gf-section-tint { background: var(--gf-cream); }
.gf-section-head h2 { font-size: 34px; font-weight: 700; }
.gf-section-head p { color: var(--gf-muted); font-size: 16px; margin-top: 14px; }

/* About */
.gf-about-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 56px; align-items: center; }
.gf-about-copy h2 { font-size: 34px; }
.gf-about-copy p { color: var(--gf-muted); }
.gf-about-copy .gf-btn { margin-top: 18px; }
.gf-about-media img { border-radius: var(--gf-radius-lg); box-shadow: var(--gf-shadow); width: 100%; object-fit: cover; }
.gf-about-media.no-img { background: linear-gradient(135deg, var(--gf-green-500), var(--gf-green-800)); border-radius: var(--gf-radius-lg); min-height: 320px; }

/* Academics */
.gf-programs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; margin-top: 44px; }
.gf-program {
  background: #fff; border: 1px solid var(--gf-line); border-radius: var(--gf-radius-lg);
  padding: 30px 20px; text-align: center; transition: all .22s ease;
}
.gf-program:hover { transform: translateY(-5px); box-shadow: var(--gf-shadow); border-color: var(--gf-green-050); }
.gf-program-icon { color: var(--gf-green-700); margin-bottom: 16px; display: flex; justify-content: center; }
.gf-program-icon svg { width: 42px; height: 42px; }
.gf-program h3 { font-family: var(--gf-sans); font-size: 16px; font-weight: 700; color: var(--gf-ink); margin-bottom: 10px; }
.gf-program p { font-size: 13px; color: var(--gf-muted); margin: 0; }

/* Events */
.gf-events-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.gf-events-head .view-all { font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.gf-events { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
.gf-event {
  background: #fff; border: 1px solid var(--gf-line); border-radius: var(--gf-radius-lg);
  padding: 22px; display: flex; gap: 18px;
}
.gf-event-date {
  background: var(--gf-green-700); color: #fff; border-radius: var(--gf-radius); text-align: center;
  padding: 12px 14px; flex: none; min-width: 62px;
}
.gf-event-date .m { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.gf-event-date .d { font-family: var(--gf-serif); font-size: 26px; font-weight: 700; line-height: 1; margin-top: 2px; }
.gf-event-body h3 { font-family: var(--gf-sans); font-size: 16px; font-weight: 700; color: var(--gf-ink); margin-bottom: 10px; }
.gf-event-meta { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--gf-muted); }
.gf-event-meta span { display: inline-flex; align-items: center; gap: 7px; }
.gf-event-meta svg { width: 14px; height: 14px; opacity: .7; }

/* ============================= Footer ============================= */
.gf-footer { background: var(--gf-green-900); color: #cfe0d3; padding: 56px 0 0; font-size: 14.5px; }
.gf-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 46px; }
.gf-footer h4 { color: #fff; font-family: var(--gf-sans); font-size: 16px; font-weight: 700; margin-bottom: 18px; }
.gf-footer-brand .name { font-family: var(--gf-serif); font-size: 22px; color: #fff; font-weight: 700; }
.gf-footer-brand .sub { font-size: 10px; letter-spacing: 3px; text-transform: uppercase; color: #9bb6a2; margin-top: 3px; }
.gf-footer-brand p { margin: 16px 0 20px; color: #b6cbbc; }
.gf-footer-social { display: flex; gap: 14px; }
.gf-footer-social a {
  width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.gf-footer-social a:hover { background: var(--gf-green-600); }
.gf-footer-social svg { width: 16px; height: 16px; }
.gf-footer-menu { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.gf-footer-menu a { color: #cfe0d3; }
.gf-footer-menu a:hover { color: #fff; }
.gf-newsletter p { color: #b6cbbc; margin-bottom: 16px; }
.gf-newsletter-form { display: flex; gap: 8px; }
.gf-newsletter-form input[type=email] {
  flex: 1; min-width: 0; padding: 11px 14px; border-radius: var(--gf-radius);
  border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #fff; font-size: 14px;
}
.gf-newsletter-form input::placeholder { color: #9bb6a2; }
.gf-newsletter-form button { background: var(--gf-green-600); color: #fff; border: 0; padding: 11px 20px; border-radius: var(--gf-radius); font-weight: 600; cursor: pointer; font-size: 14px; }
.gf-newsletter-form button:hover { background: var(--gf-green-500); }
.gf-footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 20px 0; text-align: center; color: #9bb6a2; font-size: 13.5px; }

/* ============================= Page / Post content ============================= */
.gf-page { padding: 56px 0; }
.gf-page-header { padding: 54px 0; background: var(--gf-cream); text-align: center; }
.gf-page-header h1 { font-size: 40px; }
.gf-page-header .crumb { color: var(--gf-muted); font-size: 14px; margin-top: 8px; }
.gf-content { max-width: 780px; margin: 0 auto; }
.gf-content h2 { font-size: 28px; margin-top: 1.4em; }
.gf-content h3 { font-size: 21px; margin-top: 1.2em; }
.gf-content img { border-radius: var(--gf-radius); margin: 1.2em 0; }
.gf-content blockquote { border-left: 3px solid var(--gf-green-600); padding: 4px 20px; margin: 1.4em 0; color: var(--gf-muted); font-style: italic; }
.gf-post-meta { color: var(--gf-muted); font-size: 14px; margin-bottom: 20px; }
.gf-post-card {
  background: #fff; border: 1px solid var(--gf-line); border-radius: var(--gf-radius-lg);
  overflow: hidden; margin-bottom: 28px; transition: box-shadow .2s;
}
.gf-post-card:hover { box-shadow: var(--gf-shadow-sm); }
.gf-post-card .thumb img { width: 100%; height: 210px; object-fit: cover; }
.gf-post-card .body { padding: 22px 24px; }
.gf-post-card h2 { font-size: 22px; margin-bottom: 8px; }
.gf-posts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }

.gf-pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.gf-pagination a, .gf-pagination span {
  padding: 9px 15px; border: 1px solid var(--gf-line); border-radius: var(--gf-radius); font-size: 14px; color: var(--gf-ink);
}
.gf-pagination .current { background: var(--gf-green-700); color: #fff; border-color: var(--gf-green-700); }

/* Widgets / sidebar */
.gf-sidebar .widget { margin-bottom: 34px; }
.gf-sidebar .widget-title { font-size: 18px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--gf-green-600); }
.gf-sidebar ul { list-style: none; }
.gf-sidebar li { padding: 7px 0; border-bottom: 1px solid var(--gf-line); font-size: 14.5px; }
.gf-with-sidebar { display: grid; grid-template-columns: 1fr 300px; gap: 48px; }

/* comments */
.gf-comments { max-width: 780px; margin: 40px auto 0; }
.gf-comments ol { list-style: none; }
.comment-body { padding: 16px 0; border-bottom: 1px solid var(--gf-line); }
.comment-form input, .comment-form textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--gf-line); border-radius: var(--gf-radius); margin-bottom: 14px; font-family: inherit;
}

/* ============================= Responsive ============================= */
@media (max-width: 980px) {
  .gf-hero-inner { grid-template-columns: 1fr; }
  .gf-hero-media { order: -1; min-height: 300px; }
  .gf-hero-copy { padding: 44px 0; max-width: none; }
  .gf-hero-copy h1 { font-size: 42px; }
  .gf-features-grid { grid-template-columns: repeat(2, 1fr); gap: 34px 20px; }
  .gf-feature + .gf-feature::before { display: none; }
  .gf-about-grid { grid-template-columns: 1fr; gap: 34px; }
  .gf-programs { grid-template-columns: repeat(2, 1fr); }
  .gf-events { grid-template-columns: 1fr; }
  .gf-footer-grid { grid-template-columns: 1fr 1fr; gap: 34px; }
  .gf-with-sidebar { grid-template-columns: 1fr; }
  .gf-posts-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .gf-topbar-left { gap: 16px; font-size: 12.5px; }
  .gf-topbar { display: none; }
  .gf-menu-toggle { display: flex; }
  .gf-nav {
    position: fixed; top: 82px; right: 0; bottom: 0; width: 280px; background: #fff;
    flex-direction: column; align-items: stretch; padding: 24px; gap: 0;
    transform: translateX(100%); transition: transform .25s ease; box-shadow: -8px 0 30px rgba(0,0,0,.1);
    overflow-y: auto;
  }
  .gf-nav.open { transform: translateX(0); }
  .gf-menu { flex-direction: column; align-items: stretch; gap: 0; }
  .gf-menu > li { border-bottom: 1px solid var(--gf-line); }
  .gf-menu a { display: block; padding: 13px 0; }
  .gf-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 10px 14px; }
  .gf-nav-cta .gf-btn { margin-top: 16px; width: 100%; text-align: center; }
  .gf-hero-copy h1 { font-size: 34px; }
  .gf-programs { grid-template-columns: 1fr; }
  .gf-footer-grid { grid-template-columns: 1fr; }
  .gf-section { padding: 52px 0; }
}
