/* 
   His Grace School - Responsive Web Style Guide
   Color Palette:
   - Primary (HGS Navy Blue): #1e3a8a
   - Primary Light: #3b82f6
   - Secondary (HGS Forest Green): #15803d
   - Accent (HGS Sunshine Gold): #f59e0b
   - Text Dark: #1e293b
   - Text Light/Muted: #64748b
   - Background Slate: #f8fafc
   - White: #ffffff
*/

:root {
  --primary: #1e3a8a;
  --primary-hover: #172554;
  --primary-light: #eff6ff;
  --secondary: #15803d;
  --secondary-hover: #14532d;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --bg-slate: #f8fafc;
  --bg-white: #ffffff;
  --border-color: #e2e8f0;
  
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 20px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-slate);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

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

/* Global Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Utility Classes */
.text-center { text-align: center; }
.py-5 { padding-top: 5rem; padding-bottom: 5rem; }
.py-3 { padding-top: 3rem; padding-bottom: 3rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* Buttons & Badges */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  border: none;
  gap: 0.5rem;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--bg-white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--bg-white);
}

.btn-secondary:hover {
  background-color: var(--secondary-hover);
  transform: translateY(-2px);
}

.btn-accent {
  background-color: var(--accent);
  color: var(--primary-hover);
}

.btn-accent:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  border: 2.5px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: var(--bg-white);
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 50px;
  background-color: var(--primary-light);
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  width: fit-content;
}

/* Header & Navigation */
header {
  background-color: var(--bg-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1.5px solid var(--border-color);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 85px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-img {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  object-fit: contain;
}

.logo-text h1 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.logo-text span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* Nav Links desktop */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--primary);
  transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Mobile Nav Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--primary);
  margin: 5px 0;
  transition: var(--transition);
}

.mobile-menu-overlay {
  position: fixed;
  top: 85px;
  left: -100%;
  width: 100%;
  height: calc(100vh - 85px);
  background-color: var(--bg-white);
  z-index: 999;
  transition: var(--transition);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-lg);
}

.mobile-menu-overlay.active {
  left: 0;
}

.mobile-menu-overlay ul {
  list-style: none;
  display: flex;
  flex-column: true;
  flex-direction: column;
  gap: 1.5rem;
}

.mobile-menu-overlay .nav-link {
  font-size: 1.3rem;
  font-weight: 700;
  display: block;
  padding-bottom: 0.5rem;
  border-bottom: 1.5px solid var(--border-color);
}

/* Card components */
.card {
  background-color: var(--bg-white);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  border: 1.5px solid var(--border-color);
  transition: var(--transition);
}

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

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--primary);
}

.card-description {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Hero Section */
.hero {
  position: relative;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.95) 0%, rgba(21, 128, 61, 0.9) 100%);
  color: var(--bg-white);
  padding: 7rem 0;
  overflow: hidden;
}

.hero-wrap {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.hero-content h2 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.hero-content .highlight {
  color: var(--accent);
}

.hero-content p {
  font-size: 1.15rem;
  margin-bottom: 2.5rem;
  color: rgba(255, 255, 255, 0.9);
}

.hero-image-box {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 6px solid rgba(255, 255, 255, 0.15);
  position: relative;
  aspect-ratio: 4/3;
}

.hero-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Welcome Messages & Info */
.section-header {
  max-width: 650px;
  margin: 0 auto 3.5rem auto;
}

.section-header h2 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary);
  margin-top: 0.5rem;
  letter-spacing: -0.02em;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-top: 0.5rem;
}

/* School Stats Section */
.stats-bar {
  background-color: var(--primary);
  color: var(--bg-white);
  border-radius: var(--border-radius-md);
  padding: 3rem 2rem;
  margin-top: -3.5rem;
  position: relative;
  z-index: 10;
  box-shadow: var(--shadow-lg);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-num {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.8);
}

/* School Values & Vision */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.value-card {
  background-color: var(--bg-white);
  padding: 2.5rem 2rem;
  border-radius: var(--border-radius-md);
  border: 1.5px solid var(--border-color);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.value-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.value-icon {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem auto;
  font-size: 1.75rem;
}

.value-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--primary);
}

.value-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Gallery Styling */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  aspect-ratio: 4/3;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(30, 58, 138, 0.9) 0%, rgba(30, 58, 138, 0.2) 70%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: var(--transition);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay h4 {
  color: var(--bg-white);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.gallery-overlay span {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
}

/* Form Styles (Admissions & Contact) */
.form-box {
  background-color: var(--bg-white);
  padding: 3rem;
  border-radius: var(--border-radius-md);
  border: 1.5px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background-color: var(--bg-slate);
  color: var(--text-dark);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background-color: var(--bg-white);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.grid-input-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.form-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Contact Page Side Info */
.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.info-item {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.info-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.info-details h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.info-details p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Login/Portal Screen spacing & graphics */
.login-screen {
  min-height: calc(100vh - 85px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
  background: radial-gradient(circle at top right, var(--primary-light) 0%, var(--bg-slate) 60%);
}

.login-card {
  width: 100%;
  max-width: 480px;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header img {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem auto;
}

.login-header h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
}

.login-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

/* Modal lightbox dialog styling */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(30, 58, 138, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  background-color: var(--bg-white);
  border-radius: var(--border-radius-md);
  max-width: 650px;
  width: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lightbox-header {
  padding: 1.5rem;
  border-bottom: 1.5px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lightbox-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
}

.lightbox-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
}

.lightbox-body {
  padding: 2rem;
}

.lightbox-img-wrap {
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  height: 250px;
  margin-bottom: 1.5rem;
}

.lightbox-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.school-hours-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1.5px dashed var(--border-color);
}

.school-hours-row:last-child {
  border: none;
}

/* Footer Section */
footer {
  background-color: var(--primary-hover);
  color: rgba(255, 255, 255, 0.85);
  padding: 5rem 0 2rem 0;
  border-top: 5px solid var(--accent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-col h3, .footer-col h4 {
  color: var(--bg-white);
  margin-bottom: 1.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  position: relative;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 35px;
  height: 3px;
  background-color: var(--accent);
}

.footer-col p {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.footer-socials {
  display: flex;
  gap: 1rem;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--bg-white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 1.1rem;
}

.social-icon:hover {
  background-color: var(--accent);
  color: var(--primary-hover);
  transform: translateY(-3px);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
}

.footer-links a:hover {
  color: var(--accent);
  padding-left: 6px;
}

.footer-contact li {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  align-items: flex-start;
}

.footer-contact i {
  color: var(--accent);
  font-size: 1rem;
  margin-top: 0.25rem;
}

.footer-bottom {
  border-top: 1.5px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
}

.footer-bottom p {
  margin-bottom: 0;
}

/* Response Alerts */
.alert {
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius-sm);
  margin-bottom: 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  display: none;
}

.alert-success {
  background-color: #d1fae5;
  color: #065f46;
  border: 1.5px solid #a7f3d0;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .hero-wrap {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }
  .hero-content h2 {
    font-size: 2.5rem;
  }
  .hero-image-box {
    max-width: 500px;
    margin: 0 auto;
  }
  .stats-bar {
    margin-top: -1.5rem;
  }
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  .nav-menu, .nav-cta .btn-outline {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
  .py-5 {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }
  .section-header h2 {
    font-size: 1.85rem;
  }
  .stats-bar .grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  .values-grid {
    grid-template-columns: 1fr;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .grid-3 {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .form-box {
    padding: 2rem 1.5rem;
  }
  .grid-input-2 {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .stats-bar .grid-4 {
    grid-template-columns: 1fr;
  }
  .logo-text h1 {
    font-size: 1.05rem;
  }
  .logo-text span {
    font-size: 0.7rem;
  }
}
