/*
Theme Name: Ramondetti — Governança Familiar
Theme URI: https://lucianaramondetti.com.br
Author: Luciana Ramondetti
Description: Tema sob medida para Luciana Ramondetti — Governança Familiar. Gutenberg-first: todas as páginas são editadas pelo editor de blocos. Inclui CPT de Serviços, padrões de blocos, formulário de contato em AJAX e demo content.
Version: 3.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ramondetti
Tags: portfolio, blog, business, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, block-patterns, wide-blocks
*/

/* =========================================================
   BRAND TOKENS
   ========================================================= */
:root {
    --rm-primary: #49778F;
    --rm-primary-dark: #355A6E;
    --rm-accent: #74B6AA;
    --rm-bg-soft: #F9FAFB;
    --rm-text: #333333;
    --rm-text-soft: #6B7280;
    --rm-border: #E5E7EB;
    --rm-white: #FFFFFF;
    --rm-shadow: 0 4px 20px rgba(73, 119, 143, .08);
    --rm-radius: 8px;
    --rm-container: 1180px;
    --rm-narrow: 760px;
    --rm-font-head: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    --rm-font-body: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* =========================================================
   RESET / BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--rm-font-body);
    color: var(--rm-text);
    background: var(--rm-white);
    line-height: 1.65;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--rm-primary); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--rm-primary-dark); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--rm-font-head);
    color: var(--rm-primary);
    line-height: 1.25;
    margin: 0 0 .6em;
    font-weight: 600;
}
h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1.1em; }
blockquote {
    border-left: 4px solid var(--rm-accent);
    margin: 1.6em 0;
    padding: .4em 1.2em;
    color: var(--rm-text-soft);
    font-style: italic;
    background: var(--rm-bg-soft);
    border-radius: 0 var(--rm-radius) var(--rm-radius) 0;
}

.screen-reader-text {
    border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
    height: 1px; width: 1px; margin: -1px; overflow: hidden;
    padding: 0; position: absolute; word-wrap: normal !important;
}

/* =========================================================
   LAYOUT HELPERS
   ========================================================= */
.rm-container {
    max-width: var(--rm-container);
    margin: 0 auto;
    padding: 0 24px;
}
.rm-narrow {
    max-width: var(--rm-narrow);
    margin: 0 auto;
    padding: 60px 24px;
}

/* =========================================================
   HEADER
   ========================================================= */
.rm-site-header {
    background: var(--rm-white);
    border-bottom: 1px solid var(--rm-border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.rm-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    gap: 24px;
}
.rm-logo a {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--rm-font-head);
    font-weight: 700; font-size: 1.05rem;
    color: var(--rm-primary);
    text-decoration: none;
}
.rm-logo img { max-height: 56px; width: auto; }
.rm-logo-fallback {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 50%;
    background: linear-gradient(135deg, var(--rm-primary), var(--rm-accent));
    color: var(--rm-white); font-weight: 700; font-family: var(--rm-font-head);
    font-size: .95rem;
}
.rm-logo-text small {
    display: block; font-size: .72rem; font-weight: 500;
    color: var(--rm-text-soft); margin-top: 2px;
    letter-spacing: .04em; text-transform: uppercase;
}

.rm-nav {
    display: flex; align-items: center; gap: 28px;
}
.rm-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; }
.rm-nav a {
    color: var(--rm-text);
    font-weight: 500;
    font-size: .95rem;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
}
.rm-nav a:hover, .rm-nav .current-menu-item > a {
    color: var(--rm-primary);
    border-bottom-color: var(--rm-accent);
}
.rm-nav-cta {
    background: var(--rm-primary);
    color: var(--rm-white) !important;
    padding: 10px 18px !important;
    border-radius: 999px;
    border: 0 !important;
    font-weight: 600;
    font-size: .9rem;
}
.rm-nav-cta:hover {
    background: var(--rm-primary-dark) !important;
    color: var(--rm-white) !important;
    border: 0 !important;
}

.rm-menu-toggle {
    display: none; background: transparent; border: 0; cursor: pointer;
    padding: 6px; color: var(--rm-primary);
}
.rm-menu-toggle svg { width: 28px; height: 28px; }

@media (max-width: 860px) {
    .rm-menu-toggle { display: inline-flex; }
    .rm-nav {
        position: absolute; top: 100%; left: 0; right: 0;
        background: var(--rm-white); border-bottom: 1px solid var(--rm-border);
        flex-direction: column; padding: 16px 24px;
        gap: 10px; display: none;
    }
    .rm-nav.is-open { display: flex; }
    .rm-nav ul { flex-direction: column; gap: 12px; width: 100%; }
}

/* =========================================================
   HERO (FEATURED IMAGE BAND)
   ========================================================= */
.rm-page-hero {
    position: relative;
    background: linear-gradient(135deg, var(--rm-primary) 0%, var(--rm-accent) 100%);
    color: var(--rm-white);
    padding: 80px 0;
    text-align: center;
    overflow: hidden;
}
.rm-page-hero::before {
    content: ''; position: absolute; inset: 0;
    background: rgba(53, 90, 110, .35);
}
.rm-page-hero.has-image::before {
    background: rgba(53, 90, 110, .55);
}
.rm-page-hero.has-image {
    background-size: cover;
    background-position: center;
}
.rm-page-hero-inner {
    position: relative;
    max-width: 820px;
    margin: 0 auto;
    padding: 0 24px;
}
.rm-page-hero h1 {
    color: var(--rm-white);
    margin-bottom: .4em;
}
.rm-page-hero p {
    font-size: 1.15rem;
    opacity: .95;
    margin: 0;
}
.rm-page-hero .rm-kicker {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: .15em;
    font-size: .8rem;
    font-weight: 600;
    margin-bottom: 16px;
    opacity: .9;
}

/* Hero alternativo: foto destacada como bloco lateral (não-sobreposto) */
.rm-page-photo {
    margin: 40px auto 0;
    max-width: var(--rm-container);
    padding: 0 24px;
}
.rm-page-photo img {
    width: 100%;
    height: auto;
    border-radius: var(--rm-radius);
    box-shadow: var(--rm-shadow);
}

/* =========================================================
   PAGE CONTENT (Gutenberg-friendly)
   ========================================================= */
.rm-page-content {
    padding: 60px 0 80px;
}
.rm-page-content .rm-narrow {
    padding-top: 0;
    padding-bottom: 0;
}
.rm-page-content .alignwide {
    max-width: var(--rm-container);
    margin-left: auto; margin-right: auto;
}
.rm-page-content .alignfull {
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* =========================================================
   BUTTONS
   ========================================================= */
.rm-btn, .wp-block-button__link {
    display: inline-block;
    padding: 14px 28px;
    background: var(--rm-primary);
    color: var(--rm-white) !important;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    font-family: var(--rm-font-head);
    border: 0;
    cursor: pointer;
    font-size: 1rem;
    transition: background .2s ease, transform .2s ease;
}
.rm-btn:hover, .wp-block-button__link:hover {
    background: var(--rm-primary-dark);
    color: var(--rm-white) !important;
    transform: translateY(-1px);
}
.rm-btn--ghost, .is-style-outline .wp-block-button__link {
    background: transparent !important;
    color: var(--rm-primary) !important;
    border: 2px solid var(--rm-primary) !important;
}
.rm-btn--ghost:hover, .is-style-outline .wp-block-button__link:hover {
    background: var(--rm-primary) !important;
    color: var(--rm-white) !important;
}

/* =========================================================
   CARDS (used by patterns and post archives)
   ========================================================= */
.rm-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin: 32px 0;
}
.rm-card {
    background: var(--rm-white);
    border: 1px solid var(--rm-border);
    border-radius: var(--rm-radius);
    padding: 28px;
    transition: transform .2s ease, box-shadow .2s ease;
}
.rm-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--rm-shadow);
}
.rm-card h3 { color: var(--rm-primary); margin-bottom: 8px; }
.rm-card p { color: var(--rm-text-soft); margin: 0; }

/* =========================================================
   ARCHIVE / BLOG
   ========================================================= */
.rm-posts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin: 40px 0;
}
.rm-post-card {
    background: var(--rm-white);
    border: 1px solid var(--rm-border);
    border-radius: var(--rm-radius);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
    display: flex; flex-direction: column;
}
.rm-post-card:hover { transform: translateY(-3px); box-shadow: var(--rm-shadow); }
.rm-post-thumb { aspect-ratio: 16/10; overflow: hidden; background: var(--rm-bg-soft); }
.rm-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rm-post-thumb-fallback {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--rm-primary), var(--rm-accent));
    color: var(--rm-white); font-family: var(--rm-font-head);
    font-weight: 700; font-size: 2rem;
}
.rm-post-body { padding: 22px 24px 26px; flex: 1; display: flex; flex-direction: column; }
.rm-post-body h2, .rm-post-body h3 { font-size: 1.2rem; margin-bottom: 8px; }
.rm-post-body h2 a, .rm-post-body h3 a { color: var(--rm-primary); }
.rm-post-meta {
    font-size: .8rem; color: var(--rm-text-soft);
    text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px;
}
.rm-post-excerpt { color: var(--rm-text-soft); flex: 1; margin-bottom: 14px; }
.rm-post-readmore {
    color: var(--rm-primary); font-weight: 600; font-size: .92rem;
    align-self: flex-start;
}
.rm-post-readmore::after { content: ' →'; }

.rm-pagination {
    display: flex; gap: 8px; justify-content: center; margin: 32px 0;
}
.rm-pagination .page-numbers {
    padding: 8px 14px; border: 1px solid var(--rm-border);
    border-radius: 6px; color: var(--rm-text);
}
.rm-pagination .current {
    background: var(--rm-primary); color: var(--rm-white);
    border-color: var(--rm-primary);
}

/* =========================================================
   SINGLE POST / SERVICO
   ========================================================= */
.rm-single-hero {
    background: var(--rm-bg-soft);
    padding: 60px 0 40px;
    border-bottom: 1px solid var(--rm-border);
}
.rm-single-hero .rm-narrow { padding: 0 24px; }
.rm-single-hero h1 { margin-bottom: 12px; }
.rm-single-hero .rm-post-meta { margin: 0; }

.rm-single-thumb {
    max-width: var(--rm-container);
    margin: -20px auto 40px;
    padding: 0 24px;
}
.rm-single-thumb img {
    width: 100%; border-radius: var(--rm-radius);
    box-shadow: var(--rm-shadow);
}

.rm-single-body {
    max-width: var(--rm-narrow);
    margin: 0 auto;
    padding: 0 24px 80px;
}
.rm-single-body h2 { margin-top: 1.6em; }
.rm-single-body img { border-radius: var(--rm-radius); margin: 1.4em 0; }

/* =========================================================
   CONTACT FORM
   ========================================================= */
.rm-contact-wrap {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 48px;
    margin: 40px 0 60px;
}
@media (max-width: 800px) {
    .rm-contact-wrap { grid-template-columns: 1fr; }
}
.rm-contact-info h2 { margin-bottom: 18px; }
.rm-contact-info .info-item { margin-bottom: 18px; }
.rm-contact-info .info-label {
    font-size: .8rem; text-transform: uppercase;
    letter-spacing: .08em; color: var(--rm-text-soft);
    font-weight: 600; margin-bottom: 4px;
}
.rm-contact-info .info-value { font-size: 1rem; }

.rm-contact-form {
    background: var(--rm-bg-soft);
    border: 1px solid var(--rm-border);
    border-radius: var(--rm-radius);
    padding: 32px;
}
.rm-contact-form h3 { margin-top: 0; }
.rm-contact-form input,
.rm-contact-form textarea {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 14px;
    border: 1px solid var(--rm-border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    background: var(--rm-white);
}
.rm-contact-form input:focus,
.rm-contact-form textarea:focus {
    outline: 2px solid var(--rm-accent);
    outline-offset: 1px;
    border-color: var(--rm-accent);
}
.rm-contact-form textarea { min-height: 140px; resize: vertical; }
.rm-form-message {
    padding: 12px 16px; border-radius: 6px;
    margin-bottom: 14px; font-size: .95rem;
}
.rm-form-message.is-success { background: #DCF5E7; color: #1B5E37; }
.rm-form-message.is-error { background: #FCE7E7; color: #7A1F1F; }

/* =========================================================
   FOOTER
   ========================================================= */
.rm-site-footer {
    background: var(--rm-primary);
    color: var(--rm-white);
    padding: 48px 0 24px;
    margin-top: 60px;
}
.rm-site-footer a { color: var(--rm-white); }
.rm-site-footer a:hover { opacity: .8; color: var(--rm-white); }
.rm-footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}
@media (max-width: 800px) {
    .rm-footer-grid { grid-template-columns: 1fr; }
}
.rm-footer h4 {
    color: var(--rm-white); font-size: 1rem;
    text-transform: uppercase; letter-spacing: .08em;
    margin-bottom: 12px;
}
.rm-footer-quote {
    font-style: italic;
    border-left: 3px solid var(--rm-accent);
    padding-left: 16px;
    opacity: .92;
    font-size: .98rem;
    line-height: 1.55;
}
.rm-footer-list { list-style: none; padding: 0; margin: 0; }
.rm-footer-list li { margin-bottom: 8px; font-size: .95rem; opacity: .92; }
.rm-footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,.18);
    padding-top: 22px;
    font-size: .85rem;
    opacity: .82;
}

/* =========================================================
   COMMENTS
   ========================================================= */
.comments-area {
    max-width: var(--rm-narrow);
    margin: 0 auto;
    padding: 40px 24px 60px;
}
.comment-list { list-style: none; padding: 0; }
.comment-body {
    padding: 20px;
    border: 1px solid var(--rm-border);
    border-radius: var(--rm-radius);
    margin-bottom: 16px;
    background: var(--rm-bg-soft);
}

/* =========================================================
   GUTENBERG / EDITOR HARMONY
   ========================================================= */
.has-primary-color { color: var(--rm-primary) !important; }
.has-primary-background-color { background: var(--rm-primary) !important; }
.has-accent-color { color: var(--rm-accent) !important; }
.has-accent-background-color { background: var(--rm-accent) !important; }
.has-bg-soft-background-color { background: var(--rm-bg-soft) !important; }
.has-text-color { color: var(--rm-text) !important; }
.has-white-color { color: var(--rm-white) !important; }
.has-white-background-color { background: var(--rm-white) !important; }

.wp-block-cover {
    border-radius: var(--rm-radius);
    overflow: hidden;
}
.wp-block-image img { border-radius: var(--rm-radius); }
.wp-block-quote {
    border-left: 4px solid var(--rm-accent);
    padding: .4em 1.2em;
    background: var(--rm-bg-soft);
}

/* Ramondetti-style sections via patterns */
.rm-section { padding: 64px 0; }
.rm-section--soft { background: var(--rm-bg-soft); }
.rm-section--accent {
    background: linear-gradient(135deg, var(--rm-primary), var(--rm-accent));
    color: var(--rm-white);
}
.rm-section--accent h2, .rm-section--accent h3 { color: var(--rm-white); }
.rm-section--accent p { opacity: .95; }

/* =========================================================
   UTILITIES
   ========================================================= */
.rm-text-center { text-align: center; }
.rm-mt-0 { margin-top: 0 !important; }
.rm-mt-2 { margin-top: 16px; }
.rm-mt-4 { margin-top: 32px; }
