/* Shared Styles for WPI AGSA and AFRIDEV Sites */
:root {
  /* Color Palette */
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #60a5fa;
  --secondary: #8b5cf6;
  --accent: #22d3ee;
  --dark: #0f172a;
  --dark-gray: #1e293b;
  --medium-gray: #64748b;
  --light-gray: #e2e8f0;
  --white: #ffffff;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  /* Typography */
  --font-main: 'Poppins', 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Poppins', 'Inter', system-ui, -apple-system, sans-serif;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 350ms ease;
}

/* Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  line-height: 1.6;
  color: var(--dark);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  color: var(--dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--space-md);
}

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

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

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-2xl) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-title h2 {
  font-size: 2.5rem;
  margin-bottom: var(--space-sm);
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

.section-subtitle {
  font-size: 1.25rem;
  color: var(--medium-gray);
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-normal);
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

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

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

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

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

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

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

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

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

.card-title {
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

.card-text {
  color: var(--medium-gray);
  margin-bottom: var(--space-md);
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar.scrolled {
  padding: 0.5rem 0;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.nav-logo:hover {
  transform: translateY(-1px);
  color: var(--primary-dark);
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.5rem;
  align-items: center;
  align-items: center;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  transition: all 0.2s ease;
  border-radius: 6px;
  white-space: nowrap;
  
  &:hover {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
  }
  
  &::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
  }
  
  &:hover::after {
    width: 80%;
  } 
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
  position: relative;
  
  .bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
  }
  
  &.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  
  &.active .bar:nth-child(2) {
    opacity: 0;
  }
  
  &.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

/* Countdown Timer */
.countdown {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin: 2.5rem 0;
  flex-wrap: wrap;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
  padding: 1.25rem 0.75rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.countdown-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
}

.countdown-number {
  font-size: 2.25rem;
  font-weight: 700;
  color: #1e40af;
  line-height: 1.2;
  margin-bottom: 0.25rem;
  font-variant-numeric: tabular-nums;
}

.countdown-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.9;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .countdown {
    gap: 0.75rem;
    margin: 2rem 0;
  }
  
  .countdown-item {
    min-width: 70px;
    padding: 1rem 0.5rem;
  }
  
  .countdown-number {
    font-size: 1.75rem;
  }
  
  .countdown-label {
    font-size: 0.7rem;
  }
}

/* Hero Section */
.hero {
  padding: 8rem 0 6rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  text-align: center;
}

.hero-title {
  font-size: 3.5rem;
  margin-bottom: var(--space-md);
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: var(--space-xl);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}

/* Countdown */
.countdown {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin: 2.5rem 0;
  width: 100%;
  max-width: 100%;
  padding: 0 1rem;
  box-sizing: border-box;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  padding: 1rem 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  backdrop-filter: blur(5px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.countdown-item:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.countdown-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
  margin-bottom: 0.25rem;
  background: linear-gradient(135deg, var(--primary), #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-feature-settings: 'tnum';
  font-variant-numeric: tabular-nums;
}

.countdown-label {
  font-size: 0.75rem;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  text-align: center;
  line-height: 1.3;
  padding: 0 0.5rem;
  opacity: 0.9;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .countdown {
    gap: 1rem;
    margin: 2rem 0;
  }
  
  .countdown-item {
    min-width: 4.5rem;
    padding: 0.75rem 0.25rem;
  }
  
  .countdown-number {
    font-size: 1.75rem;
  }
  
  .countdown-label {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .countdown {
    gap: 0.75rem;
  }
  
  .countdown-item {
    min-width: 3.5rem;
    padding: 0.6rem 0.2rem;
  }
  
  .countdown-number {
    font-size: 1.5rem;
  }
  
  .countdown-label {
    font-size: 0.6rem;
    letter-spacing: 0.05em;
  }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.mt-5 { margin-top: var(--space-xl); }

.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.mb-5 { margin-bottom: var(--space-xl); }

.pt-1 { padding-top: var(--space-xs); }
.pt-2 { padding-top: var(--space-sm); }
.pt-3 { padding-top: var(--space-md); }
.pt-4 { padding-top: var(--space-lg); }
.pt-5 { padding-top: var(--space-xl); }

.pb-1 { padding-bottom: var(--space-xs); }
.pb-2 { padding-bottom: var(--space-sm); }
.pb-3 { padding-bottom: var(--space-md); }
.pb-4 { padding-bottom: var(--space-lg); }
.pb-5 { padding-bottom: var(--space-xl); }

/* Responsive Design */
@media (max-width: 1024px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  
  .hero-title {
    font-size: 3rem;
  }
  
  .hero-subtitle {
    font-size: 1.25rem;
  }
}

@media (max-width: 768px) {
  .section {
    padding: var(--space-xl) 0;
  }
  
  .container {
    padding: 0 var(--space-sm);
  }
  
  .countdown-item {
    min-width: 80px;
    padding: var(--space-sm);
  }
  
  .countdown-number {
    font-size: 2rem;
  }
  
  .section-title h2 {
    font-size: 2rem;
  }
  
  .section-subtitle {
    font-size: 1.1rem;
  }
}

@media (max-width: 576px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  
  .hero {
    padding: 6rem 0 4rem;
  }
  
  .hero-title {
    font-size: 2.25rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .countdown {
    gap: var(--space-sm);
  }
  
  .countdown-item {
    min-width: 70px;
    padding: var(--space-sm) var(--space-xs);
  }
  
  .countdown-number {
    font-size: 1.75rem;
  }
  
  .countdown-label {
    font-size: 0.75rem;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --dark: #f8fafc;
    --dark-gray: #cbd5e1;
    --medium-gray: #94a3b8;
    --light-gray: #1e293b;
    --white: #0f172a;
  }
  
  body {
    background-color: #020617;
  }
  
  .card {
    background: rgba(30, 41, 59, 0.8);
    color: var(--dark-gray);
  }
  
  .card-title {
    color: var(--dark);
  }
  
  .navbar {
    background: rgba(15, 23, 42, 0.95);
  }
  
  .nav-logo, .nav-link {
    color: var(--dark-gray);
  }
  
  .nav-link:hover {
    color: var(--primary-light);
  }
}
