/* 
   Project: Cashback Portale 2025
   Theme: Acid Agency (Polished & Fixed)
   Style: High Contrast, Precision, Acid Green Accents
*/

/* Local fonts to avoid external requests */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-latin.woff2') format('woff2');
}

:root {
  /* --- Colors --- */
  --color-acid: #CCFF00;      /* Signature Lime */
  --color-acid-dim: #b3e600;  
  
  --color-black: #050505;     
  --color-dark: #111111;      
  
  --color-light: #FDFDFB;     
  --color-white: #FFFFFF;     
  
  --color-border: #E5E5E5;    
  --color-text: #050505;
  --color-text-muted: #666666;

  /* --- Dimensions & Spacing --- */
  --container-width: 1240px;
  --header-height: 80px;
  
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;

  /* --- Radius --- */
  --radius-sm: 8px;
  --radius-card: 16px;
  --radius-pill: 100px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden; /* Prevents horizontal scroll on mobile */
  background: linear-gradient(135deg, #f4ffcd 0%, #ffffff 60%); /* Soft Acid Green Gradient */
  color: var(--color-text);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--color-black);
  margin: 0 0 1rem 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 700; margin-bottom: 1.5rem; }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 2rem; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }

p {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  margin: 0 0 1.5rem 0;
  max-width: 65ch;
  line-height: 1.6;
}

a {
  color: var(--color-black);
  text-decoration: none;
  transition: opacity 0.2s;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem; /* Safe zone padding for mobile */
}

/* --- Background Glow (Disabled in favor of Body Gradient) --- */
.bg-glow-container {
  display: none;
}

.bg-glow {
  display: none;
}

/* --- Header --- */
header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  position: relative;
  z-index: 50;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-black);
  letter-spacing: -0.01em;
}

.brand img {
  width: 120px;
  height: auto;
  display: block;
  max-height: 48px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--color-acid);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3.25rem; 
  padding: 0 1.75rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  border: 1px solid transparent;
  gap: 8px; 
}

.btn::after {
  content: "↗";
  font-family: system-ui, sans-serif;
  font-weight: 400;
  font-size: 1.1em;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn:hover::after {
  transform: translate(2px, -2px); 
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--color-black);
  color: var(--color-white);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-primary:hover {
  background: #222; 
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(0,0,0,0.15);
  color: var(--color-black);
}

.btn-secondary:hover {
  border-color: var(--color-black);
  background: var(--color-white);
}

/* --- Hero --- */
.hero-wrapper {
  position: relative;
  overflow: hidden;
}

.hero-wrapper::before {
  content: '';
  position: absolute;
  width: 900px;
  height: 900px;
  top: -220px;
  left: -180px;
  background: radial-gradient(circle, rgba(204, 255, 0, 0.35) 0%, rgba(255, 255, 255, 0) 60%);
  filter: blur(40px);
  z-index: 0;
  pointer-events: none;
}

.hero {
  position: relative;
  z-index: 1;
  padding-top: 3rem;
  padding-bottom: var(--space-xl);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 5rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-black);
  margin-bottom: 1.5rem;
  position: relative;
  padding-left: 1rem;
}

.eyebrow::before {
  content: '';
  position: absolute;
  left: 0; top: 50%; transform: translateY(-50%);
  width: 8px; height: 8px;
  background: var(--color-acid);
  border-radius: 50%;
}

.hero-img img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-card);
  box-shadow: 24px 24px 0 var(--color-acid);
  filter: grayscale(100%);
  transition: filter 0.5s ease, box-shadow 0.3s ease;
}

.hero-img:hover img {
  filter: grayscale(0%);
  box-shadow: 16px 16px 0 var(--color-acid);
}

/* --- Sections --- */
.section {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
}

.section.surface {
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section.panel {
  background: var(--color-black);
  color: var(--color-white);
  border-radius: var(--radius-card);
  padding: var(--space-lg);
}
.section.panel h2, .section.panel h3, .section.panel p { color: var(--color-white); }
.section.panel .muted { color: #888; }
.section.panel .card { background: #1a1a1a; border: none; color: white; }
.section.panel .card p { color: #bbb; }
.section.panel .card h3 { color: white; }

/* --- Case Studies --- */
.case-study .case-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: flex-start;
}

.case-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-pill);
  background: rgba(204, 255, 0, 0.18);
  color: var(--color-black);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.case-highlight {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-card);
  border: 1px solid rgba(0,0,0,0.08);
  background: linear-gradient(135deg, rgba(204,255,0,0.15), #fff);
}
.case-highlight h4 {
  margin: 0 0 0.35rem 0;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.case-highlight p { margin: 0; color: var(--color-text); }

.case-steps {
  background: var(--color-white);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.04);
}
.case-steps-title {
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.9rem;
  color: var(--color-black);
  margin-bottom: 1rem;
}
.case-steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.9rem;
}
.case-steps-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: flex-start;
}
.case-steps-list .step-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(204, 255, 0, 0.25);
  border: 1px solid rgba(0,0,0,0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--color-black);
}
.case-steps-list strong {
  display: block;
  font-size: 1rem;
  color: var(--color-black);
}
.case-steps-list p {
  margin: 0.15rem 0 0 0;
  font-size: 0.98rem;
}
.case-meta-note {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* --- Table of Contents --- */
.toc {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-white);
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  padding: 1.25rem;
}
.toc summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary:after {
  content: "▼";
  font-size: 0.85rem;
  transition: transform 0.2s ease;
}
.toc[open] summary:after { transform: rotate(180deg); }
.toc ul {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0 0;
  display: grid;
  gap: 0.5rem;
}
.toc a {
  color: var(--color-black);
  text-decoration: none;
  font-weight: 600;
}
.toc a:hover { color: var(--color-acid); }

/* --- Comparison Table (Wrap-up) --- */
.compare-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 30px 70px rgba(0,0,0,0.08);
  color: var(--color-black);
}
.compare-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}
.compare-table {
  width: 100%;
  min-width: 1100px;
  border-collapse: separate;
  border-spacing: 0;
}
.compare-table thead th {
  position: sticky;
  top: 0;
  background: #f4f7ef;
  padding: 1rem;
  text-align: left;
  font-weight: 700;
  color: var(--color-black);
  z-index: 1;
}
.compare-table tbody tr:nth-child(odd) td {
  background: rgba(0,0,0,0.02);
}
.rates-table tbody tr:nth-child(odd) td {
  background: transparent;
}
.compare-table td, .compare-table th {
  padding: 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  vertical-align: top;
  color: var(--color-black);
}
.rates-table th:first-child,
.rates-table td:first-child {
  position: static;
  background: transparent;
  z-index: auto;
}
.compare-table th:first-child, .compare-table td:first-child {
  background: #f6f8f1;
  border-right: 1px solid rgba(0,0,0,0.08);
  width: 220px;
  position: sticky;
  left: 0;
  z-index: 2;
}
.compare-table thead th:first-child {
  z-index: 3;
}
.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;
}
.compare-table .sticky-col {
  background: #f6f8f1;
}
.compare-table .brand-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  text-align: center;
}
.compare-table .brand-header img {
  width: 80px;
  height: auto;
  display: block;
}
.compare-table .brand-name {
  font-weight: 700;
}
.compare-table .badge-winner,
.compare-table .badge-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.compare-table .badge-winner {
  background: var(--color-black);
  color: var(--color-white);
}
.compare-table .badge-tip {
  background: rgba(204, 255, 0, 0.35);
  color: var(--color-black);
}
.compare-table .btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  background: var(--color-acid);
  color: var(--color-black);
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(0,0,0,0.06);
}
.compare-table .btn-cta:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.compare-table .rating-row th,
.compare-table .rating-row td {
  background: rgba(0,0,0,0.02);
}
.compare-table .stars {
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 0.05em;
}
.compare-table .score {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
.compare-table .highlight-good {
  background: rgba(204, 255, 0, 0.18);
  font-weight: 700;
}
.compare-table .highlight-neutral {
  background: rgba(0,0,0,0.04);
  font-weight: 700;
}
.compare-table .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}
.compare-table .brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  color: var(--color-black);
}
.compare-table .brand .badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(204, 255, 0, 0.2);
  color: var(--color-black);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.compare-table .check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-pill);
  background: rgba(204, 255, 0, 0.22);
  color: var(--color-black);
  font-weight: 700;
  font-size: 0.9rem;
}
.compare-table .muted {
  color: #444;
  font-size: 0.95rem;
}
.compare-table .warn {
  color: #f6d100;
  font-weight: 700;
}
.compare-table .note {
  color: #444;
  font-size: 0.95rem;
}
.compare-table .cta-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  min-height: 3.2rem;
  border-radius: var(--radius-pill);
  background: var(--color-acid);
  color: var(--color-black);
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(0,0,0,0.06);
  line-height: 1.2;
  text-align: center;
}
.compare-table .cta-link:hover { box-shadow: 0 8px 20px rgba(0,0,0,0.08); }

@media (max-width: 900px) {
  .compare-table th:first-child, .compare-table td:first-child { width: 180px; }
}

/* Related Links Pills */
.rel-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.rel-links a {
  background: var(--color-dark);
  color: var(--color-white);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.rel-links a:hover {
  background: var(--color-acid);
  color: var(--color-black);
  border-color: var(--color-acid);
}

/* --- CTA Strip (Mobile Spacing Fix) --- */
.cta-strip {
  display: flex;
  flex-direction: column; /* Stack vertically on mobile */
  gap: 1rem; /* Add spacing between buttons */
  background: var(--color-white);
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  margin-top: 1rem;
}

/* --- Cards --- */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 2rem;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: var(--color-black);
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  transform: translateY(-4px);
}

/* --- Provider Overview CTA Alignment --- */
.provider-overview .card .btn {
  width: 100%;
  justify-content: center;
  margin-top: auto;
  text-align: center;
}

.info-box {
  background: #f4f4f4;
  padding: 1.5rem;
  border-left: 4px solid var(--color-black);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 1rem;
}
.info-box.warning {
  background: #fffbea;
  border-color: #ffd700;
}
.info-box.profi-tip {
  margin-top: 1.5rem;
}

.list-check {
  list-style: none;
  padding: 0;
}
.list-check li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
}
.list-check li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: var(--color-acid-dim);
  font-weight: bold;
}

.grid {
  display: grid;
  gap: 2rem;
}
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }

/* --- Chips --- */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.tag {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s;
}

.tag:hover { background: #f0f0f0; }

/* --- Footer --- */
.footer {
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-lg);
  font-size: 0.95rem;
  color: var(--color-text);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
  align-items: center;
  justify-content: center;
}
.footer a { color: var(--color-black); font-weight: 700; }
.footer .footer-note {
  color: var(--color-text-muted);
  max-width: 840px;
}

/* --- Mobile Navigation & Responsive --- */
.burger {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem; /* Larger touch target */
  cursor: pointer;
  color: var(--color-black);
  z-index: 101; /* Above nav overlay */
  padding: 0.5rem;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 3rem; }
  .hero-wrapper::before {
    width: 700px;
    height: 700px;
    top: -260px;
    left: -220px;
  }
  .case-study .case-grid { grid-template-columns: 1fr; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4, .two-col { grid-template-columns: 1fr; gap: 2rem; }
  
  /* Ensure hero content has padding on mobile - handled by global .container now */
  /* .hero padding removed here */
  
  /* Mobile Menu */
  .nav-links {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--color-light);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    padding: 2rem;
  }
  
  .nav-links.open {
    display: flex; /* Flex when open */
  }
  
  .nav-links a {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .nav-cta { display: none; }
  .burger { display: block; }
  
  h1 { font-size: 2.5rem; }
  
  .hero-img img { box-shadow: 12px 12px 0 var(--color-acid); }
}

@media (max-width: 600px) {
  .hero-wrapper::before {
    width: 520px;
    height: 520px;
    top: -220px;
    left: -240px;
  }
  h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
.stats { grid-template-columns: 1fr; }
.btn-group { flex-direction: column; align-items: flex-start; }
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.12);
  background: #f8f8f8;
  color: var(--color-text);
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  z-index: 150;
}
.back-to-top span:first-child { font-size: 1.2rem; line-height: 1; }
.back-to-top.show { display: inline-flex; }
.back-to-top:hover { transform: translateY(-2px); }
