/* =========================================
   GLOBAL RESET
========================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f7fa;
    color: #222222;
    line-height: 1.6;
}


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

.site-header {
    width: 100%;
    background: #ffffff;

    border-bottom: 1px solid #e5e7eb;

    position: sticky;
    top: 0;

    z-index: 1000;
}

.header-container {
    width: 100%;
    max-width: 1200px;

    min-height: 70px;

    margin: 0 auto;
    padding: 0 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;
}


/* =========================================
   LOGO
========================================= */

.site-logo {
    color: #111827;

    text-decoration: none;

    font-size: 24px;
    font-weight: 700;

    white-space: nowrap;
}


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

.main-nav {
    display: flex;
    align-items: center;

    gap: 8px;
}

.main-nav a {
    color: #374151;

    text-decoration: none;

    padding: 9px 14px;

    border-radius: 7px;

    font-size: 15px;
    font-weight: 500;

    transition: all 0.2s ease;
}

.main-nav a:hover {
    background: #f1f5f9;
    color: #111827;
}


/* =========================================
   MAIN AREA
========================================= */

.site-main {
    width: 100%;
}

.page-container {
    width: 100%;
    max-width: 1200px;

    margin: 0 auto;

    padding: 30px 20px;

    display: flex;
    align-items: flex-start;

    gap: 25px;
}


/* =========================================
   LEFT MAIN CONTENT - 70%
========================================= */

.main-content {
    width: 70%;
    min-width: 0;
}

.content-box {
    width: 100%;

    background: #ffffff;

    padding: 30px;

    border-radius: 12px;

    border: 1px solid #e5e7eb;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.content-box h1 {
    margin-bottom: 15px;

    font-size: 30px;

    line-height: 1.3;

    color: #111827;
}

.content-box p {
    margin-bottom: 15px;

    color: #4b5563;
}

.homepage-steps {
    margin: 0 0 20px 24px;
    color: #4b5563;
}

.homepage-steps li {
    margin-bottom: 8px;
}

.homepage-faq h3 {
    margin: 22px 0 6px;
    font-size: 18px;
    color: #111827;
}


/* =========================================
   PRIMARY BUTTON
========================================= */

.primary-button {
    display: inline-block;

    margin-top: 10px;

    padding: 12px 22px;

    background: #111827;
    color: #ffffff;

    text-decoration: none;

    font-size: 15px;
    font-weight: 600;

    border-radius: 8px;

    transition: all 0.2s ease;
}

.primary-button:hover {
    background: #374151;

    color: #ffffff;

    transform: translateY(-1px);
}


/* =========================================
   CALCULATOR LIST (Homepage)
========================================= */

.calculator-list {
    list-style: none;

    display: grid;
    grid-template-columns: repeat(2, 1fr);

    gap: 14px;

    margin-top: 20px;
}

.calculator-list-item a {
    display: flex;
    align-items: center;

    gap: 12px;

    padding: 16px;

    background: #f9fafb;

    border: 1px solid #e5e7eb;
    border-radius: 10px;

    text-decoration: none;
    color: #111827;

    transition: all 0.2s ease;
}

.calculator-list-item a:hover {
    background: #111827;
    color: #ffffff;

    transform: translateY(-2px);

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.calculator-icon {
    width: 42px;
    height: 42px;

    flex-shrink: 0;

    border-radius: 8px;

    background: #111827;
    color: #ffffff;

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: 700;
    font-size: 13px;

    transition: all 0.2s ease;
}

.calculator-list-item a:hover .calculator-icon {
    background: #ffffff;
    color: #111827;
}

.calculator-info {
    min-width: 0;
}

.calculator-name {
    display: block;

    font-weight: 600;
    font-size: 15px;
}

.calculator-desc {
    display: block;

    font-size: 13px;

    color: #6b7280;

    margin-top: 2px;
}

.calculator-list-item a:hover .calculator-desc {
    color: #e5e7eb;
}


/* =========================================
   RIGHT SIDEBAR - 30%
========================================= */

.sidebar {
    width: 30%;
    min-width: 0;

    position: sticky;

    top: 95px;

    align-self: flex-start;
}

.sidebar-box {
    width: 100%;

    background: #ffffff;

    padding: 20px;

    border-radius: 12px;

    border: 1px solid #e5e7eb;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sidebar-box h2 {
    margin-bottom: 12px;

    font-size: 20px;

    color: #111827;
}

.sidebar-box p {
    color: #4b5563;

    font-size: 15px;
}


/* =========================================
   ADVERTISEMENT CONTAINER
========================================= */

.ad-container {
    width: 100%;

    min-height: 250px;

    margin-bottom: 20px;

    display: flex;

    justify-content: center;
    align-items: center;

    text-align: center;

    overflow: hidden;
}

.ad-container:last-child {
    margin-bottom: 0;
}


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

.site-footer {
    width: 100%;

    margin-top: 40px;

    background: #111827;

    color: #ffffff;
}

.footer-container {
    width: 100%;
    max-width: 1200px;

    margin: 0 auto;

    padding: 40px 20px;

    display: flex;

    gap: 50px;
}

.footer-column {
    flex: 1;
}

.footer-column h3 {
    margin-bottom: 12px;

    font-size: 18px;

    color: #ffffff;
}

.footer-column p {
    color: #d1d5db;
}

.footer-column a {
    display: block;

    color: #d1d5db;

    text-decoration: none;

    margin-bottom: 7px;

    transition: color 0.2s ease;
}

.footer-column a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid #374151;

    text-align: center;

    padding: 18px 20px;

    color: #9ca3af;

    font-size: 14px;
}


/* =========================================
   TABLET
========================================= */

@media (max-width: 900px) {

    .page-container {
        gap: 20px;
    }

    .content-box {
        padding: 25px;
    }

    .sidebar-box {
        padding: 18px;
    }

}

/* Keyboard access and motion preferences apply to every public page. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #f59e0b;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 768px) {

    /* Header */

    .header-container {
        min-height: auto;

        padding-top: 15px;
        padding-bottom: 15px;

        flex-direction: column;

        gap: 12px;
    }


    /* Navigation */

    .main-nav {
        width: 100%;

        justify-content: center;

        flex-wrap: wrap;

        gap: 4px;
    }

    .main-nav a {
        font-size: 14px;

        padding: 7px 10px;
    }


    /* Main Layout */

    .page-container {
        flex-direction: column;

        padding: 20px 15px;

        gap: 20px;
    }


    /* Main Content */

    .main-content {
        width: 100%;
    }

    .content-box {
        width: 100%;

        padding: 22px 18px;
    }

    .content-box h1 {
        font-size: 25px;
    }


    /* Calculator list on mobile: 1 column */

    .calculator-list {
        grid-template-columns: 1fr;
    }


    /* Sidebar */

    .sidebar {
        width: 100%;

        position: static;
    }

    .sidebar-box {
        width: 100%;

        padding: 18px;
    }


    /* Ads */

    .ad-container {
        width: 100%;

        min-height: 200px;

        margin-bottom: 15px;
    }


    /* Footer */

    .footer-container {
        flex-direction: column;

        gap: 25px;

        padding: 30px 20px;
    }

}


/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 480px) {

    /* Logo */

    .site-logo {
        font-size: 21px;
    }


    /* Navigation */

    .main-nav {
        gap: 3px;
    }

    .main-nav a {
        font-size: 13px;

        padding: 6px 8px;
    }


    /* Page */

    .page-container {
        padding: 15px 10px;
    }


    /* Content */

    .content-box {
        padding: 18px 15px;

        border-radius: 9px;
    }

    .content-box h1 {
        font-size: 23px;
    }


    /* Sidebar */

    .sidebar-box {
        padding: 15px;

        border-radius: 9px;
    }


    /* Ads */

    .ad-container {
        min-height: 180px;
    }


    /* Footer */

    .footer-container {
        padding: 25px 15px;
    }

    .footer-bottom {
        padding: 15px 10px;

        font-size: 13px;
    }

}


/* =========================================
   HOMEPAGE PROFESSIONAL UI REFRESH
========================================= */

body {
    background:
        radial-gradient(circle at 4% 0%, rgba(37, 99, 235, 0.10), transparent 28rem),
        #f6f8fc;
    color: #172033;
}

.site-header {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(14px);
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06);
}

.site-logo {
    letter-spacing: -0.4px;
}

.main-nav a:hover {
    background: #eff6ff;
    color: #2563eb;
    transform: translateY(-1px);
}

.content-box,
.sidebar-box {
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07);
}

.content-box {
    border-top: 3px solid #3b82f6;
}

.content-box h1 {
    color: #0f172a;
    letter-spacing: -0.8px;
}

.content-box h2 {
    margin-top: 40px;
    color: #172554;
    font-size: 24px;
    letter-spacing: -0.4px;
}

.calculator-list-item a {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 5px 13px rgba(15, 23, 42, 0.035);
}

.calculator-list-item a:hover {
    background: linear-gradient(135deg, #1d4ed8, #4338ca);
    border-color: transparent;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.23);
}

.calculator-icon {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.16);
}

.site-footer {
    background: linear-gradient(135deg, #0f172a, #172554);
}

.site-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-card {
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07);
}

.sidebar-eyebrow,
.sidebar-heading > span {
    display: block;
    color: #2563eb;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.sidebar-heading h2,
.sidebar-feature-card h2 {
    margin: 4px 0 14px;
    color: #172554;
    font-size: 20px;
}

.sidebar-feature-card {
    background: linear-gradient(145deg, #1d4ed8, #4338ca);
    border: 0;
    color: #ffffff;
}

.sidebar-feature-card h2,
.sidebar-feature-card p,
.sidebar-feature-card .sidebar-eyebrow { color: #ffffff; }
.sidebar-feature-card p { color: rgba(255, 255, 255, 0.8); font-size: 13px; }

.sidebar-cta {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding: 10px 12px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 13px;
    font-weight: 700;
}

.tools-list { display: flex; flex-direction: column; }
.tool-item { display: grid; grid-template-columns: 36px minmax(0, 1fr) 14px; gap: 9px; align-items: center; padding: 10px 0; border-bottom: 1px solid #eef2f7; }
.tool-item:last-child { border-bottom: 0; }
.tool-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 8px; background: #eff6ff; color: #2563eb; font-size: 10px; font-weight: 800; }
.tool-info { display: flex; min-width: 0; flex-direction: column; }
.tool-info strong { overflow: hidden; color: #172033; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.tool-info small { overflow: hidden; color: #64748b; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.tool-arrow { color: #94a3b8; }
.sidebar-category-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sidebar-category-links a { padding: 8px; border: 1px solid #e2e8f0; border-radius: 8px; color: #475569; font-size: 12px; font-weight: 700; }
.sidebar-category-links a:hover { background: #eff6ff; border-color: #bfdbfe; color: #2563eb; }

/* Homepage matches the compact tool-page navigation on phones. */
.homepage-menu-button, .homepage-mobile-navigation { display: none; }
.logo-mark { display: grid; width: 38px; height: 38px; place-items: center; flex: 0 0 38px; border-radius: 10px; background: linear-gradient(135deg, #2563eb, #4f46e5); color: #fff; font-size: 16px; font-weight: 800; }
.info-page { max-width: 820px; margin: 0 auto; }
.info-page .content-box { padding: clamp(24px, 5vw, 46px); }
.info-page h2 { margin: 32px 0 10px; }
.info-page ul { margin: 0 0 18px 22px; color: #4b5563; }
.info-page li { margin: 7px 0; }
.contact-card { padding: 18px; border: 1px solid #dbeafe; border-radius: 12px; background: #f8fbff; }
.site-search { margin: 28px 0 36px; padding: clamp(20px, 4vw, 30px); border: 1px solid #bfdbfe; border-radius: 18px; background: radial-gradient(circle at 95% 5%, #dbeafe, transparent 38%), linear-gradient(135deg, #eff6ff, #fff); }
.site-search h2 { margin: 4px 0 6px !important; font-size: clamp(22px, 4vw, 29px) !important; }
.site-search p { margin-bottom: 16px; }
.site-search-kicker { color: #2563eb; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.site-search-input-wrap { display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 2px solid #93c5fd; border-radius: 12px; background: #fff; color: #2563eb; font-size: 24px; }
.site-search-input-wrap:focus-within { border-color: #2563eb; box-shadow: 0 0 0 4px rgba(37,99,235,.12); }
.site-search-input-wrap input { width: 100%; min-height: 52px; border: 0; outline: 0; background: transparent; color: #0f172a; font: inherit; font-size: 16px; }
.site-search-results { display: none; margin-top: 10px; overflow: hidden; border: 1px solid #dbeafe; border-radius: 12px; background: #fff; }
.site-search-results.is-open { display: block; }
.site-search-results a { display: block; padding: 12px 15px; border-bottom: 1px solid #eef2ff; color: #172554; text-decoration: none; }
.site-search-results a:last-child { border-bottom: 0; }
.site-search-results a:hover { background: #eff6ff; }
.site-search-results strong, .site-search-results span { display: block; }
.site-search-results span, .site-search-results p { margin: 3px 0 0; color: #64748b; font-size: 13px; }
.site-search-results p { padding: 14px; }

/* Search is part of the header, with live results on the homepage. */
.header-search-results { display: none; position: absolute; top: calc(100% + 8px); right: 0; z-index: 1200; width: min(360px, calc(100vw - 24px)); overflow: hidden; border: 1px solid #dbeafe; border-radius: 12px; background: #fff; box-shadow: 0 16px 30px rgba(15, 23, 42, .16); }
.header-search-results.is-open { display: block; }
.header-search-results a { display: block; padding: 11px 14px; border-bottom: 1px solid #eef2ff; color: #172554; text-decoration: none; }
.header-search-results a:last-child { border-bottom: 0; }
.header-search-results a:hover { background: #eff6ff; }
.header-search-results strong, .header-search-results span { display: block; }
.header-search-results span, .header-search-results p { margin: 3px 0 0; color: #64748b; font-size: 12px; }
.header-search-results p { padding: 13px; }

@media (max-width: 900px) {
    .header-container { min-height: 64px; flex-direction: row; padding-top: 0; padding-bottom: 0; }
    .main-nav { display: none; }
    .homepage-menu-button { display: block; }
    .homepage-mobile-navigation { position: fixed; top: 64px; right: 0; left: 0; z-index: 1001; max-height: calc(100vh - 64px); overflow-y: auto; box-shadow: 0 16px 28px rgba(15, 23, 42, .14); }
    .homepage-mobile-navigation.open { display: block; }
}
