/* Premium Dark Design System for Diyagala Boys' Town */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Outfit:wght@400;600;800&display=swap');

:root {
  --primary: #cbd5e1; /* Light Slate / Text */
  --primary-light: #f1f5f9; 
  --secondary: #f59e0b; /* Vibrant Amber */
  --secondary-hover: #d97706;
  --bg-color: #0B1120; /* Deep Dark Slate */
  --text-dark: #e2e8f0; /* Crisp off-white */
  --text-light: #94a3b8; /* Muted gray */
  --white: #ffffff;
  --glass-bg: rgba(15, 23, 42, 0.85); /* Dark Glass */
  --glass-border: rgba(255, 255, 255, 0.1);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 25px rgba(245, 158, 11, 0.3);
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --card-bg: #1e293b; /* Card dark bg */
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 1rem;
}

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

/* Glassmorphism Navbar */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  padding: 1rem 0;
  transition: var(--transition);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}

.logo {
  display: flex;
  align-items: center;
}

.nav-logo {
  height: 50px;
  width: auto;
  border-radius: 4px;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-dark);
  position: relative;
}

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

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

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--white);
}

/* Hero Section */
.hero {
  height: 100vh;
  min-height: 600px;
  background: url('images/image_001.png') top center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  padding: 0 1rem;
  margin-top: 0;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: none;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(0,0,0,0) 20%, rgba(11,17,32,0.7) 100%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 200px;
  background: linear-gradient(to top, var(--bg-color), transparent);
  pointer-events: none;
}

.hero-content {
  max-width: 900px;
  animation: fadeInUp 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 5rem;
  color: var(--white);
  margin-bottom: 1rem;
  text-shadow: 0 6px 25px rgba(0,0,0,0.9), 0 2px 5px rgba(0,0,0,0.8);
  line-height: 1.1;
  letter-spacing: -1px;
}

.hero p {
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 2.5rem;
  color: #f8fafc;
  text-shadow: 0 4px 15px rgba(0,0,0,0.9), 0 2px 4px rgba(0,0,0,0.9);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  font-size: 0.95rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--secondary), #f97316);
  color: var(--white);
}

.btn-primary:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-glow);
}

.btn-outline {
  background-color: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.8);
  margin-left: 1rem;
  backdrop-filter: blur(5px);
}

.btn-outline:hover {
  background-color: var(--white);
  color: var(--bg-color);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--white);
}

/* Sections */
section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
  color: var(--white);
}

.section-title::after {
  content: '';
  width: 60px;
  height: 4px;
  background-color: var(--secondary);
  display: block;
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

/* Cards & Grids */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.05);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.card p {
  color: var(--text-light);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(245, 158, 11, 0));
  z-index: -1;
  opacity: 0;
  transition: var(--transition);
}

.card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--secondary), #f97316);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  transform: translateY(-12px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.card:hover::before {
  opacity: 1;
}

.card:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.card-icon {
  font-size: 2.5rem;
  color: var(--secondary);
  margin-bottom: 1rem;
}

/* Counter Banner */
.counter-banner {
  background: var(--card-bg);
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: var(--white);
  padding: 4rem 2rem;
  margin: 4rem 0;
  text-align: center;
  max-width: 100%;
}

.counter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.counter-item h2 {
  color: var(--secondary);
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.counter-item p {
  color: var(--text-light);
}

/* Facebook Feed / Updates */
.updates-section {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  margin-top: 2rem;
  border: 1px solid rgba(255,255,255,0.05);
}

.blogger-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
}

/* Facility Carousels */
.facility-carousel {
  position: relative;
  width: 100%;
  height: 200px;
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.facility-carousel img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.facility-carousel img.active {
  opacity: 1;
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
}

th, td {
  padding: 1.5rem;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: var(--text-light);
}

th {
  background-color: rgba(0,0,0,0.2);
  color: var(--secondary);
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
}

tr:hover {
  background-color: rgba(255,255,255,0.02);
}

/* Footer */
footer {
  background: #060913;
  color: var(--text-light);
  padding: 4rem 2rem 2rem;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto 3rem;
  text-align: left;
}

.footer-col h3 {
  color: var(--white);
  margin-bottom: 1.5rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 2rem;
  font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-up {
  animation: fadeInUp 0.8s forwards;
}

/* Media Queries */
@media (max-width: 768px) {
  .hero h1 { font-size: 3rem; }
  .hero p { font-size: 1.2rem; }
  
  .mobile-menu-btn {
    display: block;
    margin-left: auto; /* Fixes centering issue by pushing to the right */
  }

  nav {
    position: absolute; /* Removes nav from flex container flow */
  }
  
  nav ul {
    position: absolute;
    top: 55px; /* Offset to align with glass header */
    left: -100vw;
    width: 100vw;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    flex-direction: column;
    text-align: center;
    padding: 2rem 0;
    box-shadow: var(--shadow-lg);
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid var(--glass-border);
  }
  
  nav ul.show {
    left: 0;
  }
  
  .btn-outline {
    margin-left: 0;
    margin-top: 1rem;
  }
}
