/*
Theme Name: 2º Ofício Extrajudicial Apiacás
Theme URI: https://testeapiacas.lovable.app
Author: 2º Ofício Extrajudicial
Description: Tema WordPress do Cartório do 2º Ofício Extrajudicial da Comarca de Apiacás/MT
Version: 2.0
License: GNU General Public License v2 or later
Text Domain: cartorio-apiacas
*/

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

:root {
  --primary: #003f7f;
  --primary-light: rgba(0,63,127,0.1);
  --primary-hover: rgba(0,63,127,0.2);
  --foreground: #1e293b;
  --muted: #64748b;
  --muted-bg: #f8fafc;
  --border: #e2e8f0;
  --card-bg: #ffffff;
  --bg: #fdfdfd;
  --radius: 0.75rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'DM Sans', sans-serif; color: var(--foreground); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.container-narrow { max-width: 768px; margin: 0 auto; padding: 0 1rem; }
.container-medium { max-width: 960px; margin: 0 auto; padding: 0 1rem; }

/* ── Header ── */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.site-header .container { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.header-logo { display: flex; align-items: center; gap: 0.75rem; }
.header-logo img { height: 40px; width: auto; }
.header-logo-text { line-height: 1.3; }
.header-logo-text .name { font-size: 0.875rem; font-weight: 700; color: var(--foreground); }
.header-logo-text .sub { font-size: 0.6875rem; color: var(--muted); }

.main-nav { display: flex; align-items: center; gap: 0.25rem; }
.main-nav a, .main-nav .dropdown-toggle { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.5rem 0.75rem; border-radius: 0.5rem; font-size: 0.875rem; font-weight: 500; color: var(--muted); transition: all 0.2s; background: none; border: none; cursor: pointer; }
.main-nav a:hover, .main-nav .dropdown-toggle:hover { color: var(--foreground); background: var(--muted-bg); }
.main-nav a.active, .main-nav .dropdown-toggle.active { background: var(--primary); color: #fff; }

.nav-dropdown { position: relative; }
.nav-dropdown-menu { display: none; position: absolute; top: 100%; left: 0; margin-top: 0.25rem; width: 16rem; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 10px 25px rgba(0,0,0,0.08); padding: 0.5rem 0; z-index: 50; }
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a { display: block; padding: 0.625rem 1rem; font-size: 0.875rem; color: var(--muted); transition: all 0.2s; }
.nav-dropdown-menu a:hover { color: var(--foreground); background: var(--muted-bg); }

.btn-whatsapp { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; background: var(--primary); color: #fff; border-radius: 0.5rem; font-size: 0.875rem; font-weight: 500; transition: background 0.2s; }
.btn-whatsapp:hover { background: #003366; }

/* Mobile */
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; color: var(--foreground); font-size: 1.25rem; }
.mobile-menu { display: none; border-top: 1px solid var(--border); background: var(--card-bg); padding: 0.75rem 1rem; }
.mobile-menu a { display: block; padding: 0.625rem 0.75rem; border-radius: 0.5rem; font-size: 0.875rem; font-weight: 500; color: var(--muted); }
.mobile-menu a:hover { color: var(--foreground); background: var(--muted-bg); }
.mobile-menu a.active { background: var(--primary); color: #fff; }

@media (max-width: 1024px) {
  .main-nav, .header-actions { display: none !important; }
  .mobile-toggle { display: block; }
  .mobile-menu.open { display: block; }
}

/* ── Hero ── */
.hero { position: relative; background: var(--primary); color: #fff; padding: 5rem 0 6rem; overflow: hidden; text-align: center; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; transition: opacity 1s ease-in-out; }
.hero-overlay { position: absolute; inset: 0; background: rgba(0,63,127,0.7); }
.hero-content { position: relative; z-index: 2; max-width: 768px; margin: 0 auto; }
.hero-badge { display: inline-flex; align-items: center; gap: 0.5rem; background: rgba(255,255,255,0.1); border-radius: 9999px; padding: 0.375rem 1rem; font-size: 0.75rem; font-weight: 500; margin-bottom: 1.5rem; }
.hero h1 { font-size: 2rem; font-weight: 700; line-height: 1.2; margin-bottom: 1rem; }
.hero p { font-size: 1rem; opacity: 0.8; margin-bottom: 2rem; max-width: 540px; margin-left: auto; margin-right: auto; }
.hero-buttons { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.btn-secondary { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.5rem; background: var(--muted-bg); color: var(--foreground); border-radius: 0.5rem; font-size: 0.875rem; font-weight: 500; transition: background 0.2s; }
.btn-secondary:hover { background: #e2e8f0; }

@media (min-width: 768px) { .hero { padding: 7rem 0 8rem; } .hero h1 { font-size: 3rem; } }

/* ── Cards ── */
.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); transition: box-shadow 0.2s; }
.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.card-body { padding: 1.5rem; }
.card-icon { width: 2.75rem; height: 2.75rem; border-radius: var(--radius); background: var(--primary-light); display: flex; align-items: center; justify-content: center; margin-bottom: 0.75rem; font-size: 1.25rem; }
.card-icon svg { width: 1.25rem; height: 1.25rem; color: var(--primary); }
.card h3 { font-size: 1rem; font-weight: 600; color: var(--foreground); margin-bottom: 0.25rem; }
.card .card-desc { font-size: 0.875rem; color: var(--muted); line-height: 1.6; }

.grid-4 { display: grid; grid-template-columns: repeat(1, 1fr); gap: 1.25rem; }
@media (min-width: 640px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }

/* ── Section ── */
.section { padding: 4rem 0; }
.section-muted { background: var(--muted-bg); }
.section-title { text-align: center; margin-bottom: 3rem; }
.section-title h2 { font-size: 1.5rem; font-weight: 700; color: var(--foreground); margin-bottom: 0.5rem; }
.section-title p { font-size: 0.875rem; color: var(--muted); }

/* ── Collapsible ── */
.collapsible { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 0.75rem; }
.collapsible-header { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 1.25rem; background: none; border: none; cursor: pointer; text-align: left; font-size: 1rem; font-weight: 600; color: var(--foreground); }
.collapsible-header svg { width: 1rem; height: 1rem; color: var(--muted); flex-shrink: 0; transition: transform 0.2s; }
.collapsible.open .collapsible-header svg { transform: rotate(180deg); }
.collapsible-body { display: none; padding: 0 1.25rem 1.25rem; }
.collapsible.open .collapsible-body { display: block; }

/* ── Content styling ── */
.content-text { font-size: 0.875rem; color: var(--muted); line-height: 1.7; }
.content-text p { margin-bottom: 0.75rem; }
.content-text ul, .content-text ol { padding-left: 1.25rem; margin-bottom: 0.75rem; }
.content-text li { margin-bottom: 0.375rem; }
.content-text h4, .content-text h5 { font-size: 0.875rem; font-weight: 700; color: var(--foreground); margin-top: 1.5rem; margin-bottom: 0.5rem; }
.content-text h6 { font-size: 0.875rem; font-weight: 600; color: var(--foreground); margin-bottom: 0.5rem; }
.content-text a { color: var(--primary); }
.content-text a:hover { text-decoration: underline; }
.content-text strong { color: var(--foreground); }

.info-box { background: var(--muted-bg); border-radius: 0.5rem; padding: 1rem; margin: 0.5rem 0; }
.warning-box { background: #fef9c3; border: 1px solid #fde68a; border-radius: 0.5rem; padding: 0.75rem; font-size: 0.875rem; color: #854d0e; font-weight: 500; margin: 0.5rem 0; }
.accent-box { background: var(--primary-light); border: 1px solid rgba(0,63,127,0.15); border-radius: 0.5rem; padding: 0.75rem; margin: 0.5rem 0; }

.citation { font-size: 0.75rem; font-style: italic; color: rgba(100,116,139,0.7); margin-top: 1rem; border-left: 2px solid var(--border); padding-left: 0.75rem; }

/* ── Tabelião ── */
.tabeliao-photo { float: left; margin: 0 2.5rem 1rem 0.5rem; width: 11rem; }
.tabeliao-photo .photo-placeholder { width: 100%; aspect-ratio: 3/4; background: var(--muted-bg); border: 2px dashed var(--border); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 0.75rem; color: var(--muted); text-align: center; padding: 0.5rem; }
.tabeliao-photo .caption { font-style: italic; color: var(--muted); text-align: center; margin-top: 0.75rem; font-size: 10px; }
@media (min-width: 768px) { .tabeliao-photo { width: 13rem; } }

/* ── Footer ── */
.site-footer { background: var(--foreground); color: #fff; padding: 3rem 0; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
.site-footer h4 { font-size: 0.875rem; font-weight: 600; margin-bottom: 0.75rem; }
.site-footer p, .site-footer a { font-size: 0.75rem; opacity: 0.7; line-height: 1.6; }
.site-footer a:hover { opacity: 1; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 2rem; padding-top: 1.5rem; text-align: center; }
.footer-bottom p { font-size: 0.75rem; opacity: 0.5; }

/* ── Page header ── */
.page-header { margin-bottom: 2rem; }
.page-header .badge { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--primary-light); border-radius: 9999px; padding: 0.375rem 1rem; font-size: 0.75rem; font-weight: 500; color: var(--primary); margin-bottom: 1rem; }
.page-header h1 { font-size: 1.5rem; font-weight: 700; color: var(--foreground); }
.page-header .icon-title { display: flex; align-items: center; gap: 0.75rem; }
.page-header .icon-box { width: 2.75rem; height: 2.75rem; border-radius: var(--radius); background: var(--primary-light); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }

.back-link { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.875rem; color: var(--muted); margin-bottom: 1.5rem; transition: color 0.2s; }
.back-link:hover { color: var(--foreground); }

.btn-primary { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; background: var(--primary); color: #fff; border-radius: 0.5rem; font-size: 0.875rem; font-weight: 500; }
.btn-outline { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; background: transparent; color: var(--foreground); border: 1px solid var(--border); border-radius: 0.5rem; font-size: 0.875rem; font-weight: 500; }

/* Prose */
.prose { font-size: 0.875rem; color: var(--muted); line-height: 1.7; }
.prose h2 { font-size: 1.125rem; font-weight: 700; color: var(--foreground); margin-top: 2rem; margin-bottom: 0.75rem; }
.prose p { margin-bottom: 1rem; }
.prose ul, .prose ol { padding-left: 1.25rem; margin-bottom: 1rem; }
.prose li { margin-bottom: 0.25rem; font-size: 0.875rem; }
.prose strong { color: var(--foreground); }
.prose a { color: var(--primary); }

/* Emolumentos iframe */
.pdf-container { border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; background: var(--card-bg); }
.pdf-container iframe { width: 100%; height: 80vh; min-height: 600px; border: none; }

/* Hero slider dots */
.hero-dots { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1.5rem; }
.hero-dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.4); cursor: pointer; transition: background 0.3s; }
.hero-dots span.active { background: #fff; }

/* link card */
.link-card { display: block; text-decoration: none; }
.link-card:hover .card { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

/* Scroll top */
.scroll-top { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; font-weight: 500; color: var(--primary); background: none; border: none; cursor: pointer; padding: 2rem 0; }
.scroll-top:hover { color: var(--primary); opacity: 0.8; }
