/*
Theme Name: PWS Condomínios
Theme URI: https://pwscondominios.com.br
Author: PWS Platform Workflow System
Author URI: https://pwscondominios.com.br
Description: Tema oficial do Sistema PWS Condomínios. Inclui páginas públicas (home, planos, contato) e templates dedicados para os portais (sem header/footer do tema).
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: pws-theme
*/

/* Bloqueio global de scroll horizontal acidental */
html, body { max-width: 100%; overflow-x: hidden; }
img { max-width: 100%; height: auto; }

/* Variáveis idênticas ao plugin (ARCHITECTURE #6) */
:root {
    --pws-primary:        #1e3a5f;
    --pws-primary-light:  #2563a8;
    --pws-primary-dark:   #122742;
    --pws-secondary:      #10b981;
    --pws-accent:         #f59e0b;
    --pws-danger:         #ef4444;
    --pws-warning:        #f59e0b;
    --pws-info:           #3b82f6;
    --pws-success:        #10b981;
    --pws-bg:             #f3f4f6;
    --pws-card-bg:        #ffffff;
    --pws-border:         #e5e7eb;
    --pws-text:           #1f2937;
    --pws-text-muted:     #6b7280;
    --pws-radius:         10px;
    --pws-shadow:         0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --pws-shadow-lg:      0 10px 25px -5px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
}

/* Reset apenas no contexto público (NÃO global!) — escopado em .pws-public */
.pws-public, .pws-public * { box-sizing: border-box; }
.pws-public { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: var(--pws-text); line-height: 1.6; }
.pws-public h1, .pws-public h2, .pws-public h3, .pws-public h4, .pws-public p, .pws-public ul { margin: 0; padding: 0; }
.pws-public ul { list-style: none; }
.pws-public a { color: var(--pws-primary); text-decoration: none; }
.pws-public img { max-width: 100%; height: auto; display: block; }

.pws-public .container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.pws-public .section { padding: 80px 0; }
.pws-public .section-title { font-size: 36px; font-weight: 800; color: var(--pws-primary); text-align: center; margin-bottom: 14px; }
.pws-public .section-subtitle { text-align: center; color: var(--pws-text-muted); font-size: 16px; margin-bottom: 50px; max-width: 700px; margin-left: auto; margin-right: auto; }

/* HEADER público */
.pws-public-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.pws-public-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.pws-public-header .pws-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--pws-primary);
    font-size: 20px;
    font-weight: 800;
}
.pws-public-header .pws-logo i { font-size: 28px; color: var(--pws-primary-light); }
.pws-public-header .pws-logo small { color: var(--pws-text-muted); font-size: 11px; font-weight: 500; display: block; }
.pws-public-header nav ul {
    display: flex;
    align-items: center;
    gap: 6px;
}
.pws-public-header nav a {
    padding: 8px 14px;
    border-radius: 6px;
    color: var(--pws-text);
    font-size: 14px;
    font-weight: 500;
    transition: .2s;
}
.pws-public-header nav a:hover { background: var(--pws-bg); color: var(--pws-primary); }
.pws-public-header nav a.cta {
    background: var(--pws-secondary);
    color: #fff !important;
    padding: 10px 18px;
}
.pws-public-header nav a.cta:hover { background: #059669; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16,185,129,.4); }
.pws-public-header nav a.cta-outline {
    color: var(--pws-secondary);
    border: 2px solid var(--pws-secondary);
    font-weight: 600;
}
.pws-public-header nav a.cta-outline:hover { background: var(--pws-secondary); color: #fff; }

/* HERO */
.pws-hero {
    background: linear-gradient(135deg, var(--pws-primary) 0%, #2563a8 60%, #10b981 100%);
    color: #fff;
    padding: 100px 0 120px;
    text-align: center;
}
.pws-hero h1 { font-size: 52px; font-weight: 900; line-height: 1.1; margin-bottom: 20px; }
.pws-hero h1 span { background: linear-gradient(120deg, #fff, var(--pws-accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pws-hero p { font-size: 19px; opacity: .92; max-width: 720px; margin: 0 auto 36px; }
.pws-hero-btns { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* BOTÕES públicos */
.pws-public .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    transition: .25s;
    cursor: pointer;
    border: 0;
    text-decoration: none;
}
.pws-public .btn-primary { background: var(--pws-secondary); color: #fff; }
.pws-public .btn-primary:hover { background: #059669; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(16,185,129,.4); }
.pws-public .btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.5); }
.pws-public .btn-outline:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.pws-public .btn-dark { background: var(--pws-primary); color: #fff; }
.pws-public .btn-dark:hover { background: var(--pws-primary-dark); }
.pws-public .btn-lg { padding: 16px 36px; font-size: 17px; }

/* FEATURES */
.pws-features { background: var(--pws-bg); }
.pws-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.pws-feature {
    background: #fff;
    border-radius: 14px;
    padding: 32px 26px;
    box-shadow: var(--pws-shadow);
    text-align: center;
    transition: .3s;
}
.pws-feature:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0,0,0,.1); }
.pws-feature .icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--pws-primary), var(--pws-primary-light));
    border-radius: 16px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 26px;
}
.pws-feature h3 { color: var(--pws-primary); font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.pws-feature p { color: var(--pws-text-muted); font-size: 14px; line-height: 1.6; }

/* COMO FUNCIONA */
.pws-how { background: #fff; }
.pws-how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; }
.pws-how-item { text-align: center; }
.pws-how-item .num {
    width: 56px;
    height: 56px;
    background: var(--pws-primary);
    color: #fff;
    border-radius: 50%;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 22px;
}
.pws-how-item h4 { color: var(--pws-primary); margin-bottom: 8px; font-size: 16px; }
.pws-how-item p  { color: var(--pws-text-muted); font-size: 14px; }

/* PLANOS */
.pws-plans { background: var(--pws-bg); }
.pws-plan-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px 32px;
    max-width: 420px;
    margin: 0 auto;
    box-shadow: var(--pws-shadow-lg);
    border-top: 5px solid var(--pws-secondary);
}
.pws-plan-card h3 { color: var(--pws-primary); font-size: 22px; text-align: center; margin-bottom: 8px; }
.pws-plan-card .price { text-align: center; margin: 16px 0 28px; }
.pws-plan-card .price .val { font-size: 48px; color: var(--pws-primary); font-weight: 900; }
.pws-plan-card .price .per { color: var(--pws-text-muted); font-size: 14px; }
.pws-plan-card ul { margin-bottom: 28px; }
.pws-plan-card ul li {
    padding: 10px 0;
    border-bottom: 1px solid var(--pws-border);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.pws-plan-card ul li i { color: var(--pws-secondary); }

/* CONTATO */
.pws-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}
.pws-contact-info h3 { color: var(--pws-primary); font-size: 22px; margin-bottom: 14px; }
.pws-contact-info p  { color: var(--pws-text-muted); margin-bottom: 20px; }
.pws-contact-info .detail {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--pws-border);
    font-size: 14px;
}
.pws-contact-info .detail i { color: var(--pws-primary); font-size: 18px; width: 24px; text-align: center; }
.pws-contact-form { background: #fff; padding: 32px; border-radius: 14px; box-shadow: var(--pws-shadow); }
.pws-contact-form input,
.pws-contact-form select,
.pws-contact-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--pws-border);
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 14px;
    font-family: inherit;
    box-sizing: border-box;
}
.pws-contact-form button {
    width: 100%;
    padding: 14px;
    background: var(--pws-primary);
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s;
}
.pws-contact-form button:hover { background: var(--pws-primary-dark); }

/* CTA bar */
.pws-cta-bar {
    background: linear-gradient(135deg, var(--pws-primary) 0%, var(--pws-primary-light) 100%);
    color: #fff;
    text-align: center;
    padding: 70px 0;
}
.pws-cta-bar h2 { font-size: 34px; margin-bottom: 14px; font-weight: 800; }
.pws-cta-bar p  { font-size: 17px; opacity: .92; margin-bottom: 28px; }

/* FOOTER */
.pws-public-footer {
    background: var(--pws-primary-dark);
    color: rgba(255,255,255,.85);
    padding: 60px 0 24px;
}
.pws-public-footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; font-weight: 700; }
.pws-public-footer ul li { padding: 5px 0; font-size: 13.5px; }
.pws-public-footer a { color: rgba(255,255,255,.7); transition: .2s; }
.pws-public-footer a:hover { color: var(--pws-secondary); }
.pws-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.pws-footer-grid p { font-size: 13.5px; line-height: 1.6; color: rgba(255,255,255,.7); margin-top: 12px; }
.pws-footer-bottom {
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,.1);
    text-align: center;
    font-size: 12.5px;
    color: rgba(255,255,255,.6);
}

/* Página genérica */
.pws-page-content { padding: 60px 0; min-height: 60vh; }
.pws-page-content h1 { color: var(--pws-primary); font-size: 36px; margin-bottom: 24px; }

/* Condomínio landing */
.pws-cond-hero {
    background: linear-gradient(135deg, var(--pws-primary), var(--pws-primary-light));
    color: #fff;
    padding: 80px 0;
    text-align: center;
}
.pws-cond-hero h1 { font-size: 42px; font-weight: 800; margin-bottom: 12px; }

/* Página /condominio — grids responsivos */
.pws-cond-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}
.pws-cond-title { font-size: 30px; color: var(--pws-primary); margin-bottom: 16px; font-weight: 800; }
.pws-cond-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* Botão hamburger — escondido no desktop */
.pws-menu-toggle {
    display: none;
    background: transparent;
    border: 0;
    width: 40px;
    height: 40px;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
}
.pws-menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--pws-primary, #1e3a5f);
    border-radius: 2px;
    transition: transform .2s, opacity .2s;
}
.pws-public-header.is-open .pws-menu-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.pws-public-header.is-open .pws-menu-toggle span:nth-child(2) { opacity: 0; }
.pws-public-header.is-open .pws-menu-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Responsividade */
@media (max-width: 900px) {
    .pws-public-header .container {
        height: auto;
        min-height: 60px;
        flex-wrap: wrap;
        padding: 10px 16px;
        position: relative;
    }
    .pws-public-header .pws-logo span { font-size: 16px; }
    .pws-public-header .pws-logo small { display: none; }
    .pws-public-header .pws-logo i { font-size: 24px; }
    .pws-menu-toggle { display: flex; }

    /* Nav escondido por padrão no mobile, aparece quando hamburger toggled */
    .pws-public-header nav {
        display: none;
        width: 100%;
        order: 3;
    }
    .pws-public-header.is-open nav { display: block; }
    .pws-public-header nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 10px 0 6px;
        border-top: 1px solid var(--pws-border, #e5e7eb);
        margin-top: 8px;
    }
    .pws-public-header nav a {
        display: block;
        padding: 12px 14px;
        font-size: 15px;
        border-radius: 6px;
    }
    .pws-public-header nav a.cta {
        text-align: center;
        margin-top: 4px;
    }

    .pws-hero h1 { font-size: 32px; line-height: 1.15; }
    .pws-hero p  { font-size: 15px; }
    .pws-contact-grid, .pws-footer-grid { grid-template-columns: 1fr; }
    .pws-cond-split { grid-template-columns: 1fr; gap: 30px; }
    .pws-cond-title { font-size: 24px; }
    .pws-public .section { padding: 40px 0; }
    .pws-public .section-title { font-size: 26px; }
    .pws-cond-hero h1 { font-size: 30px; }
}

@media (max-width: 480px) {
    .pws-hero h1 { font-size: 28px; }
    .pws-public-header .pws-logo span { font-size: 15px; }
    .container { padding: 0 14px; }
}
