/*
Theme Name: EKRE 2025 - Main Styles
Description: Simplified, consolidated stylesheet for EKRE 2025 WordPress theme
Version: 1.0.0
*/

/* ========================================
   CSS Custom Properties (Essential Only)
======================================== */
:root {
  /* Brand Colors */
  --color-primary: #0051A3;        /* Deep Estonian Blue */
  --color-secondary: #6495ED;      /* Cornflower Blue */
  --color-success: #27AE60;        /* Success Green */
  --color-warning: #F1C40F;        /* Golden Yellow */
  --color-danger: #E74C3C;         /* Warm Red */
  --color-dark: #2C3E50;           /* Charcoal Gray */
  
  /* Typography — Trim (self-hosted, see assets/css/fonts.css), matching the
     legacy ekre.ee site's font. Serif fallback chain per font-face's own
     fallback if the webfont fails to load. */
  --font-family-primary: 'Trim', Georgia, 'Times New Roman', Times, serif;
  --font-family-accent: 'Trim', Georgia, 'Times New Roman', Times, serif;
  
  /* Spacing */
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 3rem;
  
  /* Effects */
  --border-radius: 0.5rem;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

/* ========================================
   Base Styles
======================================== */
body {
  font-family: var(--font-family-primary);
  line-height: 1.6;
  color: var(--color-dark);
  background-color: #ffffff;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-primary);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-dark);
  margin-bottom: var(--spacing-md);
}

.lead {
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.8;
}

/* ========================================
   Buttons & Interactive Elements
======================================== */
.btn {
  font-weight: 500;
  border-radius: var(--border-radius);
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

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

.btn-primary:hover {
  background-color: #003d7a;
  border-color: #003d7a;
}

/* ========================================
   Cards & Components
======================================== */
.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
}

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

/* ========================================
   Navigation
======================================== */
.navbar {
  padding: var(--spacing-md) 0;
  transition: var(--transition);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--color-primary);
}

.nav-link {
  font-weight: 500;
  color: #495057;
  transition: color 0.15s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--color-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: var(--color-primary);
  transition: width 0.15s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 100%;
}

/* ========================================
   Hero Section
======================================== */
.hero-section {
  background: linear-gradient(180deg, #f4f7fb 0%, #ffffff 100%);
  position: relative;
}

.min-vh-75 {
  min-height: 75vh;
}

.hero-quote {
  font-family: var(--font-family-accent);
  font-size: 1.35rem;
  border-left: 4px solid var(--color-primary);
  padding-left: 1.25rem;
}

.hero-eyebrow {
  text-transform: uppercase;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.03em;
}

/* ========================================
   Cookie Consent Banner
======================================== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1050;
}

/* ========================================
   Policy Cards
======================================== */
.policy-card:hover {
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
}

/* ========================================
   Team Cards
======================================== */
.team-card:hover {
  box-shadow: var(--shadow-md);
}

/* ========================================
   News Cards
======================================== */
.news-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.news-card .card-title a {
  color: inherit;
  transition: color 0.15s ease;
}

.news-card:hover .card-title a {
  color: var(--color-primary);
}

/* ========================================
   Footer
======================================== */
.site-footer {
  background-color: var(--color-dark);
}

.footer-menu li {
  position: relative;
}

.footer-menu li:not(:last-child)::after {
  content: '|';
  margin-left: var(--spacing-md);
  color: #6c757d;
}

.social-menu a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.social-menu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* ========================================
   WordPress Core Styles
======================================== */
.alignleft {
  float: left;
  margin: 0 var(--spacing-lg) var(--spacing-md) 0;
}

.alignright {
  float: right;
  margin: 0 0 var(--spacing-md) var(--spacing-lg);
}

.aligncenter {
  display: block;
  margin: 0 auto var(--spacing-md);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: absolute;
  left: 6px;
  top: 7px;
  z-index: 999999;
  width: auto;
  height: auto;
  padding: 8px 16px;
  text-decoration: none;
  color: var(--color-primary);
  background: #fff;
  box-shadow: var(--shadow-md);
  border-radius: var(--border-radius);
}

/* Post Navigation */
.post-navigation {
  margin: 2rem 0;
}

.post-navigation .nav-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.post-navigation a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  border-radius: var(--border-radius);
  text-decoration: none;
  color: var(--color-dark);
  transition: var(--transition);
  flex: 1;
  max-width: 48%;
}

.post-navigation a:hover {
  background: var(--color-primary);
  color: white;
}

/* Pagination */
.pagination {
  justify-content: center;
  margin: 2rem 0;
}

.page-numbers {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  margin: 0 0.25rem;
  color: var(--color-primary);
  text-decoration: none;
  border: 1px solid #dee2e6;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.page-numbers:hover,
.page-numbers.current {
  background-color: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* ========================================
   Mobile First Responsive Design
======================================== */

/* Small Mobile (480px+) */
@media (min-width: 30em) {
  .hero-section {
    padding: 4rem 0;
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }
}

/* Tablet (768px+) */
@media (min-width: 48em) {
  .navbar-nav {
    gap: 1rem;
  }
  
  .hero-section {
    padding: 6rem 0;
  }
  
  .hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.1;
  }
  
  .hero-content .lead {
    font-size: 1.25rem;
  }
  
  .footer-menu {
    justify-content: flex-start;
  }
  
  .social-menu {
    justify-content: flex-end;
  }
}

/* Desktop (1024px+) */
@media (min-width: 64em) {
  .container {
    max-width: 1200px;
  }
  
  .hero-section {
    padding: 8rem 0;
  }
  
  .hero-content h1 {
    font-size: 4rem;
  }
  
  .navbar {
    padding: 1.5rem 0;
  }
  
  .navbar-nav {
    gap: 2rem;
  }
  
  .py-5 {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
  }
}

/* Large Desktop (1200px+) */
@media (min-width: 75em) {
  .container {
    max-width: 1400px;
  }
  
  .hero-section {
    padding: 10rem 0;
  }
  
  .hero-content h1 {
    font-size: 4.5rem;
  }
  
  .py-5 {
    padding-top: 6rem !important;
    padding-bottom: 6rem !important;
  }
}

/* Mobile-Specific Adjustments */
@media (max-width: 47.99em) {
  .hero-section .col-lg-6:first-child {
    text-align: center;
    margin-bottom: 2rem;
  }
  
  .hero-actions {
    flex-direction: column;
    gap: 1rem;
  }
  
  .hero-actions .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .navbar-collapse {
    background: white;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
  }
  
  .nav-link {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
  }
  
  .nav-link:last-child {
    border-bottom: none;
  }
  
  .footer-menu {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .footer-menu li::after {
    display: none;
  }
  
  .social-menu {
    justify-content: center;
    gap: 1.5rem;
  }
  
  .announcements-bar .row {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* ========================================
   Accessibility & Performance
======================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .card:hover,
  .btn:hover {
    transform: none;
  }
}

@media (prefers-contrast: high) {
  :root {
    --color-primary: #000080;
    --color-dark: #000000;
  }
  
  .btn {
    border: 2px solid currentColor;
  }
  
  .card {
    border: 1px solid #dee2e6;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .social-menu,
  .newsletter-section,
  .btn,
  .skip-link,
  .cta-section,
  .announcements-bar {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
    color: black;
    background: white;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
  
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }
  
  img {
    max-width: 100% !important;
  }
}