/* ============================================================
   casinobraz.com — Template A
   Theme: Sophisticated dark + emerald green
   ============================================================ */

:root {
    --bg: #0a0e14;
    --bg-elevated: #11161f;
    --bg-card: #161c27;
    --border: #232a36;
    --border-strong: #2e3644;
    --text: #e6e9ef;
    --text-muted: #9aa3b2;
    --text-dim: #6b7283;
    --accent: #10b981;
    --accent-hover: #34d399;
    --accent-soft: rgba(16, 185, 129, 0.12);
    --gold: #f0b830;
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    --container: 1180px;
    --header-h: 72px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent-hover); }
button { font-family: inherit; cursor: pointer; }
ul { padding-left: 1.25rem; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 .75em; }
h1 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* Header */
.header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(10, 14, 20, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: var(--header-h);
    display: flex; align-items: center;
}
.header-content { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo a { display: inline-flex; align-items: center; }
.logo img { max-height: 44px; width: auto; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4)); }

/* Hero */
.hero {
    padding: 80px 0 56px;
    background:
        radial-gradient(ellipse at top, rgba(16, 185, 129, 0.10), transparent 60%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-elevated) 100%);
    border-bottom: 1px solid var(--border);
}
.hero-content { max-width: 820px; margin: 0 auto; text-align: center; }
.hero h1 {
    background: linear-gradient(135deg, #fff 30%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}
.hero p { font-size: 1.075rem; color: var(--text-muted); max-width: 720px; margin: 0 auto; }

/* Casino ranking */
.casino-ranking { padding: 64px 0; }
.section-title { text-align: center; margin-bottom: 40px; width: 100%; }
.section-title::after { content: ""; display: block; width: 56px; height: 3px; background: var(--accent); border-radius: 2px; margin: 12px auto 0; }
.casino-card {
    display: grid;
    grid-template-columns: 60px 220px 1fr 180px;
    gap: 24px; align-items: center;
    padding: 24px; margin-bottom: 18px;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.casino-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); }
.ranking-number { font-size: 2rem; font-weight: 800; color: var(--accent); text-align: center; font-variant-numeric: tabular-nums; }
.casino-card:nth-of-type(1) .ranking-number { color: #f0b830; }
.casino-card:nth-of-type(2) .ranking-number { color: #c0c4ce; }
.casino-card:nth-of-type(3) .ranking-number { color: #cd7f32; }
.casino-logo-link { display: flex; justify-content: center; }
.casino-logo {
    background: #000;
    padding: 18px 24px;
    border-radius: var(--radius);
    text-align: center;
    min-width: 200px;
    min-height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}
.casino-logo img {
    max-height: 76px;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}
.casino-info { min-width: 0; }
.casino-title { font-size: 1.125rem; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.verified-badge {
    display: inline-block; padding: 3px 10px;
    background: var(--accent-soft); color: var(--accent);
    border: 1px solid var(--accent); border-radius: 999px;
    font-size: 0.75rem; font-weight: 600; margin-bottom: 10px;
}
.offer-text { font-size: 1rem; color: var(--text); font-weight: 600; margin-bottom: 12px; line-height: 1.4; }
.pwr-score { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.pwr-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; color: var(--gold); background: rgba(240, 184, 48, 0.1); padding: 3px 8px; border-radius: var(--radius-sm); }
.progress-bar { flex: 1; height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-hover)); border-radius: 999px; }
.feature-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.feature-tag {
    display: inline-block; font-size: 0.8rem; padding: 5px 10px;
    background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-muted);
}
.casino-cta {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--accent), #0d9668);
    color: #fff; font-weight: 700; border-radius: var(--radius);
    text-align: center;
    box-shadow: 0 8px 18px rgba(16, 185, 129, 0.25);
    transition: transform .15s ease, box-shadow .15s ease;
    width: 100%;
}
.casino-cta:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 12px 24px rgba(16, 185, 129, 0.35); }

/* Regulation */
.regulation-section { padding: 64px 0; background: var(--bg-elevated); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.regulation-section h2 { text-align: center; margin-bottom: 32px; }
.regulation-content { max-width: 880px; margin: 0 auto; }
.regulation-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; }
.regulation-item ul { margin: 16px 0; padding-left: 24px; }
.regulation-item ul li { margin-bottom: 10px; color: var(--text-muted); }
.regulation-item p { color: var(--text-muted); }

/* FAQ */
.faq-section { padding: 64px 0; }
.faq-section h2 { text-align: center; margin-bottom: 32px; }
.faq-accordion { max-width: 820px; margin: 0 auto; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; background: var(--bg-card); transition: border-color .15s ease; }
.faq-item:hover { border-color: var(--border-strong); }
.faq-item.active { border-color: var(--accent); }
.faq-question { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; cursor: pointer; user-select: none; }
.faq-question h3 { font-size: 1rem; font-weight: 600; margin: 0; color: var(--text); }
.faq-icon { flex-shrink: 0; font-size: 1.25rem; color: var(--accent); transition: transform .2s ease; font-weight: 300; }
.faq-item.active .faq-icon { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-item.active .faq-answer { max-height: 500px; }
.answer-content { padding: 0 22px 18px; color: var(--text-muted); }
.footer-disclaimer { margin-top: 48px; padding: 24px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-muted); font-size: 0.875rem; }
.footer-disclaimer p { margin-bottom: 12px; }
.footer-disclaimer p:last-child { margin-bottom: 0; }

/* Footer */
.footer { background: #06080c; border-top: 1px solid var(--border); padding: 48px 0 32px; color: var(--text-muted); }
.footer-content { display: grid; gap: 32px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.footer-grid a { color: var(--text-muted); font-size: 0.9rem; padding: 6px 0; }
.footer-grid a:hover { color: var(--accent); }
.footer-logos { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: center; padding: 24px 0; border-top: 1px solid var(--border); }
.logo-item { display: inline-flex; align-items: center; opacity: .85; transition: opacity .15s ease; }
.logo-item:hover { opacity: 1; }
.logo-img { height: 32px; width: auto; }
.trustpilot-logo { text-align: center; color: #f0b830; font-weight: 600; font-size: 0.95rem; padding: 12px; }
.stars { letter-spacing: 0.1em; }
.footer-legal { font-size: 0.8rem; color: var(--text-dim); line-height: 1.6; text-align: center; padding: 16px 0; border-top: 1px solid var(--border); }
.footer-bottom { text-align: center; color: var(--text-dim); font-size: 0.85rem; padding-top: 16px; border-top: 1px solid var(--border); }

/* Inner pages */
main { padding: 48px 0 64px; }

/* Responsive */
@media (max-width: 900px) {
    .casino-card { grid-template-columns: 1fr 1fr; gap: 16px; }
    .ranking-number { grid-column: 1 / 2; text-align: left; font-size: 1.5rem; }
    .casino-logo-link { grid-column: 2 / 3; justify-self: end; }
    .casino-info { grid-column: 1 / -1; }
    .casino-cta { grid-column: 1 / -1; }
}
@media (max-width: 540px) {
    :root { --header-h: 64px; }
    .hero { padding: 56px 0 40px; }
    .hero h1 { font-size: 1.625rem; }
    .casino-ranking, .regulation-section, .faq-section { padding: 40px 0; }
    .container { padding: 0 16px; }
    .casino-card { padding: 18px; }
    .regulation-item { padding: 22px; }
    .faq-question { padding: 14px 16px; }
    .answer-content { padding: 0 16px 14px; }
}

/* === JS-driven visibility overrides === */
/* ============================================================
   Inner pages: legal pages, about, contact forms
   ============================================================ */
.legal-content { padding: 48px 0 64px; }
.breadcrumb { color: var(--text-dim, var(--text-muted)); font-size: 0.875rem; margin-bottom: 16px; }
.breadcrumb a { color: var(--accent); }
.legal-header { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.legal-header h1 { margin-bottom: 8px; }
.legal-subtitle { color: var(--text-muted); font-size: 1rem; }
.legal-subtitle a { color: var(--accent); }
.legal-body { max-width: 820px; }
.legal-section { margin-bottom: 32px; }
.legal-section h2 { font-size: 1.375rem; margin-bottom: 12px; }
.legal-section p { color: var(--text-muted); }
.legal-section ul { padding-left: 22px; margin-bottom: 1em; }
.legal-section ul li { margin-bottom: 8px; color: var(--text-muted); }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.contact-info,
.contact-form-container,
.contact-card {
    background: var(--bg-card, var(--bg-soft, #fff));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg, 16px);
    padding: 28px;
}
.contact-form { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: grid; gap: 6px; }
.form-group label { font-size: 0.875rem; font-weight: 600; color: var(--text); }
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%; padding: 10px 12px;
    background: var(--bg, transparent); color: var(--text);
    border: 1px solid var(--border); border-radius: var(--radius, 10px);
    font-family: inherit; font-size: 0.95rem;
    transition: border-color .15s ease;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { outline: none; border-color: var(--accent); }
.form-group textarea { min-height: 120px; resize: vertical; }
.submit-btn {
    padding: 12px 20px; border-radius: var(--radius, 10px);
    background: var(--accent); color: #fff; font-weight: 700;
    transition: all .15s ease; border: none; cursor: pointer;
}
.submit-btn:hover { background: var(--accent-hover); transform: translateY(-2px); }
.form-message { padding: 12px 14px; border-radius: var(--radius, 10px); font-size: 0.9rem; margin-top: 10px; }
.form-message.success { background: rgba(16, 185, 129, 0.1); color: #10b981; border: 1px solid #10b981; }
.form-message.error { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid #ef4444; }

/* Bonus list / casinos page reuse same patterns */
.bonus-list-content,
.casinos-content { padding: 48px 0 64px; }
.bonus-card,
.casino-list-card {
    background: var(--bg-card, var(--bg-soft, #fff));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg, 16px);
    padding: 24px;
    margin-bottom: 16px;
}

@media (max-width: 800px) {
    .contact-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
}


/* ============================================================
   Cookie Banner (bottom-fixed, non-blocking)
   ============================================================ */
.cookie-banner {
    display: none;
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    z-index: 90;
    max-width: 560px;
    width: calc(100% - 32px);
    background: var(--bg-card, var(--bg-soft, #fff));
    color: var(--text, #14181f);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: var(--radius-lg, 16px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}
.cookie-banner.active { display: block; }
.cookie-banner-content { padding: 18px 20px; }
.cookie-banner-content h4 { margin: 0 0 8px; font-size: 1rem; font-weight: 700; color: var(--text); }
.cookie-banner-content p { margin: 0 0 12px; font-size: 0.875rem; color: var(--text-muted, var(--text)); line-height: 1.5; }
.cookie-banner-content a { color: var(--accent); text-decoration: underline; }
.cookie-banner-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-banner-actions .popup-btn { flex: 1; min-width: 130px; padding: 10px 14px; font-size: 0.875rem; }

@media (max-width: 540px) {
    .cookie-banner { bottom: 8px; }
    .cookie-banner-actions .popup-btn { min-width: 100%; }
}


/* ============================================================
   Compliance: advertorial banner + CTA labels + cookie config
   ============================================================ */
.advertorial-disclosure {
    background: var(--bg-elevated, #fff7ed);
    color: var(--text-muted, #92400e);
    border-bottom: 1px solid var(--border, #fed7aa);
    font-size: 0.78rem;
    line-height: 1.5;
}
.advertorial-disclosure p {
    margin: 0;
    padding: 10px 0;
    color: inherit;
    text-align: center;
}
.advertorial-disclosure strong { color: var(--text, var(--accent, #d97706)); }

/* CTA "Publicidad" small label */
.cta-wrapper { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.ad-label,
.card-cta .ad-label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim, #6b7280);
    text-align: center;
    margin-top: 4px;
    opacity: 0.75;
}

/* Ghost button variant for "Configurar" */
.popup-btn.ghost {
    background: transparent;
    color: var(--text, #374151);
    border: 1px solid var(--border, #d1d5db);
}
.popup-btn.ghost:hover { background: var(--bg-soft, var(--bg-elevated, #f3f4f6)); }

/* Cookie configuration modal — toggles */
.cookie-config-body { text-align: left; padding: 8px 24px 16px; max-height: 60vh; overflow-y: auto; }
.cookie-category { padding: 14px 0; border-bottom: 1px solid var(--border, #e5e7eb); }
.cookie-category:last-child { border-bottom: none; }
.cookie-category-row { display: flex; align-items: flex-start; gap: 14px; }
.cookie-category-text strong { display: block; font-size: 0.95rem; color: var(--text); margin-bottom: 4px; }
.cookie-category-text small { color: var(--text-muted); font-size: 0.82rem; line-height: 1.45; }

.cookie-toggle {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
    width: 44px;
    height: 24px;
}
.cookie-toggle input { opacity: 0; width: 0; height: 0; }
.cookie-toggle .toggle-slider {
    position: absolute; cursor: pointer; inset: 0;
    background: var(--border, #d1d5db);
    border-radius: 999px;
    transition: background-color .15s ease;
}
.cookie-toggle .toggle-slider::before {
    content: ""; position: absolute;
    top: 3px; left: 3px;
    width: 18px; height: 18px;
    background: #fff;
    border-radius: 999px;
    transition: transform .15s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.cookie-toggle input:checked + .toggle-slider { background: var(--accent); }
.cookie-toggle input:checked + .toggle-slider::before { transform: translateX(20px); }
.cookie-toggle.disabled .toggle-slider { opacity: 0.5; cursor: not-allowed; }


/* === Logo: icon + brand wordmark (template A) === */
.logo a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}
.logo .brand-icon {
    height: 44px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}
.logo .brand-text {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    background: linear-gradient(135deg, #fff 30%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
@media (max-width: 540px) {
    .logo .brand-text { display: none; }
}


/* === Scroll lock (class-based, easier to debug than inline style) === */
html, body { overflow-x: hidden; }
body.scroll-locked { overflow: hidden !important; }

/* === Popup overlay (positioning + card styling) === */
.popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(6, 8, 12, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.popup-overlay.active {
    display: flex;
}
.popup-overlay .popup-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    max-width: 460px;
    width: 100%;
    border-radius: var(--radius-lg, 16px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    overflow: hidden;
}
.popup-overlay .popup-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}
.popup-overlay .popup-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}
.popup-overlay .popup-body {
    padding: 24px;
    text-align: center;
}
.popup-overlay .popup-body p {
    color: var(--text-muted);
    margin: 0;
}
.popup-overlay .age-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 800;
    font-size: 1.25rem;
    border-radius: 999px;
    margin-bottom: 16px;
}
.popup-overlay .popup-footer {
    display: flex;
    gap: 10px;
    padding: 16px 24px 24px;
}
.popup-overlay .popup-btn {
    flex: 1;
    padding: 12px 16px;
    border-radius: var(--radius, 10px);
    font-weight: 600;
    transition: all .15s ease;
    cursor: pointer;
    border: none;
}
.popup-overlay .popup-btn.primary {
    background: var(--accent);
    color: #fff;
}
.popup-overlay .popup-btn.primary:hover {
    background: var(--accent-hover);
}
.popup-overlay .popup-btn.secondary {
    background: var(--bg-elevated);
    color: var(--text);
    border: 1px solid var(--border);
}
.popup-overlay .popup-btn.secondary:hover {
    background: var(--border);
}
.popup-overlay .popup-btn.ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.popup-overlay .popup-btn.ghost:hover {
    background: var(--bg-elevated);
}
.popup-overlay .cookie-config-body {
    padding: 8px 24px 16px;
    text-align: left;
    max-height: 60vh;
    overflow-y: auto;
}
