/* 
 * Delhi Public School Jind - Homepage Stylesheet
 * Custom CSS with HSL design system, responsive layout, and interactive states.
 */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;1,400&display=swap');

:root {
  /* Color Palette */
  --primary-green-h: 154;
  --primary-green-s: 84%;
  --primary-green-l: 18%; /* #075133 equivalent */
  --primary-green: hsl(var(--primary-green-h), var(--primary-green-s), var(--primary-green-l));
  --primary-green-hover: hsl(var(--primary-green-h), var(--primary-green-s), calc(var(--primary-green-l) + 6%));
  --primary-green-light: hsl(var(--primary-green-h), var(--primary-green-s), 95%);
  
  --accent-red-h: 0;
  --accent-red-s: 75%;
  --accent-red-l: 45%; /* #d32f2f equivalent */
  --accent-red: hsl(var(--accent-red-h), var(--accent-red-s), var(--accent-red-l));
  --accent-red-hover: hsl(var(--accent-red-h), var(--accent-red-s), calc(var(--accent-red-l) + 8%));
  
  --accent-gold: #ffd700;
  --text-dark: #2c3e50;
  --text-light: #7f8c8d;
  --bg-light: #f9fbf9;
  --bg-white: #ffffff;
  --bg-ticker: #f0f4f1;
  --border-color: #e2e8f0;
  
  /* Fonts */
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-serif: 'Playfair Display', serif;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Container Width */
  --container-max-width: 1280px;
}

/* Reset Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.6;
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

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

/* Common Container */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- HEADER SECTION --- */
.main-header {
  background-color: var(--primary-green);
  color: var(--bg-white);
  padding: 16px 0;
  border-bottom: 3px solid var(--accent-gold);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand-section .logo-wrapper {
  background: var(--bg-white);
  padding: 6px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform var(--transition-normal);
}

.brand-section .logo-wrapper:hover {
  transform: translateY(-2px);
}

.brand-section .school-logo {
  display: block;
  width: 80px;
  height: auto;
}

.title-group {
  display: flex;
  flex-direction: column;
}

.school-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--bg-white);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.school-subtitle {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--accent-gold);
  margin-top: 4px;
  letter-spacing: 0.5px;
}

/* Header Right Side Controls */
.header-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.btn-group {
  display: flex;
  gap: 10px;
}

.btn {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-red {
  background-color: var(--accent-red);
  color: var(--bg-white);
  border: 1px solid var(--accent-red);
}

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

.btn-light {
  background-color: var(--bg-white);
  color: var(--text-dark);
  border: 1px solid var(--border-color);
}

.btn-light:hover {
  background-color: var(--bg-ticker);
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.contact-info {
  display: flex;
  gap: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.95;
}

.contact-item svg {
  width: 14px;
  height: 14px;
  fill: var(--accent-gold);
}

.contact-item a:hover {
  color: var(--accent-gold);
  text-decoration: underline;
}

/* --- NAVIGATION BAR --- */
.main-nav {
  background-color: var(--bg-white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
  transition: padding var(--transition-normal);
}

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

.nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  padding: 16px 14px;
  text-transform: capitalize;
  transition: all var(--transition-fast);
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--primary-green);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--transition-normal);
}

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

.nav-link:hover::before,
.nav-item.active .nav-link::before {
  transform: scaleX(1);
}

.nav-item.active .nav-link {
  color: var(--primary-green);
}

/* Hamburger Menu Icon (Mobile) */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text-dark);
  margin: 5px 0;
  transition: all var(--transition-normal);
}

/* --- ANNOUNCEMENTS TICKER --- */
.announcements-bar {
  display: flex;
  background-color: var(--bg-ticker);
  border-bottom: 1px solid var(--border-color);
  height: 44px;
  overflow: hidden;
  align-items: center;
}

.announcements-label {
  background-color: #111111;
  color: var(--bg-white);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  box-shadow: 4px 0 10px rgba(0,0,0,0.15);
}

.ticker-container {
  flex-grow: 1;
  overflow: hidden;
  white-space: nowrap;
  display: flex;
  align-items: center;
  position: relative;
  height: 100%;
  padding-left: 20px;
}

.ticker-wrapper {
  display: inline-block;
  animation: marquee 25s linear infinite;
  padding-right: 50px;
}

.ticker-wrapper:hover {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-right: 50px;
}

.ticker-item .highlight {
  color: var(--accent-red);
}

@keyframes marquee {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

/* --- HERO CAROUSEL --- */
.hero-slider {
  position: relative;
  width: 100%;
  height: 560px;
  overflow: hidden;
  background-color: #000;
}

.slider-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity var(--transition-slow) ease-in-out;
  z-index: 1;
}

.slide.active {
  opacity: 1;
  z-index: 2;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Slider Controls */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background-color: rgba(0, 0, 0, 0.3);
  color: var(--bg-white);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.slider-arrow:hover {
  background-color: rgba(0, 0, 0, 0.6);
  transform: translateY(-50%) scale(1.05);
}

.arrow-left {
  left: 20px;
}

.arrow-right {
  right: 20px;
}

.slider-arrow svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Slider Pagination Dots (Bottom-Left) */
.slider-dots {
  position: absolute;
  bottom: 24px;
  left: 24px;
  z-index: 10;
  display: flex;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid rgba(0,0,0,0.2);
}

.dot:hover, .dot.active {
  background-color: var(--bg-white);
  transform: scale(1.2);
}

/* --- WELCOME & INFO SECTION --- */
.welcome-section {
  padding: 60px 0;
  background-color: var(--bg-white);
}

.welcome-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
}

.welcome-content h2 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  color: var(--primary-green);
  font-weight: 700;
  margin-bottom: 24px;
  position: relative;
  padding-bottom: 12px;
}

.welcome-content h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80px;
  height: 4px;
  background-color: var(--accent-gold);
  border-radius: 2px;
}

.welcome-text p {
  color: var(--text-dark);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.welcome-text p:first-of-type {
  font-weight: 500;
  color: #1e293b;
}

.btn-more {
  display: inline-block;
  background-color: var(--primary-green);
  color: var(--bg-white);
  padding: 12px 28px;
  font-family: var(--font-heading);
  font-weight: 600;
  border-radius: 4px;
  box-shadow: 0 4px 6px rgba(7, 81, 51, 0.2);
  transition: all var(--transition-fast);
  margin-top: 10px;
}

.btn-more:hover {
  background-color: var(--primary-green-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(7, 81, 51, 0.3);
}

/* Sidebar / Quick Panels */
.info-sidebar {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.sidebar-panel {
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.sidebar-panel h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--primary-green);
  margin-bottom: 16px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-panel h3 svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.quick-links-list li {
  margin-bottom: 12px;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 8px;
}

.quick-links-list li:last-child {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.quick-links-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--text-dark);
}

.quick-links-list a:hover {
  color: var(--primary-green);
  transform: translateX(4px);
}

/* Admission Widget */
.admission-widget {
  background-color: var(--primary-green-light);
  border: 1px solid rgba(7, 81, 51, 0.1);
}

.admission-widget p {
  font-size: 0.95rem;
  margin-bottom: 16px;
  color: #1e293b;
}

.btn-apply {
  display: block;
  width: 100%;
  text-align: center;
  background-color: var(--accent-red);
  color: var(--bg-white);
  padding: 10px;
  border-radius: 4px;
  font-weight: 600;
  transition: all var(--transition-fast);
}

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

/* --- ADMISSIONS & HIGHLIGHTS GRID (Vibrant Design) --- */
.highlights-section {
  background-color: var(--bg-light);
  padding: 60px 0;
  border-top: 1px solid var(--border-color);
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--primary-green);
  margin-bottom: 10px;
}

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

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

.highlight-card {
  background-color: var(--bg-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
}

.highlight-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.card-img-container {
  height: 200px;
  position: relative;
  background-color: #cbd5e1;
  overflow: hidden;
}

.card-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-content {
  padding: 24px;
}

.card-content h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--primary-green);
  margin-bottom: 12px;
}

.card-content p {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 16px;
}

.card-link {
  color: var(--primary-green);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.card-link:hover {
  color: var(--accent-red);
}

/* --- FOOTER SECTION --- */
.main-footer {
  background-color: #0b2216; /* Extra dark green */
  color: #94a3b8;
  padding: 60px 0 20px;
  font-size: 0.9rem;
  border-top: 4px solid var(--primary-green);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  font-family: var(--font-heading);
  color: var(--bg-white);
  font-size: 1.1rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 8px;
}

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

.footer-about p {
  margin-bottom: 20px;
  line-height: 1.7;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  color: var(--bg-white);
}

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

.social-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

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

.footer-links a {
  transition: all var(--transition-fast);
}

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

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.footer-contact svg {
  width: 16px;
  height: 16px;
  fill: var(--accent-gold);
  flex-shrink: 0;
  margin-top: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 20px;
  text-align: center;
  font-size: 0.8rem;
}

.footer-bottom p {
  margin-bottom: 4px;
}

/* --- RESPONSIVE DESIGN (MEDIA QUERIES) --- */

/* Standard Desktop & Laptops */
@media (max-width: 1200px) {
  .nav-link {
    padding: 14px 10px;
    font-size: 0.85rem;
  }
  .school-title {
    font-size: 1.7rem;
  }
}

/* Tablets & Landscape Phones */
@media (max-width: 992px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .header-controls {
    align-items: flex-start;
    width: 100%;
  }
  
  .btn-group {
    width: 100%;
  }
  
  .btn {
    flex-grow: 1;
    text-align: center;
  }
  
  .contact-info {
    justify-content: flex-start;
    flex-wrap: wrap;
    width: 100%;
  }

  /* Hamburger Navigation */
  .menu-toggle {
    display: block;
    margin-left: auto;
    z-index: 101;
  }

  .nav-container {
    justify-content: space-between;
    padding: 10px 24px;
  }

  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-white);
    flex-direction: column;
    align-items: stretch;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    border-top: 1px solid var(--border-color);
  }

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

  .nav-item {
    border-bottom: 1px solid var(--border-color);
  }

  .nav-link {
    padding: 16px 24px;
    font-size: 1rem;
  }

  .nav-link::before {
    display: none;
  }

  .nav-link:hover {
    background-color: var(--bg-light);
    padding-left: 32px;
  }

  /* Ticker */
  .announcements-bar {
    height: auto;
    flex-direction: column;
    align-items: stretch;
  }

  .announcements-label {
    justify-content: center;
    padding: 8px 0;
    box-shadow: none;
  }

  .ticker-container {
    padding: 8px 0;
  }

  /* Welcome & Highlights layouts */
  .welcome-layout {
    grid-template-columns: 1fr;
  }

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

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

/* Portrait Phones */
@media (max-width: 600px) {
  .brand-section {
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
  }

  .school-title {
    font-size: 1.4rem;
  }

  .school-subtitle {
    font-size: 0.8rem;
  }

  .hero-slider {
    height: 320px;
  }

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

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

  .slider-arrow {
    width: 36px;
    height: 36px;
  }
  
  .slider-arrow svg {
    width: 16px;
    height: 16px;
  }

  .welcome-section {
    padding: 40px 0;
  }

  .welcome-content h2 {
    font-size: 1.75rem;
  }
}
