/* ===== CSS Variables ===== */
:root {
  --primary: #1e3a5f;
  --primary-light: #2d4f7a;
  --primary-dark: #152a45;
  --secondary: #e67e22;
  --secondary-light: #f39c12;
  --accent: #27ae60;
  --background: #f5f7fa;
  --foreground: #1a2530;
  --card: #ffffff;
  --card-foreground: #1a2530;
  --muted: #94a3b8;
  --muted-foreground: #64748b;
  --border: #e2e8f0;
  --input: #e2e8f0;
  --destructive: #dc2626;
  --radius: 0.625rem;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Montserrat', system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--foreground);
  background-color: var(--background);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ===== Container ===== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container { padding: 0 1.5rem; }
}

@media (min-width: 1024px) {
  .container { padding: 0 2rem; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

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

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

.btn-secondary {
  background-color: var(--secondary);
  color: #fff;
}

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

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

.btn-outline:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

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

.btn-full {
  width: 100%;
}

/* ===== Top Bar ===== */
.top-bar {
  background-color: var(--primary);
  color: #fff;
  padding: 0.5rem 0;
  font-size: 0.875rem;
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.top-bar-contacts {
  display: flex;
  gap: 1.5rem;
}

.top-bar-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.top-bar-link:hover {
  opacity: 1;
}

.top-bar-address {
  opacity: 0.9;
}

@media (max-width: 768px) {
  .top-bar-contacts { gap: 1rem; }
  .top-bar-address { display: none; }
}

/* ===== Header ===== */
.header {
  display: flex;
  background-color: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  align-items: center;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
}

.logo {
  display: flex;
  align-items: center;
  
}

.logo-img {
  height: 80px;
  margin-top: 5px;
  margin-bottom: 5px;
  width: auto;
  object-fit: contain;
}

.nav {
  display: none;
  gap: 2rem;
}

.nav-link {
  font-weight: 500;
  color: var(--foreground);
  transition: color 0.2s;
  position: relative;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--secondary);
  transition: width 0.2s;
}

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

@media (min-width: 1024px) {
  .nav { display: flex; }
  .hide-mobile { display: inline-flex; }
}

/* ===== Mobile Menu Button ===== */
.mobile-menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-menu-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--foreground);
  transition: all 0.3s;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (min-width: 1024px) {
  .mobile-menu-btn { display: none; }
}

.hide-mobile {
  display: none;
}

@media (min-width: 1024px) {
  .hide-mobile { display: inline-flex; }
}

/* ===== Mobile Menu ===== */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--card);
  z-index: 99;
  padding-top: 120px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-menu.active {
  transform: translateX(0);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
}

.mobile-nav-link {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--foreground);
}

.mobile-participate-btn {
  margin-top: 1rem;
}

@media (min-width: 1024px) {
  .mobile-menu { display: none; }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(26, 37, 48, 0.95), rgba(26, 37, 48, 0.75), rgba(26, 37, 48, 0.3));
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 4rem 0;
}

.hero-text {
  max-width: 640px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--secondary);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background-color: #fff;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 1rem;
}

.text-accent {
  color: var(--secondary);
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1rem;
}

.hero-description {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
  max-width: 480px;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-buttons .btn-outline {
  border-color: rgba(255, 255, 255, 0.3);
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.hero-buttons .btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-stat {
  justify-content: center;
}

.hero-stat-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
}

.hero-stat-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

@media (min-width: 640px) {
  .hero-title { font-size: 3rem; }
  .hero-buttons { flex-direction: row; }
}

@media (min-width: 1024px) {
  .hero-title { font-size: 3.75rem; }
  .hero-subtitle { font-size: 1.5rem; }
}

/* ===== Sections Common ===== */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-badge {
  display: inline-block;
  background-color: rgba(30, 58, 95, 0.1);
  color: var(--primary);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.75rem;
}

.section-description {
  color: var(--muted-foreground);
  max-width: 640px;
  margin: 0 auto;
}

.section-footer {
  text-align: center;
  margin-top: 3rem;
}

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

/* ===== Metrics ===== */
.metrics {
  padding: 4rem 0;
  background-color: var(--card);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.metric-card {
  background-color: var(--background);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.metric-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background-color: rgba(30, 58, 95, 0.1);
  border-radius: 50%;
  margin-bottom: 1rem;
  color: var(--primary);
}

.metric-value {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  display: inline;
}

.metric-suffix {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
}

.metric-label {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
  margin-top: 0.5rem;
}

.metric-description {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}

@media (min-width: 768px) {
  .metrics-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .metrics-grid { grid-template-columns: repeat(5, 1fr); }
  .metric-card { padding: 2rem 1rem; }
}

/* ===== News ===== */
.news {
  padding: 5rem 0;
  background-color: var(--background);
}

.news-grid {
  display: grid;
  gap: 2rem;
}

.news-card {
  background-color: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.news-card-image {
  position: relative;
  height: 240px;
  overflow: hidden;
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background-color: var(--secondary);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.news-card-content {
  padding: 1.5rem;
}

.news-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 0.75rem;
}

.news-card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.news-card-excerpt {
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.news-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  font-weight: 600;
  transition: gap 0.2s;
}

.news-card-link:hover {
  gap: 0.75rem;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.news-item {
  display: flex;
  gap: 1rem;
  background-color: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.news-item:hover {
  transform: translateX(4px);
}

.news-item-image {
  width: 120px;
  height: 100px;
  flex-shrink: 0;
}

.news-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-item-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.news-item-category {
  font-size: 0.75rem;
  color: var(--secondary);
  font-weight: 600;
}

.news-item-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--foreground);
  margin: 0.25rem 0;
  line-height: 1.4;
}

.news-item-date {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

@media (min-width: 1024px) {
  .news-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .news-card-featured {
    grid-row: span 2;
  }
  
  .news-card-featured .news-card-image {
    height: 300px;
  }
}

/* ===== Events ===== */
.events {
  padding: 5rem 0;
  background-color: var(--card);
}

.events-grid {
  display: grid;
  gap: 1.5rem;
}

.event-card {
  background-color: var(--background);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.event-status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.event-status-pass {
  background-color: rgba(30, 58, 95, 0.1);
  color: var(--primary);
}

.event-status-registration {
  background-color: rgba(39, 174, 96, 0.1);
  color: var(--accent);
}

.event-status-upcoming {
  background-color: rgba(245, 235, 201, 0.7);
  color: var(--accent);
}

.event-category {
  font-size: 0.875rem;
  color: var(--secondary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.event-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 1rem;
}

.event-details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.event-detail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.event-detail svg {
  color: var(--primary);
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .events-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .events-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===== Gallery ===== */
.gallery {
  padding: 5rem 0;
  background-color: var(--background);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-category {
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
}

@media (min-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  padding: 1rem;
  transition: opacity 0.2s;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 0.7;
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
  font-size: 2.5rem;
}

.lightbox-prev {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
}

.lightbox-next {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
}

/* ===== Contacts ===== */
.contacts {
  padding: 5rem 0;
  background-color: var(--card);
}

.contacts-grid {
  display: grid;
  gap: 3rem;
}

.contacts-info {
  display: grid;
  gap: 1.5rem;
}

.contact-card {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  background-color: var(--background);
  border-radius: var(--radius);
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background-color: rgba(30, 58, 95, 0.1);
  border-radius: 50%;
  color: var(--primary);
  flex-shrink: 0;
}

.contact-title {
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}

.contact-text {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.6;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background-color: var(--primary);
  color: #fff;
  border-radius: 50%;
  transition: background-color 0.2s, transform 0.2s;
}

.social-link:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
}

.contact-form-wrapper {
  background-color: var(--background);
  border-radius: var(--radius);
  padding: 2rem;
}

.form-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--foreground);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: var(--font-sans);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--card);
  color: var(--foreground);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

@media (min-width: 1024px) {
  .contacts-grid {
/*    grid-template-columns: 1fr 1fr; */
  }
  
  .contacts-info {
/*    grid-template-columns: repeat(2, 1fr);*/
  }
  
  .social-links {
    grid-column: span 2;
  }
}

/* ===== Footer ===== */
.footer {
  background-color: var(--primary-dark);
  color: #fff;
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

.footer-brand {
  max-width: 320px;
}

.footer-logo img {
  height: 64px;
  width: auto;
  object-fit: contain;
  margin-bottom: 1rem;
}

.footer-description {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.footer-contacts {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-contact-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s;
}

.footer-contact-link:hover {
  color: var(--secondary);
}

.footer-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--secondary);
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.footer-bottom-links a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.2s;
}

.footer-bottom-links a:hover {
  color: var(--secondary);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
  
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  }
}

/* ===== Utilities ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
