/* ==========================================================================
   SilvertLinings Website Styles
   Author: Jason Silvert
   ========================================================================== */

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

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

/* CSS Variables for Light/Dark Mode */
:root {
    /* Light Mode Colors (Default) */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f8f9fa;
    --text-primary: #2c3e50;
    --text-secondary: #34495e;
    --text-tertiary: #7f8c8d;
    --nav-bg: #2c3e50;
    --nav-text: #ffffff;
    --accent-primary: #3498db;
    --accent-hover: #2980b9;
    --border-color: #ecf0f1;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --placeholder-bg: #bdc3c7;
}

/* Dark Mode Colors */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1a1a2e;
        --bg-secondary: #16213e;
        --bg-tertiary: #0f3460;
        --text-primary: #e4e4e7;
        --text-secondary: #cbd5e1;
        --text-tertiary: #94a3b8;
        --nav-bg: #0f172a;
        --nav-text: #f1f5f9;
        --accent-primary: #60a5fa;
        --accent-hover: #3b82f6;
        --border-color: #1e293b;
        --shadow-color: rgba(0, 0, 0, 0.3);
        --placeholder-bg: #475569;
    }
}

/* Manual Dark Mode Override (for testing toggle) */
[data-theme="dark"] {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-tertiary: #0f3460;
    --text-primary: #e4e4e7;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --nav-bg: #0f172a;
    --nav-text: #f1f5f9;
    --accent-primary: #60a5fa;
    --accent-hover: #3b82f6;
    --border-color: #1e293b;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --placeholder-bg: #475569;
}

[data-theme="light"] {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f8f9fa;
    --text-primary: #2c3e50;
    --text-secondary: #34495e;
    --text-tertiary: #7f8c8d;
    --nav-bg: #2c3e50;
    --nav-text: #ffffff;
    --accent-primary: #3498db;
    --accent-hover: #2980b9;
    --border-color: #ecf0f1;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --placeholder-bg: #bdc3c7;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-primary);
    line-height: 1.6;
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */

/* Navigation - Mobile First */
.nav {
    background-color: var(--nav-bg);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px var(--shadow-color);
    transition: background-color 0.3s ease;
}

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

/* Nav left side - logo and theme toggle */
.nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 102;
}

/* Logo */
.logo {
    text-decoration: none;
    z-index: 102;
}

.logo-placeholder {
    background-color: var(--nav-text);
    color: var(--nav-bg);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1.125rem;
    transition: background-color 0.3s, transform 0.2s;
    white-space: nowrap;
}

.logo:hover .logo-placeholder,
.logo:focus .logo-placeholder {
    background-color: var(--accent-primary);
    transition: color 0.3s ease;
    color: var(--nav-text);
    transform: scale(1.05);
}

/* Hamburger Menu Button */
.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 101;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background-color: var(--nav-text);
    transition: all 0.3s ease;
}

.hamburger:hover .hamburger-line,
.hamburger:focus .hamburger-line {
    background-color: var(--accent-primary);
    transition: color 0.3s ease;
}

/* Mobile Navigation Links */
.nav-links {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    order: 3;
}

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

/* Hamburger animation when active */
.hamburger[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav a:not(.logo) {
    color: var(--nav-text);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.75rem;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 4px;
    text-align: center;
}

.nav a:not(.logo):hover,
.nav a:not(.logo):focus {
    background-color: var(--accent-primary);
    transition: color 0.3s ease;
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Theme Toggle Button */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--nav-text);
    border: 2px solid var(--nav-text);
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background-color 0.3s, border-color 0.3s;
    padding: 0;
}

.theme-toggle:hover,
.theme-toggle:focus {
    transform: scale(1.1);
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-icon {
    display: inline-block;
    font-size: 0;
    line-height: 1;
}

[data-theme="dark"] .theme-icon::before {
    content: '☀️';
}

[data-theme="light"] .theme-icon::before {
    content: '🌙';
}

.theme-icon::before {
    font-size: 1.25rem;
}

/* ==========================================================================
   CONTAINER & LAYOUT
   ========================================================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--bg-secondary);
    padding: 1.5rem;
}

/* ==========================================================================
   HEADER SECTION
   ========================================================================== */

/* Header Section - Mobile First (Stacked) */
.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 0;
    border-bottom: 3px solid var(--accent-primary);
    margin-bottom: 2rem;
}

.headshot {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid var(--accent-primary);
    margin-bottom: 1.5rem;
    flex-shrink: 0;
    object-fit: cover;
}

.header-text {
    width: 100%;
}

.name {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.bio {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.bio-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.bio-link:hover,
.bio-link:focus {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* ==========================================================================
   SERVICE SECTIONS
   ========================================================================== */

/* Inline links within service section text */
.inline-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.inline-link:hover,
.inline-link:focus {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Services Sections - Mobile First */
.service-section {
    margin-bottom: 3rem;
    padding: 1.5rem;
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    border-left: 4px solid var(--accent-primary);
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.service-section:hover {
    background-color: var(--border-color);
    box-shadow: 0 2px 8px var(--shadow-color);
}

/* Section top container - stacks on mobile */
.section-top {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 0;
}

.section-text {
    flex: 1;
}

.section-image {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.service-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

.section-text h2 {
    margin-top: 0;
}

.service-section h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 700;
}

.service-section p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.service-section ul {
    margin: 1rem 0 1rem 1.25rem;
    padding: 0;
}

.service-section li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.service-section strong {
    color: var(--text-primary);
}

/* Expand/Collapse Button */
.expand-button {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    padding: 0.75rem 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s;
    font-family: inherit;
}

.expand-button:hover,
.expand-button:focus {
    color: var(--accent-primary);
    transition: color 0.3s ease;
}

/* CTA Button */
.cta-button {
    display: inline-block;
    background-color: var(--accent-primary);
    transition: color 0.3s ease;
    color: var(--nav-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
    text-align: center;
    margin: 0.75rem 0;
    box-shadow: 0 2px 4px var(--shadow-color);
}

/* Larger CTA buttons in expanded content */
.collapsible-content .cta-button {
    font-size: 1.0625rem;
    padding: 0.875rem 2rem;
    margin: 1rem 0;
}

.cta-button:hover,
.cta-button:focus {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-color);
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.cta-button:active {
    transform: translateY(0);
}

/* Prevent CTA from triggering section expand */
.cta-button {
    position: relative;
    z-index: 10;
}

.expand-icon {
    color: var(--accent-primary);
    transition: color 0.3s ease;
    font-size: 0.875rem;
    font-weight: normal;
    transition: transform 0.3s;
}

.expand-button[aria-expanded="true"] .expand-icon::before {
    content: 'Show less';
}

.expand-button[aria-expanded="false"] .expand-icon::before {
    content: 'Tell me more!';
}

/* Hide the original text */
.expand-button[aria-expanded="true"] .expand-icon,
.expand-button[aria-expanded="false"] .expand-icon {
    font-size: 0;
}

.expand-button[aria-expanded="true"] .expand-icon::before,
.expand-button[aria-expanded="false"] .expand-icon::before {
    font-size: 0.875rem;
}

/* Collapsible Content */
.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.3s ease-out;
    opacity: 0;
    width: 100%;
    margin-top: 0;
}

.collapsible-content.active {
    max-height: 2000px;
    opacity: 1;
    transition: max-height 0.5s ease-in, opacity 0.4s ease-in;
    margin-top: 1rem;
}

.collapsible-content ul {
    margin-top: 0.5rem;
}

/* ==========================================================================
   FAQ SECTION
   ========================================================================== */

.faq-section {
    max-width: 1200px;
    margin: 3rem auto 0;
    padding: 2rem 1.5rem;
    background-color: var(--bg-secondary);
}

.faq-header {
    text-align: center;
    margin-bottom: 2rem;
}

.faq-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.faq-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 2px 8px var(--shadow-color);
}

.faq-question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-family: inherit;
    transition: color 0.3s ease;
    min-height: 60px;
}

.faq-question:hover,
.faq-question:focus {
    color: var(--accent-primary);
}

.faq-question-text {
    flex: 1;
    text-align: left;
}

.faq-icon {
    font-size: 1.25rem;
    color: var(--accent-primary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(90deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    padding: 0 1.25rem;
}

.faq-answer.active {
    max-height: 500px;
    padding: 0 1.25rem 1.25rem;
    transition: max-height 0.5s ease-in, padding 0.5s ease-in;
}

.faq-answer p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
}

/* FAQ answer links */
.faq-answer a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.faq-answer a:hover,
.faq-answer a:focus {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Pro Tip Trigger Button */
.pro-tip-trigger {
    display: block;
    max-width: 900px;
    margin: 2rem auto 0;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-hover) 100%);
    color: var(--nav-text);
    border: none;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 12px var(--shadow-color);
    text-align: center;
}

.pro-tip-trigger:hover,
.pro-tip-trigger:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-color);
}

.pro-tip-trigger:active {
    transform: translateY(0);
}

.pro-tip-emoji {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

/* Pro Tip Modal */
.pro-tip-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-in;
    padding: 1rem;
}

.pro-tip-modal.show {
    display: flex;
}

.pro-tip-modal-content {
    background-color: var(--bg-secondary);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    position: relative;
    box-shadow: 0 10px 40px var(--shadow-color);
    animation: slideDown 0.4s ease-out;
    border: 3px solid var(--accent-primary);
}

.pro-tip-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-tertiary);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    transition: color 0.3s, transform 0.2s;
}

.pro-tip-modal-close:hover,
.pro-tip-modal-close:focus {
    color: var(--text-primary);
    transform: scale(1.1);
}

.pro-tip-modal h3 {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    font-weight: 700;
}

.pro-tip-modal h3::before {
    content: '💡 ';
    font-size: 2rem;
}

.pro-tip-modal p {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 1rem 0;
}

.pro-tip-modal .cta-button {
    margin-top: 1.5rem;
    font-size: 1.0625rem;
    padding: 0.875rem 2rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
    background-color: var(--nav-bg);
    color: var(--nav-text);
    padding: 2rem 1rem 1rem;
    margin-top: 3rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo {
    text-align: center;
}

.footer-logo .logo-placeholder {
    background-color: var(--nav-text);
    color: var(--nav-bg);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1.125rem;
    transition: background-color 0.3s, transform 0.2s;
    display: inline-block;
}

.footer-logo a:hover .logo-placeholder,
.footer-logo a:focus .logo-placeholder {
    background-color: var(--accent-primary);
    transition: color 0.3s ease;
    color: var(--nav-text);
    transform: scale(1.05);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 2rem;
}

.footer-links a {
    color: var(--nav-text);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem;
    transition: color 0.3s;
}

.footer-links a:hover,
.footer-links a:focus {
    color: var(--accent-primary);
    transition: color 0.3s ease;
}

.footer-copyright {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-tertiary);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    width: 100%;
}

.footer-copyright p {
    margin: 0.25rem 0;
}

.feedback-link {
    color: var(--accent-primary);
    transition: color 0.3s ease;
    text-decoration: none;
    transition: color 0.3s;
}

.feedback-link:hover,
.feedback-link:focus {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* ==========================================================================
   POPUPS & MODALS
   ========================================================================== */

/* Exit Intent Popup */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-in;
}

.popup-overlay.show {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.popup-content {
    background-color: var(--nav-text);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 40px var(--shadow-color);
    animation: slideDown 0.4s ease-out;
    text-align: center;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-tertiary);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    transition: color 0.3s, transform 0.2s;
}

.popup-close:hover,
.popup-close:focus {
    color: var(--text-primary);
    transform: scale(1.1);
}

.popup-content h3 {
    font-size: 2rem;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    font-weight: 700;
}

.popup-content p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin: 0.75rem 0;
    line-height: 1.6;
}

.popup-cta {
    color: var(--accent-primary);
    transition: color 0.3s ease;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s;
}

.popup-cta:hover,
.popup-cta:focus {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* ==========================================================================
   ACCESSIBILITY & FOCUS STATES
   ========================================================================== */

*:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

/* Tablet and up (768px+) */
@media (min-width: 768px) {
    /* Hide hamburger menu on tablet and up */
    .hamburger {
        display: none;
    }
    
    .nav-container {
        flex-wrap: nowrap;
    }
    
    /* Show horizontal navigation */
    .nav-links {
        display: flex !important;
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
        gap: 2rem;
        width: auto;
        flex: 1;
        margin-top: 0;
        padding-top: 0;
        border-top: none;
        order: 2;
    }
    
    .nav a:not(.logo) {
        padding: 0.5rem 1rem;
    }
    
    .container {
        padding: 2.5rem;
    }
    
    .header {
        flex-direction: row;
        text-align: left;
        padding: 3rem 0;
        gap: 2rem;
    }
    
    .headshot {
        width: 180px;
        height: 180px;
        margin-bottom: 0;
    }
    
    .name {
        font-size: 2.5rem;
    }
    
    .service-section {
        padding: 2rem;
    }
    
    .service-section h2 {
        font-size: 2rem;
    }
    
    /* Side-by-side layout for section-top */
    .section-top {
        flex-direction: row;
        align-items: flex-start;
        gap: 2rem;
    }
    
    .section-image {
        flex-shrink: 0;
        width: auto;
        min-width: 200px;
        max-width: 300px;
    }
    
    /* Make image match text height */
    .service-image {
        aspect-ratio: 1 / 1;
        object-fit: cover;
    }
    
    .faq-section {
        padding: 3rem 2.5rem;
    }
    
    .faq-header h2 {
        font-size: 2.5rem;
    }
    
    .faq-question {
        font-size: 1.0625rem;
        padding: 1.25rem 1.5rem;
    }
    
    .faq-answer.active {
        padding: 0 1.5rem 1.5rem;
    }
    
    .faq-answer p {
        font-size: 1.0625rem;
    }
    
    .pro-tip-trigger {
        font-size: 1.25rem;
        padding: 1.75rem 2.5rem;
    }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
    .container {
        padding: 3rem;
    }
    
    .header {
        padding: 4rem 2rem;
    }
    
    .headshot {
        width: 200px;
        height: 200px;
    }
    
    .name {
        font-size: 3rem;
    }
    
    .bio {
        font-size: 1.25rem;
    }
    
    .service-section {
        padding: 2.5rem 3rem;
    }
    
    .service-section h2 {
        font-size: 2.25rem;
    }
    
    .service-section p,
    .service-section li {
        font-size: 1.0625rem;
    }
    
    .footer {
        padding: 3rem 2rem 1.5rem;
    }
    
    .faq-section {
        padding: 4rem 3rem;
    }
    
    .faq-header h2 {
        font-size: 2.75rem;
    }
    
    .pro-tip-modal-content {
        padding: 3rem 2.5rem;
    }
    
    .pro-tip-modal h3 {
        font-size: 2rem;
    }
}

/* ==========================================================================
   DARK MODE ENHANCEMENTS
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .header {
        border-bottom-color: var(--border-color);
    }
    
    .service-section {
        border-left-color: var(--accent-primary);
        transition: color 0.3s ease;
    }
    
    .popup-overlay {
        background-color: rgba(0, 0, 0, 0.85);
    }
    
    .nav-links {
        border-top-color: rgba(255, 255, 255, 0.1);
    }
    
    .footer-copyright {
        border-top-color: rgba(255, 255, 255, 0.1);
    }
}

/* Manual dark mode (when toggle is used) */
[data-theme="dark"] .header {
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .service-section {
    border-left-color: var(--accent-primary);
    transition: color 0.3s ease;
}

[data-theme="dark"] .popup-overlay {
    background-color: rgba(0, 0, 0, 0.85);
}

[data-theme="dark"] .nav-links {
    border-top-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .footer-copyright {
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   BLOG STYLES
   ========================================================================== */

/* Blog Container */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    background-color: var(--bg-secondary);
    min-height: calc(100vh - 300px);
}

/* Blog Header */
.blog-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0 3rem;
    border-bottom: 3px solid var(--accent-primary);
}

.blog-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.blog-header p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Category Filter */
.category-filter {
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.category-filter-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    padding: 1rem 0;
}

.category-btn {
    padding: 0.625rem 1.25rem;
    border: 2px solid var(--accent-primary);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.category-btn:hover {
    background-color: var(--accent-primary);
    color: var(--nav-text);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-color);
}

.category-btn.active {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
    color: var(--nav-text);
    box-shadow: 0 2px 8px var(--shadow-color);
}

/* Blog Posts Grid */
.blog-posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 0 0.5rem;
}

/* Blog Card */
.blog-card {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow-color);
    border-color: var(--accent-primary);
}

.blog-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.blog-card-image {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    background-color: var(--placeholder-bg);
}

.blog-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-category-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.375rem 0.75rem;
    background-color: var(--accent-primary);
    color: var(--nav-text);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-card-content {
    padding: 1.75rem;
}

.blog-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-card-title {
    color: var(--accent-primary);
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.blog-separator {
    color: var(--text-tertiary);
}

.blog-card-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.blog-read-more {
    display: inline-block;
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-read-more {
    color: var(--accent-hover);
}

/* Individual Blog Post Styles */
.blog-post-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    background-color: var(--bg-secondary);
    min-height: calc(100vh - 300px);
}

.blog-post-header {
    margin-bottom: 2rem;
    padding-top: 1rem;
}

.blog-post-category {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--accent-primary);
    color: var(--nav-text);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.blog-post-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.blog-post-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 3px solid var(--accent-primary);
}

.blog-date,
.blog-read-time,
.blog-author {
    color: var(--text-tertiary);
}

.blog-post-featured-image {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 2.5rem;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow-color);
}

.blog-post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Blog Post Content */
.blog-post-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.blog-post-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 2rem 0 1rem;
    line-height: 1.3;
}

.blog-post-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 1.5rem 0 1rem;
    line-height: 1.3;
}

.blog-post-content p {
    margin-bottom: 1.5rem;
}

.blog-post-content ul,
.blog-post-content ol {
    margin: 1.5rem 0 1.5rem 2rem;
}

.blog-post-content li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.blog-post-content a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.blog-post-content a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.blog-post-content strong {
    color: var(--text-primary);
    font-weight: 700;
}

.blog-post-content blockquote {
    border-left: 4px solid var(--accent-primary);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-secondary);
}

.blog-post-content code {
    background-color: var(--bg-tertiary);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.blog-post-content pre {
    background-color: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.blog-post-content pre code {
    background-color: transparent;
    padding: 0;
}

/* Recent Posts Section */
.recent-posts-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 3px solid var(--accent-primary);
}

.recent-posts-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 2.5rem;
}

.recent-posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.recent-post-card {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.recent-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow-color);
    border-color: var(--accent-primary);
}

.recent-post-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    gap: 1rem;
}

.recent-post-image {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    overflow: hidden;
    background-color: var(--placeholder-bg);
}

.recent-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recent-post-card:hover .recent-post-image img {
    transform: scale(1.1);
}

.recent-post-content {
    padding: 1rem 1rem 1rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.recent-post-category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.recent-post-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.recent-post-date {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

/* No Posts Message */
.no-posts {
    text-align: center;
    padding: 3rem;
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* Ensure blog pages have consistent background */
body:has(.blog-container),
body:has(.blog-post-container) {
    background-color: var(--bg-primary);
}

/* Blog CTA Section */
.blog-cta-section {
    background-color: var(--bg-tertiary);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    margin: 3rem 0;
    text-align: center;
    border: 3px solid var(--accent-primary);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.blog-cta-section h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.blog-cta-section p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Responsive Blog Styles */
@media (min-width: 768px) {
    .blog-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .recent-posts-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .recent-post-link {
        flex-direction: column;
    }
    
    .recent-post-image {
        width: 100%;
        height: 180px;
    }
    
    .recent-post-content {
        padding: 1rem;
    }
    
    .blog-post-title {
        font-size: 3rem;
    }
    
    .blog-container {
        padding: 3rem 2.5rem;
    }
    
    .blog-post-container {
        padding: 3rem 2rem;
    }
}

@media (min-width: 1024px) {
    .blog-header h1 {
        font-size: 3rem;
    }
    
    .blog-posts-grid {
        gap: 2.5rem;
    }
    
    .blog-post-content {
        font-size: 1.25rem;
    }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    .nav {
        display: none;
    }
    
    body {
        background-color: white;
    }
}