/* ============================================================
   Inforloto.com - Main CSS
   ============================================================ */

/* CSS Custom Properties (Design System) */
:root {
  /* Primary Colors */
  --color-primary: #1E88E5;
  --color-primary-dark: #1565C0;
  --color-primary-light: #42A5F5;
  --color-secondary: #E91E63;
  --color-secondary-dark: #C2185B;
  --color-success: #4CAF50;
  --color-warning: #FF9800;
  --color-warning-dark: #F57C00;

  /* Neutral Colors */
  --color-text: #212529;
  --color-text-light: #6C757D;
  --color-text-muted: #ADB5BD;
  --color-background: #FFFFFF;
  --color-background-alt: #F8F9FA;
  --color-background-dark: #E9ECEF;
  --color-border: #DEE2E6;
  --color-border-light: #F1F3F5;

  /* Game Colors */
  --color-euromilhoes: #003399;
  --color-euromilhoes-star: #FFD700;
  --color-totoloto: #006600;
  --color-eurodreams: #5B21B6;
  --color-eurodreams-dream: #A78BFA;
  --color-m1lhao: #8B0000;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
  --shadow-colored: 0 8px 24px rgba(30, 136, 229, 0.15);

  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-size-base: 16px;
  --line-height-base: 1.5;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
}

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

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: var(--line-height-base);
  color: var(--color-text);
  background-color: var(--color-background-alt);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-text);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 600; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); font-weight: 600; }
h4 { font-size: 1.125rem; font-weight: 600; }
h5 { font-size: 1rem; font-weight: 600; }
h6 { font-size: 0.875rem; font-weight: 600; }

p {
  margin-bottom: var(--space-4);
}

p:last-child {
  margin-bottom: 0;
}

strong { font-weight: 700; }

/* ============================================================
   Layout
   ============================================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.section {
  padding: var(--space-7) 0;
}

.section--alt {
  background-color: var(--color-background);
}

/* Grid layouts */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

/* Results grid for homepage */
.results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .results-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   Header & Navigation
   ============================================================ */
.site-header {
  background: var(--color-background);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.98);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  max-width: 1200px;
  margin: 0 auto;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}

.site-logo img {
  height: 40px;
  width: auto;
}

.site-logo__text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.5px;
}

.site-logo__text span {
  color: var(--color-secondary);
}

.site-nav {
  display: none;
}

.site-nav ul {
  display: flex;
  gap: var(--space-1);
}

.site-nav a {
  display: block;
  padding: var(--space-2) var(--space-3);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
  border-radius: var(--radius-md);
  transition: background-color var(--transition-fast), color var(--transition-fast);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a.active {
  background-color: var(--color-background-alt);
  color: var(--color-primary);
  text-decoration: none;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 2px;
  transition: all var(--transition-base);
}

/* Mobile Nav Open State */
.site-nav.is-open {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-background);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  padding: var(--space-3) var(--space-4);
}

.site-nav.is-open ul {
  flex-direction: column;
  gap: 0;
}

.site-nav.is-open a {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: 1rem;
}

/* ============================================================
   Hero Section
   ============================================================ */
.hero {
  background: linear-gradient(135deg, #1E3A8A 0%, #1E88E5 50%, #42A5F5 100%);
  color: white;
  padding: clamp(3rem, 8vw, 5rem) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: white;
  margin-bottom: var(--space-4);
  text-shadow: 0 4px 12px rgba(0,0,0,0.2);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hero__subtitle {
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: var(--space-2);
  font-weight: 400;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero__subtitle--small {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0;
  font-weight: 300;
}

/* Hero variant for internal pages */
.hero--page {
  padding: clamp(2.5rem, 6vw, 4rem) 0;
}

.hero--page .hero__title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
}

.hero--page .hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.hero--page .hero__subtitle--small {
  font-size: clamp(0.9rem, 1.8vw, 1rem);
}

/* Game-specific hero colors */
.hero--euromilhoes {
  background: linear-gradient(135deg, #1E3A8A 0%, #1E88E5 50%, #42A5F5 100%);
}

.hero--totoloto {
  background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 50%, #43A047 100%);
}

.hero--eurodreams {
  background: linear-gradient(135deg, #4A148C 0%, #6A1B9A 50%, #8E24AA 100%);
}

.hero--m1lhao {
  background: linear-gradient(135deg, #C62828 0%, #E57373 50%, #EF9A9A 100%);
}

/* ============================================================
   Breadcrumb
   ============================================================ */
.breadcrumb {
  background: var(--color-background);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-3) 0;
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.breadcrumb__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.875rem;
  color: var(--color-text-light);
}

.breadcrumb__item:not(:last-child)::after {
  content: '›';
  color: var(--color-text-muted);
}

.breadcrumb__item a {
  color: var(--color-primary);
}

.breadcrumb__item:last-child {
  color: var(--color-text);
  font-weight: 500;
}

/* ============================================================
   Game Badge
   ============================================================ */
.game-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.game-badge--euromilhoes {
  background-color: var(--color-euromilhoes);
  color: white;
}

.game-badge--totoloto {
  background-color: var(--color-totoloto);
  color: white;
}

.game-badge--eurodreams {
  background-color: var(--color-eurodreams);
  color: white;
}

.game-badge--m1lhao {
  background-color: var(--color-m1lhao);
  color: white;
}

/* ============================================================
   Ad Placeholders
   ============================================================ */
.ad-container {
  text-align: center;
  margin: var(--space-5) 0;
}

.ad-placeholder {
  background: var(--color-background-dark);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--color-text);
  color: rgba(255, 255, 255, 0.8);
  padding: var(--space-7) 0 var(--space-5);
  margin-top: var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

.footer-brand__logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: var(--space-3);
}

.footer-brand__logo span {
  color: var(--color-secondary);
}

.footer-brand p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-nav h4 {
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-nav a:hover {
  color: white;
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.7);
}

.footer-disclaimer {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: var(--space-3);
}

/* ============================================================
   Loading & Error States
   ============================================================ */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-7);
  color: var(--color-text-light);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: var(--space-4);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-state {
  background: #FFF5F5;
  border: 1px solid #FFCCCC;
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  text-align: center;
  color: var(--color-secondary);
}

.error-state p {
  margin-bottom: var(--space-3);
}

.error-state p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   Utilities
   ============================================================ */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--color-text-light); }
.text-small  { font-size: 0.875rem; }
.text-xs     { font-size: 0.75rem; }

.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn--primary {
  background-color: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(30, 136, 229, 0.3);
}

.btn--primary:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: white;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(30, 136, 229, 0.4);
  transform: translateY(-1px);
}

.btn--outline {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn--outline:hover {
  background-color: var(--color-primary);
  color: white;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(30, 136, 229, 0.3);
  transform: translateY(-1px);
}

.btn--sm {
  padding: var(--space-2) var(--space-4);
  font-size: 0.875rem;
}

.badge {
  display: inline-block;
  padding: 2px var(--space-2);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background-color: var(--color-background-dark);
  color: var(--color-text-light);
}

.badge--success {
  background-color: #D4EDDA;
  color: #155724;
}

.badge--warning {
  background-color: #FFF3CD;
  color: #856404;
}

.badge--info {
  background-color: #E8DAFF;
  color: #4B0082;
}
