/* =====================
   INTELLIGENT SYSTEMS EVENTS - UNIFIED CSS
   Clean, organized, and optimized styles
   ===================== */

/* =====================
   CSS VARIABLES
   ===================== */
:root {
  /* Colors */
  --brand-primary: #1e3a8a;
  --brand-secondary: #3b82f6;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --bg-light: #f8fafc;
  --white: #ffffff;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #0ea5e9 100%);
  --gradient-secondary: linear-gradient(135deg, #10b981 0%, #0ea5e9 100%);
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 25px rgba(0,0,0,0.15);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.2);
  
  /* Transitions */
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--white);
}

/* =====================
   TYPOGRAPHY
   ===================== */
.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-lg);
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 42rem;
  margin: 0 auto var(--space-xl);
}

.hero-kicker {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-secondary);
  margin-bottom: var(--space-md);
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: var(--space-lg);
}

/* =====================
   LAYOUT UTILITIES
   ===================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.flex {
  display: flex;
}

.grid {
  display: grid;
}

.grid-cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }

.text-center { text-align: center; }
.text-balance { text-wrap: balance; }
.text-muted { color: var(--text-muted); }

.flex-wrap { flex-wrap: wrap; }

/* Spacing */
.py-xl { padding-top: var(--space-xl); padding-bottom: var(--space-xl); }
.py-2xl { padding-top: var(--space-2xl); padding-bottom: var(--space-2xl); }
.py-3xl { padding-top: var(--space-3xl); padding-bottom: var(--space-3xl); }
.mt-2 { margin-top: var(--space-xs); }
.mt-4 { margin-top: var(--space-md); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-0 { margin-bottom: 0; }

/* Text sizes */
.text-lg { font-size: 1.125rem; }
.text-sm { font-size: 0.875rem; }
.font-bold { font-weight: 700; }

/* Background utilities */
.bg-neutral-50 { background-color: var(--bg-light); }
.bg-neutral-900 { background-color: var(--text-dark); }

/* Text color utilities */
.text-white { color: var(--white); }
.text-neutral-300 { color: #d1d5db; }

/* Additional responsive utilities */
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* =====================
   HEADER & NAVIGATION
   ===================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(30, 64, 175, 0.08);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  padding: var(--space-md) 0;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-lg);
  padding: var(--space-sm) 0;
  border-bottom-color: rgba(30, 64, 175, 0.12);
}

.navbar-brand {
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--brand-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  transition: all var(--transition);
}

.navbar-brand:hover {
  transform: translateY(-2px);
  color: var(--brand-primary);
}

.brand-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.navbar-nav .nav-link {
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--brand-primary);
  background: rgba(59, 130, 246, 0.05);
  transform: translateY(-1px);
}

.navbar-toggler {
  border: 1px solid rgba(59, 130, 246, 0.2);
  padding: var(--space-xs);
  border-radius: var(--radius-md);
  background: rgba(59, 130, 246, 0.05);
  transition: all var(--transition);
}

.navbar-toggler:hover {
  background: rgba(59, 130, 246, 0.1);
  transform: scale(1.05);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(59, 130, 246, .8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  width: 20px;
  height: 20px;
}

/* =====================
   HERO SECTION
   ===================== */
.page-hero {
  background: linear-gradient(135deg, var(--bg-light) 0%, #f1f5f9 100%);
  padding: calc(80px + var(--space-3xl)) 0 var(--space-3xl);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 25% 75%, rgba(16,185,129,.06) 0%, transparent 50%),
              radial-gradient(circle at 75% 25%, rgba(59,130,246,.05) 0%, transparent 50%);
  pointer-events: none;
}

/* =====================
   BUTTONS
   ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-lg);
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

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

.btn-secondary {
  background: var(--text-muted);
  color: var(--white);
}

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

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

.btn-outline:hover {
  background: var(--brand-primary);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-lg {
  padding: var(--space-md) var(--space-xl);
  font-size: 1.125rem;
}

.btn-sm {
  padding: var(--space-xs) var(--space-md);
  font-size: 0.875rem;
}

/* =====================
   CARDS
   ===================== */
.card {
  background: var(--white);
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  height: 100%;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-secondary);
}

.card-body {
  padding: var(--space-lg);
}

.edition-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
  height: 100%;
  border: 1px solid #f1f5f9;
  position: relative;
}

.edition-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-xl);
  border-color: var(--brand-secondary);
}

.edition-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-secondary);
  opacity: 0;
  transition: opacity var(--transition);
}

.edition-card:hover::before {
  opacity: 1;
}

.edition-cover {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-light) 0%, #e2e8f0 100%);
}

.edition-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.edition-card:hover .edition-cover img {
  transform: scale(1.05);
}

.edition-overlay {
  position: absolute;
  top: var(--space-lg);
  left: var(--space-lg);
  right: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-sm);
  z-index: 2;
}

.edition-overlay .year {
  background: rgba(15,23,42,.92);
  color: var(--white);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-lg);
  font-weight: 800;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  backdrop-filter: blur(15px);
  box-shadow: var(--shadow-lg);
}

.badge {
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-xl);
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-soft {
  background: rgba(255,255,255,.98);
  color: #1e3a8a;
  border: 1px solid rgba(30, 64, 175, 0.2);
  backdrop-filter: blur(15px);
  box-shadow: var(--shadow-sm);
  font-weight: 800;
}

.badge-muted {
  background: rgba(100,116,139,.9);
  color: #ffffff;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
  font-weight: 700;
}

.badge-primary {
  background: #1e3a8a;
  color: #ffffff;
  border: 1px solid rgba(30, 64, 175, 0.3);
  font-weight: 700;
}

.badge-secondary {
  background: #10b981;
  color: #ffffff;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-weight: 700;
}

.rounded-pill {
  border-radius: 50px;
}

/* =====================
   RATIO CONTAINERS
   ===================== */
.ratio {
  position: relative;
  width: 100%;
}

.ratio::before {
  display: block;
  padding-top: var(--bs-aspect-ratio);
  content: "";
}

.ratio > * {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.ratio-16x9 {
  --bs-aspect-ratio: calc(9 / 16 * 100%);
}

/* =====================
   FOOTER
   ===================== */
.modern-footer {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 40%, #334155 80%, #475569 100%);
  color: var(--white);
  margin-top: var(--space-3xl);
  position: relative;
  overflow: hidden;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.3);
}

.modern-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--gradient-secondary);
  box-shadow: 0 2px 15px rgba(16, 185, 129, 0.4);
  animation: pulse 3s ease-in-out infinite;
}

.footer-main {
  padding: var(--space-3xl) 0 var(--space-2xl);
  position: relative;
  z-index: 1;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.footer-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0;
  background: linear-gradient(135deg, #fff 0%, #e5e7eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-description {
  color: rgba(255,255,255,.9);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
  font-size: 1.05rem;
}

.footer-heading {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: var(--space-lg);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
}

.footer-heading::after {
  content: '';
  position: absolute;
  bottom: -0.8rem;
  left: 0;
  width: 50px;
  height: 4px;
  background: var(--gradient-secondary);
  border-radius: 2px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-links a {
  color: rgba(255,255,255,.88);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}

.footer-links a:hover {
  color: var(--white);
  background: rgba(255,255,255,.1);
  transform: translateX(8px);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: rgba(255,255,255,.92);
  transition: all var(--transition);
  padding: var(--space-xs);
  border-radius: var(--radius-lg);
}

.contact-item:hover {
  color: var(--white);
  transform: translateX(6px);
  background: rgba(255,255,255,.05);
}

.contact-item a {
  color: inherit;
  text-decoration: none;
}

.footer-bottom {
  background: rgba(0, 0, 0, 0.35);
  padding: var(--space-lg) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
}

.link-footer {
  color: rgba(255,255,255,.85);
  text-decoration: none;
}

.link-footer:hover {
  color: var(--white);
  text-decoration: underline;
}

/* =====================
   BACK TO TOP BUTTON
   ===================== */
.back-to-top {
  position: fixed;
  right: var(--space-md);
  bottom: var(--space-md);
  width: 46px;
  height: 46px;
  background: var(--gradient-primary);
  border: none;
  border-radius: 50%;
  color: var(--white);
  box-shadow: var(--shadow-lg);
  transition: all var(--transition);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--shadow-xl);
}

/* =====================
   ANIMATIONS
   ===================== */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* =====================
   RESPONSIVE DESIGN
   ===================== */
@media (max-width: 991px) {
  .navbar-collapse {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    margin-top: var(--space-md);
    padding: var(--space-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(59, 130, 246, 0.1);
  }
  
  .navbar-nav {
    flex-direction: column;
    gap: var(--space-sm);
    width: 100%;
  }
  
  .navbar-nav .nav-link {
    text-align: left;
    padding: var(--space-sm);
    width: 100%;
    justify-content: flex-start;
  }

  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 2.5rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .edition-overlay {
    top: var(--space-md);
    left: var(--space-md);
    right: var(--space-md);
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .footer-brand {
    justify-content: flex-start;
  }

  .footer-heading::after {
    left: 0;
    transform: none;
  }

  .footer-links a {
    justify-content: flex-start;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 var(--space-sm);
  }

  .navbar-brand {
    font-size: 1.25rem;
  }

  .btn-lg {
    padding: var(--space-sm) var(--space-lg);
    font-size: 1rem;
  }

  .flex-wrap {
    flex-direction: column;
  }

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

/* =====================
   PRINT STYLES
   ===================== */
@media print {
  .navbar,
  .back-to-top,
  .footer-bottom {
    display: none;
  }

  .modern-footer {
    background: var(--white) !important;
    color: var(--text-dark) !important;
  }
}