/* Football-themed styles for FutureEdge KZ */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Football field color palette */
:root {
  --field-green: #0f3d22;
  --field-green-light: #14532d;
  --field-white: #ffffff;
  --scoreboard-yellow: #facc15;
  --deep-blue: #1e3a8a;
  --grass-texture: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Field background with grass texture */
.pitch-field {
  background: linear-gradient(135deg, var(--field-green) 0%, var(--field-green-light) 100%);
  position: relative;
}

.pitch-field::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: var(--grass-texture);
  opacity: 0.1;
  pointer-events: none;
}

/* Field lines pattern */
.field-lines {
  background-image: repeating-linear-gradient(0deg, transparent, transparent 98px, rgba(255, 255, 255, 0.1) 100px),
    repeating-linear-gradient(90deg, transparent, transparent 98px, rgba(255, 255, 255, 0.1) 100px);
}

.pitch-lines {
  background-image: repeating-linear-gradient(90deg, transparent, transparent 48px, rgba(255, 255, 255, 0.05) 50px);
}

/* Crest/Shield card styling */
.crest-card {
  position: relative;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
  transition: all 0.3s ease;
}

.crest-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Jersey/Team card styling */
.jersey-card {
  position: relative;
  border: 3px solid transparent;
  background: linear-gradient(white, white) padding-box,
    linear-gradient(45deg, var(--field-green), var(--scoreboard-yellow)) border-box;
}

.jersey-card:hover {
  border-color: var(--field-green);
}

/* Jersey numbers */
.jersey-number {
  font-family: "Arial Black", sans-serif;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  position: relative;
}

.jersey-number::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.2), transparent);
  border-radius: 50%;
  z-index: -1;
}

/* Score badges */
.score-badge {
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.score-badge::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: rotate(45deg);
  transition: all 0.5s ease;
}

.score-badge:hover::before {
  animation: shine 0.5s ease-in-out;
}

@keyframes shine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

/* Scoreboard glow effect */
.scoreboard-glow {
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.3), 0 0 40px rgba(250, 204, 21, 0.2), inset 0 0 20px rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(250, 204, 21, 0.5);
}

/* Tactical line */
.tactical-line {
  background: linear-gradient(to bottom, var(--field-green) 0%, var(--scoreboard-yellow) 50%, var(--field-green) 100%);
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.5);
}

/* Team player styling */
.team-player .jersey-style {
  position: relative;
  border: 4px solid rgba(255, 255, 255, 0.2);
}

.team-player:hover .jersey-style {
  transform: scale(1.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Stadium section */
.stadium-section {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border: 2px solid rgba(15, 61, 34, 0.1);
}

/* Stand cards (reviews) */
.stand-card {
  position: relative;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.stand-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--field-green), var(--scoreboard-yellow), var(--deep-blue));
  border-radius: 16px 16px 0 0;
}

/* Skill badges */
.skill-badge:hover {
  transform: translateY(-5px);
  transition: all 0.3s ease;
}

/* Crest logo */
.crest-logo {
  position: relative;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.crest-logo::before {
  content: "⚽";
  position: absolute;
  left: -30px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2em;
  opacity: 0.7;
}

/* Crest buttons */
.crest-button {
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  background: linear-gradient(var(--field-green), var(--field-green)) padding-box,
    linear-gradient(45deg, var(--field-green), var(--scoreboard-yellow)) border-box;
}

.crest-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.crest-button:hover::before {
  left: 100%;
}

/* Image styling variations */
.polaroid-frame {
  border: 8px solid white;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  position: relative;
}

.polaroid-frame::after {
  content: "Victory Moment";
  position: absolute;
  bottom: -6px;
  left: 8px;
  right: 8px;
  background: white;
  text-align: center;
  font-size: 12px;
  color: #666;
  padding: 4px;
}

.rounded-frame {
  border-radius: 16px;
  border: 3px solid var(--scoreboard-yellow);
  box-shadow: 0 0 15px rgba(250, 204, 21, 0.3);
}

.filter-contrast {
  filter: contrast(1.1) saturate(1.2);
  border: 2px solid var(--scoreboard-yellow);
}

/* Stadium view for map */
.stadium-view {
  border: 4px solid var(--field-green);
  box-shadow: 0 0 20px rgba(15, 61, 34, 0.3), inset 0 0 20px rgba(0, 0, 0, 0.1);
}

/* Ticker animation */
.ticker-content {
  animation: scroll-left 30s linear infinite;
}

@keyframes scroll-left {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* FAQ styling */
.faq-item {
  border: 2px solid transparent;
  background: linear-gradient(white, white) padding-box,
    linear-gradient(45deg, rgba(15, 61, 34, 0.1), rgba(250, 204, 21, 0.1)) border-box;
}

.faq-question:hover {
  background-color: rgba(15, 61, 34, 0.05);
}

.faq-question[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* Stand divider */
.stand-divider {
  height: 20px;
  background: url("data:image/svg+xml,%3Csvg width='100' height='20' viewBox='0 0 100 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 20c20-10 40-10 50 0s30 10 50 0V0H0v20z' fill='%23ffffff' fill-opacity='0.1'/%3E%3C/svg%3E")
    repeat-x;
}

/* Custom animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Animation classes */
.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.animate-slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

.animate-slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

.animate-pulse-hover:hover {
  animation: pulse 0.3s ease-in-out;
}

/* Header styles */
header {
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.95);
  border-bottom: 2px solid rgba(15, 61, 34, 0.1);
}

/* Mobile menu transition */
#mobileMenu {
  transition: all 0.3s ease-in-out;
  max-height: 0;
  overflow: hidden;
}

#mobileMenu.show {
  max-height: 300px;
}

/* Form styles */
.form-input {
  transition: all 0.3s ease;
}

.form-input:focus {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 61, 34, 0.15);
}

/* Button hover effects */
.btn-primary {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(15, 61, 34, 0.3);
}

/* Card hover effects */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Loading animation for images */
img {
  transition: opacity 0.3s ease;
}

img[data-loaded="false"] {
  opacity: 0;
}

img[data-loaded="true"] {
  opacity: 1;
}

/* Responsive typography */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
    line-height: 1.2;
  }

  h2 {
    font-size: 2rem;
    line-height: 1.3;
  }

  h3 {
    font-size: 1.5rem;
    line-height: 1.4;
  }

  .jersey-number {
    font-size: 2rem;
  }

  .ticker-content {
    font-size: 0.875rem;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: var(--field-green);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--field-green-light);
}

/* Focus styles for accessibility */
button:focus,
input:focus,
textarea:focus,
select:focus,
a:focus {
  outline: 2px solid var(--field-green);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  header,
  footer,
  #cookieNotice,
  #matchTicker {
    display: none;
  }

  body {
    font-size: 12pt;
    line-height: 1.4;
  }

  h1,
  h2,
  h3 {
    page-break-after: avoid;
  }

  img {
    max-width: 100% !important;
    height: auto !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .text-gray-600 {
    color: #374151;
  }

  .text-gray-700 {
    color: #1f2937;
  }

  .bg-gray-50 {
    background-color: #f9fafb;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .ticker-content {
    animation: none;
  }
}

/* Loading spinner */
.spinner {
  border: 2px solid #f3f4f6;
  border-top: 2px solid var(--field-green);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Form validation styles */
.form-error {
  border-color: #ef4444;
  background-color: #fef2f2;
}

.form-success {
  border-color: var(--field-green);
  background-color: #f0fdf4;
}

.error-message {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.success-message {
  color: var(--field-green);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Intersection observer animations */
.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  visibility: hidden;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: opacity, visibility;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: none;
  visibility: visible;
}

/* Performance optimizations */
.will-change-transform {
  will-change: transform;
}

.will-change-opacity {
  will-change: opacity;
}

/* Modern CSS features */
.backdrop-blur {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Accessibility improvements */
.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;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--field-green);
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 1000;
}

.skip-link:focus {
  top: 6px;
}

/* Additional football-themed elements */
.goal-post {
  position: relative;
}

.goal-post::before,
.goal-post::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 20px;
  background: white;
  top: -10px;
}

.goal-post::before {
  left: 0;
}

.goal-post::after {
  right: 0;
}

/* Victory celebration animation */
@keyframes victory {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }
  25% {
    transform: scale(1.1) rotate(-5deg);
  }
  75% {
    transform: scale(1.1) rotate(5deg);
  }
}

.victory-animation:hover {
  animation: victory 0.6s ease-in-out;
}

/* Stadium atmosphere */
.stadium-atmosphere {
  background: radial-gradient(ellipse at center, rgba(15, 61, 34, 0.1) 0%, transparent 70%);
}

/* Match result styling */
.match-result {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: linear-gradient(45deg, var(--field-green), var(--scoreboard-yellow));
  color: white;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.875rem;
}

/* Team formation grid */
.formation-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  position: relative;
}

.formation-grid::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%);
}

/* Championship trophy */
.trophy {
  color: var(--scoreboard-yellow);
  filter: drop-shadow(0 0 10px rgba(250, 204, 21, 0.5));
}
