/* Header Inline CSS - Moved to external file for optimization */

/* Custom CSS Variables */
:root {
    --primary-color: #3B82F6;
    --secondary-color: #10B981;
    --accent-color: #F59E0B;
    --danger-color: #EF4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --border-color: #e5e7eb;
    /* Brand gradient (matches newsletter card) */
    --brand-start: #0EA5E9; /* cyan-500 */
    --brand-end: #10B981;   /* emerald-500 */
}

/* Global spacing fixes */
html, body { margin: 0; padding: 0; }
.site-header { margin-top: 0 !important; }
.site-footer { margin-bottom: 0 !important; }

/* Sticky footer layout to avoid white space below footer on short pages */
body { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg-primary); }
main.site-main { flex: 1 0 auto; }
footer.site-footer { flex-shrink: 0; }

/* Text Gradient */
.text-gradient {
    background: linear-gradient(135deg, #fbbf24, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    .container {
        padding: 0 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 0.75rem;
        max-width: 100%;
    }
}

/* Section Badge */
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

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

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

@media (max-width: 768px) {
    .section-header h2 {
        font-size: 2.25rem;
    }
}

/* Hero Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

/* Hero Actions */
.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Calculator Header */
.calculator-header {
    text-align: center;
    margin-bottom: 2rem;
}

.calculator-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: white;
}

.calculator-header h3 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.calculator-header p {
    color: var(--text-secondary);
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* Importance Content */
.importance-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.importance-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    border-radius: 1rem;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.importance-item:hover {
    background: var(--bg-primary);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.importance-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color), #2563eb);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.5rem;
    color: white;
}

.importance-item h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.importance-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    justify-items: stretch;
}

.posts-grid.single-card-grid {
    grid-template-columns: minmax(280px, 420px);
    justify-content: center;
}

@media (max-width: 1024px) {
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .posts-grid { grid-template-columns: 1fr; }
}

.post-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.post-thumbnail {
    height: 200px;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-content {
    padding: 1.5rem;
}

.post-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.post-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-excerpt {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Newsletter */
.newsletter {
    background: linear-gradient(135deg, var(--brand-start), var(--brand-end));
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.newsletter::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(16, 185, 129, 0.1));
}

.newsletter-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
}

.newsletter-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.newsletter h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.newsletter p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.newsletter-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .importance-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .newsletter h2 {
        font-size: 2.25rem;
    }
    
    .newsletter-features {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Header Styles */
.site-header {
    background: var(--bg-primary);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 100;
    overflow-x: hidden;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    width: 100%;
    box-sizing: border-box;
}

/* Custom Logo image normalization */
.custom-logo-link img, .custom-logo {
    max-height: 48px;
    height: auto;
    width: auto;
}

/* Footer logo override to be slightly smaller */
.site-footer .custom-logo-link img, .site-footer .custom-logo {
    max-height: 40px;
}

.site-title {
    font-family: 'Pacifico', cursive;
    font-size: 1.75rem;
    font-weight: 400;
    margin: 0;
}

.site-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.site-title a:hover {
    opacity: 0.8;
}

.main-navigation {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2.5rem;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    display: block;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-primary);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Desktop Navigation - Hide menu toggle by default */
.menu-toggle {
    display: none;
}

/* Desktop Menu */
.desktop-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.desktop-menu li {
    margin: 0;
}

.desktop-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.desktop-menu a:hover {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    gap: 4px;
}

.hamburger-line {
    width: 24px;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    /* Brand gradient with stronger dark overlay for muted tone */
    background: 
        linear-gradient(135deg, var(--brand-start), var(--brand-end)),
        linear-gradient(0deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.28)) !important;
    background-blend-mode: multiply;
    z-index: 1001;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-title {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.3s ease;
}

.mobile-menu-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 1rem 0;
}

.mobile-menu-list li {
    margin: 0;
}

.mobile-menu-list a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-menu-list a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffd700;
    padding-left: 2rem;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Body scroll lock when menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .header-content {
        padding: 0.5rem 0;
        min-height: auto;
    }
    
    .custom-logo-link img, .custom-logo {
        max-height: 40px;
    }
    
    .desktop-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
}

/* Custom Logo image normalization */
.custom-logo-link img, .custom-logo {
    max-height: 48px;
    height: auto;
    width: auto;
}

/* Footer logo override to be slightly smaller */
.site-footer .custom-logo-link img, .site-footer .custom-logo {
    max-height: 40px;
}

.site-title {
    font-family: 'Pacifico', cursive;
    font-size: 1.75rem;
    font-weight: 400;
    margin: 0;
}

.site-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.site-title a:hover {
    opacity: 0.8;
}

.main-navigation {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2.5rem;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    display: block;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-primary);
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

@media (max-width: 768px) {
    .site-header {
        overflow-x: hidden;
    }
    
    .header-content {
        padding: 1rem 0;
        min-height: auto;
    }
    
    .site-title {
        font-size: 1.5rem;
    }
    
    .custom-logo-link img, .custom-logo {
        max-height: 40px;
    }
    
    .menu-toggle {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex-shrink: 0;
    }
    
    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 2rem;
        transition: right 0.3s ease;
        z-index: 101;
    }
    
    .nav-menu.active {
        display: flex;
        right: 0;
    }
    
    .mobile-menu-overlay.active {
        display: block;
    }
}