/* ====================================================================
   Recetas del Mundo — Estilos globales
   Mobile-first, juvenil, moderno, con paleta vibrante y animaciones.
   ==================================================================== */

:root {
    --color-bg: #fafaf7;
    --color-bg-alt: #ffffff;
    --color-surface: #ffffff;
    --color-text: #1a1a1a;
    --color-text-muted: #5b5b66;
    --color-primary: #ff5a36;
    --color-primary-dark: #e23d18;
    --color-primary-light: #ff8a6b;
    --color-secondary: #ffb800;
    --color-accent: #2ec4b6;
    --color-accent-dark: #1d8c82;
    --color-success: #06d6a0;
    --color-danger: #ef476f;
    --gradient-hero: linear-gradient(135deg, #ff5a36 0%, #ffb800 50%, #2ec4b6 100%);
    --gradient-warm: linear-gradient(135deg, #ff5a36 0%, #ffb800 100%);
    --gradient-cool: linear-gradient(135deg, #2ec4b6 0%, #06d6a0 100%);
    --shadow-sm: 0 2px 6px rgba(20, 20, 30, 0.06);
    --shadow-md: 0 8px 24px rgba(20, 20, 30, 0.10);
    --shadow-lg: 0 20px 50px rgba(20, 20, 30, 0.16);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 999px;
    --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.55;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

a { color: var(--color-primary); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--color-primary-dark); }

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

button { font-family: var(--font-body); cursor: pointer; }

/* ====================================================================
   LAYOUT
   ==================================================================== */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

/* ====================================================================
   TOP NAV
   ==================================================================== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid rgba(20, 20, 30, 0.06);
}

.topbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: .85rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--color-text);
    white-space: nowrap;
}
.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: var(--gradient-hero);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    box-shadow: var(--shadow-sm);
}
.brand-text { line-height: 1; }
.brand-text small { display: block; font-size: .65rem; font-weight: 600; color: var(--color-text-muted); letter-spacing: .12em; text-transform: uppercase; }

.nav-primary {
    display: none;
    gap: .25rem;
    margin-left: auto;
}
.nav-primary a {
    color: var(--color-text);
    font-weight: 600;
    font-size: .92rem;
    padding: .5rem .85rem;
    border-radius: var(--radius-pill);
    transition: background .2s ease;
}
.nav-primary a:hover { background: rgba(255, 90, 54, 0.10); color: var(--color-primary-dark); }
.nav-primary a.active { background: rgba(255, 90, 54, 0.14); color: var(--color-primary-dark); }

.nav-cta {
    margin-left: .25rem;
    padding: .55rem 1.1rem;
    background: var(--color-text);
    color: #fff !important;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: .9rem;
    transition: transform .2s ease, background .2s ease;
}
.nav-cta:hover { background: var(--color-primary); transform: translateY(-1px); }

.nav-toggle {
    margin-left: auto;
    background: transparent;
    border: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--color-text);
}
.nav-toggle:hover { background: rgba(20,20,30,.05); }

.mobile-menu {
    display: none;
    padding: .75rem 1.25rem 1.25rem;
    border-top: 1px solid rgba(20,20,30,.06);
    background: #fff;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
    display: block;
    padding: .85rem 1rem;
    border-radius: 12px;
    font-weight: 600;
    color: var(--color-text);
}
.mobile-menu a:hover { background: rgba(255, 90, 54, 0.10); }

@media (min-width: 992px) {
    .nav-primary { display: inline-flex; }
    .nav-toggle { display: none; }
    .mobile-menu { display: none !important; }
}

/* ====================================================================
   HERO
   ==================================================================== */
.hero {
    position: relative;
    overflow: hidden;
    padding: 4rem 1.25rem 5rem;
    background: var(--gradient-hero);
    color: #fff;
    isolation: isolate;
}
.hero::before, .hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: .6;
}
.hero::before { width: 320px; height: 320px; background: #ff5a36; top: -120px; left: -100px; }
.hero::after { width: 380px; height: 380px; background: #2ec4b6; bottom: -150px; right: -120px; }

.hero-inner { max-width: 1100px; margin: 0 auto; text-align: center; }
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: .35rem .85rem;
    border-radius: var(--radius-pill);
    font-size: .8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    backdrop-filter: blur(8px);
}
.hero h1 {
    font-size: clamp(2.2rem, 6vw, 4rem);
    line-height: 1.05;
    color: #fff;
    margin: 0 0 1rem;
}
.hero h1 span { display: block; background: linear-gradient(120deg, #fff 0%, #ffe7a0 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 1.05rem; max-width: 620px; margin: 0 auto 1.75rem; opacity: .94; }
.hero-search {
    max-width: 680px;
    margin: 0 auto;
    background: #fff;
    border-radius: var(--radius-pill);
    padding: .35rem;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-lg);
    gap: .25rem;
}
.hero-search input {
    flex: 1;
    border: 0;
    background: transparent;
    padding: .85rem 1.2rem;
    font-size: 1rem;
    color: var(--color-text);
    outline: none;
    min-width: 0;
}
.hero-search button {
    border: 0;
    background: var(--color-text);
    color: #fff;
    padding: .8rem 1.4rem;
    border-radius: var(--radius-pill);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    transition: background .2s;
}
.hero-search button:hover { background: var(--color-primary); }
.hero-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    justify-content: center;
    margin-top: 1.4rem;
}
.hero-cta-row a {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    padding: .6rem 1.1rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: .9rem;
    backdrop-filter: blur(8px);
    transition: all .2s;
}
.hero-cta-row a:hover { background: #fff; color: var(--color-primary-dark); }

.hero-stats {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
    font-size: .85rem;
    opacity: .92;
}
.hero-stats strong { display: block; font-size: 1.5rem; font-family: var(--font-display); font-weight: 800; }

@media (max-width: 480px) {
    .hero { padding: 3rem 1rem 4rem; }
    .hero-search { flex-direction: column; padding: .5rem; border-radius: var(--radius-md); }
    .hero-search input { padding: .9rem 1rem; text-align: center; }
    .hero-search button { width: 100%; justify-content: center; padding: .85rem 1rem; }
}

/* ====================================================================
   SECTIONS
   ==================================================================== */
section { padding: 3.5rem 1.25rem; }
.section-inner { max-width: 1280px; margin: 0 auto; }
.section-header { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.section-header h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); margin: 0; }
.section-header p { color: var(--color-text-muted); margin: 0; }
.section-link { font-weight: 700; font-size: .9rem; color: var(--color-primary); }

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

/* ====================================================================
   RECIPE CARDS
   ==================================================================== */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.recipe-card {
    position: relative;
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .25s ease, box-shadow .25s ease;
    display: flex;
    flex-direction: column;
}
.recipe-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.recipe-card-media {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: linear-gradient(135deg, #ffe1d6, #ffd4a8);
}
.recipe-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.recipe-card:hover .recipe-card-media img { transform: scale(1.06); }

.recipe-card-flag {
    position: absolute;
    top: .75rem;
    left: .75rem;
    background: rgba(255, 255, 255, 0.95);
    padding: .25rem .55rem .25rem .25rem;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .75rem;
    font-weight: 700;
    color: var(--color-text);
    backdrop-filter: blur(8px);
}
.recipe-card-flag img { width: 22px; height: 16px; object-fit: cover; border-radius: 3px; }
.recipe-card-time {
    position: absolute;
    top: .75rem;
    right: .75rem;
    background: rgba(20, 20, 30, 0.78);
    color: #fff;
    padding: .3rem .7rem;
    border-radius: var(--radius-pill);
    font-size: .75rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

.recipe-card-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.recipe-card-meta {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
    color: var(--color-text-muted);
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.recipe-card-meta .dot { color: var(--color-text-muted); }
.recipe-card h3 {
    font-size: 1.05rem;
    line-height: 1.25;
    margin: 0;
    color: var(--color-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.recipe-card-summary {
    color: var(--color-text-muted);
    font-size: .85rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.recipe-card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: .5rem;
    border-top: 1px dashed rgba(20, 20, 30, 0.08);
    font-size: .8rem;
    color: var(--color-text-muted);
    font-weight: 600;
}
.recipe-card-foot .badge-difficulty {
    padding: .2rem .55rem;
    border-radius: var(--radius-pill);
    font-size: .7rem;
    background: rgba(46, 196, 182, 0.16);
    color: var(--color-accent-dark);
}
.badge-difficulty.medium { background: rgba(255, 184, 0, 0.18); color: #b87a00; }
.badge-difficulty.hard { background: rgba(239, 71, 111, 0.18); color: #b8234f; }
.badge-difficulty.expert { background: rgba(20, 20, 30, 0.85); color: #fff; }

.recipe-card a.stretched::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* ====================================================================
   COUNTRY PILLS
   ==================================================================== */
.country-pills {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
}
.country-pill {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    background: #fff;
    border: 1px solid rgba(20, 20, 30, 0.08);
    border-radius: var(--radius-pill);
    padding: .35rem 1rem .35rem .35rem;
    font-weight: 600;
    font-size: .85rem;
    color: var(--color-text);
    transition: all .2s;
}
.country-pill:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.country-pill img { width: 28px; height: 20px; object-fit: cover; border-radius: 4px; }

/* ====================================================================
   BUTTONS
   ==================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .8rem 1.4rem;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: .95rem;
    border: 0;
    transition: transform .15s, background .2s, color .2s, box-shadow .2s;
    text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); color: #fff; }
.btn-secondary { background: var(--color-text); color: #fff; }
.btn-secondary:hover { background: #000; color: #fff; }
.btn-outline { background: transparent; border: 2px solid var(--color-text); color: var(--color-text); }
.btn-outline:hover { background: var(--color-text); color: #fff; }
.btn-ghost { background: rgba(20, 20, 30, 0.05); color: var(--color-text); }
.btn-ghost:hover { background: rgba(20, 20, 30, 0.10); }
.btn-block { display: flex; width: 100%; }
.btn-sm { padding: .5rem 1rem; font-size: .85rem; }
.btn-lg { padding: 1rem 1.6rem; font-size: 1rem; }

/* ====================================================================
   FEATURE CARDS
   ==================================================================== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}
.feature-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.6rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(20, 20, 30, 0.05);
    transition: transform .25s, box-shadow .25s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 1rem;
}
.feature-icon.gradient-1 { background: var(--gradient-warm); }
.feature-icon.gradient-2 { background: var(--gradient-cool); }
.feature-icon.gradient-3 { background: linear-gradient(135deg, #6a4cff 0%, #ff5a36 100%); }
.feature-icon.gradient-4 { background: linear-gradient(135deg, #ff5a36 0%, #2ec4b6 100%); }
.feature-card h3 { font-size: 1.1rem; margin: 0 0 .4rem; }
.feature-card p { color: var(--color-text-muted); font-size: .9rem; margin: 0; }

/* ====================================================================
   PANTRY (Ingredientes)
   ==================================================================== */
.pantry-hero {
    background: var(--gradient-cool);
    color: #fff;
    padding: 4rem 1.25rem;
    text-align: center;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.pantry-hero h1 { color: #fff; font-size: clamp(1.9rem, 4.5vw, 2.8rem); margin: 0 0 .6rem; }
.pantry-hero p { color: rgba(255, 255, 255, 0.92); max-width: 640px; margin: 0 auto 1.4rem; }
.pantry-form {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.4rem;
    max-width: 760px;
    margin: 0 auto;
    text-align: left;
    box-shadow: var(--shadow-lg);
}
.pantry-form textarea {
    width: 100%;
    min-height: 120px;
    border: 1px solid rgba(20, 20, 30, 0.1);
    border-radius: var(--radius-md);
    padding: 1rem;
    font-size: 1rem;
    font-family: var(--font-body);
    resize: vertical;
    background: #fdfdfb;
    color: var(--color-text);
}
.pantry-form textarea:focus { outline: 2px solid var(--color-accent); border-color: transparent; }
.pantry-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1rem;
}
.pantry-chip {
    background: rgba(20, 20, 30, 0.06);
    color: var(--color-text);
    padding: .35rem .85rem;
    border-radius: var(--radius-pill);
    font-size: .85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}
.pantry-chip .x { cursor: pointer; opacity: .6; }
.pantry-chip .x:hover { opacity: 1; color: var(--color-danger); }
.pantry-form-foot { display: flex; gap: .75rem; margin-top: 1rem; align-items: center; flex-wrap: wrap; }
.pantry-form-foot .form-check { margin: 0; }
.pantry-suggested {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}
.pantry-suggested button {
    background: rgba(255, 90, 54, 0.1);
    color: var(--color-primary-dark);
    border: 0;
    padding: .35rem .8rem;
    border-radius: var(--radius-pill);
    font-size: .82rem;
    font-weight: 600;
}
.pantry-suggested button:hover { background: var(--color-primary); color: #fff; }

/* ====================================================================
   RECIPE DETAIL
   ==================================================================== */
.recipe-hero {
    position: relative;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    overflow: hidden;
    color: #fff;
    background: #1a1a1a;
}
.recipe-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.55);
    z-index: 0;
}
.recipe-hero-content {
    position: relative;
    z-index: 1;
    padding: 3rem 1.25rem 4rem;
    max-width: 1100px;
    margin: 0 auto;
}
.recipe-hero h1 { color: #fff; font-size: clamp(1.8rem, 4.5vw, 3rem); margin: 0 0 .75rem; line-height: 1.1; }
.recipe-hero p.summary { font-size: 1.05rem; max-width: 720px; opacity: .94; margin: 0 0 1.25rem; }
.recipe-hero-meta { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.recipe-hero-meta div { display: flex; flex-direction: column; }
.recipe-hero-meta strong { font-size: 1.3rem; font-family: var(--font-display); }
.recipe-hero-meta span { font-size: .8rem; opacity: .85; text-transform: uppercase; letter-spacing: .04em; }

.recipe-body {
    max-width: 1180px;
    margin: -2rem auto 3rem;
    padding: 0 1.25rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    position: relative;
    z-index: 2;
}
@media (min-width: 992px) {
    .recipe-body { grid-template-columns: 340px 1fr; }
}

.recipe-panel {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(20, 20, 30, 0.05);
}
.recipe-panel h2 { font-size: 1.15rem; margin: 0 0 1rem; }

.servings-control {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: linear-gradient(135deg, rgba(255, 90, 54, 0.10), rgba(255, 184, 0, 0.10));
    padding: .75rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.servings-control .label { font-weight: 700; flex: 1; min-width: 130px; }
.servings-control .stepper { display: inline-flex; align-items: center; background: #fff; border-radius: var(--radius-pill); padding: .25rem; }
.servings-control .stepper button {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: var(--color-text);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.servings-control .stepper button:hover { background: var(--color-primary); }
.servings-control .stepper button:disabled { background: rgba(20, 20, 30, 0.2); cursor: not-allowed; }
.servings-control .stepper input {
    width: 56px;
    text-align: center;
    border: 0;
    background: transparent;
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--color-text);
}
.servings-control .stepper input::-webkit-outer-spin-button,
.servings-control .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.servings-control .stepper input { -moz-appearance: textfield; }
.servings-control .badge { background: #fff; color: var(--color-primary-dark); font-weight: 700; padding: .25rem .65rem; border-radius: var(--radius-pill); font-size: .8rem; }

.ingredients-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .55rem; }
.ingredients-list li {
    display: flex;
    align-items: baseline;
    gap: .65rem;
    padding: .55rem .75rem;
    border-radius: var(--radius-md);
    background: rgba(20, 20, 30, 0.03);
    transition: background .2s;
}
.ingredients-list li:hover { background: rgba(255, 90, 54, 0.08); }
.ingredients-list .qty {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--color-primary-dark);
    min-width: 64px;
    font-variant-numeric: tabular-nums;
}
.ingredients-list .unit { color: var(--color-text-muted); font-size: .85rem; min-width: 32px; }
.ingredients-list .name { flex: 1; }
.ingredients-list .optional { font-size: .7rem; background: rgba(20, 20, 30, 0.08); color: var(--color-text-muted); padding: .1rem .5rem; border-radius: var(--radius-pill); }

.steps-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1rem; }
.steps-list li {
    display: flex;
    gap: 1rem;
    background: #fff;
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    border: 1px solid rgba(20, 20, 30, 0.06);
}
.steps-list .num {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-warm);
    color: #fff;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
}
.steps-list .body { flex: 1; }
.steps-list .body p { margin: 0 0 .4rem; }
.steps-list .tip {
    margin-top: .4rem;
    padding: .55rem .75rem;
    background: rgba(46, 196, 182, 0.10);
    color: var(--color-accent-dark);
    border-radius: var(--radius-md);
    font-size: .88rem;
}
.steps-list .duration { font-size: .8rem; color: var(--color-text-muted); margin-top: .35rem; }

/* ====================================================================
   FOOTER
   ==================================================================== */
footer.site-footer {
    background: #11131a;
    color: #c4c4cf;
    padding: 3rem 1.25rem 2rem;
    margin-top: 4rem;
}
.footer-inner { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 768px) { .footer-inner { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-inner h4 { color: #fff; font-size: .9rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 .8rem; }
.footer-inner a { color: #c4c4cf; display: block; padding: .3rem 0; font-size: .9rem; }
.footer-inner a:hover { color: #fff; }
.footer-brand p { font-size: .9rem; max-width: 360px; }
.footer-bottom { max-width: 1280px; margin: 2rem auto 0; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.08); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: .82rem; opacity: .7; }

/* ====================================================================
   FORMS (Admin)
   ==================================================================== */
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.field label { font-weight: 600; font-size: .88rem; color: var(--color-text); }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number], .field input[type=url], .field select, .field textarea {
    border: 1px solid rgba(20, 20, 30, 0.12);
    border-radius: var(--radius-md);
    padding: .75rem .9rem;
    font-size: .95rem;
    font-family: var(--font-body);
    background: #fff;
    color: var(--color-text);
    width: 100%;
    transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--color-primary);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(255, 90, 54, 0.18);
}
.field .help { color: var(--color-text-muted); font-size: .8rem; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }

/* ====================================================================
   ADMIN
   ==================================================================== */
.admin-shell { display: grid; grid-template-columns: 1fr; min-height: 100vh; background: #f1f3f8; }
@media (min-width: 992px) { .admin-shell { grid-template-columns: 260px 1fr; } }
.admin-side {
    background: linear-gradient(180deg, #11131a 0%, #1d1f2a 100%);
    color: #c4c4cf;
    padding: 1.4rem 1.1rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.admin-side .brand { color: #fff; margin-bottom: 1.5rem; }
.admin-side .nav-side { display: flex; flex-direction: column; gap: .25rem; }
.admin-side .nav-side a {
    color: #c4c4cf;
    padding: .65rem .85rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-weight: 600;
    font-size: .92rem;
    transition: background .2s, color .2s;
}
.admin-side .nav-side a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.admin-side .nav-side a.active { background: var(--color-primary); color: #fff; }
.admin-main { padding: 1.5rem 1.25rem 3rem; }
@media (min-width: 768px) { .admin-main { padding: 2rem 2rem 3rem; } }

.admin-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.admin-header h1 { margin: 0; font-size: 1.5rem; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.kpi-card { background: #fff; border-radius: var(--radius-md); padding: 1.25rem; box-shadow: var(--shadow-sm); }
.kpi-card .label { color: var(--color-text-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.kpi-card .value { font-size: 1.8rem; font-family: var(--font-display); font-weight: 800; margin-top: .35rem; }
.kpi-card.success .value { color: var(--color-success); }
.kpi-card.primary .value { color: var(--color-primary); }

.admin-table {
    width: 100%;
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border-collapse: collapse;
}
.admin-table th, .admin-table td { padding: .85rem 1rem; text-align: left; font-size: .9rem; }
.admin-table thead th { background: #f7f8fb; color: var(--color-text-muted); font-weight: 700; text-transform: uppercase; font-size: .72rem; letter-spacing: .04em; }
.admin-table tbody tr { border-top: 1px solid rgba(20, 20, 30, 0.06); }
.admin-table tbody tr:hover { background: rgba(255, 90, 54, 0.04); }
.admin-table img.thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; background: #eee; }

.badge-soft { display: inline-flex; align-items: center; padding: .2rem .55rem; border-radius: var(--radius-pill); font-size: .72rem; font-weight: 700; background: rgba(46, 196, 182, 0.15); color: var(--color-accent-dark); }
.badge-soft.danger { background: rgba(239, 71, 111, 0.15); color: #b8234f; }
.badge-soft.warn { background: rgba(255, 184, 0, 0.20); color: #b87a00; }
.badge-soft.muted { background: rgba(20, 20, 30, 0.08); color: var(--color-text-muted); }

.alert { padding: .9rem 1.1rem; border-radius: var(--radius-md); margin-bottom: 1rem; font-size: .9rem; }
.alert-info { background: rgba(46, 196, 182, 0.10); color: var(--color-accent-dark); border: 1px solid rgba(46, 196, 182, 0.30); }
.alert-danger { background: rgba(239, 71, 111, 0.10); color: #b8234f; border: 1px solid rgba(239, 71, 111, 0.30); }
.alert-warning { background: rgba(255, 184, 0, 0.18); color: #b87a00; border: 1px solid rgba(255, 184, 0, 0.40); }

.card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(20, 20, 30, 0.05);
}
.card h2 { font-size: 1.1rem; margin: 0 0 1rem; }

/* ====================================================================
   LOGIN
   ==================================================================== */
.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #11131a 0%, #1d1f2a 100%);
    padding: 2rem 1rem;
}
.auth-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}
.auth-card h1 { font-size: 1.5rem; margin: 0 0 .4rem; }
.auth-card p.sub { color: var(--color-text-muted); font-size: .9rem; margin: 0 0 1.5rem; }
.auth-card .brand { margin-bottom: 1.5rem; }

/* ====================================================================
   UTILITIES
   ==================================================================== */
.fade-in { animation: fadeIn .3s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.skeleton { background: linear-gradient(90deg, #eee 0%, #f5f5f5 50%, #eee 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; border-radius: 12px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.text-muted { color: var(--color-text-muted); }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: .5rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }
.mt-1 { margin-top: .5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-100 { width: 100%; }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--color-text-muted); }
.empty-state .ico { font-size: 2.5rem; margin-bottom: 1rem; opacity: .5; }

/* ====================================================================
   PAGINATION
   ==================================================================== */
.pagination { display: flex; justify-content: center; gap: .4rem; flex-wrap: wrap; margin-top: 2rem; }
.pagination a, .pagination span {
    min-width: 40px;
    height: 40px;
    padding: 0 .85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-pill);
    background: #fff;
    color: var(--color-text);
    font-weight: 700;
    font-size: .9rem;
    border: 1px solid rgba(20, 20, 30, 0.08);
}
.pagination a:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.pagination .active { background: var(--color-text); color: #fff; border-color: var(--color-text); }
.pagination .disabled { opacity: .4; pointer-events: none; }

/* ====================================================================
   TOASTS
   ==================================================================== */
.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--color-text);
    color: #fff;
    padding: .9rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    font-weight: 600;
    font-size: .9rem;
    animation: toastIn .25s ease both;
}
.toast.success { background: var(--color-success); }
.toast.danger { background: var(--color-danger); }
@keyframes toastIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ====================================================================
   COOKIE BANNER (RGPD)
   ==================================================================== */
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 9998;
    background: #1a1a1a;
    color: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 1100px;
    margin: 0 auto;
    animation: cookieIn .35s ease both;
    border: 1px solid rgba(255,255,255,.08);
}
.cookie-banner[hidden] { display: none !important; }
.cookie-inner {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.cookie-text {
    flex: 1;
    min-width: 260px;
    font-size: .9rem;
    line-height: 1.5;
}
.cookie-text a { color: #ffb800; text-decoration: underline; }
.cookie-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}
.cookie-actions .btn-sm { padding: .5rem .85rem; font-size: .85rem; }
.cookie-actions .btn-ghost { background: rgba(255,255,255,.12); color: #fff; }
.cookie-actions .btn-ghost:hover { background: rgba(255,255,255,.2); }
.cookie-actions .btn-outline { border-color: rgba(255,255,255,.4); color: #fff; }
.cookie-actions .btn-outline:hover { background: #fff; color: #1a1a1a; }

@keyframes cookieIn {
    from { transform: translateY(120%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ====================================================================
   ADSENSE — Espacios reservados para anuncios
   ==================================================================== */
.adsense-slot {
    display: block;
    margin: 1.5rem auto;
    text-align: center;
    min-height: 90px;
}
@media (min-width: 768px) {
    .adsense-slot { min-height: 120px; }
}

/* ====================================================================
   ACCESSIBILITY HELPERS
   ==================================================================== */
.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute;
    top: -40px; left: 0;
    background: var(--color-primary);
    color: #fff;
    padding: .5rem 1rem;
    border-radius: 0 0 var(--radius-md) 0;
    text-decoration: none;
    font-weight: 700;
    z-index: 10000;
    transition: top .2s;
}
.skip-link:focus { top: 0; }

/* ====================================================================
   PROSE (artículos legales, About)
   ==================================================================== */
.card h2 { margin-top: 1.75rem; }
.card h2:first-child { margin-top: 0; }
.card p { line-height: 1.7; color: #2a2a35; }
.card ul, .card ol { padding-left: 1.4rem; line-height: 1.7; color: #2a2a35; }
.card ul li, .card ol li { margin-bottom: .35rem; }
.card table { margin: 1rem 0; }
