/* ============================================= */
/* DopoQuanto - Shared Styles                    */
/* Used by all pages (homepage, privacy, etc.)   */
/* ============================================= */

:root {
    /* Semaforo */
    --green-ok: #22C55E;
    --yellow-warning: #EAB308;
    --red-urgent: #EF4444;
    /* Brand */
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --primary-light: rgba(79, 70, 229, 0.08);
    --secondary: #0D9488;
    --accent: #F59E0B;
    /* Surfaces */
    --bg-white: #FAFAF9;
    --bg-gray-light: #F5F5F4;
    --bg-gray: #E7E5E4;
    /* Text */
    --text-primary: #1C1917;
    --text-secondary: #57534E;
    --text-tertiary: #78716C;
    --border-color: #D6D3D1;
    /* Elevation */
    --shadow-sm: 0 1px 3px rgba(28, 25, 23, 0.06), 0 1px 2px rgba(28, 25, 23, 0.04);
    --shadow-md: 0 4px 6px rgba(28, 25, 23, 0.05), 0 2px 4px rgba(28, 25, 23, 0.04);
    --shadow-lg: 0 10px 25px rgba(28, 25, 23, 0.08), 0 4px 10px rgba(28, 25, 23, 0.04);
    /* Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    /* Fonts */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Outfit', 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --green-ok: #4ADE80;
        --yellow-warning: #FACC15;
        --red-urgent: #F87171;
        --primary: #818CF8;
        --primary-hover: #6366F1;
        --primary-light: rgba(129, 140, 248, 0.12);
        --secondary: #2DD4BF;
        --accent: #FBBF24;
        --bg-white: #1C1917;
        --bg-gray-light: #292524;
        --bg-gray: #3A3633;
        --text-primary: #FAFAF9;
        --text-secondary: #A8A29E;
        --text-tertiary: #78716C;
        --border-color: #44403C;
        --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    }
}

/* Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-family);
    background: var(--bg-white);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-hover); }

h1, h2, h3 { font-family: var(--font-display); }
h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 600; line-height: 1.2; letter-spacing: -0.015em; }
h3 { font-size: 20px; font-weight: 600; line-height: 1.3; }

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

/* Header */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(250, 250, 249, 0.85); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-color);
    transition: box-shadow 0.3s;
}
.header.scrolled { box-shadow: 0 1px 12px rgba(0,0,0,0.06); }
@media (prefers-color-scheme: dark) {
    .header { background: rgba(28, 25, 23, 0.88); }
    .header.scrolled { box-shadow: 0 1px 12px rgba(0,0,0,0.3); }
}
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 64px; padding: 0 24px; max-width: 1200px; margin: 0 auto; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--text-primary); }
.logo:hover { color: var(--text-primary); }
.logo-icon { width: 36px; height: 36px; background: linear-gradient(135deg, var(--primary), #7C3AED); border-radius: 10px; display: flex; align-items: center; justify-content: center; padding: 5px; }
.logo-icon svg { width: 100%; height: 100%; }

.app-store-btn {
    display: inline-flex; align-items: center; gap: 12px;
    background: var(--text-primary); color: var(--bg-white);
    padding: 10px 20px; border-radius: var(--radius-md); font-weight: 500; transition: all 0.2s; font-size: 14px;
}
.app-store-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: var(--bg-white); }
.app-store-btn svg { width: 24px; height: 24px; }
.app-store-btn .btn-text { text-align: left; }
.app-store-btn .btn-text small { font-size: 10px; opacity: 0.8; display: block; }
.app-store-btn .btn-text span { font-size: 15px; font-weight: 600; }

/* Footer */
.footer { background: var(--bg-gray-light); padding: 60px 0 30px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand > p { font-size: 15px; max-width: 280px; color: var(--text-secondary); }
.footer-links h4 { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 20px; color: var(--text-primary); }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: var(--text-secondary); font-size: 15px; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { padding-top: 30px; border-top: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-bottom p { font-size: 14px; color: var(--text-secondary); }
.footer-social { display: flex; gap: 16px; }
.footer-social a { width: 40px; height: 40px; background: var(--bg-white); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); transition: all 0.2s; }
.footer-social a:hover { background: var(--primary); color: white; }
.footer-social svg { width: 20px; height: 20px; }

/* Page hero (subpages) */
.page-hero { padding: 120px 0 40px; background: var(--bg-white); }
.page-hero h1 { margin-bottom: 8px; }
.page-hero .last-updated { color: var(--text-secondary); font-size: 15px; }

/* Page content (subpages) */
.page-content-section { padding: 60px 0; background: var(--bg-white); }
.page-content { max-width: 800px; margin: 0 auto; }
.page-content h2 { font-size: 24px; font-weight: 600; margin: 40px 0 16px; color: var(--primary); }
.page-content h2:first-child { margin-top: 0; }
.page-content h3 { font-size: 18px; font-weight: 600; margin: 24px 0 12px; color: var(--text-primary); }
.page-content p { color: var(--text-secondary); margin-bottom: 16px; line-height: 1.7; }
.page-content p.intro { font-size: 18px; margin-bottom: 32px; }
.page-content ul, .page-content ol { color: var(--text-secondary); margin-bottom: 16px; padding-left: 24px; }
.page-content li { margin-bottom: 8px; line-height: 1.6; }
.page-content strong { color: var(--text-primary); }
.page-content table { width: 100%; border-collapse: collapse; margin: 20px 0; background: var(--bg-gray-light); border-radius: var(--radius-lg); overflow: hidden; }
.page-content th, .page-content td { padding: 16px; text-align: left; border-bottom: 1px solid var(--border-color); }
.page-content th { background: var(--bg-gray); font-weight: 600; color: var(--text-primary); }
.page-content td { color: var(--text-secondary); }
.page-content tr:last-child td { border-bottom: none; }

/* Special cards (privacy, terms) */
.owner-card { background: var(--bg-gray-light); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 32px; }
.owner-card h3 { margin: 0 0 12px; color: var(--text-primary); font-size: 18px; }
.owner-card p { margin-bottom: 4px; }
.no-collect { background: var(--bg-gray-light); border-radius: var(--radius-lg); padding: 24px; margin: 20px 0; }
.no-collect-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; color: var(--text-secondary); }
.no-collect-item .icon { color: #FF3B30; font-size: 18px; }
.legal-refs { background: var(--bg-gray-light); border-radius: var(--radius-lg); padding: 24px; margin: 20px 0; }
.legal-refs ul { list-style: none; padding: 0; margin: 0; }
.legal-refs li { padding: 8px 0; border-bottom: 1px solid var(--border-color); }
.legal-refs li:last-child { border-bottom: none; }
.copyright { text-align: center; color: var(--text-tertiary); font-style: italic; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border-color); }

/* Support-specific */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 32px 0 48px; }
.contact-card { background: var(--bg-gray-light); border-radius: var(--radius-lg); padding: 24px; text-align: center; transition: transform 0.2s, box-shadow 0.2s; }
.contact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.contact-icon { font-size: 32px; margin-bottom: 12px; }
.contact-card h3 { font-size: 16px; margin-bottom: 8px; color: var(--text-primary); }
.contact-card p { margin: 0; font-size: 15px; }
.support-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin: 32px 0 48px; }
.support-card { background: var(--bg-gray-light); border-radius: var(--radius-lg); padding: 28px; transition: transform 0.2s, box-shadow 0.2s; }
.support-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.support-card-icon { font-size: 40px; margin-bottom: 16px; }
.support-card h3 { font-size: 20px; margin-bottom: 12px; color: var(--text-primary); }
.support-card p { margin-bottom: 8px; }
.support-card .hint { font-size: 13px; color: var(--text-tertiary); margin-top: 12px; }
.app-info { background: var(--bg-gray-light); border-radius: var(--radius-lg); padding: 28px; margin-top: 32px; }
.app-info h3 { font-size: 18px; margin-bottom: 20px; color: var(--text-primary); }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.info-item { text-align: center; }
.info-item .label { display: block; font-size: 13px; color: var(--text-tertiary); margin-bottom: 4px; }
.info-item .value { font-size: 16px; font-weight: 600; color: var(--text-primary); }

/* FAQ (subpages) */
.faq-list { margin: 24px 0 48px; }
.faq-item { border-bottom: 1px solid var(--border-color); }
.faq-question { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 20px 0; background: none; border: none; cursor: pointer; text-align: left; font-size: 17px; font-weight: 600; color: var(--text-primary); font-family: inherit; }
.faq-question:hover { color: var(--primary); }
.faq-icon { width: 24px; height: 24px; position: relative; flex-shrink: 0; }
.faq-icon::before, .faq-icon::after { content: ''; position: absolute; background: currentColor; transition: transform 0.3s; }
.faq-icon::before { width: 14px; height: 2px; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.faq-icon::after { width: 2px; height: 14px; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.faq-item.active .faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s, padding 0.3s; }
.faq-item.active .faq-answer { max-height: 300px; padding-bottom: 20px; }
.faq-answer p { font-size: 16px; line-height: 1.7; margin: 0; }

/* Responsive */
@media (max-width: 1024px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 768px) {
    .page-hero { padding: 100px 0 30px; }
    .page-content-section { padding: 40px 0; }
    .contact-grid { grid-template-columns: 1fr; }
    .support-cards { grid-template-columns: 1fr; }
    .info-grid { grid-template-columns: 1fr; gap: 16px; }
    .footer-inner { grid-template-columns: 1fr; text-align: center; }
    .footer-brand > p { margin: 0 auto; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .app-store-btn .btn-text { display: none; }
}
