/*
Theme Name: CasoUrgente Child
Template: generatepress
Description: Child theme do CasoUrgente.pt baseado em GeneratePress
Version: 1.0.0
Author: MCCV Global Lda
Text Domain: casourgente-child
*/

/* ── Variáveis ──────────────────────────────────────────────────────────────── */
:root {
    --co-red:        #E63030;
    --co-red-dark:   #c41a1a;
    --co-red-light:  #fff0f0;
    --co-text:       #1A1A1A;
    --co-muted:      #666;
    --co-border:     #e0e0e0;
    --co-bg:         #f8f8f8;
    --co-white:      #ffffff;
    --co-radius:     8px;
    --co-shadow:     0 2px 12px rgba(0,0,0,.08);
    --co-font:       'Inter', system-ui, -apple-system, sans-serif;
    --co-max:        1200px;
}

/* ── Reset / Base ────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--co-font);
    color: var(--co-text);
    background: var(--co-white);
    line-height: 1.65;
}

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

a { color: var(--co-red); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Tipografia ──────────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--co-text);
}

h1 { font-size: clamp(28px, 5vw, 48px); }
h2 { font-size: clamp(22px, 4vw, 36px); }
h3 { font-size: clamp(18px, 3vw, 24px); }

/* ── Header ──────────────────────────────────────────────────────────────────── */
.site-header {
    background: var(--co-white);
    border-bottom: 2px solid var(--co-red);
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Número de telefone no header */
.co-header-tel {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 17px;
    color: var(--co-red);
    text-decoration: none;
}
.co-header-tel:hover { color: var(--co-red-dark); text-decoration: none; }
.co-header-tel::before { content: "📞"; }

/* ── Hero / Banner de urgência ───────────────────────────────────────────────── */
.co-hero {
    background: linear-gradient(135deg, var(--co-red) 0%, #a00000 100%);
    color: var(--co-white);
    padding: 64px 24px;
    text-align: center;
}

.co-hero h1 { color: var(--co-white); margin-bottom: 16px; }
.co-hero p  { font-size: 18px; opacity: .9; max-width: 600px; margin: 0 auto 32px; }

/* ── Botão principal ─────────────────────────────────────────────────────────── */
.co-btn,
.co-btn-primary {
    display: inline-block;
    background: var(--co-red);
    color: var(--co-white);
    font-weight: 700;
    font-size: 16px;
    padding: 14px 32px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s, transform .15s, box-shadow .2s;
    box-shadow: 0 4px 16px rgba(230,48,48,.35);
}

.co-btn:hover,
.co-btn-primary:hover {
    background: var(--co-red-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230,48,48,.45);
    color: var(--co-white);
    text-decoration: none;
}

.co-btn-lg {
    font-size: 18px;
    padding: 18px 40px;
}

/* ── Cards de benefícios (3 colunas) ─────────────────────────────────────────── */
.co-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    padding: 48px 24px;
    max-width: var(--co-max);
    margin: 0 auto;
}

.co-benefit-card {
    background: var(--co-white);
    border: 1px solid var(--co-border);
    border-radius: var(--co-radius);
    padding: 28px 24px;
    text-align: center;
    box-shadow: var(--co-shadow);
    transition: transform .2s, box-shadow .2s;
}

.co-benefit-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
}

.co-benefit-card .co-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 12px;
}

.co-benefit-card h3 {
    font-size: 17px;
    margin-bottom: 8px;
}

.co-benefit-card p {
    font-size: 14px;
    color: var(--co-muted);
    margin: 0;
}

/* ── Secção do formulário ─────────────────────────────────────────────────────── */
.co-form-section {
    background: var(--co-bg);
    padding: 64px 24px;
}

.co-form-section h2 {
    text-align: center;
    margin-bottom: 8px;
}

.co-form-section .co-subtitle {
    text-align: center;
    color: var(--co-muted);
    margin-bottom: 40px;
    font-size: 16px;
}

.co-form-wrap {
    background: var(--co-white);
    max-width: 600px;
    margin: 0 auto;
    border-radius: var(--co-radius);
    padding: 40px 36px;
    box-shadow: var(--co-shadow);
    border-top: 4px solid var(--co-red);
}

/* ── Estilos WPForms ─────────────────────────────────────────────────────────── */
.wpforms-form .wpforms-field { margin-bottom: 20px !important; }

.wpforms-form label {
    font-weight: 600 !important;
    font-size: 14px !important;
    color: var(--co-text) !important;
    margin-bottom: 6px !important;
    display: block;
}

.wpforms-form input[type="text"],
.wpforms-form input[type="tel"],
.wpforms-form input[type="email"],
.wpforms-form select,
.wpforms-form textarea {
    width: 100% !important;
    padding: 12px 14px !important;
    border: 1.5px solid var(--co-border) !important;
    border-radius: var(--co-radius) !important;
    font-size: 15px !important;
    font-family: var(--co-font) !important;
    color: var(--co-text) !important;
    background: var(--co-white) !important;
    transition: border-color .2s !important;
    -webkit-appearance: none;
    appearance: none;
}

.wpforms-form input:focus,
.wpforms-form select:focus,
.wpforms-form textarea:focus {
    border-color: var(--co-red) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(230,48,48,.12) !important;
}

.wpforms-form textarea { min-height: 100px !important; resize: vertical !important; }

/* Radio buttons de urgência */
.wpforms-form .wpforms-field-radio .choice-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1.5px solid var(--co-border);
    border-radius: var(--co-radius);
    margin-bottom: 8px !important;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}

.wpforms-form .wpforms-field-radio .choice-item:has(input:checked) {
    border-color: var(--co-red);
    background: var(--co-red-light);
}

/* Botão submit */
.wpforms-form .wpforms-submit-container { margin-top: 8px !important; }

.wpforms-form button[type="submit"],
.wpforms-form input[type="submit"] {
    width: 100% !important;
    background: var(--co-red) !important;
    color: var(--co-white) !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    padding: 16px !important;
    border-radius: 50px !important;
    border: none !important;
    cursor: pointer !important;
    transition: background .2s, transform .15s !important;
    box-shadow: 0 4px 16px rgba(230,48,48,.35) !important;
}

.wpforms-form button[type="submit"]:hover {
    background: var(--co-red-dark) !important;
    transform: translateY(-2px) !important;
}

/* Checkbox GDPR */
.wpforms-form .wpforms-field-checkbox .choice-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.wpforms-form .wpforms-field-checkbox input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--co-red);
}

/* ── FAQ ─────────────────────────────────────────────────────────────────────── */
.co-faq { max-width: 760px; margin: 0 auto; padding: 48px 24px; }
.co-faq h2 { text-align: center; margin-bottom: 32px; }

.co-faq-item {
    border-bottom: 1px solid var(--co-border);
    padding: 0;
}

.co-faq-question {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 18px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--co-text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.co-faq-question::after { content: "+"; font-size: 22px; color: var(--co-red); flex-shrink: 0; }
.co-faq-item.open .co-faq-question::after { content: "−"; }

.co-faq-answer {
    display: none;
    padding-bottom: 16px;
    color: var(--co-muted);
    font-size: 15px;
    line-height: 1.7;
}

.co-faq-item.open .co-faq-answer { display: block; }

/* ── Botão flutuante WhatsApp ─────────────────────────────────────────────────── */
.co-whatsapp-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    background: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 4px 20px rgba(37,211,102,.4);
    transition: transform .2s, box-shadow .2s;
}

.co-whatsapp-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(37,211,102,.5);
    color: #fff;
    text-decoration: none;
}

.co-whatsapp-btn img { width: 24px; height: 24px; }

@media (max-width: 600px) {
    .co-whatsapp-btn span { display: none; }
    .co-whatsapp-btn { padding: 14px; border-radius: 50%; bottom: 16px; right: 16px; }
}

/* ── Secção de problemas que resolvemos ──────────────────────────────────────── */
.co-problems {
    padding: 48px 24px;
    max-width: var(--co-max);
    margin: 0 auto;
}

.co-problems h2 { margin-bottom: 24px; }

.co-problems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.co-problem-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--co-bg);
    border-radius: var(--co-radius);
    border-left: 3px solid var(--co-red);
    font-size: 14px;
    font-weight: 500;
}

.co-problem-item::before { content: "✓"; color: var(--co-red); font-weight: 700; flex-shrink: 0; }

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.site-footer {
    background: #1a1a1a;
    color: #ccc;
    padding: 32px 24px;
    text-align: center;
    font-size: 14px;
}

.site-footer a { color: #aaa; }
.site-footer a:hover { color: #fff; }
.site-footer .footer-links { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; margin-bottom: 12px; }

/* ── Página /obrigado/ ───────────────────────────────────────────────────────── */
.co-obrigado {
    text-align: center;
    padding: 80px 24px;
    max-width: 600px;
    margin: 0 auto;
}

.co-obrigado .co-check {
    font-size: 72px;
    display: block;
    margin-bottom: 24px;
    animation: co-bounce .6s ease;
}

@keyframes co-bounce {
    0%   { transform: scale(0); }
    70%  { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.co-obrigado h1 { color: var(--co-red); margin-bottom: 16px; }
.co-obrigado p  { color: var(--co-muted); font-size: 17px; line-height: 1.7; }

/* ── Utilitários ─────────────────────────────────────────────────────────────── */
.co-container { max-width: var(--co-max); margin: 0 auto; padding: 0 24px; }
.co-center     { text-align: center; }
.co-section    { padding: 56px 0; }
.co-divider    { border: none; border-top: 1px solid var(--co-border); margin: 0; }

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .co-form-wrap { padding: 28px 20px; }
    .co-hero      { padding: 48px 20px; }
    .co-benefits  { padding: 32px 16px; }
}

@media (max-width: 480px) {
    .co-btn-lg { font-size: 16px; padding: 15px 28px; width: 100%; text-align: center; }
}
