/* ------------------------------------------------------
   CSS RESET & NORMALIZE
---------------------------------------------------------*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}

article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
  display: block;
}
body {
  line-height: 1.5;
  background: #f7f8fa;
  color: #25324D;
  min-height: 100vh;
}
ol, ul {
  list-style: none;
}
a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
img {
  max-width: 100%;
  height: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
}
:focus {
  outline: 2px solid #F25C05;
  outline-offset: 2px;
}

/* ------------------------------------------------------
   BRAND VARIABLES (WITH FALLBACKS)
---------------------------------------------------------*/
:root {
  --color-primary: #24345D;
  --color-secondary: #F25C05;
  --color-accent: #F2F2F2;
  --color-bg: #f7f8fa;
  --color-white: #fff;
  --color-text: #24345D;
  --color-gray-light: #e5e8f1;
  --color-gray-medium: #b6bbca;
  --color-gray-dark: #3B465E;
  --color-shadow: rgba(36,52,93,0.07);
  --font-display: 'Oswald', Arial, sans-serif;
  --font-body: 'Roboto', Arial, sans-serif;
  --radius: 8px;
  --transition: 0.2s cubic-bezier(.47,.01,.58,1.01);
  --shadow-card: 0 2px 12px var(--color-shadow);
  --shadow-hover: 0 4px 16px rgba(36,52,93,0.12);
}

/* ------------------------------------------------------
   TYPOGRAPHY
---------------------------------------------------------*/
body {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-text);
  background: var(--color-bg);
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0;
  margin-bottom: 12px;
  color: var(--color-primary);
}
h1 {
  font-size: 2.25rem; /* 36px */
  line-height: 1.15;
}
h2 {
  font-size: 1.85rem; /* 30px */
  line-height: 1.2;
  margin-bottom: 20px;
}
h3 {
  font-size: 1.25rem; /* 20px */
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 8px;
}
h4 {
  font-size: 1.1rem;
}
p {
  line-height: 1.7;
  margin-bottom: 18px;
  color: var(--color-gray-dark);
}
strong {font-weight: 700; color: var(--color-primary);}

/* -------------------------------------------
   GENERIC LAYOUT CONTAINERS
--------------------------------------------*/
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.section,
[class^="section-"] {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

/* -------------------------------------------
   HEADER/NAVIGATION
--------------------------------------------*/
header {
  width: 100%;
  background: var(--color-white);
  box-shadow: 0 2px 12px var(--color-shadow);
  position: sticky;
  top: 0; left: 0;
  z-index: 50;
}

header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  gap: 12px;
}
header nav {
  display: flex;
  gap: 20px;
  align-items: center;
}
header nav a {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-primary);
  padding: 8px 8px;
  border-radius: 4px;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  position: relative;
}
header nav a:hover, header nav a.active {
  color: var(--color-secondary);
  background: var(--color-accent);
}
header img[alt="Fiery Balance"] {
  height: 38px;
  margin-right: 16px;
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--color-white);
  background: var(--color-secondary);
  border: none;
  border-radius: var(--radius);
  padding: 11px 34px;
  margin-left: 12px;
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition), color var(--transition);
  box-shadow: 0 1px 8px var(--color-shadow);
}
.cta-btn:hover, .cta-btn:focus {
  background: #c34701;
  color: #fff;
  box-shadow: 0 4px 16px rgba(242,92,5,0.10);
}
header .mobile-menu-toggle {
  font-size: 2rem;
  padding: 4px 10px;
  color: var(--color-primary);
  background: none;
  border: none;
  border-radius: 4px;
  display: none;
  cursor: pointer;
  transition: background var(--transition);
}
header .mobile-menu-toggle:hover {
  background: var(--color-accent);
}

/* MOBILE NAVIGATION */
.mobile-menu {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--color-primary);
  color: var(--color-white);
  transform: translateX(-100vw);
  transition: transform 0.32s cubic-bezier(.51,.13,.29,1.24);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: 36px;
  padding-left: 34px;
  padding-right: 34px;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  align-self: flex-end;
  font-size: 2.4rem;
  background: none;
  border: none;
  color: var(--color secondary, #fff);
  padding: 11px 16px;
  margin-bottom: 12px;
  cursor: pointer;
  border-radius: 50%;
  transition: background var(--transition);
}
.mobile-menu-close:hover {
  background: rgba(255,255,255,0.07);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-size: 1.25rem;
}
.mobile-nav a {
  padding: 16px 0 5px 0;
  color: #fff;
  text-transform: none;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 400;
  transition: color var(--transition), background var(--transition);
}
.mobile-nav a:hover {
  background: #2e4172;
  color: var(--color-secondary);
}

/* Hide main nav for mobile, show mobile menu toggle */
@media (max-width: 1050px) {
  header nav, .cta-btn {
    display: none !important;
  }
  header .mobile-menu-toggle {
    display: block;
  }
}
@media (min-width: 1051px) {
  .mobile-menu {
    display: none !important;
  }
}

/* ------------------------------------------------------
   HERO & BANNERS
---------------------------------------------------------*/
.hero,
.cta-banner,
.confirmation {
  background: linear-gradient(105deg, #f7f8fa 0%, #e5e8f1 100%);
  box-shadow: none;
  text-align: center;
  padding: 60px 20px 54px 20px;
  margin-bottom: 60px;
  border-radius: var(--radius);
}
.hero h1,
.confirmation h1 {
  font-size: 2.6rem;
  color: var(--color-primary);
  margin-bottom: 18px;
}
.hero p,
.cta-banner p,
.confirmation p {
  color: var(--color-gray-dark);
  font-size: 1.13rem;
  margin-bottom: 19px;
}
.cta-banner h2 {
  font-size: 2rem;
  margin-bottom: 12px;
}
@media (max-width: 768px) {
  .hero .container, .cta-banner .container, .confirmation .container {
    padding: 0 8px;
  }
  .hero h1, .confirmation h1 {font-size: 2rem;}
}

/* ------------------------------------------------------
   FEATURES SECTIONS & CARDS
---------------------------------------------------------*/
.features .feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
}
.features .feature-grid > div {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  flex: 1 1 195px;
  min-width: 210px;
  max-width: 260px;
  padding: 26px 20px 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 20px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.features .feature-grid > div:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-5px) scale(1.03);
}
.features .feature-grid img {
  width: 37px;
  height: 37px;
  margin-bottom: 10px;
}
.features .feature-grid h3 {font-size: 1.07rem; font-weight: 700;}

/* ------------------------------------------------------
   MINI LEAGUE TABLE, STATS, CARDS
---------------------------------------------------------*/
.stats-preview .mini-league-table,
.stats-preview .best-teams-preview,
.stats-preview .latest-results {
  background: var(--color-accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 18px 22px;
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stats-preview h3 {font-size: 1rem; margin-bottom: 6px;}

/* ------------------------------------------------------
   TOURNAMENT TABLE & TABLES
---------------------------------------------------------*/
.tournament-table table, 
.match-results table {
  width: 100%;
  margin-top: 18px;
  margin-bottom: 18px;
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.tournament-table th, .tournament-table td,
.match-results th, .match-results td {
  padding: 12px 10px;
  text-align: center;
  font-size: 1rem;
  color: var(--color-primary);
  border-bottom: 1px solid var(--color-gray-light);
}
.tournament-table th,
.match-results th {
  background: var(--color-accent);
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--color-primary);
}
.tournament-table tr:last-child td, 
.match-results tr:last-child td {
  border-bottom: none;
}

.legend h3 {font-size: 1.05rem; margin-bottom: 6px;}
.legend ul {
  display: flex;
  gap: 16px;
  font-size: 0.97rem;
}

/* FILTER BUTTONS */
.filter-options, .stats-filter, .date-filter, .team-selector, .quick-filter {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.filter-options button,
.stats-filter button,
.date-filter button,
.team-selector button,
.quick-filter button {
  background: var(--color-accent);
  color: var(--color-primary);
  border: 1px solid var(--color-gray-light);
  border-radius: 20px;
  padding: 6px 20px;
  font-size: 0.97rem;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border var(--transition);
}
.filter-options button:hover, .filter-options button.active,
.stats-filter button:hover, .stats-filter button.active,
.date-filter button:hover, .date-filter button.active,
.team-selector button:hover, .team-selector button.active,
.quick-filter button:hover, .quick-filter button.active {
  background: var(--color-secondary);
  color: var(--color-white);
  border: 1.5px solid var(--color-secondary);
}

/* ------------------------------------------------------
   TEAMS GRID
---------------------------------------------------------*/
.teams-grid .team-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 24px;
}
.teams-grid .team-list > div {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  flex: 1 0 220px;
  padding: 22px 22px 17px 22px;
  min-width: 210px;
  max-width: 260px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 20px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.teams-grid .team-list > div:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px) scale(1.02);
}
.teams-grid .team-list h3 {font-size: 1.08rem; margin-bottom: 8px;}
.teams-grid .team-list p {font-size: 1rem; margin-bottom: 7px;}
.teams-grid .team-list ul {display: flex; gap: 10px;}
.teams-grid .team-stats-preview {
  background: var(--color-accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 14px 20px 10px 20px;
}
.teams-grid .team-stats-preview h3 {font-size: 1.04rem; margin-bottom: 6px;}

/* ------------------------------------------------------
   ABOUT US PAGE & VALUES
---------------------------------------------------------*/
.about, .values, .legal, .faq {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  margin-bottom: 60px;
  padding: 40px 20px;
}
.values ul, .analysis-highlights ul, .faq ul, .legal ul {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.testimonials .testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 26px 22px 22px 22px;
  background: var(--color-accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
}
.testimonials .testimonial-card blockquote {
  color: var(--color-primary);
  font-size: 1.07rem;
  font-style: italic;
}
.testimonial-signature {
  color: var(--color-gray-dark);
  font-weight: 500;
  font-size: 1rem;
  margin-top: 4px;
  letter-spacing: 0.1px;
}

/* ------------------------------------------------------
   CONTACT PAGE & FAQ
---------------------------------------------------------*/
.contact .contact-details ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.contact .contact-details li img {
  width: 22px;
  height: 22px;
  margin-right: 9px;
  vertical-align: middle;
}
.map-location {
  background: var(--color-accent);
  border-radius: 6px;
  padding: 18px 13px;
  font-size: 1rem;
  box-shadow: var(--shadow-card);
}
.faq ul > li {
  margin-bottom: 16px;
}
.faq strong {display: block; color: var(--color-primary); margin-bottom: 6px;}

/* ------------------------------------------------------
   LEGAL (POLICIES, RODO)
---------------------------------------------------------*/
.legal {
  font-size: 1.02rem;
  color: var(--color-gray-dark);
}
.legal h1, .legal h2 {
  color: var(--color-primary);
  margin-bottom: 13px;
}
.legal section, .legal ul, .legal p {
  margin-bottom: 17px;
}

/* ------------------------------------------------------
   FOOTER
---------------------------------------------------------*/
footer {
  background: var(--color-primary);
  color: var(--color-accent);
  width: 100%;
  padding: 0;
  margin-top: 30px;
  box-shadow: 0 -2px 12px var(--color-shadow);
}
footer .container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 27px 20px 20px 20px;
}
.footer-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-nav a {
  color: #dce1ed;
  font-size: 1rem;
  padding: 6px 6px;
  border-radius: 4px;
  transition: background var(--transition), color var(--transition);
}
.footer-nav a:hover {
  background: #33446d;
  color: var(--color-secondary);
}
.contact-info {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 26px;
  align-items: center;
  font-size: 1em;
}
.contact-info span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.contact-info img {
  height: 22px;
  width: 22px;
  display: inline-block;
  vertical-align: middle;
}
@media (max-width: 800px) {
  footer .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
  .contact-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .footer-nav {
    gap: 14px;
  }
}

/* ------------------------------------------------------
   GENERIC FLEXBOX SPACING and CARDS
---------------------------------------------------------*/
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; background: var(--color-white); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 28px 22px; }
.content-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.text-image-section { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.testimonial-card { display: flex; align-items: center; gap: 20px; padding: 20px; background: var(--color-accent); border-radius: var(--radius); box-shadow: var(--shadow-card); }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* ------------------------------------------------------
   COOKIE CONSENT BANNER & MODAL
---------------------------------------------------------*/
#cookie-consent-banner {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  width: 100vw;
  background: var(--color-white);
  box-shadow: 0 -2px 16px rgba(36,52,93,0.10);
  color: var(--color-primary);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 1rem;
  z-index: 20000;
  padding: 24px 30px;
  transition: transform var(--transition), opacity var(--transition);
}
#cookie-consent-banner.hidden {
  transform: translateY(140px);
  opacity: 0;
  pointer-events: none;
}
#cookie-consent-banner .cookie-buttons {
  display: flex;
  gap: 13px;
}
#cookie-consent-banner button {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 7px 21px;
  border: none;
  border-radius: 18px;
  font-weight: 600;
  background: var(--color-accent);
  color: var(--color-primary);
  cursor: pointer;
  margin-top: 5px;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
#cookie-consent-banner button.accept-all {
  background: var(--color-secondary);
  color: #fff;
  box-shadow: 0 1px 4px var(--color-shadow);
}
#cookie-consent-banner button.accept-all:hover {
  background: #c34701;
}
#cookie-consent-banner button.reject-all {
  background: #e5e8f1;
  color: var(--color-primary);
}
#cookie-consent-banner button.reject-all:hover {
  background: #d1dae9;
}
#cookie-consent-banner button.cookie-settings {
  background: var(--color-white);
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}
#cookie-consent-banner button.cookie-settings:hover {
  background: #f6f6fa;
}

#cookie-modal {
  position: fixed;
  left: 0; right:0; top:0; bottom:0;
  width: 100vw; height: 100vh;
  background: rgba(36,52,93,0.28);
  z-index: 20001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
#cookie-modal.open {
  opacity: 1;
  pointer-events: all;
}
#cookie-modal .modal-content {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: 0 4px 32px rgba(36,52,93,0.15);
  padding: 44px 34px 32px 34px;
  max-width: 420px;
  width: 95vw;
  color: var(--color-text);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 23px;
  font-size: 1.03rem;
  animation: fadeDown 0.3s;
}
@keyframes fadeDown {
  from { transform: translateY(-100px); opacity: 0;}
  to { transform: translateY(0); opacity: 1;}
}
#cookie-modal .modal-title {
  font-family: var(--font-display);
  font-size: 1.23rem;
  margin-bottom: 8px;
}
#cookie-modal .modal-categories {
  display: flex;
  flex-direction: column;
  gap: 17px;
  margin-bottom: 18px;
}
.cookie-category {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 13px;
  font-size: 1.07rem;
}
.cookie-category input[type="checkbox"] {
  accent-color: var(--color-primary);
  width: 18px; height: 18px;
}
.cookie-category.essential input[type="checkbox"] {
  accent-color: var(--color-primary);
}
.cookie-category.essential label {
  font-weight: 600;
  color: var(--color-primary);
}
#cookie-modal .modal-close {
  position: absolute;
  right: 12px;
  top: 9px;
  background: none;
  border: none;
  font-size: 1.9rem;
  color: var(--color-primary);
  cursor: pointer;
  border-radius: 50%;
  transition: background var(--transition);
}
#cookie-modal .modal-close:hover {
  background: #eef1f7;
}
#cookie-modal .modal-actions {
  margin-top: 8px;
  display: flex;
  flex-direction: row;
  gap: 14px;
  justify-content: flex-end;
}
#cookie-modal .modal-actions button {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  padding: 7px 19px;
  border-radius: 16px;
  cursor: pointer;
  border: none;
  background: var(--color-accent);
  color: var(--color-primary);
  box-shadow: 0 1px 5px var(--color-shadow);
  transition: background var(--transition), color var(--transition);
}
#cookie-modal .modal-actions button.accept {
  background: var(--color-secondary);
  color: #fff;
}
#cookie-modal .modal-actions button.accept:hover {
  background: #c34701;
}
#cookie-modal .modal-actions button.cancel {
  background: #e5e8f1;
  color: var(--color-primary);
}
#cookie-modal .modal-actions button.cancel:hover {
  background: #d1dae9;
}


/* ------------------------------------------------------
   RESPONSIVE LAYOUTS (MOBILE-FIRST)
---------------------------------------------------------*/
@media (max-width: 1050px) {
  .features .feature-grid, .teams-grid .team-list, .content-grid, .card-container {
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
  }
}
@media (max-width: 950px) {
  .container {padding: 0 7px;}
  .section, [class^="section-"] {padding: 32px 7px;}
}
@media (max-width: 768px) {
  .container {padding: 0 5px;}
  .section, [class^="section-"] { padding: 24px 5px; margin-bottom: 40px;}
  .feature-grid > div, .team-list > div, .card, .testimonial-card {
    min-width: 90vw!important;
    max-width: 100%!important;
  }
  .footer-nav, .contact-info {
    flex-direction: column;
    gap: 12px;
  }
  .content-wrapper, .legend ul, .analysis-highlights ul, .values ul, .faq ul {
    gap: 13px;
  }
  .text-image-section { flex-direction: column; align-items: flex-start; gap: 18px; }
  .mobile-menu { padding-left: 8px; padding-right: 8px; }
  #cookie-consent-banner { flex-direction: column; gap: 17px; padding: 16px 7px; font-size: 0.95rem; }
}

/* ------------------------------------------------------
   ADDITIONAL MICRO-INTERACTIONS
---------------------------------------------------------*/
button, [role=button], .cta-btn, .mobile-menu-close, .mobile-menu-toggle {
  transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform 0.12s linear;
}
button:active, .cta-btn:active, .mobile-menu-close:active, .mobile-menu-toggle:active {
  transform: scale(0.97);
}

/* ------------------------------------------------------
   PRINT SUPPORT: Remove navigation and cookie banner from print
---------------------------------------------------------*/
@media print {
  header, .mobile-menu, #cookie-consent-banner { display: none !important; }
  body, .container, main, footer { background: #fff !important; color: #111 !important; }
}
