/* Tip Page Styles — Shared across all /tips/ Jinja2 pages */
:root {
    --zr-blue: #00468b;
    --zr-orange: #f37021;
    --primary: #00468b;
    --primary-dark: #003366;
    --primary-light: #e6f0f9;
    --accent: #f37021;
    --accent-dark: #d4530a;
    --text: #333333;
    --text-muted: #64748b;
    --bg: #f5f5f5;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

html[data-theme="dark"] {
    --zr-blue: #4a9eff;
    --zr-orange: #ff8c42;
    --primary: #4a9eff;
    --primary-dark: #2d7fd4;
    --primary-light: #1a2a3d;
    --accent: #ff8c42;
    --accent-dark: #e67320;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --bg: #0f172a;
    --card: #1e293b;
    --border: #334155;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    background: white;
    color: var(--text);
    line-height: 1.6;
}

html[data-theme="dark"] body {
    background: var(--bg);
}

h1, h2, h3, h4 {
    font-family: 'Fjalla One', sans-serif;
    letter-spacing: 0.02em;
}

/* Header */
.header {
    background: white;
    border-bottom: 3px solid var(--accent);
    padding: 12px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

html[data-theme="dark"] .header {
    background: var(--card);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img { height: 40px; }

.header-nav {
    display: flex;
    gap: 28px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: lowercase;
    letter-spacing: 0.03em;
}

.header-nav a { color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.header-nav a:hover { color: var(--primary); }
.header-nav .nav-primary { text-transform: uppercase; font-weight: 700; color: var(--text); }
.header-nav .active { color: var(--primary); }

.header-right { display: flex; align-items: center; gap: 16px; }

.btn-login {
    background: var(--accent);
    color: white;
    padding: 6px 16px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-login:hover { background: #e8751a; }

.franchise-link {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    padding: 16px 24px;
    background: white;
    border-top: 1px solid var(--border);
}

html[data-theme="dark"] .mobile-nav {
    background: var(--card);
}

.mobile-nav a {
    padding: 12px 0;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid var(--border);
}

.mobile-nav a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.mobile-nav.active { display: flex; }

/* Article Hero */
.hero {
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 24px 48px;
}

.hero h1 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 16px;
    color: var(--text);
}

.hero .lead {
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1.7;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
}

/* Hero Image */
.hero-image-wrap {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px 32px;
    box-sizing: border-box;
}

.hero-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.inline-image-wrap {
    width: min(100%, 720px);
    max-width: 100%;
    margin: 36px auto 12px;
    overflow: hidden;
    box-sizing: border-box;
}

.inline-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Article Content */
.content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px 80px;
    box-sizing: border-box;
    overflow-wrap: anywhere;
}

.content h2 {
    font-size: 2rem;
    margin: 48px 0 16px;
    color: var(--primary);
}

.content h2:first-child {
    margin-top: 0;
}

.content p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 20px;
}

.content strong {
    color: var(--text);
    font-weight: 600;
}

.content a {
    color: var(--primary);
    font-weight: 500;
}

.content ol, .content ul {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 20px;
    padding-left: 24px;
}

.content li {
    margin-bottom: 12px;
}

.content li strong {
    color: var(--text);
}

/* Related Links */
.related-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px 48px;
}

.related-section h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.related-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.related-item {
    margin: 0;
}

.related-link {
    display: block;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.related-link:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 70, 139, 0.1);
}

.related-link strong {
    display: block;
    color: var(--text);
    font-weight: 700;
    margin-bottom: 6px;
}

.related-link span {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* FAQ Section */
.faq-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px 48px;
}

.faq-section h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 24px;
    font-family: 'Fjalla One', sans-serif;
}

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

.faq-item summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text);
    transition: color 0.2s;
}

.faq-item summary::marker { content: ''; }
.faq-item summary:hover { color: var(--primary); }
.faq-item[open] > summary { color: var(--primary); }

.faq-item summary .faq-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.faq-item summary .faq-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-muted);
    transition: stroke 0.2s;
}

.faq-item summary:hover .faq-icon svg { stroke: var(--primary); }
.faq-item[open] > summary .faq-icon { transform: rotate(45deg); }

.faq-answer {
    overflow: hidden;
    transition: height 0.35s ease;
}

.faq-answer-inner {
    padding-bottom: 24px;
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 0.95rem;
}

.faq-answer-inner p { margin-bottom: 12px; }
.faq-answer-inner p:last-child { margin-bottom: 0; }
.faq-answer-inner a { color: var(--primary); font-weight: 500; }

/* CTA */
.cta-section {
    background: var(--bg);
    padding: 64px 24px;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.cta-section p {
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto 32px;
}

.btn-cta {
    display: inline-block;
    font-size: 18px;
    font-weight: 600;
    color: white;
    background: var(--accent);
    padding: 16px 32px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(243, 112, 33, 0.3);
}

.btn-cta:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243, 112, 33, 0.4);
}

@media (max-width: 1100px) {
    .header-nav, .header-right { display: none; }
    .mobile-menu-btn { display: flex; }
}

@media (max-width: 768px) {
    .hero { padding: 48px 24px 32px; }
    .hero h1 { font-size: 2.25rem; }
    .hero .lead { font-size: 1.1rem; }
    .hero-image-wrap { padding: 0 16px 28px; }
    .content { padding: 0 16px 64px; }
    .inline-image-wrap { width: 100%; margin: 28px auto 8px; }
    .content h2 { font-size: 1.5rem; margin-top: 36px; }
    .faq-item summary { font-size: 0.95rem; padding: 20px 0; }
    .related-list { grid-template-columns: 1fr; }
}

/* Dark Mode */
html[data-theme="dark"] .logo img { filter: brightness(1.8); }
html[data-theme="dark"] .cta-section { background: var(--card); }
html[data-theme="dark"] .hero-image { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3); }
html[data-theme="dark"] .inline-image { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3); }
