/* ===================================
   Gyanmanjari Vidyapith - Global Styles
   Modern Design with Animations
   =================================== */

/* CSS Variables - Color Palette */
:root {
  /* Primary Colors - Blue/Indigo Theme */
  --primary-blue: #2563eb;
  --primary-blue-dark: #1d4ed8;
  --primary-blue-light: #3b82f6;
  --primary-indigo: #4f46e5;
  --primary-indigo-dark: #4338ca;
  --accent-blue: #0ea5e9;

  /* Neutral Colors */
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Semantic Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;
}

/* Gallery Swiper Custom Styles */
.gallerySwiper .swiper-slide {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  filter: blur(2px) grayscale(50%);
  transform: scale(0.8);
  opacity: 0.6;
}

.gallerySwiper .swiper-slide-active {
  filter: blur(0) grayscale(0);
  transform: scale(1.1);
  z-index: 10;
  opacity: 1;
}

.gallerySwiper .swiper-slide-active .relative {
  border-color: white;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Glass Glossy Effect */
.glass-glossy {
  background: rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
  position: relative;
}

/* ===================================
   Reset & Base Styles
   =================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background-color: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===================================
   Typography
   =================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  color: var(--gray-900);
}

/* Character Animation */
.char {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.char.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Content Reveal Animation */
.reveal-content {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  will-change: opacity, transform;
}

.reveal-content.active {
  opacity: 1;
  transform: translateY(0);
}

h1 {
  font-size: 3rem;
}
h2 {
  font-size: 2.25rem;
}
h3 {
  font-size: 1.875rem;
}
h4 {
  font-size: 1.5rem;
}
h5 {
  font-size: 1.25rem;
}
h6 {
  font-size: 1rem;
}

p {
  margin-bottom: var(--spacing-sm);
  line-height: 1.75;
}

/* ===================================
   Animation Keyframes
   =================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* ===================================
   Utility Classes
   =================================== */

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.slide-up {
  animation: slideUp 0.8s ease-out;
}

.slide-in-left {
  animation: slideInLeft 0.8s ease-out;
}

.slide-in-right {
  animation: slideInRight 0.8s ease-out;
}

.hover-lift {
  transition: transform var(--transition-base),
    box-shadow var(--transition-base);
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

/* ===================================
   Hero Section & Slider
   =================================== */

.hero-section {
  padding: var(--spacing-lg) var(--spacing-sm);
  margin: var(--spacing-md) var(--spacing-sm);
  animation: fadeIn 1s ease-out;
}

.hero-slider-container {
  position: relative;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.hero-slider-wrapper {
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}

.hero-slider {
  display: flex;
  transition: transform 700ms ease-in-out;
}

.hero-slide {
  width: 100%;
  flex-shrink: 0;
  display: block;
  background: #1a1a1a; /* Dark background for contain mode */
}

.hero-slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover; /* Changed from cover to contain */
  object-position: center;
  background: #1a1a1a;
}

/* Hero Swiper specific styles */
.heroSwiper {
  width: 100%;
  border-radius: 1.5rem;
  overflow: hidden;
}

.heroSwiper .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a1a;
}

.heroSwiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(
    135deg,
    var(--primary-blue),
    var(--primary-indigo)
  );
  color: var(--white);
  border: none;
  border-radius: var(--radius-full);
  padding: 0.75rem;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
  z-index: 10;
}

.slider-btn:hover {
  transform: translateY(-50%) scale(1.1);
  box-shadow: var(--shadow-xl);
  background: linear-gradient(
    135deg,
    var(--primary-indigo),
    var(--primary-blue-dark)
  );
}

.slider-btn:focus {
  outline: none;
}

.slider-btn-prev {
  left: 0.5rem;
}

.slider-btn-next {
  right: 0.5rem;
}

.slider-btn svg {
  width: 1.5rem;
  height: 1.5rem;
  display: block;
}

/* ===================================
   Section Styles
   =================================== */

.section {
  padding: var(--spacing-2xl) 0;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: var(--spacing-xl);
  animation: slideUp 0.8s ease-out;
}

/* ===================================
   About Section
   =================================== */

.about-section {
  padding: var(--spacing-2xl) var(--spacing-md);
}

.about-container {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
  background: var(--white);
  padding: var(--spacing-xl);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  animation: scaleIn 0.8s ease-out;
}

.about-image-wrapper {
  flex: 1;
  animation: slideInLeft 1s ease-out;
}

.about-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base);
}

.about-image:hover {
  transform: scale(1.02);
}

.about-content {
  flex: 1;
  animation: slideInRight 1s ease-out;
}

.about-title {
  font-size: 2rem;
  color: var(--gray-900);
  margin-bottom: var(--spacing-md);
}

.about-text {
  font-size: 1.125rem;
  color: var(--gray-700);
  line-height: 1.8;
  margin-bottom: var(--spacing-md);
}

.about-link {
  display: inline-block;
  margin-top: var(--spacing-md);
  color: var(--primary-blue);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-base);
  font-size: 1.125rem;
}

.about-link:hover {
  color: var(--primary-indigo);
  transform: translateX(5px);
}

/* ===================================
   Programs Section
   =================================== */

.programs-section {
  background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
  padding: var(--spacing-2xl) var(--spacing-md);
}

.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-xl);
  max-width: 1200px;
  margin: 0 auto;
}

.program-card {
  background: var(--white);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
  transition: all var(--transition-base);
  animation: slideUp 0.8s ease-out;
}

.program-card:nth-child(2) {
  animation-delay: 0.1s;
}

.program-card:nth-child(3) {
  animation-delay: 0.2s;
}

.program-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-xl);
}

.program-icon {
  margin: 0 auto var(--spacing-md);
  transition: all var(--transition-base);
}

.program-icon svg {
  width: 4rem;
  height: 4rem;
}

.program-card:hover .program-icon {
  transform: scale(1.1) rotate(5deg);
}

.icon-blue {
  color: var(--primary-blue);
}
.icon-green {
  color: var(--success);
}
.icon-purple {
  color: #a855f7;
}

.program-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: var(--spacing-sm);
}

.program-description {
  color: var(--gray-700);
  line-height: 1.7;
}

/* ===================================
   Location Cards (Swiper)
   =================================== */

.location-section {
  background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
  padding: var(--spacing-2xl) 0;
}

.location-card {
  background: var(--white);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
  transition: all var(--transition-base);
}

.location-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.location-card img {
  margin: 0 auto var(--spacing-md);
  max-width: 100%;
  height: auto;
}

.location-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: var(--spacing-sm);
}

/* ===================================
   Facilities Section
   =================================== */

.facilities-section {
  background: linear-gradient(
    135deg,
    var(--primary-blue),
    var(--primary-indigo)
  );
  color: var(--white);
  padding: var(--spacing-2xl) var(--spacing-md);
  border-radius: var(--radius-lg);
  margin: var(--spacing-lg) var(--spacing-sm);
  animation: fadeIn 1s ease-out;
}

/* ===================================
   Testimonials Section
   =================================== */

.testimonials-section {
  padding: var(--spacing-2xl) var(--spacing-md);
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-md);
  max-width: 1400px;
  margin: 0 auto;
}

.testimonial-video {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.testimonial-video:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-xl);
}

.testimonial-video iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ===================================
   Photo Gallery
   =================================== */

.gallery-section {
  padding: var(--spacing-2xl) var(--spacing-md);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-md);
  max-width: 1400px;
  margin: 0 auto;
}

.gallery-item {
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  animation: fadeIn 0.6s ease-out;
}

.gallery-item:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-xl);
}

.gallery-item img {
  width: 100%;
  height: 14rem;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

/* ===================================
   Custom Scrollbar
   =================================== */

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--gray-200);
  border-radius: var(--radius-md);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(
    135deg,
    var(--primary-blue),
    var(--primary-indigo)
  );
  border-radius: var(--radius-md);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    135deg,
    var(--primary-indigo),
    var(--primary-blue-dark)
  );
}

/* ===================================
   Responsive Design
   =================================== */

/* Large Desktop */
@media (min-width: 1440px) {
  .container {
    max-width: 1400px;
  }

  h1 {
    font-size: 3.5rem;
  }
  h2 {
    font-size: 2.75rem;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .about-container {
    flex-direction: row;
    align-items: center;
  }

  .programs-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .testimonial-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* Tablet */
@media (max-width: 1024px) {
  h1 {
    font-size: 2.5rem;
  }
  h2 {
    font-size: 2rem;
  }

  .section {
    padding: var(--spacing-xl) 0;
  }

  .programs-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .testimonial-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.75rem;
  }
  h3 {
    font-size: 1.5rem;
  }

  .container {
    padding: 0 var(--spacing-sm);
  }

  .hero-section {
    padding: var(--spacing-md) var(--spacing-xs);
    margin: var(--spacing-sm) var(--spacing-xs);
  }

  .heroSwiper {
    height: 350px !important; /* Adjust height for mobile */
    border-radius: 1rem;
  }

  .hero-slide img {
    object-fit: contain; /* Maintain contain on mobile */
  }

  .about-container,
  .programs-grid {
    gap: var(--spacing-md);
  }

  .programs-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonial-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .slider-btn {
    padding: 0.5rem;
  }

  .slider-btn svg {
    width: 1.25rem;
    height: 1.25rem;
  }
}

/* Extra Small Mobile */
@media (max-width: 480px) {
  h1 {
    font-size: 1.75rem;
  }
  h2 {
    font-size: 1.5rem;
  }

  .gallery-grid,
  .testimonial-grid {
    grid-template-columns: 1fr;
  }

  .about-container {
    padding: var(--spacing-md);
  }

  .program-card {
    padding: var(--spacing-md);
  }
}

/* Floating Animation */
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}
