/*
Theme Name: Peniel Academy
Theme URI: https://peniel.davidgodwill.com
Author: David Godwill
Author URI: https://davidgodwill.com
Description: A modern, animated WordPress theme for Peniel Academy — featuring a fully responsive public school website and a powerful custom admin dashboard for school management.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: peniel-academy
Tags: education, school, modern, animation, elementor, responsive

--- PENIEL ACADEMY THEME ---
Built with GSAP, Swiper, Lenis, AOS, Tailwind CSS, React (Admin)
*/

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* Brand Colors */
  --pa-primary:        #1A237E;
  --pa-primary-dark:   #0D1B5E;
  --pa-primary-light:  #3949AB;
  --pa-secondary:      #D4AF37;
  --pa-secondary-dark: #B8960C;
  --pa-secondary-light:#F0D060;
  --pa-accent:         #E53935;
  --pa-accent-light:   #FF6659;

  /* Neutral */
  --pa-white:      #FFFFFF;
  --pa-off-white:  #FAFAFA;
  --pa-light:      #F5F5F5;
  --pa-light-2:    #EEEEEE;
  --pa-gray:       #9E9E9E;
  --pa-gray-dark:  #616161;
  --pa-dark:       #212121;
  --pa-black:      #0A0A0A;

  /* Typography */
  --font-display:  'Playfair Display', Georgia, serif;
  --font-body:     'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:     'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* Borders */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md:  0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg:  0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-xl:  0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0,0,0,0.25);
  --shadow-glow: 0 0 40px rgba(26,35,126,0.3);

  /* Transitions */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-index */
  --z-behind:  -1;
  --z-base:    0;
  --z-above:   10;
  --z-nav:     100;
  --z-overlay: 200;
  --z-modal:   300;
  --z-toast:   400;

  /* Section padding */
  --section-padding: clamp(4rem, 8vw, 8rem);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--pa-dark);
  background-color: var(--pa-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Lenis smooth scroll */
html.lenis {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: hidden;
}
.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s var(--ease-out);
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ============================================================
   TYPOGRAPHY SYSTEM
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--pa-primary);
}

.display-1 { font-size: clamp(3rem, 8vw, 7rem); letter-spacing: -0.02em; }
.display-2 { font-size: clamp(2.5rem, 6vw, 5rem); letter-spacing: -0.02em; }
h1, .h1    { font-size: clamp(2rem, 4vw, 3.5rem); }
h2, .h2    { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3, .h3    { font-size: clamp(1.375rem, 2vw, 1.875rem); }
h4, .h4    { font-size: clamp(1.125rem, 1.5vw, 1.375rem); }
h5, .h5    { font-size: 1.125rem; }
h6, .h6    { font-size: 1rem; }

.text-overline {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: var(--font-body);
}

.lead {
  font-size: clamp(1.1rem, 1.5vw, 1.25rem);
  line-height: 1.8;
  color: var(--pa-gray-dark);
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

.container--wide  { max-width: 1440px; }
.container--narrow { max-width: 860px; }

.section {
  padding-block: var(--section-padding);
  position: relative;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-xl); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-xl); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-xl); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font-body);
  border-radius: var(--radius-full);
  transition: all 0.35s var(--ease-out);
  cursor: pointer;
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  transform: translateX(-100%);
  transition: transform 0.4s var(--ease-out);
}

.btn:hover::before { transform: translateX(0); }

.btn-primary {
  background: var(--pa-primary);
  color: var(--pa-white);
  box-shadow: 0 4px 20px rgba(26,35,126,0.3);
}
.btn-primary:hover {
  background: var(--pa-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(26,35,126,0.4);
  color: var(--pa-white);
}

.btn-secondary {
  background: var(--pa-secondary);
  color: var(--pa-dark);
  box-shadow: 0 4px 20px rgba(212,175,55,0.3);
}
.btn-secondary:hover {
  background: var(--pa-secondary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(212,175,55,0.4);
}

.btn-outline {
  background: transparent;
  color: var(--pa-primary);
  border: 2px solid var(--pa-primary);
}
.btn-outline:hover {
  background: var(--pa-primary);
  color: var(--pa-white);
  transform: translateY(-2px);
}

.btn-outline-white {
  background: transparent;
  color: var(--pa-white);
  border: 2px solid rgba(255,255,255,0.6);
}
.btn-outline-white:hover {
  background: var(--pa-white);
  color: var(--pa-primary);
  border-color: var(--pa-white);
}

.btn-lg { padding: 1.125rem 2.5rem; font-size: 1.0625rem; }
.btn-sm { padding: 0.625rem 1.25rem; font-size: 0.875rem; }

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header {
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-header .overline {
  color: var(--pa-secondary);
  margin-bottom: 0.75rem;
  display: block;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header p {
  max-width: 600px;
  margin-inline: auto;
  color: var(--pa-gray-dark);
  font-size: 1.0625rem;
}

.section-header--left {
  text-align: left;
}
.section-header--left p {
  margin-inline: 0;
}

/* Decorative underline */
.section-title-decorated {
  position: relative;
  display: inline-block;
}
.section-title-decorated::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--pa-secondary), var(--pa-secondary-light));
  border-radius: 2px;
}
.section-header .section-title-decorated::after {
  left: 50%;
  transform: translateX(-50%);
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--pa-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.card:hover .card-img {
  transform: scale(1.05);
}

.card-body {
  padding: 1.5rem;
}

.card-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--pa-primary-light);
  color: var(--pa-white);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

/* ============================================================
   BACKGROUND UTILITIES
   ============================================================ */
.bg-primary     { background-color: var(--pa-primary); }
.bg-secondary   { background-color: var(--pa-secondary); }
.bg-light       { background-color: var(--pa-light); }
.bg-dark        { background-color: var(--pa-dark); }
.bg-gradient-primary {
  background: linear-gradient(135deg, var(--pa-primary-dark) 0%, var(--pa-primary) 50%, var(--pa-primary-light) 100%);
}
.bg-gradient-hero {
  background: linear-gradient(135deg, #0D1B5E 0%, #1A237E 40%, #283593 70%, #1565C0 100%);
}

.text-white  { color: var(--pa-white); }
.text-primary { color: var(--pa-primary); }
.text-secondary { color: var(--pa-secondary); }
.text-muted  { color: var(--pa-gray); }

/* ============================================================
   ANIMATIONS INIT (hidden state before GSAP)
   ============================================================ */
.reveal-up,
.reveal-left,
.reveal-right,
.reveal-scale {
  opacity: 0;
}

[data-aos] {
  pointer-events: none;
}
[data-aos].aos-animate {
  pointer-events: auto;
}

/* ============================================================
   LOADING SCREEN
   ============================================================ */
#pa-loader {
  position: fixed;
  inset: 0;
  background: var(--pa-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.5rem;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#pa-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.pa-loader-logo {
  width: 80px;
  height: 80px;
  position: relative;
}

.pa-loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--pa-secondary);
  animation: spin 1s linear infinite;
}

.pa-loader-ring:nth-child(2) {
  inset: 8px;
  border-top-color: var(--pa-white);
  animation-duration: 0.8s;
  animation-direction: reverse;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.pa-loader-text {
  color: var(--pa-white);
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.1em;
}

.pa-loader-bar {
  width: 200px;
  height: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 1px;
  overflow: hidden;
}

.pa-loader-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pa-secondary), var(--pa-secondary-light));
  border-radius: 1px;
  animation: load-bar 1.5s var(--ease-out) forwards;
}

@keyframes load-bar {
  from { width: 0; }
  to { width: 100%; }
}

/* ============================================================
   CURSOR CUSTOM
   ============================================================ */
.pa-cursor {
  position: fixed;
  width: 12px;
  height: 12px;
  background: var(--pa-secondary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  mix-blend-mode: difference;
  transition: transform 0.15s ease;
}

.pa-cursor-follower {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 2px solid var(--pa-secondary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9997;
  transition: transform 0.4s var(--ease-out), opacity 0.3s ease;
  opacity: 0.6;
}

.pa-cursor.expanded {
  transform: scale(3);
}

/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--pa-secondary), var(--pa-accent));
  z-index: var(--z-nav);
  transform-origin: left;
  transform: scaleX(0);
}

/* ============================================================
   RESPONSIVE UTILITIES
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --section-padding: clamp(3rem, 6vw, 5rem);
  }
}

/* WordPress core blocks & alignment */
.alignwide  { max-width: 1200px; margin-inline: auto; }
.alignfull  { width: 100vw; margin-inline: calc(50% - 50vw); }
.alignleft  { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { margin-inline: auto; display: block; }

/* Screen reader text */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

/* ============================================================
   ABOUT VISUAL STACK
   ============================================================ */
.about-visual-stack {
  position: relative;
  padding-bottom: 3rem;
}
.avs-main {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.18);
}
.avs-main img { width: 100%; height: 100%; object-fit: cover; }
.avs-secondary {
  position: absolute;
  bottom: 0; right: -1.5rem;
  width: 45%; border-radius: 14px;
  overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.18);
  border: 4px solid #fff;
}
.avs-secondary img { width: 100%; height: 100%; object-fit: cover; }
.avs-badge {
  position: absolute;
  top: 2rem; left: -1.5rem;
  background: var(--pa-secondary);
  color: var(--pa-primary-dark);
  padding: 1rem 1.25rem;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  text-align: center;
}
.avs-badge strong {
  display: block;
  font-family: var(--pa-font-serif);
  font-size: 2.25rem;
  font-weight: 900;
  line-height: 1;
}
.avs-badge span {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  line-height: 1.3;
}

/* ============================================================
   WHY PENIEL GRID
   ============================================================ */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.why-card {
  background: #fff;
  border: 1px solid var(--pa-light-1);
  border-radius: 16px;
  padding: 2rem 1.75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  transition: box-shadow .3s, transform .3s;
}
.why-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.10);
  transform: translateY(-4px);
}
.why-card__icon {
  font-size: 2.25rem;
  color: var(--pa-secondary);
  margin-bottom: .875rem;
}
.why-card h3 {
  font-family: var(--pa-font-sans);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .375rem;
}
.why-card p {
  font-size: .875rem;
  color: var(--pa-mid);
  line-height: 1.6;
  max-width: none;
}

/* ============================================================
   EVENTS PAGE — standalone template
   ============================================================ */
.events-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

/* ============================================================
   FOOTER — newsletter
   ============================================================ */
.site-footer-newsletter {
  background: var(--pa-primary);
  padding: 3rem 0;
}
.newsletter-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.newsletter-wrap h3 { color: #fff; font-family: var(--pa-font-sans); font-size: 1.2rem; margin-bottom: .25rem; }
.newsletter-wrap p  { color: rgba(255,255,255,.7); font-size: .9rem; margin: 0; }
.newsletter-form {
  display: flex;
  border-radius: 9999px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  max-width: 420px; width: 100%;
}
.newsletter-form input {
  flex: 1; border: none; padding: .75rem 1.25rem;
  font-size: .9rem; background: #fff; outline: none;
}
.newsletter-form button {
  background: var(--pa-secondary);
  color: var(--pa-primary-dark);
  padding: .75rem 1.5rem;
  font-weight: 700; font-size: .875rem;
  border: none; cursor: pointer;
  white-space: nowrap;
  transition: background .3s;
}
.newsletter-form button:hover { background: var(--pa-secondary-dark); }

/* ============================================================
   PRIVACY / TERMS — plain text pages
   ============================================================ */
.plain-content {
  max-width: 800px; margin: 0 auto;
  line-height: 1.8;
}
.plain-content h2 { margin: 2.5rem 0 .75rem; font-size: 1.4rem; }
.plain-content p, .plain-content li { color: var(--pa-dark-2); }
.plain-content ul { list-style: disc; padding-left: 1.5rem; }

/* ============================================================
   RESPONSIVE PATCHES
   ============================================================ */
@media (max-width: 768px) {
  .avs-secondary { display: none; }
  .avs-badge { left: auto; right: 1rem; top: auto; bottom: -1rem; }
  .why-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .why-grid { grid-template-columns: 1fr; }
  .newsletter-wrap { flex-direction: column; }
}
