/* Modern Home Page Styles - Inspired by shadcn and SSB design */
:root {
  --primary: #dc2626; /* SSB red color */
  --primary-foreground: #ffffff;
  --secondary: #f1f5f9;
  --secondary-foreground: #0f172a;
  --muted: #f8fafc;
  --muted-foreground: #64748b;
  --accent: #f1f5f9;
  --accent-foreground: #0f172a;
  --destructive: #ef4444;
  --destructive-foreground: #ffffff;
  --border: #e2e8f0;
  --input: #e2e8f0;
  --ring: #dc2626;
  --background: #ffffff;
  --foreground: #0f172a;
  --card: #ffffff;
  --card-foreground: #0f172a;
  --popover: #ffffff;
  --popover-foreground: #0f172a;
  --radius: 0.5rem;
}

/* Only apply mod/* Fix page content positioning - only for home page */
.modern-hero-page #page_content {
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
  width: 100% !important;
}

.modern-hero-page #page_content .row {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

/* Only apply modern styles to home page - target by body class or specific containers */
.modern-hero-page * {
  box-sizing: border-box;
}

/* Container - only for home page */
.modern-hero-page .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Modern Hero Section */
.modern-hero {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Particles.js styling */
#particles-js {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 10;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  padding: 2rem 0;
}

.hero-container {
  text-align: center;
  color: white;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
}

.hero-logo {
  height: 140px;
  margin-bottom: 2.5rem;
  filter: brightness(1.2) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
  animation: fadeInUp 1s ease-out;
}

.hero-title {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-subtitle {
  font-size: 1.375rem;
  color: #cbd5e1;
  margin-bottom: 3rem;
  font-weight: 400;
  line-height: 1.5;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease-out 0.6s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modern Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  height: 2.5rem;
  padding: 0 1rem;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
  background-color: #b91c1c;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
  transform: translateY(-1px);
}

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

.btn-secondary:hover {
  background-color: #e2e8f0;
  transform: translateY(-1px);
}

/* Main Content - only for home page */
.modern-hero-page .main-content {
  background: var(--background);
  position: relative;
  z-index: 5;
}

/* Section Styles - only for home page */
.modern-hero-page section {
  padding: 5rem 0;
}

.modern-hero-page section:first-child {
  padding-top: 3rem;
}

.modern-hero-page .section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4rem;
  color: var(--foreground);
  position: relative;
}

.modern-hero-page .section-title::after {
  content: '';
  position: absolute;
  bottom: -1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(135deg, var(--primary) 0%, #b91c1c 100%);
  border-radius: 2px;
}

/* Announcement Banner */
.announcement-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #b91c1c 100%);
  color: white;
  padding: 1rem 0;
  text-align: center;
  position: relative;
  z-index: 10;
}

.announcement-content {
  font-weight: 500;
}

/* Competitions Section */
.competitions-section {
  background: var(--background);
  position: relative;
}

.competitions-section .container {
  max-width: 1400px;
}

/* Features Section */
.features-section {
  background-color: var(--muted);
  position: relative;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.15);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, var(--primary) 0%, #b91c1c 100%);
  border-radius: 50%;
  margin-bottom: 1rem;
}

.feature-icon .icon {
  width: 1.5rem;
  height: 1.5rem;
  color: white;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--foreground);
}

.feature-description {
  color: var(--muted-foreground);
  line-height: 1.6;
}

/* Stats Section */
.stats-section {
  background: var(--background);
  position: relative;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.15);
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* About Section */
.about-section {
  background: var(--muted);
  position: relative;
}

.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 5rem;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}

.about-content h2 {
  text-align: left;
  margin-bottom: 1.5rem;
}

.about-description {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
}

.about-features {
  display: grid;
  gap: 1.5rem;
}

.about-feature h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--foreground);
}

.about-feature p {
  color: var(--muted-foreground);
  line-height: 1.6;
}

/* News Section */
.news-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.news-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--foreground);
}

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

.news-item {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.news-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.news-date {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.news-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease-in-out;
}

.news-link:hover {
  color: #b91c1c;
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 3.5rem;
  }
  
  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (max-width: 768px) {
  .nav-container {
    padding: 0 0.75rem;
    height: 60px;
  }
  
  .nav-left {
    gap: 1rem;
  }
  
  .nav-logo img {
    height: 32px;
  }
  
  #site-wide-competition-search .ui.input {
    width: 200px;
  }
  
  .nav-menu {
    gap: 0.25rem;
  }
  
  .nav-item {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }

  .modern-hero {
    min-height: 70vh;
  }
  
  .hero-content {
    min-height: 70vh;
  }
  
  .hero-title {
    font-size: 2.75rem;
    margin-bottom: 1rem;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
  }
  
  .hero-logo {
    height: 100px;
    margin-bottom: 2rem;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .btn {
    width: 100%;
    max-width: 280px;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  section {
    padding: 3rem 0;
  }
  
  .section-title {
    font-size: 2rem;
    margin-bottom: 3rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .nav-container {
    height: 50px;
    padding: 0 0.5rem;
    flex-wrap: wrap;
  }
  
  .nav-left {
    flex: 1;
  }
  
  .nav-logo img {
    height: 28px;
  }
  
  #site-wide-competition-search {
    display: none; /* Hide search on very small screens */
  }
  
  .nav-menu {
    display: none; /* Consider implementing a mobile menu toggle */
  }

  .hero-title {
    font-size: 2.25rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .hero-logo {
    height: 80px;
  }
  
  .container {
    padding: 0 0.75rem;
  }
  
  section {
    padding: 2.5rem 0;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
}

/* Override Semantic UI styles where needed */
.ui.container {
  max-width: none !important;
}

/* Hide old styles - only on home page */
.modern-hero-page .home-wrap {
  display: none;
}

.modern-hero-page .segment-container {
  display: none;
}

.modern-hero-page #general-stats {
  display: none;
}

/* Ensure proper page layout - only for home page */
.modern-hero-page {
  margin: 0;
  padding: 0;
}

.pusher {
  position: relative;
}

/* Override semantic UI container styles - only for home page */
.modern-hero-page .ui.container.grid {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: none !important;
}

/* Ensure content doesn't get cut off - only for home page */
.modern-hero-page .main-content {
  width: 100%;
  overflow-x: hidden;
}

/* Fix page content positioning */
#page_content {
  margin: 5px !important;
  padding: 5px !important;
  max-width: none !important;
  width: 100% !important;
}

#page_content .row {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

/* Ensure navigation stays on top */
.main-navigation {
  position: relative;
  z-index: 100;
}

/* Modern Navigation */
.main-navigation {
  background: #1e293b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-logo img {
  height: 40px;
  width: auto;
  filter: brightness(1.2) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  transition: transform 0.2s ease-in-out;
}

.nav-logo:hover img {
  transform: scale(1.05);
}

.nav-right {
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-item {
  color: rgba(255, 255, 255, 0.9) !important;
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  transition: all 0.2s ease-in-out;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.nav-item:hover {
  color: white !important;
  background: rgba(255, 255, 255, 0.1) !important;
  text-decoration: none;
}

.nav-item i {
  font-size: 0.875rem;
}

/* Hero Section - separate from navigation */
.masthead {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
  border-bottom: none;
  position: relative;
  z-index: 10;
}

.masthead.modern-hero {
  border-bottom: none;
}

/* Modern Search box styling */
#site-wide-competition-search {
  position: relative;
}

#site-wide-competition-search .ui.input {
  width: 300px;
}

#site-wide-competition-search .ui.input input {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: white !important;
  border-radius: var(--radius) !important;
  padding: 0.75rem 1rem 0.75rem 2.5rem !important;
  font-size: 0.875rem;
  transition: all 0.2s ease-in-out;
}

#site-wide-competition-search .ui.input input::placeholder {
  color: rgba(255, 255, 255, 0.6) !important;
}

#site-wide-competition-search .ui.input input:focus {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: var(--primary) !important;
  outline: none;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);
}

#site-wide-competition-search .ui.input .search.icon {
  color: rgba(255, 255, 255, 0.6) !important;
}

/* Dropdown improvements */
.nav-item.ui.dropdown {
  color: rgba(255, 255, 255, 0.9) !important;
}

.nav-item.ui.dropdown:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

/* Navigation dropdown specific styles */
.nav-dropdown.ui.simple.dropdown > .menu {
  margin-top: 0 !important;
  top: 100% !important;
  left: 0 !important;
  padding-top: 0.5rem !important;
}

.nav-dropdown.ui.simple.dropdown::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

.ui.dropdown .menu {
  background: #1e293b !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: var(--radius) !important;
  box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.3) !important;
}

.ui.dropdown .menu .item {
  color: rgba(255, 255, 255, 0.9) !important;
  transition: all 0.2s ease-in-out;
  padding: 0.75rem 1rem !important;
}

.ui.dropdown .menu .item:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: white !important;
}

.ui.dropdown .menu .header {
  color: rgba(255, 255, 255, 0.7) !important;
  font-size: 0.75rem !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 1rem !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.ui.dropdown .menu .divider {
  border-color: rgba(255, 255, 255, 0.1) !important;
}



/* Footer improvements */
.ui.inverted.vertical.footer.segment {
  background: #1e293b !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3rem 0 2rem !important;
}

.ui.inverted.vertical.footer.segment h4 {
  color: white !important;
  font-weight: 600;
}

.ui.inverted.vertical.footer.segment .item {
  color: rgba(255, 255, 255, 0.8) !important;
  transition: color 0.2s ease-in-out;
}

.ui.inverted.vertical.footer.segment .item:hover {
  color: white !important;
}
