/* css/style.css */

/* ---------------------------------------------------------------------------
   Theme tokens — MercadosPredicciones (es-MX).
   Base color is the Mexican flag green (#006847). Retune the whole site from
   here: every component references these variables, no scattered hex.
   --------------------------------------------------------------------------- */
:root {
    --brand: #006847;          /* Mexican flag green — primary (buttons, links, borders) */
    --brand-dark: #00492f;     /* darker green — hovers */
    --accent: #4ecca3;         /* mint accent — logo, footer headings, standout CTA */
    --accent-dark: #45b88f;    /* mint accent hover */
    --ink: #12261c;            /* deep green-charcoal — dark header/footer + headings */
    --surface: #f8f9fa;        /* light section background */
    --border: #e6e8ee;         /* hairline borders */
    --hero-grad: linear-gradient(135deg, #007a4d 0%, #00492f 100%);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: var(--ink);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.main-nav a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: var(--accent);
}

/* Hero Section */
.hero {
    background: var(--hero-grad);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

/* Country Grid */
.country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.country-card {
    background: white;
    color: #333;
    padding: 2rem;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.country-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.country-card .flag {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.country-card h3 {
    margin-bottom: 0.5rem;
    color: var(--ink);
}

.country-card p {
    color: #666;
}

/* Content Sections */
section {
    padding: 4rem 0;
}

section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--ink);
}

.content-box {
    max-width: 800px;
    margin: 0 auto;
}

.lead {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.feature-list {
    list-style: none;
    margin: 2rem 0;
}

.feature-list li {
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--surface);
    border-left: 4px solid var(--brand);
    border-radius: 4px;
}

/* Buttons */
.cta-button {
    display: inline-block;
    background: var(--brand);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.cta-button:hover {
    background: var(--brand-dark);
}

.cta-button-large {
    display: inline-block;
    background: var(--brand);
    color: white;
    padding: 1rem 3rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.125rem;
    transition: background 0.3s;
}

.cta-button-large:hover {
    background: var(--brand-dark);
}

/* Accent "primary" CTA — the standout conversion button used on platform
   reviews and Polymarket country subpages (green on the purple hero). */
.cta-button.primary {
    background: var(--accent);
    color: var(--ink);
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-top: 1rem;
    transition: all 0.3s;
}

.cta-button.primary:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
}

/* Bottom "Pronto para começar?" CTA box (reviews + country subpages). */
.bottom-cta {
    margin: 3rem 0;
}

.cta-box {
    background: var(--hero-grad);
    color: white;
    padding: 3rem;
    border-radius: 12px;
    text-align: center;
}

.cta-box h3 {
    color: white;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

/* Platform Grid */
.platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.platform-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s;
}

.platform-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.platform-card h3 {
    margin-bottom: 1rem;
    color: var(--ink);
}

.platform-desc {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.platform-features {
    list-style: none;
    margin: 1.5rem 0;
}

.platform-features li {
    padding: 0.5rem 0;
    color: #666;
}

.platform-link {
    color: var(--brand);
    text-decoration: none;
    font-weight: 600;
}

.platform-link:hover {
    text-decoration: underline;
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.step {
    text-align: center;
    padding: 2rem;
}

.step-number {
    display: inline-block;
    width: 60px;
    height: 60px;
    line-height: 60px;
    background: var(--brand);
    color: white;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.step h3 {
    margin-bottom: 0.5rem;
    color: var(--ink);
}

.step p {
    color: #666;
}

/* FAQ Section */
.faq-section {
    background: var(--surface);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.faq-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.faq-item h3 {
    margin-bottom: 1rem;
    color: var(--ink);
    font-size: 1.125rem;
}

.faq-item p {
    margin-bottom: 1rem;
    color: #666;
    line-height: 1.6;
}

.faq-link {
    color: var(--brand);
    text-decoration: none;
    font-weight: 600;
}

.faq-link:hover {
    text-decoration: underline;
}

/* Trust Section */
.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.trust-item {
    text-align: center;
    padding: 2rem;
}

.trust-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.trust-item h3 {
    margin-bottom: 1rem;
    color: var(--ink);
}

.trust-item p {
    color: #666;
    line-height: 1.6;
}

/* Section Footer */
.section-footer {
    text-align: center;
    margin-top: 3rem;
}

.view-all {
    color: var(--brand);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.125rem;
}

.view-all:hover {
    text-decoration: underline;
}

/* Footer */
.site-footer {
    background: var(--ink);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--accent);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
}

.footer-section a:hover {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 2rem;
    text-align: center;
    color: #999;
}

.disclaimer {
    font-size: 0.875rem;
    margin-top: 1rem;
    font-style: italic;
}

/* Affiliate disclosure — small, muted line placed near affiliate CTAs/links.
   Inherits its color from context so it reads on both the purple hero (white
   text) and light content areas. */
.affiliate-disclosure {
    font-size: 0.8rem;
    line-height: 1.4;
    margin-top: 0.75rem;
    opacity: 0.85;
    max-width: 60ch;
}

.affiliate-disclosure a {
    color: inherit;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .country-grid {
        grid-template-columns: 1fr;
    }
    
    .main-nav {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Country Page Specific Styles */
.country-hero {
    background: var(--hero-grad);
    padding: 3rem 0;
}

.country-content {
    padding: 3rem 0;
}

.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.intro {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: #555;
}

.intro a {
    color: var(--brand);
    text-decoration: none;
    font-weight: 600;
}

.intro a:hover {
    text-decoration: underline;
}

.country-content h2 {
    color: var(--ink);
    font-size: 1.75rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--brand);
}

.country-content h3 {
    color: var(--ink);
    font-size: 1.375rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.country-content h4 {
    color: #333;
    font-size: 1.125rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.country-content p {
    line-height: 1.8;
    margin-bottom: 1rem;
    color: #444;
}

.country-content ul {
    margin: 1rem 0 1.5rem 1.5rem;
    line-height: 1.8;
}

.country-content ul li {
    margin-bottom: 0.75rem;
    color: #444;
}

.platforms-list,
.future-operators,
.active-markets {
    background: var(--surface);
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.platforms-list h3,
.future-operators h3,
.active-markets h3 {
    color: var(--brand);
    margin-top: 1.5rem;
}

.platforms-list h3:first-child {
    margin-top: 0;
}

.recommended-platforms {
    max-width: 900px;
    margin: 2rem auto;
}

.cta-section {
    background: var(--hero-grad);
    color: white;
    padding: 3rem 2rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 3rem;
}

.cta-section h2 {
    color: white;
    border-bottom: none;
    margin-top: 0;
}

/* Body copy inside the CTA box sits on the dark green gradient, so it must be
   light — otherwise it inherits the dark .country-content p color (#444) and
   drops to an unreadable low-contrast grey-on-green. */
.cta-section p {
    color: #fff;
}

.cta-section a {
    color: #fff;
    text-decoration: underline;
    font-weight: 600;
}

.cta-section a:hover {
    color: var(--accent);
}

/* Polymarket live embed */
.polymarket-embed {
    margin: 2rem 0;
    text-align: center;
}

.polymarket-embed iframe {
    max-width: 100%;
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.polymarket-embed figcaption {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
}

.polymarket-embed .embed-snapshot {
    font-size: 0.85rem;
    color: #777;
}

.polymarket-embed figcaption a {
    color: var(--brand);
    font-weight: 600;
    text-decoration: none;
}

.polymarket-embed figcaption a:hover {
    text-decoration: underline;
}

/* Featured (hero) embed — the headline market on a topic page */
.polymarket-embed--featured {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0 2.5rem;
}

.polymarket-embed--featured iframe {
    width: 100%;
    box-shadow: none;
}

/* Grid of smaller example markets */
.embed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0 2rem;
}

.embed-grid .polymarket-embed {
    margin: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem;
}

.embed-grid .polymarket-embed iframe {
    width: 100%;
}