/* =========================================
   CSS Variables & Design System
   D.S.S. Pal Nainital Public School
   ========================================= */
:root {
  --primary:        #0b3d2e;
  --primary-light:  #1a6b4a;
  --primary-dark:   #082d21;
  --accent:         #d8c3a5;
  --accent-dark:    #c4a882;
  --bg:             #f7f5ef;
  --white:          #ffffff;
  --text-main:      #222222;
  --text-muted:     #666666;
  --border:         #e8e0d0;
  --shadow-sm:      0 2px 8px rgba(0,0,0,0.06);
  --shadow-md:      0 8px 25px rgba(0,0,0,0.08);
  --shadow-lg:      0 15px 40px rgba(0,0,0,0.12);
  --radius:         10px;
  --radius-lg:      18px;
  --radius-xl:      20px;
  --container:      1280px;
  --transition:     all 0.3s ease;
}

/* =========================================
   Reset & Base
   ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-main);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; transition: var(--transition); }
ul { list-style: none; }

.container {
  width: 90%;
  max-width: var(--container);
  margin: 0 auto;
}

/* =========================================
   TOP BAR
   ========================================= */
.top-bar {
  background: var(--primary);
  padding: 12px 0;
  color: var(--white);
  font-size: 14px;
}

.top-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.top-contact {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
}

.top-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.top-buttons a {
  border: 1px solid var(--accent);
  color: var(--white);
  padding: 8px 18px;
  border-radius: 40px;
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
}

.top-buttons a:hover {
  background: var(--accent);
  color: var(--primary);
}

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
.header {
  background: var(--accent);
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

/* This hides any hamburger/toggle buttons injected by old JS */
.nav-toggle,
.menu-toggle,
.hamburger {
  display: none !important;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  padding: 15px 0;
}

/* LOGO */
.logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.logo img {
  width: 90px;
  height: 90px;
  min-width: 90px;
  min-height: 90px;
  object-fit: cover;
  border-radius: 50%;
  background: var(--white);
  padding: 4px;
  border: 4px solid var(--white);
  display: block;
}

/* OLD-STYLE logo (text-based, from about.html original) */
.logo h1 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.3;
}

.logo span {
  display: block;
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 500;
  opacity: 0.8;
}

/* NAVBAR */
.navbar ul,
.main-nav ul {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.navbar ul li,
.main-nav ul li {
  position: relative;
}

.navbar ul li a,
.main-nav ul li a,
.main-nav a {
  display: block;
  padding: 14px 18px;
  color: var(--primary);
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--radius);
  transition: var(--transition);
}

.navbar ul li a:hover,
.main-nav ul li a:hover,
.main-nav a:hover,
.navbar ul li a.active,
.main-nav a.active {
  background: var(--primary);
  color: var(--white);
}

/* Remove underline animation from old style.css */
.main-nav a::after { display: none !important; }

/* DROPDOWN */
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 240px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
}

.dropdown li { width: 100%; }

.dropdown li a {
  border-radius: 0;
  color: #333 !important;
  padding: 14px 18px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

.dropdown li a:hover {
  background: var(--primary) !important;
  color: var(--white) !important;
}

.navbar ul li:hover .dropdown,
.main-nav ul li:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* =========================================
   SHARED BUTTONS
   ========================================= */
.btn {
  display: inline-block;
  padding: 16px 34px;
  border-radius: 50px;
  font-weight: 700;
  transition: var(--transition);
  font-size: 15px;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-dark {
  background: var(--primary);
  color: var(--white);
}

.btn-dark:hover {
  background: var(--accent);
  color: var(--primary);
}

.btn-outline {
  border: 2px solid var(--white);
  color: var(--white);
  background: transparent;
  padding: 14px 32px;
}

.btn-outline:hover {
  background: var(--white);
  color: var(--primary);
}

/* =========================================
   SECTION SHARED STYLES
   ========================================= */
.section-label {
  display: inline-block;
  background: var(--accent);
  color: var(--primary);
  padding: 8px 20px;
  border-radius: 40px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.section-title {
  font-size: 50px;
  color: var(--primary);
  margin-bottom: 18px;
  font-weight: 800;
  line-height: 1.1;
}

.section-subtitle {
  color: var(--text-muted);
  max-width: 760px;
  line-height: 1.9;
  margin-bottom: 50px;
  font-size: 17px;
}

/* =========================================
   CARDS (shared across pages)
   ========================================= */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 1px solid var(--border);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.card h3 {
  color: var(--primary);
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

/* =========================================
   TABLE (fees page etc.)
   ========================================= */
.table-wrapper {
  overflow-x: auto;
  margin-top: 2rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
}

tr:hover td { background: #fafaf8; }

/* =========================================
   GALLERY
   ========================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  background: var(--border);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img { transform: scale(1.05); }

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(11,61,46,0.85));
  color: var(--white);
  font-weight: 500;
}

/* Gallery Modal */
.gallery-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background: rgba(0,0,0,0.92);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.gallery-modal.active { display: flex; }

.modal-content {
  max-width: 90%;
  max-height: 80vh;
  border-radius: var(--radius);
}

.close-modal, .prev, .next {
  color: var(--white);
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
}

.close-modal { position: absolute; top: 20px; right: 30px; }
.prev, .next { position: absolute; top: 50%; transform: translateY(-50%); padding: 16px; }
.prev { left: 15px; }
.next { right: 15px; }
.close-modal:hover, .prev:hover, .next:hover { color: var(--accent); }

/* =========================================
   CONTACT FORM
   ========================================= */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group.full { grid-column: 1 / -1; }

label {
  font-weight: 600;
  color: var(--text-main);
  font-size: 14px;
}

input, textarea, select {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
  background: var(--white);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11,61,46,0.1);
}

textarea { min-height: 120px; resize: vertical; }

/* =========================================
   FOOTER
   ========================================= */
.site-footer,
footer {
  background: var(--primary);
  color: var(--white);
  padding-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 50px;
  padding-bottom: 60px;
}

.footer-col h4,
footer h3 {
  color: var(--accent);
  margin-bottom: 24px;
  font-size: 20px;
  font-weight: 700;
}

.footer-col p,
.footer-col li,
footer p,
footer li {
  color: #ddd;
  margin-bottom: 12px;
  line-height: 1.8;
  font-size: 15px;
}

.footer-col a,
footer a {
  color: #ddd;
  transition: var(--transition);
}

.footer-col a:hover,
footer a:hover {
  color: var(--accent);
}

.contact-info p {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  text-align: center;
  padding: 24px 0;
  color: #bbb;
  font-size: 14px;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1100px) {
  .header-inner {
    flex-direction: column;
    padding: 14px 0;
    gap: 12px;
  }

  .navbar ul,
  .main-nav ul {
    justify-content: center;
  }

  .section-title { font-size: 38px; }
}

@media (max-width: 768px) {
  .section-title { font-size: 30px; }
  .section-subtitle { font-size: 15px; }

  .top-inner {
    justify-content: center;
    text-align: center;
  }

  .navbar ul li a,
  .main-nav ul li a,
  .main-nav a {
    padding: 11px 13px;
    font-size: 14px;
  }

  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    width: 100%;
    display: none;
    box-shadow: none;
    border-top: 1px solid var(--border);
  }

  .navbar ul li:hover .dropdown,
  .main-nav ul li:hover .dropdown {
    display: block;
  }

  .btn { padding: 14px 26px; font-size: 14px; }
}