/* =========================================
   Elegant Study Forum - Premium Stylesheet
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Montserrat:wght@300;400;500;600;700&family=Oswald:wght@400;500;600;700&family=Poppins:wght@300;400;500;600;700&display=swap');

/* --- CSS Variables --- */
:root {
  /* Brand Colors */
  --primary-red: #C70039;
  --primary-red-dark: #900C3F;
  --gold: #FFD700;
  --gold-dark: #D4AF37;
  --dark-blue: #0B1A3C;
  --dark-blue-light: #152B5A;
  --white: #FFFFFF;
  --off-white: #F8F9FA;
  --text-dark: #333333;
  --text-light: #666666;
  --bg-gradient: linear-gradient(135deg, var(--dark-blue) 0%, #1a3673 100%);
  
  /* Typography */
  --font-heading: 'Oswald', sans-serif;
  --font-body: 'Poppins', sans-serif;
  --font-bebas: 'Bebas Neue', sans-serif;

  /* Spacing */
  --section-padding: 80px 5%;
  --border-radius: 12px;
  --border-radius-lg: 20px;

  /* Shadows & Glassmorphism */
  --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --box-shadow-hover: 0 20px 40px rgba(11, 26, 60, 0.15);
  --glass-bg: rgba(255, 255, 255, 0.9);
  --glass-border: 1px solid rgba(255, 255, 255, 0.2);
  --glass-blur: blur(10px);
  
  /* Transitions */
  --transition-fast: 0.3s ease;
  --transition-smooth: 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --- Resets & Global Styles --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background-color: var(--off-white);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--dark-blue);
  text-transform: uppercase;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Reusable Components --- */
.container {
  max-width: 1280px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 2.8rem;
  font-weight: 700;
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--primary-red);
  border-radius: 2px;
}

.section-title p {
  color: var(--text-light);
  margin-top: 15px;
  font-size: 1.1rem;
}

/* Base Buttons */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary {
  background-color: var(--primary-red);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(199, 0, 57, 0.3);
}

.btn-primary:hover {
  background-color: var(--primary-red-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(199, 0, 57, 0.4);
  color: var(--white);
}

.btn-secondary {
  background-color: transparent;
  color: var(--white);
  border: 2px solid var(--gold);
}

.btn-secondary:hover {
  background-color: var(--gold);
  color: var(--dark-blue);
  transform: translateY(-3px);
}

.btn-gold {
  background-color: var(--gold);
  color: var(--dark-blue);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-gold:hover {
  background-color: var(--gold-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255, 215, 0, 0.4);
}

/* --- Scroll Animations (Initial States) --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.fade-in {
  opacity: 0;
  transition: opacity 1s ease;
}

.fade-in.active {
  opacity: 1;
}

/* --- Navigation --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: var(--transition-fast);
  padding: 15px 5%;
  background: transparent;
}

header.scrolled {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--box-shadow);
  padding: 10px 5%;
  border-bottom: var(--glass-border);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
}

.logo img {
  height: 60px; /* Adjust according to your logo dimensions */
  transition: var(--transition-fast);
}

header.scrolled .logo img {
  height: 50px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links li a {
  color: var(--white);
  font-weight: 500;
  font-size: 1.05rem;
  position: relative;
}

header.scrolled .nav-links li a {
  color: var(--dark-blue);
}

.nav-links li a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-red);
  transition: width 0.3s ease;
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
  width: 100%;
}

.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--white);
  cursor: pointer;
}

header.scrolled .mobile-toggle {
  color: var(--dark-blue);
}

/* --- Hero Section --- */
.hero {
  height: 100vh;
  min-height: 600px;
  background: var(--bg-gradient);
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Geometric Background Elements for Hero */
.hero::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(199,0,57,0.15) 0%, rgba(255,255,255,0) 70%);
  top: -100px;
  right: -100px;
  border-radius: 50%;
  z-index: 1;
}

.hero::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,215,0,0.1) 0%, rgba(255,255,255,0) 70%);
  bottom: 10%;
  left: -50px;
  border-radius: 50%;
  z-index: 1;
}

/* Add a subtle overlay pattern if desired */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 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.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  padding: 0 5%;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
}

.hero-text h1 {
  font-size: 4.5rem;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 20px;
  text-transform: uppercase;
  font-family: var(--font-bebas);
  letter-spacing: 2px;
}

.hero-text h1 span {
  color: var(--gold);
}

.hero-text p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  margin-bottom: 30px;
  max-width: 500px;
}

.hero-btns {
  display: flex;
  gap: 20px;
}

.hero-image {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Glassmorphism accent card in Hero */
.hero-card {
  position: absolute;
  bottom: 10%;
  left: 0;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 20px;
  border-radius: var(--border-radius);
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 15px;
  animation: float 4s ease-in-out infinite;
  box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.hero-card i {
  font-size: 2.5rem;
  color: var(--gold);
}

.hero-card-text h4 {
  color: var(--white);
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.hero-card-text p {
  font-size: 0.9rem;
  opacity: 0.8;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
  100% { transform: translateY(0px); }
}

/* --- Features / Why Choose Us --- */
.features {
  padding: var(--section-padding);
  background-color: var(--white);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.feature-card {
  background: var(--white);
  padding: 40px 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  text-align: center;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.03);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--box-shadow-hover);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  width: 70px;
  height: 70px;
  background: rgba(199, 0, 57, 0.1);
  color: var(--primary-red);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  margin: 0 auto 20px;
  transition: var(--transition-fast);
}

.feature-card:hover .feature-icon {
  background: var(--primary-red);
  color: var(--white);
}

.feature-card h3 {
  font-size: 1.4rem;
  margin-bottom: 15px;
}

.feature-card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* --- Courses Section --- */
.courses {
  padding: var(--section-padding);
  background-color: var(--off-white);
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.course-card {
  background: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.course-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--box-shadow-hover);
}

.course-img {
  height: 200px;
  background-color: var(--dark-blue); /* Fallback */
  position: relative;
  overflow: hidden;
}

.course-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.course-card:hover .course-img img {
  transform: scale(1.1);
}

.course-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--gold);
  color: var(--dark-blue);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.course-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.course-content h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--dark-blue);
}

.course-content p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 20px;
  flex-grow: 1;
}

.course-features {
  margin-bottom: 20px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.course-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.course-features li i {
  color: var(--primary-red);
}

/* --- Achievements Section (Stats) --- */
.achievements {
  padding: 80px 5%;
  background: linear-gradient(rgba(11, 26, 60, 0.9), rgba(11, 26, 60, 0.9)), url('https://images.unsplash.com/photo-1523050854058-8df90110c9f1?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover fixed;
  color: var(--white);
}

.stats-container {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--font-bebas);
  font-size: 4rem;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 10px;
}

.stat-text {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* --- Registration Form Section --- */
.registration {
  padding: var(--section-padding);
  background-color: var(--white);
  position: relative;
}

.registration-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  background: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow);
  overflow: hidden;
}

.reg-image {
  background: url('https://images.unsplash.com/photo-1434030216411-0b793f4b4173?ixlib=rb-4.0.3&auto=format&fit=crop&w=1000&q=80') center/cover;
  min-height: 400px;
  position: relative;
}

.reg-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(11, 26, 60, 0.2), rgba(11, 26, 60, 0.8));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.reg-image-text {
  color: var(--white);
  text-align: right;
}

.reg-image-text h3 {
  color: var(--white);
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.reg-form {
  padding: 50px;
}

.form-group {
  margin-bottom: 20px;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition-fast);
  background-color: #f9f9f9;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-red);
  background-color: var(--white);
  box-shadow: 0 0 0 3px rgba(199, 0, 57, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* --- Timetable Section --- */
.timings {
  padding: var(--section-padding);
  background-color: var(--off-white);
}

.table-responsive {
  overflow-x: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  background: var(--white);
}

.timing-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.timing-table th {
  background-color: var(--dark-blue);
  color: var(--white);
  padding: 18px 20px;
  font-family: var(--font-heading);
  letter-spacing: 1px;
  font-size: 1.1rem;
}

.timing-table td {
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  color: var(--text-dark);
}

.timing-table tr:last-child td {
  border-bottom: none;
}

.timing-table tr:hover td {
  background-color: rgba(11, 26, 60, 0.02);
}

.batch-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  background: rgba(199, 0, 57, 0.1);
  color: var(--primary-red);
}

/* --- Testimonials --- */
.testimonials {
  padding: var(--section-padding);
  background-color: var(--white);
  overflow: hidden;
}

.testimonial-slider {
  display: flex;
  gap: 30px;
  overflow-x: auto;
  padding: 20px 0 40px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.testimonial-slider::-webkit-scrollbar {
  display: none;
}

.testimonial-card {
  min-width: 350px;
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 30px;
  box-shadow: var(--box-shadow);
  scroll-snap-align: center;
  border: 1px solid #eee;
  position: relative;
}

.quote-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 3rem;
  color: rgba(255, 215, 0, 0.2);
  z-index: 0;
}

.testimonial-content {
  position: relative;
  z-index: 1;
}

.stars {
  color: var(--gold);
  margin-bottom: 15px;
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 20px;
  color: var(--text-light);
}

.student-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.student-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary-red);
  color: var(--white);
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 600;
  font-size: 1.2rem;
}

.student-details h4 {
  font-size: 1.1rem;
  color: var(--dark-blue);
  text-transform: none;
  font-family: var(--font-body);
  font-weight: 600;
}

.student-details p {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* --- Gallery Section --- */
.gallery {
  padding: var(--section-padding);
  background: var(--off-white);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
}

.gallery-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  height: 250px;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 26, 60, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: var(--transition-fast);
}

.gallery-overlay i {
  color: var(--white);
  font-size: 2rem;
  transform: scale(0);
  transition: transform 0.3s ease 0.1s;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-item:hover .gallery-overlay i {
  transform: scale(1);
}

/* --- Footer & Contact --- */
.footer {
  background: var(--dark-blue);
  color: var(--white);
  padding: 80px 5% 20px;
}

.footer-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 60px;
}

.footer-col h3 {
  color: var(--white);
  font-size: 1.5rem;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 10px;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 3px;
  background: var(--primary-red);
}

.footer-logo img {
  max-width: 200px;
  margin-bottom: 20px;
  background: rgba(255,255,255,0.1);
  padding: 10px;
  border-radius: 8px;
}

.footer-col p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 15px;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-links a:hover {
  color: var(--gold);
  padding-left: 5px;
}

.footer-contact li {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.7);
}

.footer-contact i {
  color: var(--gold);
  font-size: 1.2rem;
  margin-top: 3px;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

/* -- WhatsApp FAB -- */
.whatsapp-fab {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #25D366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 35px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: transform 0.3s;
  animation: pulse 2s infinite;
}

.whatsapp-fab:hover {
  transform: scale(1.1);
  color: white;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 100px;
  }
  
  .hero-text p {
    margin: 0 auto 30px;
  }

  .hero-btns {
    justify-content: center;
  }
  
  .hero-card {
    display: none;
  }
  
  .registration-container {
    grid-template-columns: 1fr;
  }
  
  .reg-image {
    min-height: 250px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background: var(--dark-blue);
    flex-direction: column;
    justify-content: center;
    transition: 0.4s;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .nav-links li a {
    color: var(--white) !important;
  }
  
  .mobile-toggle {
    display: block;
    z-index: 1001; /* Above nav links */
  }
  
  .section-title h2 {
    font-size: 2.2rem;
  }
  
  .hero-text h1 {
    font-size: 3.5rem;
  }
  
  .stats-container {
    flex-direction: column;
    gap: 30px;
  }
}

@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 2.5rem;
  }
  
  .hero-btns {
    flex-direction: column;
  }
  
  .reg-form {
    padding: 30px 20px;
  }
}
