/* =========================================================
   MONEYTOOL.IO
   HOMEPAGE v2.0
   Clean • Fast • Responsive • SEO/AdSense Friendly
   ========================================================= */


/* =========================================================
   HERO
   ========================================================= */

.home-hero {
    padding: 92px 0 72px;
    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(16, 185, 129, 0.09),
            transparent 38%
        ),
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f8fafc 100%
        );
}

.hero-content {
    max-width: 850px;
    margin: 0 auto;
    text-align: center;
}

.hero-eyebrow,
.section-eyebrow {
    display: inline-block;
    margin-bottom: 15px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.hero-content h1 {
    max-width: 900px;
    margin: 0 auto;
    color: var(--text-primary);
    font-size: clamp(40px, 5vw, 64px);
    line-height: 1.07;
    letter-spacing: -0.045em;
}

.hero-content h1 span {
    display: block;
    color: var(--primary);
}

.hero-description {
    max-width: 720px;
    margin: 24px auto 34px;
    color: var(--text-body);
    font-size: 18px;
    line-height: 1.7;
}

.hero-search {
    display: flex;
    align-items: center;
    max-width: 720px;
    min-height: 66px;
    margin: 0 auto;
    padding: 6px;
    background: #ffffff;
    border: 1px solid var(--border-normal);
    border-radius: 15px;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.09);
}

.hero-search:focus-within {
    border-color: var(--primary);
    box-shadow:
        0 14px 40px rgba(15, 23, 42, 0.10),
        0 0 0 4px rgba(15, 118, 110, 0.08);
}

.hero-search-icon {
    width: 48px;
    color: var(--text-light);
    font-size: 24px;
    text-align: center;
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 12px 8px;
    color: var(--text-primary);
    font: inherit;
    font-size: 15px;
}

.hero-search button {
    min-height: 52px;
    padding: 0 28px;
    border: 0;
    border-radius: 11px;
    background: var(--primary);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-search button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.hero-popular-searches {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 15px;
    margin-top: 17px;
    font-size: 13px;
}

.hero-popular-searches span {
    color: var(--text-light);
}

.hero-popular-searches a {
    color: var(--primary);
    font-weight: 700;
}

.hero-popular-searches a:hover {
    text-decoration: underline;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    max-width: 900px;
    margin: 58px auto 0;
    padding-top: 30px;
    border-top: 1px solid var(--border-normal);
}

.hero-stat {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: center;
}

.hero-stat strong {
    color: var(--text-primary);
    font-family: var(--font-numeric);
    font-size: 24px;
    font-weight: 800;
}

.hero-stat span {
    color: var(--text-light);
    font-size: 13px;
}


/* =========================================================
   TRUST BAR
   ========================================================= */

.trust-bar {
    border-top: 1px solid var(--border-normal);
    border-bottom: 1px solid var(--border-normal);
    background: #ffffff;
}

.trust-items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.trust-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 19px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
}

.trust-item span {
    color: var(--success);
    font-size: 16px;
    font-weight: 900;
}


/* =========================================================
   GENERAL SECTIONS
   ========================================================= */

.home-section {
    padding: 92px 0;
    background: #ffffff;
}

.section-light {
    background: #f8fafc;
}

.section-heading {
    max-width: 760px;
    margin: 0 auto 48px;
    text-align: center;
}

.section-heading h2 {
    margin: 0 0 13px;
    color: var(--text-primary);
    font-size: clamp(30px, 4vw, 43px);
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.section-heading p {
    margin: 0;
    color: var(--text-body);
    font-size: 16px;
    line-height: 1.7;
}

.section-heading-inline {
    max-width: none;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 35px;
    text-align: left;
}

.section-heading-inline p {
    margin-top: 9px;
}

.section-link {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    color: var(--primary);
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.section-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.section-action {
    margin-top: 42px;
    text-align: center;
}


/* =========================================================
   FEATURED TOOLS
   ========================================================= */

.featured-tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.featured-tool-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 330px;
    padding: 30px;
    overflow: hidden;

    border: 1px solid var(--border-card);
    border-radius: 19px;
    background: #ffffff;

    box-shadow:
        0 5px 18px rgba(15, 23, 42, 0.045);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.featured-tool-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.featured-tool-card:hover {
    transform: translateY(-5px);
    border-color: rgba(15, 118, 110, 0.35);
    box-shadow:
        0 15px 35px rgba(15, 23, 42, 0.10);
}

.featured-tool-card:hover::before {
    opacity: 1;
}

.featured-tool-primary {
    background:
        linear-gradient(
            180deg,
            #f0fdfa 0%,
            #ffffff 100%
        );
    border-color: rgba(15, 118, 110, 0.22);
}

.tool-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-bottom: 25px;
    border-radius: 14px;
    background: #ecfdf5;
    color: var(--primary);
    font-size: 22px;
    font-weight: 900;
}

.tool-card-category,
.tool-box-category,
.guide-category {
    color: var(--primary);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.11em;
}

.featured-tool-card h3 {
    margin: 8px 0 12px;
    color: var(--text-primary);
    font-size: 21px;
    line-height: 1.25;
}

.featured-tool-card p {
    margin: 0;
    color: var(--text-body);
    font-size: 14px;
    line-height: 1.7;
}

.tool-card-link {
    display: inline-block;
    margin-top: auto;
    padding-top: 24px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 800;
}

.featured-tool-card:hover .tool-card-link {
    color: var(--primary-dark);
}


/* =========================================================
   EXPLORE ALL CALCULATORS BUTTON
   ========================================================= */

/*
   Explicitly override generic button styles.
   This prevents hover rules elsewhere from making
   the button text disappear.
*/

.featured-tools-section .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;

    border: 1px solid var(--primary);
    border-radius: 10px;

    background: var(--primary);
    color: #ffffff;

    font-size: 14px;
    font-weight: 800;
    text-decoration: none;

    box-shadow: 0 7px 18px rgba(15, 118, 110, 0.16);

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.featured-tools-section .btn-primary:hover,
.featured-tools-section .btn-primary:focus {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.20);
}


/* =========================================================
   POPULAR TOOLS
   ========================================================= */

.popular-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.tool-box {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 17px;
    min-height: 135px;
    padding: 22px;

    border: 1px solid var(--border-card);
    border-radius: 16px;
    background: #ffffff;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.tool-box:hover {
    transform: translateY(-3px);
    border-color: rgba(15, 118, 110, 0.25);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.07);
}

.tool-box-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 13px;
    background: #f1f5f9;
    font-size: 22px;
}

.tool-box-category {
    font-size: 10px;
}

.tool-box h3 {
    margin: 5px 0 5px;
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.3;
}

.tool-box p {
    margin: 0;
    color: var(--text-body);
    font-size: 13px;
    line-height: 1.5;
}

.tool-box-arrow {
    color: var(--primary);
    font-size: 18px;
    font-weight: 800;
    transition: transform 0.2s ease;
}

.tool-box:hover .tool-box-arrow {
    transform: translateX(3px);
}


/* =========================================================
   CATEGORIES
   ========================================================= */

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.category-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 185px;
    padding: 27px 18px;

    text-align: center;

    border: 1px solid var(--border-card);
    border-radius: 17px;
    background: #ffffff;

    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.025);

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.category-box:hover {
    transform: translateY(-4px);
    border-color: rgba(15, 118, 110, 0.35);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.category-box > span {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 56px;
    height: 56px;
    margin-bottom: 15px;

    border-radius: 15px;
    background: #f0fdfa;

    font-size: 25px;
}

.category-box strong {
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.3;
}

.category-box small {
    margin-top: 6px;
    color: var(--text-body);
    font-size: 13px;
}


/* =========================================================
   AI FINANCE
   ========================================================= */

.ai-finance-section {
    background:
        linear-gradient(
            135deg,
            #0f766e 0%,
            #115e59 100%
        );
    color: #ffffff;
}

.ai-finance-layout {
    display: grid;
    grid-template-columns: 0.9fr 1.5fr;
    align-items: center;
    gap: 60px;
}

.ai-finance-intro .section-eyebrow {
    color: #a7f3d0;
}

.ai-finance-intro h2 {
    margin: 0 0 17px;
    color: #ffffff;
    font-size: clamp(32px, 4vw, 46px);
    line-height: 1.12;
}

.ai-finance-intro p {
    max-width: 520px;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 16px;
    line-height: 1.75;
}


/*
   AI button is explicitly styled here so that
   global .btn-primary hover rules cannot hide
   the white-background button text.
*/

.ai-finance-intro .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 48px;
    margin-top: 24px;
    padding: 0 22px;

    border: 1px solid #ffffff;
    border-radius: 10px;

    background: #ffffff;
    color: #0f766e;

    font-size: 14px;
    font-weight: 800;
    text-decoration: none;

    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.10);

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.ai-finance-intro .btn-primary:hover,
.ai-finance-intro .btn-primary:focus {
    background: #ecfdf5;
    border-color: #ecfdf5;
    color: #0f766e;
    text-decoration: none;
    transform: translateY(-2px);
}

.ai-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.ai-tool-card {
    padding: 26px;

    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 16px;

    background: rgba(255,255,255,0.08);
    color: #ffffff;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.ai-tool-card:hover {
    background: rgba(255,255,255,0.13);
    transform: translateY(-3px);
}

.ai-tool-card > span {
    font-size: 27px;
}

.ai-tool-card h3 {
    margin: 13px 0 7px;
    color: #ffffff;
    font-size: 17px;
    line-height: 1.35;
}

.ai-tool-card p {
    margin: 0;
    color: rgba(255,255,255,0.76);
    font-size: 13px;
    line-height: 1.6;
}


/* =========================================================
   FINANCIAL PLANNING
   ========================================================= */

.planning-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.planning-card {
    min-height: 220px;
    padding: 30px 25px;

    border: 1px solid var(--border-card);
    border-radius: 16px;
    background: #ffffff;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.planning-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.planning-number {
    display: block;
    margin-bottom: 25px;
    color: var(--primary);
    font-family: var(--font-numeric);
    font-size: 13px;
    font-weight: 800;
}

.planning-card h3 {
    margin: 0 0 11px;
    color: var(--text-primary);
    font-size: 19px;
}

.planning-card p {
    margin: 0;
    color: var(--text-body);
    font-size: 14px;
    line-height: 1.7;
}


/* =========================================================
   BENEFITS
   ========================================================= */

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.benefit-card {
    min-height: 205px;
    padding: 30px 24px;
    text-align: center;

    border: 1px solid var(--border-card);
    border-radius: 16px;
    background: #ffffff;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.benefit-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.benefit-card > span {
    display: block;
    margin-bottom: 16px;
    font-size: 30px;
}

.benefit-card h3 {
    margin: 0 0 9px;
    color: var(--text-primary);
    font-size: 18px;
}

.benefit-card p {
    margin: 0;
    color: var(--text-body);
    font-size: 14px;
    line-height: 1.7;
}


/* =========================================================
   LEARNING CENTER / GUIDES
   ========================================================= */

.guides-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.guide-card {
    overflow: hidden;

    border: 1px solid var(--border-card);
    border-radius: 17px;
    background: #ffffff;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.guide-card:hover {
    transform: translateY(-4px);
    border-color: rgba(15, 118, 110, 0.25);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.guide-card-body {
    padding: 29px;
}

.guide-category {
    font-size: 11px;
}

.guide-card h3 {
    margin: 11px 0 13px;
    color: var(--text-primary);
    font-size: 20px;
    line-height: 1.35;
}

.guide-card p {
    margin: 0 0 20px;
    color: var(--text-body);
    font-size: 14px;
    line-height: 1.75;
}

.guide-card a {
    color: var(--primary);
    font-size: 14px;
    font-weight: 800;
}

.guide-card a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}


/* =========================================================
   LEARNING RESOURCES
   ========================================================= */

.learning-resources {
    display: grid;
    grid-template-columns: 0.8fr 1.4fr;
    align-items: center;
    gap: 70px;
}

.learning-resources h2 {
    margin: 5px 0 15px;
    color: var(--text-primary);
    font-size: 36px;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.learning-resources p {
    max-width: 500px;
    color: var(--text-body);
    font-size: 16px;
    line-height: 1.7;
}

.resource-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.resource-links a {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 15px;

    padding: 22px;

    border: 1px solid var(--border-card);
    border-radius: 15px;
    background: #ffffff;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.resource-links a:hover {
    transform: translateY(-3px);
    border-color: rgba(15, 118, 110, 0.28);
    box-shadow: 0 9px 24px rgba(15, 23, 42, 0.06);
}

.resource-links a > span {
    grid-row: span 2;
    font-size: 27px;
}

.resource-links strong {
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.4;
}

.resource-links small {
    margin-top: 3px;
    color: var(--text-body);
    font-size: 13px;
    line-height: 1.5;
}


/* =========================================================
   NEWSLETTER
   ========================================================= */

.newsletter-section {
    padding: 68px 0;
    background: #f8fafc;
}

.newsletter-box {
    display: grid;
    grid-template-columns: 1fr 0.9fr;
    align-items: center;
    gap: 50px;

    padding: 48px;

    border: 1px solid var(--border-card);
    border-radius: 20px;
    background: #ffffff;
}

.newsletter-box h2 {
    margin: 5px 0 11px;
    color: var(--text-primary);
    font-size: 31px;
    line-height: 1.2;
}

.newsletter-box p {
    margin: 0;
    color: var(--text-body);
    font-size: 15px;
    line-height: 1.7;
}

.newsletter-form {
    display: flex;
    gap: 9px;
}

.newsletter-form input {
    flex: 1;
    min-width: 0;
    padding: 14px 16px;

    border: 1px solid var(--border-input);
    border-radius: 10px;

    outline: 0;
    font: inherit;
    font-size: 14px;
}

.newsletter-form input:focus {
    border-color: var(--primary);
}

.newsletter-form button {
    min-height: 48px;
    padding: 0 22px;

    border: 0;
    border-radius: 10px;

    background: var(--primary);
    color: #ffffff;

    font-size: 14px;
    font-weight: 800;

    cursor: pointer;
}

.newsletter-form button:hover {
    background: var(--primary-dark);
}


/* =========================================================
   FAQ
   ========================================================= */

.faq-list {
    max-width: 850px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border-normal);
}

.faq-item summary {
    position: relative;

    padding: 23px 40px 23px 0;

    cursor: pointer;
    list-style: none;

    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.5;
    font-weight: 700;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 5px;
    top: 18px;

    color: var(--primary);
    font-size: 22px;
    font-weight: 500;
}

.faq-item[open] summary::after {
    content: "−";
}

.faq-item p {
    max-width: 760px;
    padding: 0 0 23px;

    color: var(--text-body);
    font-size: 14px;
    line-height: 1.75;
}


/* =========================================================
   RESPONSIVE — TABLET
   ========================================================= */

@media (max-width: 1100px) {

    .featured-tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .planning-grid,
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ai-finance-layout {
        grid-template-columns: 1fr;
        gap: 45px;
    }

    .ai-finance-intro p {
        max-width: 700px;
    }

    .learning-resources {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}


/* =========================================================
   RESPONSIVE — SMALL TABLET
   ========================================================= */

@media (max-width: 850px) {

    .home-section {
        padding: 75px 0;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 25px;
    }

    .trust-items {
        grid-template-columns: repeat(2, 1fr);
    }

    .popular-tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .guides-grid {
        grid-template-columns: 1fr;
    }

    .newsletter-box {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   RESPONSIVE — MOBILE
   ========================================================= */

@media (max-width: 650px) {

    .home-hero {
        padding: 60px 0 50px;
    }

    .hero-content h1 {
        font-size: 38px;
    }

    .hero-description {
        margin-top: 20px;
        font-size: 16px;
    }

    .hero-search {
        flex-direction: column;
        align-items: stretch;
        padding: 8px;
    }

    .hero-search-icon {
        display: none;
    }

    .hero-search input {
        min-height: 52px;
        padding: 12px 15px;
    }

    .hero-search button {
        min-height: 50px;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        margin-top: 45px;
    }

    .trust-items {
        grid-template-columns: 1fr;
    }

    .trust-item {
        justify-content: flex-start;
        padding: 13px 0;
    }

    .home-section {
        padding: 65px 0;
    }

    .section-heading {
        margin-bottom: 36px;
    }

    .section-heading h2 {
        font-size: 30px;
    }

    .section-heading p {
        font-size: 15px;
    }

    .section-heading-inline {
        display: block;
    }

    .section-link {
        display: inline-flex;
        margin-top: 15px;
    }

    .featured-tools-grid,
    .popular-tools-grid,
    .category-grid,
    .planning-grid,
    .benefits-grid,
    .ai-tools-grid,
    .resource-links {
        grid-template-columns: 1fr;
    }

    .featured-tool-card {
        min-height: 290px;
        padding: 26px;
    }

    .tool-box {
        min-height: 120px;
    }

    .ai-finance-layout {
        gap: 35px;
    }

    .ai-finance-intro h2 {
        font-size: 34px;
    }

    .newsletter-box {
        padding: 30px 22px;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form button {
        min-height: 48px;
    }
}