/*
Theme Name: Tools 804
Theme URI: https://tools804.com
Author: Tools 804 Team
Author URI: https://tools804.com
Description: A premium, fast, and professional WordPress theme designed specifically for online tool sites and blogs. Features a modern dark footer, styled comments, and optimized search functionality.
Version: 1.7.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: tools-804
Tags: tools, utilities, news, blog, two-columns, custom-menu, featured-images, translation-ready, dark-footer, custom-colors, custom-logo
*/

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #0ea5e9;
    --accent: #f43f5e;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --footer-bg: #0f172a;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 12px;
    --font: 'Poppins', system-ui, sans-serif;
}

/* Base resets and centering */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    background: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    display: block;
    margin: 0 auto;
}

/* GLOBAL CENTER ALIGNMENT */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.text-center {
    text-align: center;
}

/* Header */
.site-header {
    background: #fff;
    padding: 15px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    flex-shrink: 0;
}

.site-logo span {
    color: var(--text-main);
    font-weight: 400;
}

.site-logo .logo-image {
    height: 40px;
    width: auto;
    margin-right: 8px;
    vertical-align: middle;
}

/* Navigation - Center */
.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* Search - Right Side */
.header-search {
    position: relative;
    display: flex;
    align-items: center;
}

.search-toggle {
    background: var(--primary);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.search-toggle:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.header-search .search-form {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    align-items: center;
    background: #f8fafc;
    border-radius: 25px;
    border: 2px solid #e2e8f0;
    width: 320px;
    z-index: 1000;
    overflow: hidden;
}

.header-search.active .search-form {
    display: flex;
}

.header-search.active .search-toggle {
    display: none;
}

.header-search .search-form input,
.header-search .search-form input[type="text"],
.header-search .search-form input[type="search"] {
    flex: 1;
    border: 0;
    background: transparent;
    padding: 12px 16px;
    outline: 0;
    font-size: 14px;
    color: #333;
}

.header-search .search-form input::placeholder {
    color: #94a3b8;
}

.header-search .search-form:focus-within {
    border-color: var(--primary);
}

.header-search .search-form button[type="submit"] {
    background: var(--primary);
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin: 4px;
}

.header-search .search-form button[type="submit"]:hover {
    background: var(--primary-dark);
}

.search-close {
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 4px;
}

.search-close:hover {
    background: #e2e8f0;
    color: #334155;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-main);
    cursor: pointer;
    padding: 5px;
}

.main-nav ul {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav>ul {
    display: flex;
    gap: 20px;
}

.main-nav li {
    position: relative;
}

.main-nav a {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 0;
}

.main-nav a:hover {
    color: var(--primary);
}

/* Dropdown arrow for parent items */
.main-nav .menu-item-has-children>a::after {
    content: '▼';
    font-size: 8px;
    margin-left: 4px;
    transition: transform 0.3s;
}

.main-nav .menu-item-has-children:hover>a::after {
    transform: rotate(180deg);
}

/* Sub-menu / Dropdown */
.main-nav .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 200px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid var(--border);
    /* FIX: Display items vertically as list */
    display: flex;
    flex-direction: column;
    gap: 0;
}

.main-nav li:hover>.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-nav .sub-menu li {
    width: 100%;
}

.main-nav .sub-menu a {
    display: block;
    padding: 10px 20px;
    font-size: 13px;
    color: var(--text-main);
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.main-nav .sub-menu a:hover {
    background: #f8fafc;
    color: var(--primary);
    border-left-color: var(--primary);
}

/* Nested sub-menu (sub-sub menu) */
.main-nav .sub-menu .sub-menu {
    top: 0;
    left: 100%;
    margin-left: 0;
}

.main-nav .sub-menu .menu-item-has-children>a::after {
    content: '▶';
    margin-left: auto;
}

/* Menu Item Featured Images */
.main-nav .sub-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-thumb-wrap {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
}

.menu-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.menu-no-thumb {
    color: #fff;
    font-size: 12px;
}

.menu-no-thumb i {
    font-size: 12px;
}

/* Main layout alignment */
.content-area {
    margin: 20px auto;
    width: 100%;
    max-width: 1200px;
}

.main-content {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin: 0 auto;
    width: 100%;
}

.main-content.full-width {
    flex-direction: column;
    align-items: center;
}

/* Titles and Meta - STRICT CENTERING */
.section-title {
    font-size: 22px;
    font-weight: 700;
    margin: 20px auto 25px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-bottom: 15px;
    position: relative;
    width: 100%;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 10px;
}

.section-title i {
    color: var(--primary);
    font-size: 0.9em;
}

.tool-page-header {
    background: #fff;
    padding: 20px 0 10px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
    text-align: center;
}

.tool-page-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 5px;
    line-height: 1.3;
    color: var(--text-main);
}

/* Grid Centering */
/* Tools Grid - Clean Modern Design */
.tools-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 0 auto 40px;
    width: 100%;
    padding: 20px;
    background: #f0f2f5;
    border-radius: 16px;
}

.tool-card {
    width: 140px;
    flex-shrink: 0;
    background: #fff;
    padding: 25px 15px 20px;
    border-radius: 12px;
    text-align: center;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.tool-icon {
    width: 80px;
    height: 80px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 48px;
    transition: transform 0.3s ease;
}

.tool-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
}

.tool-card:hover .tool-icon {
    transform: scale(1.1);
}

.tool-card h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.4;
    margin: 0;
}

/* Articles Grid - STRICT CENTERING */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    width: 100%;
    justify-content: center;
    justify-items: center;
    margin: 0 auto;
}

.post-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    max-width: 380px;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.post-info {
    padding: 25px;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.post-stats {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    border-top: 1px solid #f1f5f9;
    padding-top: 15px;
    margin-top: auto;
    justify-content: center;
}

.post-meta {
    display: flex;
    justify-content: center;
    font-size: 11px;
    color: var(--text-muted);
}

/* Blog Header and Meta */
.blog-header {
    margin-bottom: 30px;
}

.blog-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 15px;
    line-height: 1.3;
}

.blog-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-meta i {
    color: var(--primary);
    font-size: 1.1em;
}

.blog-meta a {
    color: inherit;
    font-weight: 600;
}

.blog-meta a:hover {
    color: var(--primary);
}

/* Single Page Content Centering */
.blog-article,
.tool-container {
    background: #fff;
    padding: 40px 50px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin: 0 auto 40px;
    max-width: 1100px;
    width: 100%;
    box-shadow: var(--shadow);
}

/* Content Typography and Spacing */
.blog-content,
.tool-embed,
.page-content {
    font-size: 17px;
    line-height: 1.8;
    color: #334155;
}

.blog-content p,
.tool-embed p,
.page-content p {
    margin-bottom: 25px;
}

.blog-content h2,
.blog-content h3,
.blog-content h4,
.tool-embed h2,
.tool-embed h3,
.tool-embed h4 {
    margin: 45px 0 20px;
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.3;
}

.blog-content h2,
.tool-embed h2 {
    font-size: 28px;
}

.blog-content h3,
.tool-embed h3 {
    font-size: 22px;
}

.blog-content ul,
.blog-content ol,
.tool-embed ul,
.tool-embed ol {
    margin-bottom: 25px;
    padding-left: 25px;
}

.blog-content li,
.tool-embed li {
    margin-bottom: 12px;
}

.blog-content strong,
.tool-embed strong {
    color: #1e293b;
    font-weight: 700;
}

/* Comments */
.comments-area {
    background: #fff;
    padding: 40px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin: 30px auto 80px;
    max-width: 1100px;
    width: 100%;
}

/* Comment Form - FORCED SYTLES */
#respond {
    margin-top: 30px;
    border-top: 1px solid var(--border);
    padding-top: 25px;
}

#reply-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    display: block;
}

.comment-form-comment textarea,
.comment-form-author input,
.comment-form-email input,
.comment-form-url input {
    width: 100% !important;
    padding: 12px 18px !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    background: #f8fafc !important;
    margin-bottom: 15px !important;
    font-family: inherit !important;
    font-size: 14px !important;
    display: block !important;
    box-sizing: border-box !important;
}

.comment-form-comment textarea {
    min-height: 120px;
}

.submit {
    background: var(--primary) !important;
    color: #fff !important;
    padding: 12px 30px !important;
    border-radius: 50px !important;
    border: none !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: 0.3s !important;
}

.submit:hover {
    background: var(--primary-dark) !important;
    transform: translateY(-2px);
}

.comment-list .pingback {
    background: #f1f5f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 13px;
}

.comment-body {
    background: #f8fafc;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    text-align: left;
}

.comment-author img {
    border-radius: 50%;
    width: 50px;
    height: 50px;
}

/* Footer - CLEAN & CENTERED */
.site-footer {
    background: var(--footer-bg);
    color: #94a3b8;
    padding: 70px 0 40px;
    margin-top: 80px;
    text-align: center;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 50px;
    margin-bottom: 60px;
    justify-content: center;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.footer-logo {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 20px;
}

.footer-logo span {
    color: var(--primary-light);
}

.footer-col {
    max-width: 350px;
    text-align: left;
}

.footer-col h4 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 25px;
    font-weight: 700;
    position: relative;
    padding-bottom: 12px;
}

.footer-col h4::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 35px;
    height: 3px;
    background: var(--primary);
    border-radius: 5px;
}

.footer-col p {
    font-size: 14px;
    line-height: 1.7;
    color: #94a3b8;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 12px;
    font-size: 14px;
}

.footer-col ul li a {
    color: #94a3b8;
    transition: 0.3s;
}

.footer-col ul li a:hover {
    color: #fff;
    padding-left: 0;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 40px;
    text-align: center;
    font-size: 13px;
    color: #64748b;
}

/* Sidebar */
.sidebar {
    width: 300px;
    flex-shrink: 0;
    margin: 0 auto;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .header-inner {
        flex-direction: column;
        gap: 15px;
    }

    .header-search {
        order: 3;
        width: 100%;
    }

    .main-nav {
        order: 2;
    }

    .main-nav ul {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-article,
    .tool-container,
    .comments-area {
        padding: 20px;
    }
}

/* =====================================================
   CONTACT PAGE STYLES
   ===================================================== */

.contact-page {
    max-width: 1000px !important;
}

.contact-page .blog-header {
    text-align: center;
    margin-bottom: 40px;
}

.contact-page .blog-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.contact-page .blog-title i {
    color: var(--primary);
    font-size: 0.85em;
}

.contact-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    margin: 0;
}

/* Contact Info Cards */
.contact-info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.info-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.info-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
    color: #fff;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.info-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.info-card p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

/* Contact Form Wrapper */
.contact-form-wrapper {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow);
}

.form-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 30px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.form-title i {
    color: var(--primary);
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Form Groups */
.contact-form .form-group {
    margin-bottom: 25px;
}

.contact-form label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 10px;
}

.contact-form label i {
    color: var(--primary);
    font-size: 14px;
}

.contact-form label .required {
    color: var(--accent);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: #fff;
    font-family: var(--font);
    font-size: 14px;
    color: var(--text-main);
    transition: all 0.3s ease;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #94a3b8;
}

.contact-form select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10L6 8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.contact-form textarea {
    resize: vertical;
    min-height: 140px;
}

/* Submit Button */
.form-submit {
    text-align: center;
    margin-top: 10px;
}

.submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: 50px;
    color: #fff;
    font-family: var(--font);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.35);
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(99, 102, 241, 0.45);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-text,
.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Form Messages */
.form-message {
    margin-top: 25px;
    padding: 0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.form-message.success {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border: 1px solid #86efac;
    color: #166534;
    padding: 18px 25px;
}

.form-message.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 18px 25px;
}

.form-message i {
    font-size: 18px;
}

/* Newsletter Checkbox */
.newsletter-checkbox {
    margin: 20px 0 !important;
}

.newsletter-checkbox .checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 15px 20px;
    background: rgba(var(--primary-rgb, 0, 123, 255), 0.05);
    border-radius: 10px;
    border: 2px dashed rgba(var(--primary-rgb, 0, 123, 255), 0.3);
    transition: all 0.3s ease;
}

.newsletter-checkbox .checkbox-label:hover {
    background: rgba(var(--primary-rgb, 0, 123, 255), 0.1);
    border-color: rgba(var(--primary-rgb, 0, 123, 255), 0.5);
}

.newsletter-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    accent-color: var(--primary-color, #007bff);
    cursor: pointer;
}

.newsletter-checkbox .checkbox-text {
    color: #555;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.newsletter-checkbox .checkbox-text i {
    color: var(--primary-color, #007bff);
}

/* Responsive */
@media (max-width: 768px) {
    .contact-page .blog-title {
        font-size: 24px;
    }

    .contact-form-wrapper {
        padding: 25px 20px;
    }

    .info-card {
        padding: 25px 15px;
    }

    .info-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .submit-btn {
        width: 100%;
        padding: 14px 30px;
    }

    .newsletter-checkbox .checkbox-label {
        padding: 12px 15px;
    }

    /* Header Mobile Styles */
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .main-nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: #fff;
        padding: 20px;
        box-shadow: var(--shadow-lg);
        display: none;
        flex-direction: column;
        z-index: 999;
    }

    .main-nav.active {
        display: flex;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }

    .main-nav>ul>li {
        border-bottom: 1px solid var(--border);
    }

    .main-nav a {
        padding: 15px 10px;
    }

    .main-nav .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding-left: 20px;
        background: #f8fafc;
    }

    .header-search .search-form {
        position: fixed;
        top: 70px;
        left: 10px;
        right: 10px;
        width: auto;
        border-radius: var(--radius);
    }

    .header-inner {
        gap: 10px;
    }

    .site-logo {
        font-size: 20px;
    }
}

/* Floating Table of Contents */
.post-toc {
    position: fixed;
    top: 15vh;
    left: 30px;
    width: 280px;
    max-height: 70vh;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    z-index: 1000;
    text-align: left;
    display: none;
    transition: all 0.3s ease;
}

.post-toc.has-content {
    display: block;
}

.toc-title {
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-main);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-light);
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-item {
    margin-bottom: 12px;
}

.toc-item a {
    font-size: 14px;
    color: var(--text-muted);
    transition: 0.3s;
    text-decoration: none;
    line-height: 1.5;
}

.toc-item a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.toc-h3 {
    margin-left: 15px;
    border-left: 2px solid var(--border);
    padding-left: 12px;
}

.toc-h3 a {
    font-size: 13px;
}

/* =====================================================
   NEW TABLE OF CONTENTS - Fixed Left Sidebar
   ===================================================== */

/* Blog with TOC Layout */
.blog-with-toc {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    width: 100%;
}

/* TOC Wrapper - Fixed Left Position */
.toc-wrapper {
    position: sticky;
    top: 100px;
    width: 260px;
    min-width: 260px;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
    background: transparent;
    border-radius: 0;
    border: none;
    box-shadow: none;
    padding: 20px 15px;
    flex-shrink: 0;
}

.toc-wrapper::-webkit-scrollbar {
    width: 4px;
}

.toc-wrapper::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.toc-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

.toc-header {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-main);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.toc-header i {
    color: var(--primary);
}

.toc-wrapper .toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-wrapper .toc-item {
    margin-bottom: 8px;
    padding-left: 0;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.toc-wrapper .toc-item a {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    padding: 8px 12px;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.4;
    border-radius: 6px;
}

.toc-wrapper .toc-item a:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

/* Active State */
.toc-wrapper .toc-item.active {
    border-left-color: var(--primary);
}

.toc-wrapper .toc-item.active a {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    font-weight: 600;
}

/* H3 Items - Indented */
.toc-wrapper .toc-item-h3 {
    margin-left: 12px;
}

.toc-wrapper .toc-item-h3 a {
    font-size: 12px;
    padding: 6px 10px;
}

/* Main Content takes remaining space */
.blog-with-toc .main-content {
    flex: 1;
    min-width: 0;
}

/* Media Query: Hide TOC on smaller screens */
@media screen and (max-width: 1200px) {
    .toc-wrapper {
        display: none !important;
    }

    .blog-with-toc {
        display: block;
    }
}

/* Search Results Sections - Centering */
.tools-section,
.blog-section {
    text-align: center;
    margin: 0 auto;
    width: 100%;
}

.tools-section h2,
.blog-section h2 {
    text-align: center;
    justify-content: center;
}

.tools-section .tools-grid,
.blog-section .posts-grid {
    justify-content: center;
    margin: 0 auto;
}

/* No results message centering */
.error-404 {
    text-align: center;
}

.error-404 .tools-grid {
    justify-content: center;
    margin: 0 auto;
}

@media screen and (max-width: 1024px) {
    .post-toc {
        display: none !important;
    }
}