/* ===== CSS VARIABLES ===== */
:root {
  /* Primary Colors (Complementary Color Scheme) */
  --primary-color: #3273dc;
  --primary-dark: #2366d1;
  --primary-light: #5490ff;
  --secondary-color: #ff6b35;
  --secondary-dark: #e55528;
  --secondary-light: #ff8a5c;
  
  /* Accent Colors */
  --accent-1: #00d1b2;
  --accent-2: #ffdd57;
  --accent-3: #ff3860;
  --accent-4: #8b5cf6;
  
  /* Neutral Colors */
  --white: #ffffff;
  --light-gray: #f5f5f5;
  --medium-gray: #e0e0e0;
  --dark-gray: #4a4a4a;
  --black: #1a1a1a;
  
  /* Text Colors */
  --text-primary: #2c3e50;
  --text-secondary: #7f8c8d;
  --text-light: #bdc3c7;
  --text-white: #ffffff;
  
  /* Background Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-dark: #2c3e50;
  --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --bg-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  
  /* Glass Effects */
  --glass-bg: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  --glass-backdrop: blur(10px);
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
  
  /* Typography */
  --font-heading: 'Manrope', sans-serif;
  --font-body: 'Rubik', sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 2.5rem;
  --spacing-3xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.15s ease-out;
  --transition-base: 0.3s ease-out;
  --transition-slow: 0.5s ease-out;
  
  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal: 1040;
  --z-popover: 1050;
  --z-tooltip: 1060;
}

/* ===== RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
}

h1 { font-size: var(--font-size-5xl); }
h2 { font-size: var(--font-size-4xl); }
h3 { font-size: var(--font-size-3xl); }
h4 { font-size: var(--font-size-2xl); }
h5 { font-size: var(--font-size-xl); }
h6 { font-size: var(--font-size-lg); }

p {
  margin-bottom: var(--spacing-md);
  color: var(--text-secondary);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all var(--transition-base);
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ===== GLOBAL BUTTON STYLES ===== */
.btn, button, input[type='submit'], .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md) var(--spacing-xl);
  font-family: var(--font-heading);
  font-size: var(--font-size-base);
  font-weight: 500;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before, button::before, input[type='submit']::before, .button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left var(--transition-slow);
  z-index: -1;
}

.btn:hover::before, button:hover::before, input[type='submit']:hover::before, .button:hover::before {
  left: 100%;
}

/* Primary Button */
.btn-primary, .button.is-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover, .button.is-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--white);
}

/* Secondary Button */
.btn-secondary, .button.is-light {
  background: var(--white);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover, .button.is-light:hover {
  background: var(--primary-color);
  color: var(--white);
  transform: translateY(-2px);
}

/* Glass Button */
.glass-button {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  color: var(--white);
}

.glass-button:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  color: var(--white);
}

/* ===== GLASS EFFECTS ===== */
.glass-card, .glass-box, .glass-form, .glass-header, .glass-footer {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-shadow);
}

.glass-input, .glass-select select {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.glass-input:focus, .glass-select select:focus {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--primary-color);
  outline: none;
}

/* ===== HEADER & NAVIGATION ===== */
.glass-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  z-index: var(--z-fixed);
  transition: all var(--transition-base);
}

.navbar-brand .logo-text {
  font-family: var(--font-heading);
  font-size: var(--font-size-2xl);
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-item {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--text-primary);
  position: relative;
  transition: all var(--transition-base);
}

.navbar-item::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: all var(--transition-base);
  transform: translateX(-50%);
}

.navbar-item:hover::after {
  width: 100%;
}

.navbar-item:hover {
  color: var(--primary-color);
}

/* ===== HERO SECTION ===== */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -2;
}

.gradient-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.3));
  z-index: -1;
}

.hero-body {
  padding: var(--spacing-3xl) 0;
  position: relative;
  z-index: 1;
}

.hero .title {
  color: var(--white) !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  margin-bottom: var(--spacing-lg);
}

.hero .subtitle {
  color: var(--white) !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  margin-bottom: var(--spacing-xl);
}

/* ===== PARALLAX EFFECTS ===== */
.parallax-container {
  position: relative;
  overflow: hidden;
}

.parallax-section {
  position: relative;
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ===== SERVICES SECTION ===== */
#services {
  padding: var(--spacing-3xl) 0;
}

#services .card {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all var(--transition-base);
  border: none;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

#services .card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-xl);
}

#services .image-container {
  width: 100%;
  height: 250px;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  text-align: center;
}

#services .image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all var(--transition-slow);
  margin: 0 auto;
}

#services .card:hover .image-container img {
  transform: scale(1.1);
}

#services .card-content {
  padding: var(--spacing-xl);
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ===== RESEARCH SECTION ===== */
#research {
  padding: var(--spacing-3xl) 0;
  background: var(--bg-secondary);
}

#research .animate-float {
  animation: float 6s ease-in-out infinite;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

/* ===== NEWS SECTION ===== */
#news {
  padding: var(--spacing-3xl) 0;
}

#news .card {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all var(--transition-base);
  border: none;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

#news .card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

#news .image-container {
  width: 100%;
  height: 250px;
  overflow: hidden;
  text-align: center;
}

#news .image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0 auto;
}

#news .card-content {
  padding: var(--spacing-xl);
  text-align: center;
  flex-grow: 1;
}

/* ===== INSIGHTS SECTION ===== */
#insights {
  padding: var(--spacing-3xl) 0;
}

.custom-slider {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  padding: var(--spacing-xl);
}

.slider-container {
  position: relative;
}

.slide {
  display: none;
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.slide.active {
  display: block;
  opacity: 1;
}

.slider-controls {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  margin-top: var(--spacing-xl);
}

.slider-btn {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-full);
  background: var(--primary-color);
  color: var(--white);
  border: none;
  font-size: var(--font-size-xl);
  cursor: pointer;
  transition: all var(--transition-base);
}

.slider-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
}

/* ===== INSTRUCTORS SECTION ===== */
#instructors {
  padding: var(--spacing-3xl) 0;
  background: var(--bg-secondary);
}

#instructors .card {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all var(--transition-base);
  border: none;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

#instructors .card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}

#instructors .image-container {
  width: 100%;
  height: 400px;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  text-align: center;
}

#instructors .image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0 auto;
}

#instructors .card-content {
  padding: var(--spacing-xl);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ===== SUCCESS STORIES SECTION ===== */
#success-stories {
  padding: var(--spacing-3xl) 0;
}

#success-stories .box {
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-lg);
}

#success-stories .tags {
  margin-top: var(--spacing-lg);
}

#success-stories .tag {
  margin-right: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
  font-weight: 500;
}

#success-stories .animate-float {
  animation: float 6s ease-in-out infinite;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

/* ===== CONTACT SECTION ===== */
#contact {
  padding: var(--spacing-3xl) 0;
  background: var(--bg-secondary);
}

.contact-form {
  padding: var(--spacing-xl);
  border-radius: var(--radius-xl);
}

.contact-form .field {
  margin-bottom: var(--spacing-lg);
}

.contact-form .label {
  font-family: var(--font-heading);
  font-weight: 500;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

.contact-form .input,
.contact-form .textarea,
.contact-form .select select {
  border-radius: var(--radius-md);
  border: 1px solid var(--medium-gray);
  padding: var(--spacing-md);
  font-family: var(--font-body);
  transition: all var(--transition-base);
}

.contact-form .input:focus,
.contact-form .textarea:focus,
.contact-form .select select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(50, 115, 220, 0.1);
  outline: none;
}

/* ===== FOOTER ===== */
.glass-footer {
  background: linear-gradient(135deg, var(--bg-dark), #34495e);
  color: var(--white);
  padding: var(--spacing-3xl) 0 var(--spacing-xl) 0;
  margin-top: var(--spacing-3xl);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--spacing-sm);
}

.footer-links a {
  color: var(--text-light);
  transition: all var(--transition-base);
}

.footer-links a:hover {
  color: var(--white);
  text-decoration: none;
  padding-left: var(--spacing-sm);
}

.social-links {
  display: flex;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
}

.social-links a {
  color: var(--text-light);
  font-size: var(--font-size-lg);
  font-weight: 500;
  transition: all var(--transition-base);
  position: relative;
}

.social-links a::before {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width var(--transition-base);
}

.social-links a:hover {
  color: var(--primary-light);
  transform: translateY(-2px);
  text-decoration: none;
}

.social-links a:hover::before {
  width: 100%;
}

.footer-divider {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--text-light), transparent);
  margin: var(--spacing-xl) 0;
}

/* ===== UTILITY CLASSES ===== */
.animate-slide-up {
  animation: slideUp 1s ease-out;
}

.animate-fade-in {
  animation: fadeIn 1.5s ease-out;
}

.animate-card {
  animation: cardAppear 0.8s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Biomorphic Design Elements */
.bio-shape {
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
  0%, 100% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  }
  25% {
    border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
  }
  50% {
    border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
  }
  75% {
    border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
  }
}

/* Read More Links */
.read-more {
  color: var(--primary-color);
  font-weight: 500;
  position: relative;
  text-decoration: none;
  transition: all var(--transition-base);
}

.read-more::after {
  content: ' →';
  transition: transform var(--transition-base);
}

.read-more:hover {
  color: var(--primary-dark);
  text-decoration: none;
}

.read-more:hover::after {
  transform: translateX(5px);
}

/* Special Pages Styles */
.page-content {
  padding-top: 100px;
  min-height: calc(100vh - 100px);
}

.success-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.success-content {
  text-align: center;
  padding: var(--spacing-3xl);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.success-content h1,
.success-content p {
  color: var(--white);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
  :root {
    --font-size-5xl: 2.5rem;
    --font-size-4xl: 2rem;
    --font-size-3xl: 1.5rem;
  }
  
  .hero-body {
    padding: var(--spacing-2xl) 0;
  }
  
  #services .card:hover,
  #instructors .card:hover {
    transform: translateY(-5px) scale(1.01);
  }
}

@media (max-width: 768px) {
  :root {
    --font-size-5xl: 2rem;
    --font-size-4xl: 1.75rem;
    --font-size-3xl: 1.25rem;
    --spacing-3xl: 2rem;
  }
  
  .hero-body {
    padding: var(--spacing-xl) 0;
  }
  
  .section {
    padding: var(--spacing-xl) 0;
  }
  
  .glass-header {
    background: rgba(255, 255, 255, 0.98);
  }
  
  .navbar-burger {
    color: var(--text-primary);
  }
  
  .buttons {
    flex-direction: column;
    gap: var(--spacing-md);
  }
  
  .buttons .button {
    width: 100%;
    justify-content: center;
  }
  
  .social-links {
    justify-content: center;
  }
  
  #services .image-container,
  #news .image-container {
    height: 200px;
  }
  
  #instructors .image-container {
    height: 300px;
  }
}

@media (max-width: 480px) {
  :root {
    --font-size-5xl: 1.75rem;
    --font-size-4xl: 1.5rem;
    --spacing-3xl: 1.5rem;
  }
  
  .container {
    padding: 0 var(--spacing-md);
  }
  
  .contact-form,
  .glass-box,
  .glass-card {
    margin: 0 var(--spacing-sm);
  }
  
  #services .card,
  #news .card,
  #instructors .card {
    margin-bottom: var(--spacing-lg);
  }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.card, .box, .button {
  will-change: transform;
}

.hero-background {
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== ACCESSIBILITY ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

button:focus,
input:focus,
textarea:focus,
select:focus,
a:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}