/* ==========================================================================
   Team shuff lezest - SRIJ Operator Directory Stylesheet
   Design System: Midnight Indigo & Amber Gold (Portuguese Sportsbook Theme)
   ========================================================================== */

/* --- Custom Properties & Theme Design Tokens --- */
:root {
  --color-brand-blue: #1e1b4b;
  --color-brand-blue-hover: #17153b;
  --color-brand-blue-light: #eef2ff;
  --color-brand-dark: #090d16;
  --color-brand-dark-card: #0e1424;
  --color-brand-emerald: #d97706;
  --color-brand-emerald-hover: #b45309;
  --color-brand-emerald-light: #fef3c7;
  --color-brand-light: #f8fafc;
  
  --color-slate-50: #f8fafc;
  --color-slate-100: #f1f5f9;
  --color-slate-200: #e2e8f0;
  --color-slate-300: #cbd5e1;
  --color-slate-400: #94a3b8;
  --color-slate-500: #64748b;
  --color-slate-600: #475569;
  --color-slate-700: #334155;
  --color-slate-800: #1e293b;
  --color-slate-900: #0f172a;
  --color-white: #ffffff;
  --color-red-600: #dc2626;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;
  --radius-3xl: 1.5rem;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(9, 13, 22, 0.08), 0 2px 4px -2px rgba(9, 13, 22, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(9, 13, 22, 0.1), 0 4px 6px -4px rgba(9, 13, 22, 0.08);
  --shadow-xl: 0 20px 25px -5px rgba(9, 13, 22, 0.15), 0 8px 10px -6px rgba(9, 13, 22, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(9, 13, 22, 0.25);

  --transition-base: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--color-brand-light);
  color: var(--color-slate-800);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex-grow: 1;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-base);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

ul,
ol {
  list-style-position: inside;
}

/* --- Lucide Icons Utility Alignment --- */
[data-lucide],
.lucide {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* --- Global Structure & Containers --- */
.max-w-7xl {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
}

.max-w-4xl {
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
}

.max-w-3xl {
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

.max-w-2xl {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

/* --- Top Compliance Banner --- */
.bg-brand-dark {
  background-color: var(--color-brand-dark);
}

.border-b.border-slate-700\/60 {
  border-bottom: 1px solid rgba(51, 65, 85, 0.6);
}

.text-brand-emerald {
  color: var(--color-brand-emerald) !important;
}

/* --- Header & Site Navigation --- */
header.bg-white {
  background-color: var(--color-white);
  border-bottom: 1px solid var(--color-slate-200);
  position: relative;
  z-index: 40;
}

.brand-logo-icon,
header .w-11.h-11 {
  width: 2.75rem;
  height: 2.75rem;
  background-color: var(--color-brand-blue);
  color: var(--color-white);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.25rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition-base);
}

header a.group:hover .brand-logo-icon,
header a.group:hover .w-11.h-11 {
  background-color: var(--color-brand-emerald);
  transform: translateY(-1px);
}

header nav a {
  position: relative;
  font-weight: 600;
  color: var(--color-slate-700);
  transition: var(--transition-base);
}

header nav a:hover {
  color: var(--color-brand-blue);
}

header nav a.text-brand-blue {
  color: var(--color-brand-blue);
}

/* Mobile Navigation Dropdown */
#mobileMenu {
  transition: var(--transition-base);
}

#mobileMenu.hidden {
  display: none;
}

#mobileMenu:not(.hidden) {
  display: block;
  animation: slideDown 0.25s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Hero Section & Patterns --- */
section.relative.bg-gradient-to-b {
  position: relative;
  background: linear-gradient(180deg, #090d16 0%, var(--color-brand-blue) 60%, #060910 100%);
  color: var(--color-white);
}

.backdrop-blur-md {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#quickSearchInput:focus,
#catalogSearch:focus,
#paymentFilter:focus,
#catalogPaymentSelect:focus,
#catalogSort:focus {
  outline: none;
  border-color: var(--color-brand-emerald);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.2);
}

/* Search Tool Inputs & Clear Actions */
#quickSearchClear,
#catalogSearchClear {
  cursor: pointer;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-base);
}

#quickSearchClear:hover,
#catalogSearchClear:hover {
  color: var(--color-brand-emerald);
}

/* ==========================================================================
   ROW-STYLE OPERATOR CARDS (ONE AFTER ANOTHER)
   ========================================================================= */
.operator-card,
.catalog-card {
  display: flex;
  flex-direction: column;
  background-color: var(--color-white);
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
  position: relative;
}

@media (min-width: 1024px) {
  .operator-card,
  .catalog-card {
    flex-direction: row;
    align-items: stretch;
  }
}

.operator-card:hover,
.catalog-card:hover {
  border-color: var(--color-brand-emerald);
  box-shadow: var(--shadow-xl);
  transform: translateY(-2px);
}

/* Brand Logo Box in Row Card */
.brand-logo-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.25rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid var(--color-slate-200);
  min-width: 220px;
  max-width: 100%;
  position: relative;
}

@media (min-width: 1024px) {
  .brand-logo-panel {
    border-bottom: none;
    border-right: 1px solid var(--color-slate-200);
    width: 240px;
    flex-shrink: 0;
  }
}

.brand-rank-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--radius-md);
  background-color: var(--color-brand-blue);
  color: var(--color-white);
  font-size: 0.75rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.brand-svg-box {
  width: 100%;
  max-width: 170px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
}

/* Payment Logos & Badges */
.payment-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 0.25rem 0.6rem;
  height: 32px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: var(--transition-base);
}

.payment-badge:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.payment-badge svg {
  height: 18px;
  width: auto;
  max-width: 60px;
  display: block;
}

/* Offer Box in Row Card */
.offer-banner-row {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
  border-radius: var(--radius-xl);
  padding: 0.85rem 1rem;
}

/* CTA Side Panel */
.action-side-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 0.6rem;
  padding: 1.25rem;
  background-color: #fafbfc;
  border-top: 1px solid var(--color-slate-200);
}

@media (min-width: 1024px) {
  .action-side-panel {
    border-top: none;
    border-left: 1px solid var(--color-slate-200);
    width: 220px;
    flex-shrink: 0;
  }
}

/* Colors & CTA buttons */
.bg-brand-emerald {
  background-color: var(--color-brand-emerald) !important;
  color: var(--color-white) !important;
}

.bg-brand-emerald:hover,
a.bg-brand-emerald:hover {
  background-color: var(--color-brand-emerald-hover) !important;
  transform: translateY(-1px);
}

.bg-brand-blue {
  background-color: var(--color-brand-blue) !important;
  color: var(--color-white) !important;
}

.bg-brand-blue:hover,
a.bg-brand-blue:hover {
  background-color: var(--color-brand-blue-hover) !important;
}

.bg-slate-100:hover,
a.bg-slate-100:hover {
  background-color: var(--color-slate-200) !important;
}

/* Dropdown Filters */
#catalogPaymentSelect,
#catalogSort,
#paymentFilter {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748B'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.25rem;
  appearance: none;
  -webkit-appearance: none;
}

/* --- Resumo Comparativo Table --- */
.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.comparison-table th {
  background-color: #1e1b4b;
  color: #ffffff;
  padding: 0.85rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
}

.comparison-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--color-slate-200);
  font-size: 0.8125rem;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table tr:hover td {
  background-color: #f8fafc;
}

/* --- Universal Footer Styling --- */
footer {
  background-color: var(--color-brand-dark);
  color: var(--color-slate-400);
  border-top: 1px solid rgba(51, 65, 85, 0.7);
}

footer h4 {
  letter-spacing: 0.08em;
  color: var(--color-white);
}

footer a:hover {
  color: var(--color-brand-emerald) !important;
}

footer .bg-slate-900 {
  background-color: #0b101c;
  border: 1px solid #1e293b;
}

/* --- Cookie Banner --- */
#cookieBanner {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  max-width: 24rem;
  background-color: var(--color-white);
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  z-index: 100;
  animation: popIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* --- Accessibility & Print --- */
:focus-visible {
  outline: 2px solid var(--color-brand-emerald);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  header,
  footer,
  #cookieBanner,
  .bg-brand-dark {
    display: none !important;
  }

  body {
    background: #ffffff;
    color: #000000;
  }
}