/* De Achievers Favoured School - Brand Palette & Shared Styles
   Brand Colors from Shield Crest:
   Primary Royal Blue: #1B3B8A
   Accent Cyan/Sky Blue: #00A8E8
   Highlight Crimson Red: #E31E24
   Motto: ALL ROUND ACADEMIC PERFECTION
*/

:root {
  --royal-blue: #1B3B8A;
  --royal-dark: #10255C;
  --cyan-accent: #00A8E8;
  --cyan-light: #E6F7FF;
  --crimson-red: #E31E24;
  --crimson-dark: #B5151B;
  --surface-white: #FFFFFF;
  --surface-slate: #F4F7FC;
  --text-dark: #1A2238;
  --text-muted: #5A6782;
  --border-light: #DCE4F2;
  --shadow-sm: 0 4px 14px rgba(27, 59, 138, 0.07);
  --shadow-hover: 0 16px 34px rgba(27, 59, 138, 0.16);
  --radius-md: 12px;
  --radius-lg: 18px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-dark);
  background-color: var(--surface-white);
  line-height: 1.65;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Top Utility Bar */
.top-bar {
  background-color: var(--royal-dark);
  color: #E8EEFF;
  font-size: 0.85rem;
  padding: 8px 0;
  border-bottom: 2px solid var(--crimson-red);
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.top-bar-motto {
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #FFD166;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.top-bar-contacts {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

/* Sticky Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 2px 12px rgba(16, 37, 92, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 16px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 8px;
  border: 1.5px solid var(--border-light);
  padding: 2px;
  background: #fff;
}

.brand-text h1,
.brand-text .brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--royal-blue);
  line-height: 1.2;
}

.brand-text span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--crimson-red);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav-menu a {
  display: inline-block;
  padding: 9px 15px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dark);
  transition: background-color 0.22s ease, color 0.22s ease, transform 0.2s ease;
}

.nav-menu a:hover {
  background-color: var(--cyan-light);
  color: var(--royal-blue);
}

.nav-menu a.active {
  background-color: var(--royal-blue);
  color: #FFFFFF;
}

.nav-cta {
  background-color: var(--crimson-red) !important;
  color: #FFFFFF !important;
}

.nav-cta:hover {
  background-color: var(--crimson-dark) !important;
}

.mobile-toggle {
  display: none;
  background: var(--royal-blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 1.2rem;
  cursor: pointer;
}

/* Page Banner (Subpages) */
.page-banner {
  background: linear-gradient(135deg, var(--royal-dark) 0%, var(--royal-blue) 60%, var(--cyan-accent) 100%);
  color: #FFFFFF;
  padding: 58px 0;
  position: relative;
  border-bottom: 4px solid var(--crimson-red);
}

.page-banner h1 {
  font-size: 2.35rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.page-banner p {
  max-width: 680px;
  color: #E8F3FF;
  font-size: 1.05rem;
}

.breadcrumb {
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: #BCE8FF;
}

.breadcrumb a {
  color: #FFFFFF;
  text-decoration: underline;
}

/* Sections & Headings */
.section {
  padding: 72px 0;
}

.section-slate {
  background-color: var(--surface-slate);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 46px;
}

.section-tag {
  display: inline-block;
  background-color: var(--cyan-light);
  color: var(--royal-blue);
  border: 1px solid rgba(0, 168, 232, 0.35);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: 2rem;
  color: var(--royal-blue);
  font-weight: 800;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease, color 0.22s ease;
}

.btn-primary {
  background-color: var(--crimson-red);
  color: #FFFFFF;
}

.btn-primary:hover {
  background-color: var(--crimson-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(227, 30, 36, 0.28);
}

.btn-outline-light {
  border-color: #FFFFFF;
  color: #FFFFFF;
  background: transparent;
}

.btn-outline-light:hover {
  background: #FFFFFF;
  color: var(--royal-blue);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: var(--royal-blue);
  color: #FFFFFF;
}

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

/* Cards with Hover Effects */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.card {
  background: var(--surface-white);
  border: 1px solid var(--border-light);
  border-top: 4px solid var(--royal-blue);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease, border-color 0.28s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-top-color: var(--crimson-red);
  border-color: rgba(0, 168, 232, 0.55);
}

.card-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: var(--cyan-light);
  color: var(--royal-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 18px;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.card:hover .card-icon {
  background-color: var(--royal-blue);
  color: #FFFFFF;
  transform: scale(1.06);
}

.card h3 {
  font-size: 1.22rem;
  color: var(--royal-blue);
  margin-bottom: 10px;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
  flex-grow: 1;
}

.card-link {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--crimson-red);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease, color 0.2s ease;
}

.card:hover .card-link {
  gap: 10px;
  color: var(--royal-blue);
}

/* Gallery Cards */
.gallery-card {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.gallery-visual {
  height: 210px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #FFFFFF;
  position: relative;
  transition: filter 0.3s ease;
}

.gallery-card:hover .gallery-visual {
  filter: brightness(1.05);
}

.gallery-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(16, 37, 92, 0.85);
  color: #FFFFFF;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
}

.gallery-body {
  padding: 20px 22px;
}

.gallery-body h3 {
  font-size: 1.12rem;
  color: var(--royal-blue);
  margin-bottom: 6px;
}

.gallery-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Blog Cards */
.blog-meta {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cyan-accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

/* Forms */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--royal-blue);
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border-light);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--cyan-accent);
  box-shadow: 0 0 0 3px rgba(0, 168, 232, 0.16);
}

/* Footer */
.site-footer {
  background-color: var(--royal-dark);
  color: #D7E2FA;
  padding: 60px 0 26px;
  border-top: 4px solid var(--crimson-red);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: #FFFFFF;
  font-size: 1.05rem;
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 8px;
}

.footer-col h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 38px;
  height: 3px;
  background: var(--cyan-accent);
}

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

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #C7D6F5;
  font-size: 0.92rem;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-links a:hover {
  color: #FFFFFF;
  padding-left: 5px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.86rem;
  color: #A9BCE3;
}

/* Responsive Breakpoints */
@media (max-width: 960px) {
  .grid-3,
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #FFFFFF;
    flex-direction: column;
    align-items: stretch;
    padding: 14px 20px 20px;
    border-bottom: 3px solid var(--royal-blue);
    box-shadow: 0 14px 28px rgba(16, 37, 92, 0.14);
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-menu a {
    padding: 12px 14px;
  }

  .grid-3,
  .grid-2,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .page-banner h1 {
    font-size: 1.85rem;
  }
}
