/* Custom Styles for Kayastha Professional Alliance of India Foundation */

:root {
  /* Kayastha Society Theme - Orange & Blue */
  --background: 0 0% 100%;
  --foreground: 222 47% 11%;

  --card: 0 0% 100%;
  --card-foreground: 222 47% 11%;

  --popover: 0 0% 100%;
  --popover-foreground: 222 47% 11%;

  /* Primary - Deep Blue */
  --primary: 224 76% 32%;
  --primary-foreground: 0 0% 100%;
  --primary-light: 224 76% 48%;
  --primary-dark: 224 76% 24%;

  /* Secondary - Warm Orange */
  --secondary: 25 95% 53%;
  --secondary-foreground: 0 0% 100%;
  --secondary-light: 25 95% 63%;
  --secondary-dark: 25 95% 43%;

  /* Accent - Soft Gold */
  --accent: 38 92% 50%;
  --accent-foreground: 222 47% 11%;

  --muted: 210 40% 96%;
  --muted-foreground: 215 16% 47%;

  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 100%;

  --border: 214 32% 91%;
  --input: 214 32% 91%;
  --ring: 224 76% 48%;

  --radius: 0.75rem;

  /* Custom tokens */
  --section-alt: 220 20% 97%;
  --hero-gradient: linear-gradient(135deg, hsl(224 76% 28%) 0%, hsl(224 76% 20%) 50%, hsl(224 76% 16%) 100%);
  --cta-gradient: linear-gradient(135deg, hsl(25 95% 53%) 0%, hsl(25 95% 43%) 100%);
  --orange-glow: 0 12px 40px -12px hsla(25, 95%, 53%, 0.35);
  --blue-glow: 0 12px 40px -12px hsla(224, 76%, 32%, 0.25);
  --card-shadow: 0 1px 3px 0 hsla(222, 47%, 11%, 0.04), 0 6px 16px -4px hsla(222, 47%, 11%, 0.06);
  --card-shadow-hover: 0 2px 8px 0 hsla(222, 47%, 11%, 0.06), 0 12px 32px -8px hsla(222, 47%, 11%, 0.1);
  --premium-shadow: 0 25px 50px -12px hsla(222, 47%, 11%, 0.15);
}

* {
  border-color: hsl(var(--border));
}

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  letter-spacing: -0.025em;
}

/* Utility Classes */
.section-padding {
  padding: 5rem 1.5rem;
}

@media (min-width: 768px) {
  .section-padding {
    padding: 7rem 2rem;
  }
}

@media (min-width: 1024px) {
  .section-padding {
    padding: 5rem 3rem;
  }
}

.container-main {
  max-width: 1280px;
  margin: 0 auto;
}

.gradient-hero {
  background: var(--hero-gradient);
}

.gradient-cta {
  background: var(--cta-gradient);
}

.shadow-card {
  box-shadow: var(--card-shadow);
}

.shadow-card-hover {
  box-shadow: var(--card-shadow-hover);
}

.shadow-premium {
  box-shadow: var(--premium-shadow);
}

.shadow-orange {
  box-shadow: var(--orange-glow);
}

.shadow-blue {
  box-shadow: var(--blue-glow);
}

.section-header {
  text-align: center;
  max-width: 48rem;
  margin: 0 auto 4rem;
}

@media (min-width: 768px) {
  .section-header {
    margin-bottom: 4rem;
  }
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  background-color: hsl(var(--secondary) / 0.1);
  color: hsl(var(--secondary));
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.875rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 2.25rem;
  }
}

@media (min-width: 1024px) {
  .section-title {
    font-size: 3rem;
  }
}

.section-description {
  color: hsl(var(--muted-foreground));
  font-size: 1.125rem;
  line-height: 1.75;
  max-width: 42rem;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .section-description {
    font-size: 1.25rem;
  }
}

.card-premium {
  background-color: hsl(var(--card));
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: var(--card-shadow);
  transition: all 0.5s;
  border: 1px solid hsl(var(--border) / 0.5);
}

@media (min-width: 768px) {
  .card-premium {
    padding: 2.5rem;
  }
}

.card-premium:hover {
  box-shadow: var(--card-shadow-hover);
  border-color: hsl(var(--border));
}

/* Scroll Animation Classes */
.scroll-animate {
  opacity: 0;
  transform: translateY(2rem);
  transition: all 0.7s ease-out;
}

.scroll-animate.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-animate-left {
  opacity: 0;
  transform: translateX(-2rem);
  transition: all 0.7s ease-out;
}

.scroll-animate-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.scroll-animate-right {
  opacity: 0;
  transform: translateX(2rem);
  transition: all 0.7s ease-out;
}

.scroll-animate-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.scroll-animate-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.7s ease-out;
}

.scroll-animate-scale.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* Pattern Overlay */
.pattern-overlay {
  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");
}

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

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

@keyframes slideDown {
  from { 
    opacity: 0; 
    transform: translateY(-10px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

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

.animate-slide-up {
  animation: slideUp 0.6s ease-out forwards;
}

.animate-slide-down {
  animation: slideDown 0.4s ease-out forwards;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  box-shadow: var(--orange-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
  opacity: 0;
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: all;
}

.back-to-top:hover {
  transform: scale(1.1);
}

/* Mobile Menu */
.mobile-menu {
  display: none;
}

@media (max-width: 1023px) {
  .mobile-menu {
    display: block;
  }
}

.mobile-menu.open {
  display: block;
}

/* Form Styles */
input, textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--input));
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  transition: all 0.2s;
}

input:focus, textarea:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: calc(var(--radius) - 2px);
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.btn-primary:hover {
  background-color: hsl(var(--primary-dark));
}

.btn-secondary {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  box-shadow: var(--orange-glow);
}

.btn-secondary:hover {
  background-color: hsl(var(--secondary-dark));
}

.btn-outline {
  background-color: transparent;
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
}

.btn-outline:hover {
  background-color: hsl(var(--muted));
}

.btn-hero {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  box-shadow: var(--orange-glow);
}

.btn-hero:hover {
  background-color: hsl(var(--secondary-dark));
  transform: translateY(-2px);
}

.btn-hero-outline {
  background-color: transparent;
  color: hsl(var(--primary-foreground));
  border: 2px solid hsl(var(--primary-foreground));
}

.btn-hero-outline:hover {
  background-color: hsl(var(--primary-foreground));
  color: hsl(var(--primary));
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
}

.btn-xl {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* Link Styles */
.link-primary {
  color: hsl(var(--primary));
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap 0.3s;
}

.link-primary:hover {
  gap: 0.75rem;
}

/* Active Navigation Link */
.nav-link.active {
  color: hsl(var(--primary));
  background-color: hsl(var(--primary) / 0.05);
}

/* Filter Buttons */
.filter-btn.active {
  background-color: hsl(var(--primary)) !important;
  color: hsl(var(--primary-foreground)) !important;
}

.filter-item {
  transition: opacity 0.3s, transform 0.3s;
}

/* Header Scrolled State */
header.scrolled {
  background-color: hsl(var(--background) / 0.98);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px 0 hsla(222, 47%, 11%, 0.1);
  border-bottom: 1px solid hsl(var(--border) / 0.5);
}
