/* ==========================================================
   Design System: Sabores Arabes (Premium 2.5D)
   Cumple estricto con:
   - 8px Baseline Grid
   - WCAG 2.2 Accesibility (Contrastes)
   - Cero CLS (Estabilidad visual Adsense)
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap');

:root {
  /* --- PALETA DE COLORES (NotebookLM Master Manual) --- */
  --c-sahara-dunes: #E3A869; /* Warm yellow/orange */
  --c-zellige-teal: #008080; /* Rich cyan-green */
  --c-marrakech-rose: #C95B5B; /* Deep soft red */
  --c-arabian-desert: #8B5A2B; /* Deep brown */
  
  --c-bg-dark: #0A0806;
  --c-bg-card: #14100C;
  --c-text-primary: #FEF7EC;
  --c-text-muted: #B3A08A;

  /* --- 8px SPACER GRID --- */
  --s-1: 8px;
  --s-2: 16px;
  --s-3: 24px;
  --s-4: 32px;
  --s-6: 48px;  /* Touch target min-height */
  --s-8: 64px;
  --s-12: 96px;

  /* --- TYPOGRAPHY --- */
  --font-body: 'Outfit', system-ui, sans-serif;
  --font-heading: 'Playfair Display', serif; /* Hybrid Arabic Feel */
  
  /* --- 2.5D & GLASSMORPHISM TOKENS --- */
  --shadow-base: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-2-5d: 0 16px 48px -12px rgba(227, 168, 105, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.05);
  --glass-bg: rgba(20, 16, 12, 0.65);
  --glass-border: 1px solid rgba(227, 168, 105, 0.1);
  --radius-md: 16px;
  --radius-lg: 24px;
  
  /* --- TRANSITIONS --- */
  --t-smooth: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ================== CSS RESET ================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px; /* Base size */
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--c-bg-dark);
  color: var(--c-text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; border-radius: 8px; }

/* ================== TIPOGRAFÍA ================== */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--s-2);
  color: var(--c-text-primary);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.5rem; }

p { margin-bottom: var(--s-3); }
.text-sahara { color: var(--c-sahara-dunes); }
.text-teal { color: var(--c-zellige-teal); }

/* ================== LAYOUT & UTILIDADES ================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--s-3);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--s-4);
}

/* ================== COMPONENTES ================== */
/* Botones (Min 48px Touch Area) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--s-6); 
  padding: 0 var(--s-4);
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  transition: var(--t-smooth);
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--c-arabian-desert);
  color: #fff;
  box-shadow: var(--shadow-base);
}

.btn-primary:hover {
  background: var(--c-sahara-dunes);
  color: var(--c-bg-dark);
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-2-5d);
}

.btn-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: var(--glass-border);
  color: var(--c-text-primary);
}

.btn-glass:hover {
  background: rgba(227, 168, 105, 0.15);
  border-color: var(--c-sahara-dunes);
  transform: translateY(-2px);
}

/* Header Glassmorphism */
header.glass-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: var(--glass-border);
  padding: var(--s-2) 0;
  transition: var(--t-smooth);
}

header .nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  color: var(--c-sahara-dunes);
  text-decoration: none;
  font-style: italic;
}

nav ul {
  display: flex;
  gap: var(--s-4);
  list-style: none;
}

nav a {
  color: var(--c-text-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: var(--t-smooth);
}

nav a:hover {
  color: var(--c-sahara-dunes);
}

/* 2.5D Cards */
.card-25d {
  background: var(--c-bg-card);
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: var(--radius-lg);
  padding: var(--s-3);
  box-shadow: var(--shadow-base);
  transition: var(--t-smooth);
  cursor: pointer;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.card-25d:hover {
  transform: translateY(-8px) rotateX(2deg) rotateY(2deg);
  box-shadow: var(--shadow-2-5d);
  border-color: rgba(227, 168, 105, 0.2);
}

.card-25d img {
  border-radius: var(--radius-md);
  margin-bottom: var(--s-3);
  object-fit: cover;
  aspect-ratio: 4/3;
  width: 100%;
}

.card-tag {
  display: inline-block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--c-marrakech-rose);
  margin-bottom: var(--s-1);
  font-weight: 600;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--s-8);
  background-image: linear-gradient(to right, rgba(10, 8, 6, 0.95) 0%, rgba(10, 8, 6, 0.6) 100%), var(--bg-img);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.hero::after { /* Efecto de partícula flotante decorativa */
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: radial-gradient(circle at 80% 50%, rgba(227, 168, 105, 0.15), transparent 50%);
  pointer-events: none;
}

.hero-content {
  max-width: 600px;
  position: relative;
  z-index: 2;
}

.hero p.lead {
  font-size: 1.25rem;
  color: var(--c-text-muted);
  margin-bottom: var(--s-4);
}

.hero-actions {
  display: flex;
  gap: var(--s-2);
}

/* ================== SEO & ADSENSE (Zero CLS & Placeholder) ================== */
.ad-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: var(--s-8) 0;
  /* Simulación visual de placeholder para anuncios mientras carga AdSense */
  background: 
    linear-gradient(90deg, rgba(227, 168, 105, 0.03) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(180deg, rgba(227, 168, 105, 0.03) 1px, transparent 1px) 0 0 / 20px 20px,
    var(--glass-bg);
  border: 1px dashed rgba(227, 168, 105, 0.2);
  border-radius: var(--radius-md);
  color: var(--c-text-muted);
  font-size: 0.9rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Marca de agua de publicidad para transparencia */
.ad-container::before {
  content: "Anuncio Patrocinado";
  position: absolute;
  top: 8px; left: 16px;
  font-size: 0.65rem;
  text-transform: uppercase;
  color: rgba(227, 168, 105, 0.4);
  letter-spacing: 1px;
}

/* Evitar Custom Layout Shifts estático */
.ad-leaderboard {
  min-height: 90px;
}
.ad-rectangle {
  min-height: 250px;
}

/* Modulo Amazon Favorites */
.affiliate-module {
  background: linear-gradient(135deg, rgba(139, 90, 43, 0.1), rgba(0, 128, 128, 0.05));
  border-radius: var(--radius-lg);
  padding: var(--s-6);
  margin: var(--s-8) 0;
  border-left: 4px solid var(--c-sahara-dunes);
}

/* Section Spacing */
section {
  padding: var(--s-12) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--s-8);
}

.section-title h2 {
  font-size: 2.5rem;
}
.section-title p {
  color: var(--c-text-muted);
}

/* ================== COOKIE CONSENT BANNER V2 ================== */
.cookie-banner {
  position: fixed;
  bottom: var(--s-3);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - var(--s-6));
  max-width: 800px;
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--s-4);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  box-shadow: var(--shadow-2-5d);
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.cookie-banner.hidden {
  opacity: 0;
  transform: translate(-50%, 150%);
  pointer-events: none;
}

@media(min-width: 768px) {
  .cookie-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.cookie-content h4 { margin-bottom: var(--s-1); font-size: 1.1rem; }
.cookie-content p { margin: 0; font-size: 0.9rem; color: var(--c-text-muted); line-height: 1.4; }
.cookie-content a { color: var(--c-sahara-dunes); text-decoration: none; border-bottom: 1px dotted var(--c-sahara-dunes); }
.cookie-actions { display: flex; gap: var(--s-2); flex-shrink: 0; flex-wrap: wrap; }
