/*
Theme Name: Divorce Shield
Theme URI: https://divorceshield.co
Author: Divorce Shield
Author URI: https://divorceshield.co
Description: Custom WordPress theme for Divorce Shield — practical divorce preparation for men. Professional, navy & gold design focused on driving checklist downloads.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: Proprietary
Text Domain: divorce-shield
*/

/* ================================
   CSS RESET & BASE
   ================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

:root {
    --color-navy: #0a2342;
    --color-navy-dark: #061528;
    --color-navy-light: #1a3a5c;
    --color-gold: #c8a951;
    --color-gold-light: #d9be73;
    --color-gold-dark: #a88a35;
    --color-cream: #faf8f3;
    --color-white: #ffffff;
    --color-text: #1c1c1c;
    --color-text-light: #555555;
    --color-text-muted: #888888;
    --color-border: #e5e5e5;
    --color-bg-alt: #f7f7f5;
    --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    --max-width: 1200px;
    --max-width-content: 760px;
    --radius: 4px;
    --shadow-sm: 0 2px 8px rgba(10, 35, 66, 0.08);
    --shadow-md: 0 4px 20px rgba(10, 35, 66, 0.12);
    --shadow-lg: 0 10px 40px rgba(10, 35, 66, 0.15);
    --transition: all 0.25s ease;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--color-navy);
    text-decoration: none;
    transition: var(--transition);
}
a:hover { color: var(--color-gold-dark); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-navy);
    margin-bottom: 0.5em;
}

h1 { font-size: clamp(2rem, 4vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.15rem; }

p { margin-bottom: 1.25em; }

ul, ol { margin: 0 0 1.25em 1.5em; }
li { margin-bottom: 0.4em; }

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

.container-narrow {
    max-width: var(--max-width-content);
    margin: 0 auto;
    padding: 0 24px;
}

.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.section-lg { padding: 120px 0; }

.bg-alt { background: var(--color-bg-alt); }
.bg-navy { background: var(--color-navy); color: var(--color-white); }
.bg-navy h1, .bg-navy h2, .bg-navy h3 { color: var(--color-white); }
.bg-cream { background: var(--color-cream); }

/* ================================
   HEADER
   ================================ */
.site-header {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-navy);
    letter-spacing: -0.01em;
}

.site-logo:hover { color: var(--color-navy); }

.logo-shield {
    width: 32px;
    height: 36px;
    flex-shrink: 0;
}

.logo-shield path { fill: var(--color-navy); }
.logo-shield .shield-accent { fill: var(--color-gold); }

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    gap: 32px;
    align-items: center;
}

.main-nav li { margin: 0; }

.main-nav a {
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    position: relative;
}

.main-nav a:hover { color: var(--color-gold-dark); }

.main-nav .nav-cta {
    background: var(--color-navy);
    color: var(--color-white);
    padding: 10px 22px;
    border-radius: var(--radius);
    font-weight: 600;
}

.main-nav .nav-cta:hover {
    background: var(--color-gold);
    color: var(--color-navy);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    display: block;
    width: 28px;
    height: 2px;
    background: var(--color-navy);
    margin: 6px 0;
    transition: var(--transition);
}

/* ================================
   HERO
   ================================ */
.hero {
    background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-dark) 100%);
    color: var(--color-white);
    padding: 100px 0 110px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle at 70% 30%, rgba(200, 169, 81, 0.12) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    display: inline-block;
    color: var(--color-gold);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.hero h1 {
    color: var(--color-white);
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    margin-bottom: 24px;
    line-height: 1.15;
}

.hero h1 span { color: var(--color-gold); }

.hero-subtitle {
    font-size: 1.2rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.85);
    margin-bottom: 40px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* ================================
   BUTTONS
   ================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 36px;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    border-radius: var(--radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    line-height: 1.3;
}

.btn-primary {
    background: var(--color-gold);
    color: var(--color-navy);
    border-color: var(--color-gold);
    box-shadow: 0 4px 14px rgba(200, 169, 81, 0.35);
}

.btn-primary:hover {
    background: var(--color-gold-light);
    border-color: var(--color-gold-light);
    color: var(--color-navy);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200, 169, 81, 0.45);
}

.btn-secondary {
    background: transparent;
    color: var(--color-navy);
    border-color: var(--color-navy);
}

.btn-secondary:hover {
    background: var(--color-navy);
    color: var(--color-white);
}

.btn-large {
    padding: 18px 44px;
    font-size: 1.05rem;
}

.btn-icon { width: 18px; height: 18px; }

/* ================================
   CTA BLOCK (inline, for blog posts)
   ================================ */
.cta-block {
    background: var(--color-navy);
    color: var(--color-white);
    padding: 48px 40px;
    border-radius: 8px;
    text-align: center;
    margin: 48px 0;
    border-left: 4px solid var(--color-gold);
}

.cta-block h3 {
    color: var(--color-white);
    margin-bottom: 12px;
}

.cta-block p {
    color: rgba(255,255,255,0.85);
    margin-bottom: 24px;
    font-size: 1.05rem;
}

/* ================================
   HOMEPAGE SECTIONS
   ================================ */
.intro-section { text-align: center; }

.intro-section h2 { margin-bottom: 24px; }
.intro-section p {
    font-size: 1.1rem;
    color: var(--color-text-light);
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-top: 56px;
}

.feature-card {
    background: var(--color-white);
    padding: 36px 28px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-gold);
}

.feature-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    color: var(--color-gold);
}

.feature-card h3 { font-size: 1.25rem; margin-bottom: 12px; }
.feature-card p { color: var(--color-text-light); margin-bottom: 0; font-size: 0.98rem; }

/* ================================
   BLOG LISTING
   ================================ */
.page-header {
    background: var(--color-bg-alt);
    padding: 80px 0 60px;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
}

.page-header h1 { margin-bottom: 12px; }
.page-header p {
    color: var(--color-text-light);
    font-size: 1.1rem;
    max-width: 640px;
    margin: 0 auto;
}

.blog-grid {
    display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 36px;
}

.post-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-gold);
}

.post-card-content {
    padding: 28px 26px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-card-meta {
    color: var(--color-gold-dark);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.post-card h2, .post-card h3 {
    font-size: 1.35rem;
    margin-bottom: 14px;
    line-height: 1.3;
}

.post-card h2 a, .post-card h3 a { color: var(--color-navy); }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--color-gold-dark); }

.post-card-excerpt {
    color: var(--color-text-light);
    margin-bottom: 20px;
    flex: 1;
    font-size: 0.98rem;
}

.read-more {
    color: var(--color-gold-dark);
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
}

.read-more:hover { gap: 10px; color: var(--color-navy); }

/* ================================
   SINGLE POST
   ================================ */
.single-post-wrap {
    padding: 60px 0 80px;
}

.single-post article {
    max-width: var(--max-width-content);
    margin: 0 auto;
}

.post-header {
    text-align: center;
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--color-border);
}

.post-header .post-meta {
    color: var(--color-gold-dark);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.post-header h1 {
    font-size: clamp(1.9rem, 4vw, 2.75rem);
    margin-bottom: 16px;
}

.post-header .post-subtitle {
    font-size: 1.15rem;
    color: var(--color-text-light);
    font-style: italic;
}

.post-content {
    font-size: 1.075rem;
    line-height: 1.8;
}

.post-content h2 {
    margin-top: 2em;
    margin-bottom: 0.7em;
    font-size: 1.6rem;
}

.post-content h3 {
    margin-top: 1.6em;
    margin-bottom: 0.6em;
    font-size: 1.3rem;
    color: var(--color-navy);
}

.post-content ul, .post-content ol {
    margin-left: 1.5em;
    margin-bottom: 1.5em;
}

.post-content ul li::marker { color: var(--color-gold); }

.post-content blockquote {
    border-left: 4px solid var(--color-gold);
    background: var(--color-bg-alt);
    padding: 24px 28px;
    margin: 32px 0;
    font-style: italic;
    color: var(--color-text-light);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.post-content blockquote p:last-child { margin-bottom: 0; }

.post-disclaimer {
    background: var(--color-bg-alt);
    border-left: 4px solid var(--color-navy);
    padding: 18px 24px;
    margin: 32px 0;
    font-size: 0.95rem;
    color: var(--color-text-light);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.post-disclaimer strong { color: var(--color-navy); }

/* ================================
   PAGE TEMPLATE
   ================================ */
.page-content {
    padding: 60px 0 80px;
}

.page-content .container-narrow {
    font-size: 1.05rem;
    line-height: 1.75;
}

.page-content h2 {
    margin-top: 1.8em;
    margin-bottom: 0.6em;
}

/* ================================
   CONTACT
   ================================ */
.contact-info {
    background: var(--color-bg-alt);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin-top: 32px;
    border-left: 4px solid var(--color-gold);
}

@media (max-width: 480px) {
    .contact-info {
        padding: 20px !important;
    }
    .contact-info a {
        font-size: 1rem !important;
        word-break: break-all !important;
    }
}

/* ================================
   THANK YOU PAGE
   ================================ */
.thank-you {
    text-align: center;
    padding: 100px 0;
}

.thank-you-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    color: var(--color-gold);
}

.thank-you h1 { margin-bottom: 16px; }

.thank-you p {
    font-size: 1.1rem;
    color: var(--color-text-light);
    max-width: 560px;
    margin: 0 auto 28px;
}

.download-status {
    background: var(--color-bg-alt);
    padding: 20px 28px;
    border-radius: var(--radius);
    margin: 32px auto;
    max-width: 480px;
    border-left: 4px solid var(--color-gold);
    font-size: 0.95rem;
    color: var(--color-text-light);
}

/* ================================
   FOOTER
   ================================ */
.site-footer {
    background: var(--color-navy-dark);
    color: rgba(255,255,255,0.78);
    padding: 64px 0 0;
    margin-top: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand .site-logo {
    color: var(--color-white);
    margin-bottom: 16px;
}

.footer-brand .logo-shield path { fill: var(--color-white); }
.footer-brand .logo-shield .shield-accent { fill: var(--color-gold); }

.footer-brand p {
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
    max-width: 380px;
}

.site-footer h4 {
    color: var(--color-white);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer li { margin-bottom: 10px; }

.site-footer a {
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
}

.site-footer a:hover { color: var(--color-gold); }

.footer-disclaimer {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 28px 0;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.6;
}

.footer-disclaimer strong { color: rgba(255,255,255,0.85); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 860px) {
    .menu-toggle { display: block; }
    .main-nav ul {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-white);
        flex-direction: column;
        padding: 24px;
        gap: 20px;
        box-shadow: var(--shadow-md);
        display: none;
    }
    .main-nav.active ul { display: flex; }
    .main-nav .nav-cta { width: 100%; text-align: center; }

    .footer-grid { grid-template-columns: 2fr 1fr 1fr; gap: 24px; }

    .hero { padding: 70px 0 80px; }
    .section { padding: 60px 0; }
    .section-lg { padding: 80px 0; }
    .cta-block { padding: 36px 24px; }
}

@media (max-width: 480px) {
    .btn { padding: 14px 26px; font-size: 0.95rem; }
    .btn-large { padding: 16px 32px; }
    .container, .container-narrow { padding: 0 18px; }
}
@media (max-width: 767px) {
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
    }
    .footer-brand p {
        max-width: 100% !important;
    }
}

/* for email popup */
/* Email gate modal */
.email-gate-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.email-gate-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.email-gate-card {
    position: relative;
    width: 100%;
    max-width: 460px;
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    z-index: 2;
}

.email-gate-card h3 {
    margin: 0 0 10px;
}

.email-gate-card p {
    margin: 0 0 16px;
}

#email-gate-form input[type="email"] {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #d5d8dd;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 15px;
}

#email-gate-form button[type="submit"] {
    width: 100%;
}

.email-gate-close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: 0;
    background: transparent;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: #333;
}

.email-gate-error {
    color: #c0392b;
    margin-top: 10px;
    font-size: 14px;
}