/* ==========================================================================
   style.css — BGS Public Site UI Foundation
   --------------------------------------------------------------------------
   This file replaces the previous placeholder style.css (which only defined
   an unused .hero-section/.info-section pair pointing at a missing image —
   see PROJECT_ANALYSIS.md §10/§11). Nothing in the live site linked the old
   content, so nothing breaks by replacing it here.

   Structure:
     1. Font import
     2. Base / reset
     3. Typography system
     4. Utility classes
     5. Reusable components (consolidated from page-level inline <style> blocks)

   NOTE: this file is NOT yet <link>ed from any page/header. It is a staged
   foundation — wiring it in is a follow-up step once approved, per the
   "do not edit PHP/HTML" constraint for this pass.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* --------------------------------------------------------------------------
   1. Base / Reset
   -------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-base);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--text-body);
  background-color: var(--surface-alt);
}

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

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

a:hover {
  color: var(--primary);
}

/* --------------------------------------------------------------------------
   2. Typography System
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-base);
  color: var(--text-heading);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: .75rem;
}

h1 { font-size: 2.8rem; font-weight: 700; }   /* matches existing .page-title / .hero-title scale */
h2 { font-size: 2.25rem; font-weight: 700; }
h3 { font-size: 1.5rem; font-weight: 700; }
h4 { font-size: 1.25rem; font-weight: 600; }
h5 { font-size: 1.1rem; font-weight: 600; }
h6 { font-size: 1rem; font-weight: 600; }

p {
  color: var(--text-body);
  line-height: var(--lh-base);
  margin-bottom: 1rem;
}

.lead-text {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-body);
  max-width: 800px;
  margin: 0 auto 40px;
}

small, .text-small {
  font-size: .85rem;
  color: var(--text-muted);
}

.btn, button {
  font-family: var(--font-base);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   3. Utility Classes
   -------------------------------------------------------------------------- */

/* Layout container wider than Bootstrap's default .container */
.container-xl {
  width: 100%;
  max-width: var(--container-xl-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Standard vertical section rhythm — replaces the ad-hoc 60px/80px inline
   padding values repeated per-page (see PROJECT_ANALYSIS.md §14). */
.section-padding {
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
}

.section-title {
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  margin-bottom: .5rem;
}

.section-subtitle {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-body);
  max-width: 800px;
  margin: 0 auto 40px;
  text-align: center;
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.shadow-card {
  box-shadow: var(--shadow);
}

.glass {
  background: rgba(255, 255, 255, .15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .25);
}

.hover-lift {
  transition: transform var(--transition), box-shadow var(--transition);
}

.hover-lift:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-primary);
}

.rounded-xl {
  border-radius: var(--radius);
}

.btn-primary-modern {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--gradient-primary);
  color: var(--white);
  font-weight: 700;
  padding: 14px 36px;
  border: none;
  border-radius: var(--radius-pill);
  transition: transform var(--transition), box-shadow var(--transition);
}

.btn-primary-modern:hover {
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: var(--shadow-primary);
}

.btn-outline-modern {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: transparent;
  color: var(--primary);
  font-weight: 700;
  padding: 12px 34px;
  border: 2px solid var(--primary);
  border-radius: var(--radius-pill);
  transition: all var(--transition);
}

.btn-outline-modern:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-3px);
}

/* --------------------------------------------------------------------------
   4. Reusable Components
   (Consolidated from duplicated per-page inline <style> blocks. Class names
   are kept identical to the originals so they remain drop-in compatible
   once a page is wired to this stylesheet. Original inline copies are left
   in place and flagged with a `/* TODO: Moved to assets/css/style.css */`
   comment — see FOUNDATION_REPORT.md for the full file-by-file list.)
   -------------------------------------------------------------------------- */

/* --- Navbar / Top bar (source: includes/header.php) --- */
.top-bar {
  background-color: var(--primary);
  color: var(--white);
  font-size: 13px;
  padding: 10px 0;
  font-weight: 400;
  letter-spacing: .5px;
}

.top-bar a {
  color: var(--white);
  text-decoration: none;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.top-bar a:hover {
  color: var(--accent);
}

.social-icons a {
  width: 28px;
  height: 28px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, .1);
  border-radius: var(--radius-circle);
  margin-left: 8px;
}

.social-icons a:hover {
  background: var(--accent);
  color: var(--text-heading);
  transform: translateY(-2px);
}

.navbar {
  background-color: var(--white);
  padding: 12px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .05);
  transition: all var(--transition);
}

/* Applied by app.js when the page scrolls past the threshold */
.navbar.is-scrolled {
  box-shadow: var(--shadow-md);
  padding: 6px 0;
}

.logo-img {
  height: 65px;
  transition: transform var(--transition);
}

.navbar-brand:hover .logo-img {
  transform: scale(1.05);
}

.logo-text {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-heading);
  margin-left: 12px;
  letter-spacing: -.5px;
  white-space: nowrap;
}

.navbar-nav .nav-link {
  color: var(--text-heading);
  font-weight: 500;
  font-size: 15px;
  padding: 8px 16px !important;
  margin: 0 4px;
  position: relative;
  transition: color var(--transition);
}

/* Highlighted by app.js active-menu detection */
.navbar-nav .nav-link.is-active {
  color: var(--primary);
}

@media (min-width: 992px) {
  .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary);
    transition: all var(--transition);
    transform: translateX(-50%);
  }

  .navbar-nav .nav-link:hover::after,
  .navbar-nav .nav-link.is-active::after {
    width: 80%;
  }

  .dropdown:hover .dropdown-menu {
    display: block;
    animation: fadeUp .3s ease forwards;
  }

  .dropdown-menu {
    display: none;
    margin-top: 0;
    border: none;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-sm);
    overflow: hidden;
  }
}

.dropdown-item {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  transition: background .2s, color .2s;
}

.dropdown-item:hover {
  background-color: rgba(var(--primary-rgb), .05);
  color: var(--primary);
}

/* --- Ticker / Marquee (source: includes/header.php) --- */
.ticker-wrap {
  display: flex;
  background-color: var(--primary);
  color: var(--white);
  height: 40px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .1);
}

.ticker-heading {
  background-color: var(--secondary);
  padding: 0 20px;
  display: flex;
  align-items: center;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1px;
  z-index: 2;
  white-space: nowrap;
  box-shadow: 2px 0 5px rgba(0, 0, 0, .2);
}

.marquee-wrapper {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  display: flex;
  align-items: center;
}

.marquee-content {
  display: inline-block;
  animation: marquee 30s linear infinite;
}

.marquee-wrapper:hover .marquee-content,
.marquee-wrapper.is-touch-paused .marquee-content {
  animation-play-state: paused;
}

@keyframes marquee {
  0% { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}

/* --- Hero (source: index.php) --- */
.hero-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, .5);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, .8);
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--white);
}

.hero-desc {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--white);
}

/* --- Page Header / Breadcrumb (source: 18 shared content pages —
   about_school, admissions, calendar, cbse_regulations, co_curricular,
   contact, correspondent_message, curriculum, director_message, gallery,
   news, news_detail, principal_message, privacy_policy, prospectus,
   results, sport, terms_conditions — all byte-identical) --- */
.page-header {
  background: var(--gradient-overlay), url('../img/bgspng.png') center/cover;
  padding: 80px 0 60px;
  color: var(--white);
  text-align: center;
  margin-bottom: 50px;
  position: relative;
}

.page-title {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--white);
}

.breadcrumb-custom {
  display: inline-flex;
  background: rgba(255, 255, 255, .1);
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  font-size: 14px;
}

.breadcrumb-custom a {
  color: var(--accent);
  text-decoration: none;
  transition: color .3s;
}

.breadcrumb-custom a:hover {
  color: var(--white);
}

.breadcrumb-custom span {
  margin: 0 10px;
  color: rgba(255, 255, 255, .5);
}

.section-divider {
  width: 60px;
  height: 4px;
  background-color: var(--primary);
  margin: 0 auto 30px;
  border-radius: 2px;
}

/* --- Cards (generalized from .info-card / .core-card / .contact-info-card
   / .topper-card, which only differed in minor sizing) --- */
.cards {
  background: var(--surface);
  border: none;
  border-radius: var(--radius-md);
  padding: 40px 30px;
  height: 100%;
  box-shadow: var(--shadow-sm);
  transition: all .4s cubic-bezier(.175, .885, .32, 1.275);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.cards:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-primary);
}

.cards .icon-box {
  width: 70px;
  height: 70px;
  background: rgba(var(--primary-rgb), .05);
  border-radius: var(--radius-circle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
  transition: all .4s ease;
}

.cards .icon-box i {
  font-size: 30px;
  color: var(--primary);
  transition: all .4s ease;
}

.cards:hover .icon-box {
  background: rgba(255, 255, 255, .2);
}

.cards .card-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 15px;
  transition: color .4s ease;
}

.cards .card-text {
  color: var(--text-muted);
  line-height: 1.7;
  transition: color .4s ease;
}

/* --- Buttons (generalized from .submit-btn / .filter-btn) --- */
.buttons .btn-solid {
  background: var(--primary);
  color: var(--white);
  font-weight: 700;
  padding: 14px 40px;
  border-radius: var(--radius-pill);
  border: none;
  transition: all var(--transition);
  font-size: 1.1rem;
}

.buttons .btn-solid:hover {
  background: var(--accent);
  color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(var(--accent-rgb), .4);
}

.buttons .btn-filter {
  background: var(--surface-alt);
  color: var(--text-heading);
  border: 2px solid transparent;
  padding: 10px 25px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
}

.buttons .btn-filter:hover {
  background: rgba(var(--primary-rgb), .1);
  color: var(--primary);
}

.buttons .btn-filter.active {
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-primary);
}

/* --- Forms (source: contact.php / admissions.php) --- */
.forms .form-control {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--surface-alt);
  transition: all var(--transition);
  margin-bottom: 20px;
}

.forms .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .1);
  background-color: var(--white);
}

.forms .form-label {
  font-weight: 600;
  color: var(--text-body);
  margin-bottom: 8px;
}

/* --- Tables (no live public-site table usage found at audit time; provided
   so future data tables — e.g. results, disclosure documents — share the
   same design language as the admin panel's data grids) --- */
.tables table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.tables th {
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
  text-align: left;
  padding: 14px 20px;
}

.tables td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-body);
}

.tables tr:last-child td {
  border-bottom: none;
}

.tables tr:hover td {
  background: var(--surface-alt);
}

/* --- Gallery (source: index.php / gallery.php) --- */
.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  margin: -15px;
}

.gallery-item {
  padding: 15px;
  width: 33.333%;
  transition: transform .4s ease, opacity .4s ease;
}

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

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.175, .885, .32, 1.275);
}

.gallery-card:hover img {
  transform: scale(1.1);
  opacity: .6;
}

.gallery-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(var(--primary-rgb), .95), rgba(var(--secondary-rgb), .8));
  color: var(--white);
  padding: 25px 20px;
  transform: translateY(100%);
  transition: transform .4s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.gallery-card:hover .gallery-overlay {
  transform: translateY(0);
}

.gallery-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.gallery-date {
  font-size: .85rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 10px;
}

.gallery-desc {
  font-size: .95rem;
  opacity: .9;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0;
}

.view-icon {
  position: absolute;
  top: 20px; right: 20px;
  background: var(--accent);
  color: var(--primary);
  width: 40px; height: 40px;
  border-radius: var(--radius-circle);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(.5);
  transition: all .4s ease;
  z-index: 2;
}

.gallery-card:hover .view-icon {
  opacity: 1;
  transform: scale(1);
}

/* --- Footer (source: includes/footer.php) --- */
.stylish-footer {
  background: var(--gradient-primary);
  position: relative;
  margin-top: 50px;
}

.custom-shape-divider-top {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  transform: translateY(-99%);
}

.custom-shape-divider-top svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 40px;
}

.footer-heading {
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 1.1rem;
  position: relative;
  display: inline-block;
  color: var(--white);
}

.footer-heading::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 2px;
  background-color: var(--accent);
  bottom: -8px;
  left: 0;
}

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

.footer-links a {
  color: rgba(255, 255, 255, .8);
  text-decoration: none;
  transition: all var(--transition);
  display: inline-block;
}

.footer-links a:hover {
  color: var(--accent);
  transform: translateX(5px);
}

.contact-info a,
.contact-info span {
  color: rgba(255, 255, 255, .8);
}

.contact-info a:hover {
  color: var(--accent);
}

.footer-divider {
  border-top: 1px solid rgba(255, 255, 255, .2);
  opacity: 1;
}

.copyright-text, .developer-text {
  font-size: .9rem;
  color: rgba(255, 255, 255, .7);
}

.developer-text a {
  color: var(--accent);
}

.developer-text a:hover {
  color: var(--white);
}

.go-top-btn {
  position: fixed;
  bottom: 30px; right: 30px;
  background-color: var(--accent);
  color: var(--primary);
  width: 45px; height: 45px;
  border-radius: var(--radius-circle);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all .4s cubic-bezier(.175, .885, .32, 1.275);
}

.go-top-btn.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.go-top-btn:hover {
  background-color: var(--white);
  transform: translateY(-5px) scale(1.05);
  box-shadow: var(--shadow-lg);
}
