/* =========================================
 🌈 ROOT VARIABLES
========================================= */
:root {
  --brand: #1d0cdb;
  --accent: #f6a623;
  --muted: #666;
  --max-width: 1100px;
}

/* =========================================
 🧱 BASE STYLES
========================================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, "Segoe UI", Roboto, "Noto Sans Tamil";
  color: #222;
  background: #fafafa;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: 'Baloo Tammudu 2', cursive;
  color: #1d0cdb;
  margin-bottom: 15px;
}

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

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* =========================================
 🏠 HEADER
========================================= */

/* ---- Background Gradient ---- */
header {
  position: fixed;
  top: 0;
  left: 1%;
  right: 0%;
  width: 98%;
  height: 200px;
  text-align: center;
  padding-top: 15px;
  padding-left: 40px;
  padding-bottom: 10px;
  border: 10px solid #1d0cdb;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  z-index: 1000;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(270deg, rgb(233, 194, 198), #ffffff, #cbecd8, #ffffff, #e3d1ed, #fafaf7);
  background-size: 1000% 1000%;
  animation: gradientSlide 30s ease infinite;
}

@keyframes gradientSlide {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---- Header Title ---- */
header h1 {
  margin: 0;
  
  font-size: clamp(30px, 5vw, 60px);
  font-weight: 900;
  color: blue;
  position: relative;
  z-index: 2;
  letter-spacing: -5px;
  margin-top: 20px;
  right: 22px;
  -webkit-text-stroke: 1px white;
  text-stroke: 1px white;
  text-shadow:
    1px 1px 0 white,
    -1px 1px 0 white,
    1px -1px 0 white,
    -1px -1px 0 white;
}

/* ---- Header Sub Text ---- */
header .address h2 {
  margin: 0;
  font-size: clamp(40px, 60vw, 12px);
  font-weight: bold;
  text-align: center;
  color: #1d0cdb;
  position: relative;
  z-index: 2;
  letter-spacing: -3px;
}

/* ---- Border Balls ---- */
.border-ball {
  position: absolute;
  width: 15px;
  height: 15px;
  background: red;
  border-radius: 50%;
  z-index: 3;
  animation: moveBall 6s linear infinite;
}

.ball1 { animation-delay: 0s; }
.ball2 { animation-delay: 2s; }
.ball3 { animation-delay: 4s; }

@keyframes moveBall {
  0%   { top: -5px; left: -5px; }
  25%  { top: -5px; left: calc(100% - 10px); }
  50%  { top: calc(100% - 10px); left: calc(100% - 10px); }
  75%  { top: calc(100% - 10px); left: -5px; }
  100% { top: -5px; left: -5px; }
}

/* ---- Falling Footballs ---- */
.football {
  position: absolute;
  width: 40px;
  height: 40px;
  background: url('https://upload.wikimedia.org/wikipedia/commons/d/d3/Soccerball.svg') no-repeat center/contain;
  top: -50px;
  z-index: 1;
  animation: fall 5s linear infinite;
}

.football:nth-child(1) { left: 10%; animation-duration: 4s; animation-delay: 0s; }
.football:nth-child(2) { left: 30%; animation-duration: 6s; animation-delay: 1s; }
.football:nth-child(3) { left: 50%; animation-duration: 5s; animation-delay: 2s; }
.football:nth-child(4) { left: 70%; animation-duration: 7s; animation-delay: 0.5s; }
.football:nth-child(5) { left: 85%; animation-duration: 6s; animation-delay: 1.5s; }

@keyframes fall {
  0% { top: -50px; transform: rotate(0deg); }
  50% { top: 100%; transform: rotate(180deg); }
  100% { top: -50px; transform: rotate(360deg); }
}

/* =========================================
   🧱 Main Content Area
========================================= */
main {
  margin-left: 240px;   /* space for sidebar */
  margin-top: 220px;    /* space for header */
  padding: 20px;
  width: calc(100% - 260px); /* keeps hero & content aligned */
  box-sizing: border-box;
}

/* =========================================
   📱 Responsive Fix
========================================= */
@media (max-width: 760px) {
  .side-nav {
    display: none;
  }
  main {
    margin: 0;
    width: 100%;
    padding-top: 160px;
  }
}


/* ===================== Hero Slider ===================== */
.hero-slider {
  position: relative;
  width: 90vw;
  max-width: none; /* optional, adjust as needed */
  height: 500px; /* slider height */
  margin: -29px ; /* space for header */
  overflow: hidden;
  border-radius: 10px;
  margin-left: -180px;
}

.hero-slider .slide {
  position: absolute;
  top: 0;
  left: 0;
  right: -500px;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  padding-left: 100px;
}

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

.hero-slider img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* makes image cover the slider area */
  display: block;
  border-radius: inherit;
}




/* =========================================
   🟣 Permanent Side Navigation (Below Header)
========================================= */
.side-nav {
  position: fixed;
  top: 205px;
  left: 10px;
  right:0px;
  width: 160px;
  height: calc(100vh - 200px);
  background: #1d0cdb;
  padding-top: 20px;
  border-radius: 20px;
}

/* ---- Sidebar Links ---- */
.side-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.side-nav ul li {
  margin: 20px 0;
  text-align: left;
}

.side-nav ul li a {
  color: #fff;
  font-weight: 600;
  font-size: 18px;
  padding: 10px 20px;
  display: block;
  transition: background 0.3s, color 0.3s;
  border-radius: 8px;
}

.side-nav ul li a:hover {
  background: #f6a623;
  color: #000;
}

/* =========================================
   🏫 About Section
========================================= */
.about {
  background: #ffffff;
  padding: 60px 60px;
  margin-top: 60px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  width: 90%;
  margin-left: -10px;
  max-width: 1500px;

  
  /* 🔧 Stretch and align with hero slider */
  position: relative;
  left: -70px;              /* same as your hero-slider margin-left */
  width: calc(100% + 110px); /* extend width to fill the shift */
  max-width: none !important;
}

.about h2 {
  text-align: center;
  color: var(--brand);
  font-size: 2rem;
  margin-bottom: 20px;
}

.about p {
  font-size: 18px;
  color: #333;
  line-height: 1.8;
  text-align: justify;
  margin-bottom: 15px;
}

/* =========================================
   🖼️ Gallery Section 
========================================= */
.gallery {
  max-width: 1000px;
  margin: 60px auto;
  padding: 20px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.gallery h2 {
  text-align: center;
  color: var(--brand);
  margin-bottom: 20px;
  font-family: 'Baloo Tammudu 2', cursive;
}

.gallery-slider-wrapper {
  position: relative;
  overflow: hidden;
}

.gallery-slider {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.gallery-slide {
  flex: 0 0 33.33%; /* 3 images per view */
  padding: 10px;
}

.gallery-slide img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 15px;
}

/* Navigation Buttons */
.prev, .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0,0,0,0.5);
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
  border-radius: 50%;
  z-index: 10;
}

.prev { left: 10px; }
.next { right: 10px; }

/* Responsive */
@media (max-width: 760px) {
  .gallery-slide {
    flex: 0 0 50%; /* 2 images per view on tablet */
  }
}

@media (max-width: 480px) {
  .gallery-slide {
    flex: 0 0 100%; /* 1 image per view on mobile */
  }
  .gallery-slide img {
    height: 150px;
  }
}

/* =========================================
   🏅 Programs Section
========================================= */

.programs {
  background: #f8f9ff; /* light background */
  padding: 60px 20px;
  border-radius: 20px;
  margin: 40px auto;
  max-width: 1200px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.programs h2 {
  text-align: center;
  color: var(--brand);
  font-family: 'Baloo Tammudu 2', cursive;
  font-size: 2.2rem;
  margin-bottom: 40px;
}

.program-list {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: center;
}

.program {
  background: #ffffff;
  border-radius: 15px;
  padding: 25px 20px;
  flex: 1 1 280px; /* responsive width */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}

.program:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.program h3 {
  font-family: 'Baloo Tammudu 2', cursive;
  color: var(--brand);
  font-size: 1.5rem;
  margin-bottom: 10px;
  text-align: center;
}

.program p {
  font-size: 1rem;
  color: #333;
  text-align: center;
  line-height: 1.6;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .program-list {
    flex-direction: column;
    align-items: center;
  }
}

/* =========================================
   📞 Contact Section
========================================= */
.contact {
  max-width: 800px;
  margin-left: 180px;  /* side-nav இடம் விட்டு right shift */
  margin-top: 220px;   /* header கீழே space */
  padding: 20px;
  font-family: Inter, system-ui, sans-serif;
}

.contact h2 {
  text-align: center;
  color: var(--brand);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.contact-form input,
.contact-form textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
}

.contact-form button {
  width: 150px;
  padding: 10px;
  border: none;
  border-radius: 5px;
  background-color: var(--brand);
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  transition: 0.3s;
}

.contact-form button:hover {
  background-color: var(--accent);
}

.contact-info {
  margin-top: 30px;
  text-align: center;
  font-size: 1rem;
  color: var(--muted);
}



/* =========================================
   Responsive: for mobile, hide sidebar
========================================= */
@media (max-width: 760px) {
  .side-nav {
    display: none;
  }
  header {
    left: 0;
    width: 100%;
  }
  main {
    margin-left: 0;
    padding-top: 100px; /* still leave space for header */
  }
}


/* =========================================
 ⚓ FOOTER
========================================= */
footer {
  background: #07203b;
  color: #eef6ff;
  padding: 28px 0;
  margin-top: 36px;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

footer a {
  color: #cfe9ff;
}

/* =========================================
 📱 RESPONSIVE STYLES
========================================= */

/* ---- Mobile (<=760px) ---- */
@media (max-width: 760px) {
  header .address h2 { font-size: 22px; }

  nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  header { height: 100px; padding-top: 20px; }
  header h1 { font-size: clamp(22px, 7vw, 32px); }

  .hero-slider { height: 300px; }
  .slide-caption { font-size: 1rem; bottom: 10px; }

  .gallery { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Tablet & Desktop (>=760px) ---- */
@media (min-width: 760px) {
  .programs,
  .grid-3 { grid-template-columns: repeat(3, 1fr); }

  .gallery { grid-template-columns: repeat(4, 1fr); }

  .contact-card { grid-template-columns: 1fr 320px; }
}

/* ---- Small Mobile (<=480px) ---- */
@media (max-width: 480px) {
  header { height: 100px; padding-top: 20px; }
  header h1 { font-size: clamp(22px, 7vw, 32px); }
  header::before, header::after { width: 150%; }

  .hero-slider { height: 200px; }
  .slide-caption { font-size: 0.9rem; bottom: 5px; }
}

.profile {
  position: absolute;
  top: 90px;           /* move up/down */
  right: 20px;         /* move left/right */
  width: 90px;        /* outer circle size */
  height: 90px;
  background: radial-gradient(circle, #140dd1 30%, #1d0cdb 90%); /* nice color mix */
  border-radius: 50%;  /* make it a circle */
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  z-index: 10;
}

.profile-overlay {
  width: 100px;         /* inner image size */
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff; /* white ring inside */
}

/* ===============================
   🧩 MANAGEMENT PAGE STYLES
================================= */

.management-page {
  margin-left: 1px; /* Sidebar width */
  margin-top: 1px;  /* Header height */
  padding: 40px;
  font-family: 'Noto Sans Tamil', sans-serif;
  text-align: center;
  background-color: #f9f9ff;
  min-height: 80vh;
}

.management-page h2 {
  color: #1d0cdb;
  font-size: 2.4rem;
  margin-bottom: 40px;
  font-family: 'Baloo Tammudu 2', cursive;
}

.management-gallery {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.manager {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid #1d0cdb;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
}

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

.manager:hover {
  transform: scale(1.1);
}

.name {
  margin-top: 10px;
  font-weight: 600;
  color: #333;
  font-size: 1.1rem;
}

/* 📱 Responsive */
@media (max-width: 768px) {
  .management-page {
    margin-left: 0;
    margin-top: 150px;
  }

  .manager {
    width: 140px;
    height: 140px;
  }
}


