/*!
Theme Name: Jelgavas Nakts Pusmaratons
Theme URI: https://jelgavaspusmaratons.lv
Description: Premium night marathon event WordPress theme optimized for mass participation with premium feel
Author: Baltic Events
Author URI: https://balticsevents.lv
Version: 1.0.0
License: GPL v2 or later
Text Domain: jelgavas-nakts
Domain Path: /languages
Requires PHP: 7.4
Requires at least: 5.0

================================================================================
Color Palette
================================================================================
Primary Dark Blue: #0C1D3D
Hot Pink/Magenta: #E91E8C
Yellow: #FFED00
Green: #00D400
White: #FFFFFF
Light Gray: #F5F5F5
Dark Gray: #333333

================================================================================
Table of Contents
================================================================================
1. Normalize & Reset
2. Typography
3. Layout
4. Navigation
5. Hero Section
6. Components
7. Forms
8. Footer
9. Responsive Design
================================================================================
*/

/* 1. Normalize & Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333333;
  line-height: 1.6;
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 2. Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #0C1D3D;
}

h1 {
  font-size: 3.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

h2 {
  font-size: 2.5rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1.5rem;
}

a {
  color: #E91E8C;
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: #0C1D3D;
}

/* 3. Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-fluid {
  width: 100%;
  padding-left: 0;
  padding-right: 0;
}

/* 4. Navigation */
header {
  background-color: #0C1D3D;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #FFED00;
}

.logo a {
  color: #FFED00;
}

.logo img {
  height: 50px;
  width: auto;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav a {
  color: #FFFFFF;
  text-transform: uppercase;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 1px;
}

nav a:hover {
  color: #FFED00;
  border-bottom: 3px solid #FFED00;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #FFED00;
  font-size: 1.5rem;
  cursor: pointer;
}

/* 5. Hero Section */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  overflow: hidden;
  background: linear-gradient(135deg, #0C1D3D 0%, #1a3a5c 100%);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><linearGradient id="grad" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:%23E91E8C;stop-opacity:0.1" /><stop offset="100%" style="stop-color:%2300D400;stop-opacity:0.1" /></linearGradient></defs><rect width="1200" height="600" fill="url(%23grad)"/></svg>');
  opacity: 0.8;
}

.hero-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
}

.hero-title {
  font-size: 5rem;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 2rem;
  text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
  letter-spacing: 3px;
}

.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: 3rem;
  font-weight: 300;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
  justify-items: center;
}

.countdown-item {
  background: linear-gradient(135deg, #E91E8C 0%, #E91E8C 100%);
  padding: 2rem;
  border-radius: 8px;
  min-width: 120px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.countdown-number {
  font-size: 3rem;
  font-weight: 900;
  color: #FFED00;
  display: block;
  line-height: 1;
}

.countdown-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.5rem;
  font-weight: 600;
}

.cta-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 3rem;
}

.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-primary {
  background-color: #E91E8C;
  color: #FFFFFF;
}

.btn-primary:hover {
  background-color: #cc1770;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233, 30, 140, 0.4);
}

.btn-secondary {
  background-color: #FFED00;
  color: #0C1D3D;
}

.btn-secondary:hover {
  background-color: #e6d700;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 237, 0, 0.4);
}

.btn-outline {
  background-color: transparent;
  color: #FFFFFF;
  border: 2px solid #FFFFFF;
}

.btn-outline:hover {
  background-color: #FFFFFF;
  color: #0C1D3D;
}

/* Race Categories */
.race-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  padding: 3rem 0;
}

.race-card {
  text-align: center;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 2px solid #E91E8C;
  transition: all 0.3s ease;
}

.race-card:hover {
  transform: translateY(-5px);
  background: rgba(233, 30, 140, 0.1);
}

.race-name {
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.race-time {
  color: #FFED00;
  font-size: 0.9rem;
  font-weight: 600;
}

/* 6. Components */
.section {
  padding: 4rem 0;
}

.section-dark {
  background-color: #0C1D3D;
  color: #FFFFFF;
}

.section-light {
  background-color: #F5F5F5;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  color: #0C1D3D;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.section-dark .section-title {
  color: #FFED00;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.card {
  background: #FFFFFF;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-content {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: #0C1D3D;
}

.card-text {
  color: #666666;
  font-size: 0.95rem;
}

/* Image with colored border */
.image-bordered {
  position: relative;
  display: inline-block;
}

.image-bordered.yellow {
  border: 8px solid #FFED00;
}

.image-bordered.pink {
  border: 8px solid #E91E8C;
}

.image-bordered img {
  display: block;
  width: 100%;
  height: auto;
}

/* Stats Section */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
  text-align: center;
}

.stat-item h3 {
  color: #E91E8C;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.stat-item p {
  font-size: 1rem;
  margin: 0;
}

/* Testimonials */
.testimonial {
  background: #FFFFFF;
  padding: 2rem;
  border-radius: 8px;
  border-left: 4px solid #E91E8C;
  text-align: center;
}

.testimonial-text {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: #333333;
}

.testimonial-author {
  font-weight: 700;
  color: #0C1D3D;
}

/* 7. Forms */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #0C1D3D;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #E0E0E0;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #E91E8C;
  box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* 8. Footer */
footer {
  background-color: #0C1D3D;
  color: #FFFFFF;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: #FFED00;
  margin-bottom: 1rem;
}

.footer-section a {
  color: #FFFFFF;
}

.footer-section a:hover {
  color: #FFED00;
}

.sponsors-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 2rem;
}

.sponsor-logo {
  height: 40px;
  width: auto;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.sponsor-logo:hover {
  opacity: 1;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
}

/* 9. Responsive Design */
@media (max-width: 1024px) {
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  .hero {
    min-height: 60vh;
  }

  .hero-title {
    font-size: 3rem;
  }

  .countdown {
    gap: 1rem;
  }

  .countdown-item {
    padding: 1.5rem;
    min-width: 100px;
  }
}

@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    gap: 1rem;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background-color: #0C1D3D;
    padding: 1rem;
    display: none;
  }

  nav ul.active {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  h1 {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .countdown {
    grid-template-columns: repeat(2, 1fr);
  }

  .cta-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 2rem 0;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .hero {
    min-height: 50vh;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .countdown {
    gap: 0.75rem;
  }

  .countdown-item {
    padding: 1rem;
  }

  .countdown-number {
    font-size: 1.5rem;
  }

  .section-title {
    font-size: 1.3rem;
  }
}

/* Print Styles */
@media print {
  header,
  footer,
  .nav-toggle,
  .cta-buttons {
    display: none;
  }
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #E91E8C;
  color: #FFFFFF;
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* Focus visible for better accessibility */
*:focus-visible {
  outline: 2px solid #E91E8C;
  outline-offset: 2px;
}
