/* ============================================================
   style.css — Tirupati Group of College
   Modern Blue + White theme | Responsive | Animated
   ============================================================ */

/* ----------------------------------------------------------
   1. CSS VARIABLES (Design Tokens)
   ---------------------------------------------------------- */
:root {
  /* Colors */
  --blue-900: #0a1f5c;
  --blue-800: #0f2d82;
  --blue-700: #1540b0;
  --blue-600: #1a4ecf;
  --blue-500: #2563eb;
  --blue-400: #3b82f6;
  --blue-100: #dbeafe;
  --blue-50:  #eff6ff;

  --gold:     #f59e0b;
  --gold-lt:  #fde68a;

  --white:    #ffffff;
  --gray-50:  #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-400: #94a3b8;
  --gray-600: #475569;
  --gray-800: #1e293b;
  --text:     #0f172a;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', 'Segoe UI', sans-serif;

  /* Spacing */
  --section-pad: 80px;
  --container:   1180px;
  --radius:      14px;
  --radius-sm:   8px;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(10, 31, 92, 0.08);
  --shadow-md:  0 8px 32px rgba(10, 31, 92, 0.12);
  --shadow-lg:  0 20px 60px rgba(10, 31, 92, 0.18);

  /* Transition */
  --t: 0.3s ease;
}

/* ----------------------------------------------------------
   2. RESET & BASE
   ---------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}

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

ul { list-style: none; }
a  { text-decoration: none; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
}

.highlight       { color: var(--blue-500); }
.highlight-white { color: var(--gold-lt); }

/* ----------------------------------------------------------
   3. UTILITIES
   ---------------------------------------------------------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section-pad {
  padding: var(--section-pad) 0;
}

.bg-light { background: var(--gray-50); }

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

.section-header h2 {
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  color: var(--blue-900);
  margin-bottom: 12px;
}

.section-sub {
  color: var(--gray-600);
  max-width: 560px;
  margin: 0 auto;
}

.section-tag {
  display: inline-block;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 12px;
}

/* ----------------------------------------------------------
   4. BUTTONS
   ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform var(--t), box-shadow var(--t), background var(--t), color var(--t);
  white-space: nowrap;
}

.btn:active { transform: scale(0.96); }

/* Primary */
.btn-primary {
  background: var(--blue-600);
  color: var(--white);
  border-color: var(--blue-600);
}
.btn-primary:hover {
  background: var(--blue-700);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.4);
  transform: translateY(-2px);
}

/* Outline */
.btn-outline {
  background: transparent;
  color: var(--blue-600);
  border-color: var(--blue-600);
}
.btn-outline:hover {
  background: var(--blue-600);
  color: var(--white);
  transform: translateY(-2px);
}

/* White (on dark bg) */
.btn-white {
  background: var(--white);
  color: var(--blue-900);
  border-color: var(--white);
}
.btn-white:hover {
  background: var(--gold);
  border-color: var(--gold);
  transform: translateY(-2px);
}

/* Outline white (on dark bg) */
.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.7);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}

/* Sizes */
.btn-sm  { padding: 9px 20px; font-size: 0.85rem; }
.btn-lg  { padding: 16px 36px; font-size: 1.05rem; }
.btn-full { width: 100%; justify-content: center; }

/* Pulse animation for hero CTA */
.btn-pulse {
  animation: pulse 2.5s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
  50%       { box-shadow: 0 0 0 12px rgba(37, 99, 235, 0); }
}

/* ----------------------------------------------------------
   5. HEADER / NAVBAR
   ---------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 24px;
  max-width: var(--container);
  margin: 0 auto;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--blue-900);
  transition: opacity var(--t);
}
.nav-logo:hover { opacity: 0.8; }
.logo-icon { font-size: 1.5rem; }
.logo-text strong { color: var(--blue-600); }

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  color: var(--gray-600);
  transition: background var(--t), color var(--t);
}
.nav-link:hover,
.nav-link.active {
  background: var(--blue-50);
  color: var(--blue-700);
}

.nav-cta {
  padding: 9px 20px;
  background: var(--blue-600);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background var(--t), transform var(--t);
}
.nav-cta:hover {
  background: var(--blue-700);
  transform: translateY(-1px);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--blue-900);
  border-radius: 2px;
  transition: transform var(--t), opacity var(--t);
}
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ----------------------------------------------------------
   6. HERO SECTION
   ---------------------------------------------------------- */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-700) 60%, var(--blue-500) 100%);
  color: var(--white);
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 60px 24px;
}

/* Decorative blobs */
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  pointer-events: none;
}
.hero-blob--1 {
  width: 600px; height: 600px;
  background: var(--blue-400);
  top: -200px; right: -100px;
}
.hero-blob--2 {
  width: 400px; height: 400px;
  background: var(--gold);
  bottom: -120px; left: -80px;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 620px;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--gold-lt);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}

.hero-title {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 20px;
  color: var(--white);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,0.85);
  margin-bottom: 36px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 52px;
}

/* Stats bar */
.hero-stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.2);
}
.stat { text-align: center; }
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold-lt);
}
.stat-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Hero image */
.hero-image-wrap {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 48%;
  max-width: 640px;
  z-index: 1;
  pointer-events: none;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  clip-path: polygon(12% 0%, 100% 0%, 100% 100%, 0% 100%);
  opacity: 0.55;
}
.hero-img-badge {
  position: absolute;
  bottom: 32px;
  left: 10%;
  background: var(--white);
  color: var(--blue-900);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
}

/* ----------------------------------------------------------
   7. ABOUT SECTION
   ---------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-img-wrap {
  position: relative;
}

.about-img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.about-badge {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: var(--blue-600);
  color: var(--white);
  padding: 16px 20px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.85rem;
  line-height: 1.4;
  box-shadow: var(--shadow-md);
}
.about-badge small { color: rgba(255,255,255,0.8); font-size: 0.75rem; }
.badge-icon { font-size: 1.8rem; }

.about-text h2 {
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  color: var(--blue-900);
  margin-bottom: 18px;
}

.about-text p {
  color: var(--gray-600);
  margin-bottom: 14px;
}

.about-features {
  margin: 24px 0 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.about-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  color: var(--gray-800);
}
.feature-icon { color: var(--blue-500); font-style: normal; }

/* ----------------------------------------------------------
   8. COURSES SECTION
   ---------------------------------------------------------- */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.course-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 28px;
  border: 1.5px solid var(--gray-200);
  position: relative;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}

.course-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-400);
}

.course-card--featured {
  background: linear-gradient(135deg, var(--blue-900), var(--blue-700));
  color: var(--white);
  border-color: transparent;
}
.course-card--featured p,
.course-card--featured .course-desc { color: rgba(255,255,255,0.85); }
.course-card--featured h3 { color: var(--white); }
.course-card--featured .course-highlights li { color: rgba(255,255,255,0.85); }

.course-icon {
  font-size: 2.5rem;
  margin-bottom: 14px;
}

.course-tag {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--gold);
  color: var(--blue-900);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
}
.course-tag--featured {
  background: var(--gold-lt);
}

.course-card h3 {
  font-size: 1.6rem;
  color: var(--blue-900);
  margin-bottom: 4px;
}

.course-full {
  font-size: 0.82rem;
  color: var(--gray-400);
  margin-bottom: 14px;
  font-weight: 500;
}

.course-desc {
  color: var(--gray-600);
  font-size: 0.92rem;
  margin-bottom: 18px;
}

.course-highlights {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.course-highlights li {
  font-size: 0.88rem;
  color: var(--gray-600);
  font-weight: 500;
}

/* ----------------------------------------------------------
   9. ADMISSION BANNER
   ---------------------------------------------------------- */
.admission-banner {
  background: linear-gradient(135deg, var(--blue-800), var(--blue-600));
  color: var(--white);
  padding: var(--section-pad) 0;
  position: relative;
  overflow: hidden;
}
.admission-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.admission-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.admission-text h2 {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  margin-bottom: 14px;
}
.admission-text p {
  color: rgba(255,255,255,0.85);
  max-width: 540px;
  margin-bottom: 20px;
}

.blink-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  animation: blink 1.8s infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.urgency-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.urgency-list li {
  font-size: 0.92rem;
  color: var(--gold-lt);
  font-weight: 500;
}

.admission-cta {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 220px;
}

/* ----------------------------------------------------------
   10. ADMISSION FORM
   ---------------------------------------------------------- */
.form-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.form-intro h2 {
  font-size: clamp(1.8rem, 2.8vw, 2.4rem);
  color: var(--blue-900);
  margin-bottom: 14px;
}
.form-intro p { color: var(--gray-600); }

.admission-form {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gray-800);
}
.form-group label span { color: var(--blue-600); }
.optional { color: var(--gray-400); font-weight: 400; font-size: 0.8rem; }

.form-group input,
.form-group select {
  padding: 12px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--gray-50);
  transition: border-color var(--t), box-shadow var(--t);
  outline: none;
  width: 100%;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--blue-500);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-group input.error,
.form-group select.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-error {
  font-size: 0.8rem;
  color: #ef4444;
  font-weight: 500;
  min-height: 18px;
}

.form-success {
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #166534;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-align: center;
  font-size: 0.95rem;
}

/* ----------------------------------------------------------
   11. CONTACT SECTION
   ---------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.contact-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 28px;
  text-align: center;
  border: 1.5px solid var(--gray-200);
  transition: transform var(--t), box-shadow var(--t);
}
.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.contact-icon {
  font-size: 2.6rem;
  margin-bottom: 16px;
}

.contact-card h3 {
  font-size: 1.2rem;
  color: var(--blue-900);
  margin-bottom: 10px;
}

.contact-card p,
.contact-card address {
  color: var(--gray-600);
  font-style: normal;
  font-size: 0.92rem;
  margin-bottom: 22px;
  line-height: 1.6;
}

.contact-btn { width: 100%; justify-content: center; }

/* ----------------------------------------------------------
   12. FOOTER
   ---------------------------------------------------------- */
.site-footer {
  background: var(--blue-900);
  color: rgba(255,255,255,0.75);
  padding: 48px 0 28px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.footer-brand .logo-text { font-size: 1.1rem; color: var(--white); }
.footer-brand p { font-size: 0.85rem; color: rgba(255,255,255,0.5); }

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  transition: color var(--t);
}
.footer-links a:hover { color: var(--white); }

.footer-copy {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

/* ----------------------------------------------------------
   13. BACK TO TOP
   ---------------------------------------------------------- */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 46px;
  height: 46px;
  background: var(--blue-600);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--t), transform var(--t);
  z-index: 999;
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}
.back-to-top:hover { background: var(--blue-700); }

/* ----------------------------------------------------------
   14. SCROLL ANIMATIONS
   ---------------------------------------------------------- */
.animate-fade-up {
  opacity: 0;
  transform: translateY(32px);
  animation: fadeUp 0.7s ease forwards;
}
.animate-fade-left {
  opacity: 0;
  transform: translateX(40px);
  animation: fadeLeft 0.8s ease forwards;
}

@keyframes fadeUp   { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeLeft { to { opacity: 1; transform: translateX(0); } }

/* Animation delays */
.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.30s; }
.delay-3 { animation-delay: 0.45s; }
.delay-4 { animation-delay: 0.60s; }

/* Scroll-triggered reveal (JS adds .visible) */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal.delay-1 { transition-delay: 0.12s; }
.reveal.delay-2 { transition-delay: 0.24s; }
.reveal.delay-3 { transition-delay: 0.36s; }

/* ----------------------------------------------------------
   15. RESPONSIVE — TABLET (≤ 900px)
   ---------------------------------------------------------- */
@media (max-width: 900px) {
  :root { --section-pad: 60px; }

  /* Navbar */
  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 24px 24px;
    border-top: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
    gap: 4px;
    /* Hidden by default */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }
  .nav-links.open { max-height: 500px; }

  .site-header { position: relative; }

  .nav-link { padding: 10px 16px; }
  .nav-cta   { text-align: center; padding: 12px 16px; }

  /* Hero */
  .hero { padding: 60px 24px 80px; min-height: unset; }
  .hero-image-wrap { display: none; }
  .hero-content { max-width: 100%; }

  /* About */
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-badge { right: 0; }

  /* Courses */
  .courses-grid { grid-template-columns: 1fr; }

  /* Admission banner */
  .admission-content { flex-direction: column; text-align: center; }
  .admission-cta { align-items: center; }
  .urgency-list { align-items: center; }

  /* Form */
  .form-wrap { grid-template-columns: 1fr; gap: 36px; }

  /* Contact */
  .contact-grid { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------
   16. RESPONSIVE — MOBILE (≤ 580px)
   ---------------------------------------------------------- */
@media (max-width: 580px) {
  :root { --section-pad: 48px; }

  .hero-actions { flex-direction: column; }
  .hero-stats { gap: 20px; justify-content: center; }

  .about-badge { position: static; margin-top: 16px; }

  .admission-cta .btn { width: 100%; justify-content: center; }

  .admission-form { padding: 24px 20px; }

  .footer-links { gap: 14px; }

  .back-to-top { bottom: 18px; right: 18px; }
}
