/* ============================================================
   HOMEPAGE — Complete Enhancement
   freecalculatortool.com / Astra Child Theme
   css/home.css
   ============================================================ */

/* ============================================================
   1. PAGE RESET — Remove Astra default page padding/margin
   ============================================================ */
.home .site-content,
.home .ast-container,
.home #primary,
.home .entry-content {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

.home .entry-content > * {
    max-width: 1200px;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 24px;
    padding-right: 24px;
    box-sizing: border-box;
}

/* Full-bleed sections get special treatment */
.home .fct-hero-section,
.home .fct-stats-section,
.home .fct-categories-section,
.home .fct-trusted-section {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* ============================================================
   2. HERO SECTION
   ============================================================ */
.fct-hero-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 45%, #1d4ed8 75%, #0ea5e9 100%);
    padding: 80px 24px 100px;
    position: relative;
    overflow: hidden;
}

/* Animated background orbs */
.fct-hero-section::before {
    content: '';
    position: absolute;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(99,179,237,0.12) 0%, transparent 70%);
    top: -200px; right: -100px;
    border-radius: 50%;
    pointer-events: none;
}

.fct-hero-section::after {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(37,99,235,0.15) 0%, transparent 70%);
    bottom: -100px; left: -100px;
    border-radius: 50%;
    pointer-events: none;
}

.fct-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* Hero Left */
.fct-hero-left .fct-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #bfdbfe;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 50px;
    margin-bottom: 20px;
    backdrop-filter: blur(8px);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.fct-hero-left h1 {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: clamp(2.2rem, 5vw, 3.5rem) !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    line-height: 1.15 !important;
    letter-spacing: -0.03em !important;
    margin: 0 0 20px !important;
}

.fct-hero-left h1 span {
    background: linear-gradient(90deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.fct-hero-left p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
    margin: 0 0 32px;
    max-width: 480px;
}

.fct-hero-cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.fct-hero-cta .fct-btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 10px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none !important;
    transition: all 0.22s ease;
}

.fct-hero-cta .fct-btn-primary {
    background: #2563eb;
    color: #fff !important;
    box-shadow: 0 8px 24px rgba(37,99,235,0.4);
}

.fct-hero-cta .fct-btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(37,99,235,0.5);
}

.fct-hero-cta .fct-btn-ghost {
    background: rgba(255,255,255,0.08);
    color: #fff !important;
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
}

.fct-hero-cta .fct-btn-ghost:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

/* Hero Right — floating calculator cards */
.fct-hero-right {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fct-hero-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    padding: 18px 22px;
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.3s ease;
}

.fct-hero-card:hover { transform: translateX(6px); }

.fct-hero-card:nth-child(2) { margin-left: 24px; }
.fct-hero-card:nth-child(3) { margin-left: 12px; }

.fct-hero-card-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.fct-hero-card-icon.blue   { background: rgba(37,99,235,0.3); }
.fct-hero-card-icon.green  { background: rgba(16,185,129,0.3); }
.fct-hero-card-icon.purple { background: rgba(139,92,246,0.3); }
.fct-hero-card-icon.orange { background: rgba(245,158,11,0.3); }

.fct-hero-card-text strong {
    display: block;
    color: #ffffff;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
}

.fct-hero-card-text span {
    color: rgba(255,255,255,0.55);
    font-size: 0.8rem;
}

/* ============================================================
   3. STATS BAR
   ============================================================ */
.fct-stats-section {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 32px 24px;
}

.fct-stats-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}

.fct-stat-item {
    text-align: center;
    padding: 12px 24px;
    border-right: 1px solid #e2e8f0;
}

.fct-stat-item:last-child { border-right: none; }

.fct-stat-item .fct-stat-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #2563eb;
    line-height: 1;
    display: block;
}

.fct-stat-item .fct-stat-label {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 4px;
    display: block;
    font-weight: 500;
}

/* ============================================================
   4. SEARCH BAR SECTION
   ============================================================ */
.fct-search-section {
    background: #f8fafc;
    padding: 48px 24px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.fct-search-section h2 {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 0 24px !important;
    letter-spacing: -0.02em !important;
}

.fct-home-search-wrap {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.fct-home-search-wrap input[type="search"],
.fct-home-search-wrap input[type="text"] {
    width: 100%;
    padding: 16px 60px 16px 22px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 1rem;
    font-family: 'DM Sans', sans-serif;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    outline: none;
    transition: all 0.22s ease;
    color: #0f172a;
}

.fct-home-search-wrap input:focus {
    border-color: #2563eb;
    box-shadow: 0 4px 24px rgba(37,99,235,0.15);
}

.fct-home-search-wrap button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px; height: 44px;
    background: #2563eb;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #fff;
}

.fct-home-search-wrap button:hover {
    background: #1d4ed8;
    transform: translateY(-50%) scale(1.05);
}

/* ============================================================
   5. CATEGORY CARDS SECTION
   ============================================================ */
.fct-categories-section {
    background: #f8fafc;
    padding: 64px 24px;
}

.fct-section-header {
    text-align: center;
    margin-bottom: 40px;
}

.fct-section-label {
    display: inline-block;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 12px;
}

.fct-section-header h2 {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: clamp(1.6rem, 3vw, 2.2rem) !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 0 10px !important;
    letter-spacing: -0.02em !important;
}

.fct-section-header p {
    color: #64748b;
    font-size: 1rem;
    margin: 0;
}

.fct-categories-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.fct-category-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 28px 24px;
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
    position: relative;
    overflow: hidden;
}

.fct-category-card::after {
    content: '→';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 1rem;
    color: #cbd5e1;
    transition: all 0.22s ease;
}

.fct-category-card:hover {
    border-color: #2563eb;
    box-shadow: 0 8px 32px rgba(37,99,235,0.12);
    transform: translateY(-4px);
}

.fct-category-card:hover::after {
    color: #2563eb;
    right: 16px;
}

.fct-category-card .fct-cat-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.fct-category-card .fct-cat-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
}

.fct-category-card .fct-cat-count {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 500;
}

/* Category icon backgrounds */
.fct-cat-bg-blue   { background: #dbeafe; }
.fct-cat-bg-green  { background: #d1fae5; }
.fct-cat-bg-purple { background: #ede9fe; }
.fct-cat-bg-orange { background: #fef3c7; }
.fct-cat-bg-red    { background: #fee2e2; }
.fct-cat-bg-teal   { background: #ccfbf1; }
.fct-cat-bg-pink   { background: #fce7f3; }
.fct-cat-bg-sky    { background: #e0f2fe; }
.fct-cat-bg-indigo { background: #e0e7ff; }
.fct-cat-bg-lime   { background: #ecfccb; }
.fct-cat-bg-amber  { background: #fef9c3; }
.fct-cat-bg-rose   { background: #fff1f2; }

/* ============================================================
   6. FEATURED CALCULATORS STRIP
   ============================================================ */
.fct-featured-section {
    background: #ffffff;
    padding: 64px 24px;
    border-top: 1px solid #e2e8f0;
}

.fct-featured-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.fct-featured-card {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none !important;
    display: block;
    transition: all 0.25s ease;
    background: #fff;
}

.fct-featured-card:hover {
    box-shadow: 0 12px 36px rgba(37,99,235,0.1);
    transform: translateY(-4px);
    border-color: #bfdbfe;
}

.fct-featured-card-top {
    padding: 28px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.fct-featured-card-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    flex-shrink: 0;
}

.fct-featured-card-tag {
    display: inline-block;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.fct-featured-card-body {
    padding: 0 28px 28px;
}

.fct-featured-card-body h3 {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 0 8px !important;
    letter-spacing: -0.01em !important;
}

.fct-featured-card-body p {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0 0 16px;
    line-height: 1.6;
}

.fct-featured-card-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s ease;
}

.fct-featured-card:hover .fct-featured-card-link { gap: 8px; }

/* ============================================================
   7. TRUST BANNER
   ============================================================ */
.fct-trusted-section {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    padding: 56px 24px;
}

.fct-trusted-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.fct-trusted-left h2 {
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: clamp(1.6rem, 3vw, 2.2rem) !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin: 0 0 16px !important;
    letter-spacing: -0.02em !important;
}

.fct-trusted-left p {
    color: rgba(255,255,255,0.75);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0 0 28px;
}

.fct-trusted-left a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #2563eb !important;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 13px 26px;
    border-radius: 10px;
    text-decoration: none !important;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.fct-trusted-left a:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.fct-trusted-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.fct-trust-badge {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 14px;
    padding: 20px;
    backdrop-filter: blur(8px);
}

.fct-trust-badge .fct-trust-icon {
    font-size: 1.75rem;
    margin-bottom: 10px;
    display: block;
}

.fct-trust-badge strong {
    display: block;
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.fct-trust-badge span {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.5;
}

/* ============================================================
   8. EXISTING PAGE CONTENT WRAPPER
   — Makes the existing WP page content look polished
   ============================================================ */

/* Wrap the existing calculator embeds in a nice section */
.home .entry-content h2:not(.fct-no-style),
.home .entry-content h3:not(.fct-no-style) {
    font-family: 'Space Grotesk', sans-serif !important;
    letter-spacing: -0.02em !important;
    color: #0f172a !important;
    text-align: center;
    margin-top: 56px !important;
    margin-bottom: 24px !important;
    font-size: clamp(1.3rem, 2.5vw, 1.75rem) !important;
}

/* Style the inline calculator blocks */
.home .entry-content .wp-block-group,
.home .entry-content [class*="calculator"],
.home .entry-content [class*="calc-wrap"] {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    margin-bottom: 32px !important;
}

/* Promotional banner blocks */
.home .entry-content .wp-block-cover,
.home .entry-content .wp-block-media-text {
    border-radius: 16px !important;
    overflow: hidden !important;
    margin-bottom: 28px !important;
}

/* ============================================================
   SUPPRESS OLD PAGE BUILDER CONTENT ON FRONT PAGE
   Belt-and-suspenders: in case PHP filter doesn't catch everything
   ============================================================ */

/* Hide the old hero section (dotted pattern + image) */
.home .elementor-section,
.home .elementor-widget-wrap,
.home .wp-block-cover,
.home .wp-block-media-text,
.home .wp-block-group:not(.fct-hero-section):not(.fct-stats-section):not(.fct-categories-section):not(.fct-featured-section):not(.fct-trusted-section):not(.fct-search-section),
.home .entry-content .wp-block-columns,
.home .entry-content > .wp-block-image,
.home .entry-content > figure,
.home .ast-edd-sv,
.home [data-elementor-type],
.home .e-con,
.home .e-con-inner {
    display: none !important;
}

/* Hide subscribe form blocks that appear inline */
.home .entry-content .wp-block-html,
.home .entry-content > div:not([class*="fct-"]) {
    display: none !important;
}

/* Hide old h2/h3 headings that were part of old content */
.home .entry-content > h2,
.home .entry-content > h3,
.home .entry-content > h4,
.home .entry-content > p,
.home .entry-content > hr,
.home .entry-content > ul,
.home .entry-content > ol {
    display: none !important;
}

/* ============================================================
   ============================================================ */
.fct-stat-number[data-count] {
    transition: none;
}

/* ============================================================
   10. HOMEPAGE-SPECIFIC OVERRIDES
   ============================================================ */

/* Hide the existing basic page title on homepage */
.home .entry-title,
.home .page-header {
    display: none !important;
}

/* Remove double padding from Astra page wrapper */
.home .ast-separate-container .entry-content,
.home .ast-page-builder-template .entry-content {
    padding: 0 !important;
    margin: 0 !important;
}

/* Ensure full width on homepage */
.home .ast-article-single,
.home .ast-grid-right-sidebar,
.home .ast-grid-left-sidebar {
    width: 100% !important;
    float: none !important;
}

.home #secondary { display: none !important; }

/* ============================================================
   11. MOBILE
   ============================================================ */
@media (max-width: 1024px) {
    .fct-categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .fct-featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .fct-hero-inner {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .fct-hero-left p { margin-left: auto; margin-right: auto; }

    .fct-hero-cta { justify-content: center; }

    .fct-hero-right { display: none; }

    .fct-stats-inner {
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
    }

    .fct-stat-item:nth-child(2) { border-right: none; }
    .fct-stat-item:nth-child(3),
    .fct-stat-item:nth-child(4) { border-top: 1px solid #e2e8f0; }
    .fct-stat-item:nth-child(4) { border-right: none; }

    .fct-categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .fct-featured-grid {
        grid-template-columns: 1fr;
    }

    .fct-trusted-inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .fct-trusted-right {
        grid-template-columns: repeat(2, 1fr);
    }

    .fct-hero-section { padding: 56px 20px 72px; }
}

@media (max-width: 480px) {
    .fct-categories-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .fct-stat-number { font-size: 1.5rem !important; }
}
