﻿/* =========================================================
   HOME PAGE – Optimized & Refactored
   Uses site.css variables and adds page-specific styles
   ========================================================= */

/* ----- Global Reset & Base ----- */
.home-page {
    width: 100%;
    overflow-x: hidden;
    margin-bottom: -150px; /* compensates footer overlap */
}

/* ----- Section Blocks ----- */
.section-block {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    position: relative;
}

.container {
    width: 88%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ----- Shared Section Overlap Pattern ----- */
.overlap-section {
    padding-bottom: 50px;
    position: relative;
    z-index: var(--section-z-index, 1);
    box-shadow: var(--kcl-shadow-bottom);
    border-bottom-left-radius: var(--kcl-radius-xxl);
    border-bottom-right-radius: var(--kcl-radius-xxl);
}

/* ----- Hero Section ----- */
.hero-section {
    background: var(--kcl-surface-soft);
    padding: 50px 0 10px;
    z-index: 10;
    display: flex;
}

.hero-content {
    max-width: 700px;
    margin-bottom: 20px;
    padding-bottom: 20px;
}

/* Eyebrow (shared) */
.section-eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    color: var(--kcl-primary);
    background: rgba(42, 126, 168, 0.1);
    padding: 0.3rem 0.9rem;
    border-radius: 40px;
}

.hero-title {
    font-size: clamp(2.5rem, 3.3vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #1a1a1a;
    margin: 1.5rem 0;
}

.accent-text {
    color: var(--kcl-primary);
}

.hero-description {
    font-size: 1.1rem;
    color: #4a5568;
    line-height: 1.5;
    margin-bottom: 3rem;
}

/* Buttons */
.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: nowrap;
    align-items: center;
    margin-bottom: 3rem;
}

.btn-primary, .btn-outline,
.btn-outline-dark, .btn-outline-light {
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--kcl-shadow-bottom);
}

.btn-primary {
    background: #111;
    color: #fff;
}

    .btn-primary:hover {
        transform: translateY(-3px);
        background: #000;
    }

.btn-outline {
    background: #fff;
    color: #111;
    border: 1px solid #e2e8f0;
}

    .btn-outline:hover {
        transform: translateY(-3px);
    }

.btn-outline-dark {
    background: transparent;
    border: 1px solid var(--kcl-primary);
    color: var(--kcl-primary);
}

    .btn-outline-dark:hover {
        background: var(--kcl-surface);
        color: var(--kcl-primary);
        transform: translateY(-2px);
    }

.btn-outline-light {
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #111;
}

    .btn-outline-light:hover {
        transform: translateY(-3px);
        color: var(--kcl-primary);
        border-color: var(--kcl-primary);
    }

/* Stats group (replaces old hero-stats) */
.stats-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    justify-content: space-between;
    margin-top: 3rem;
    margin-bottom: 0;
}

.stat-item {
    flex: 1;
    min-width: 150px;
    background: var(--kcl-surface);
    border-radius: var(--kcl-radius-md);
    padding: 1.2rem 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.35s ease;
    box-shadow: var(--kcl-shadow-bottom), 0 -6px 12px -5px rgba(0, 0, 0, 0.05);
    border: 1px solid color-mix(in srgb, var(--kcl-border) 30%, transparent);
    cursor: default;
    overflow-wrap: break-word;
}

    .stat-item:hover {
        transform: translateY(-5px);
        background: var(--kcl-hover-bg);
    }

.stat-icon-circle {
    width: 48px;
    height: 48px;
    background: color-mix(in srgb, var(--kcl-primary) 8%, transparent);
    border-radius: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .stat-icon-circle i {
        font-size: 1.3rem;
        color: var(--kcl-primary);
    }

.stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    color: var(--kcl-text-muted);
    margin-bottom: 0.2rem;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--kcl-text);
    line-height: 1.2;
}

/* Hero right card */
.hero-card {
    background: var(--kcl-gray-dark, #2c2c2c);
    position: relative;
    padding-top: 20px;
    padding-bottom: 50px;
}

.hero-card-image {
    width: 100%;
    background: #999;
    border-radius: var(--kcl-radius-xl);
    box-shadow: var(--kcl-shadow-bottom);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    overflow: visible;
}

.hero-image {
    position: relative;
    width: 90%;
    aspect-ratio: 16 / 9;
    margin-top: -60px auto 0;
    transition: transform 0.3s ease;
}

    .hero-image img {
        display: block;
        margin: auto;
        width: 90%;
        border-radius: 20px;
        position: relative;
        z-index: 20;
    }

.cover-div {
    position: relative;
    z-index: 100;
    width: 90%;
    height: 200px;
    margin-top: -70px;
    margin-bottom: -40px;
    background: linear-gradient(to right, var(--kcl-gray-dark), var(--kcl-gray-light));
    max-height: 200px;
    padding: 10px;
    border-bottom-left-radius: 40px;
    border-bottom-right-radius: 40px;
    box-shadow: var(--kcl-shadow-md);
    outline: 2px dashed #999;
    outline-offset: -10px;
}

.hero-card:hover .hero-image {
    transform: translateY(-100px);
}

/* ----- Shared Section Headers ----- */
.section-header {
    text-align: center;
    margin-bottom: 70px;
}

.section-title {
    font-size: 54px;
    line-height: 1.2;
    letter-spacing: -1px;
    color: #111;
    margin-bottom: 15px;
}

.section-subtitle {
    color: #7a7a7a;
    font-size: 17px;
    max-width: 600px;
    margin: 0 auto;
}

/* ----- Services Section ----- */
.services-section {
    background: var(--kcl-surface);
    padding: 200px 0 50px;
    margin-top: -150px;
    z-index: 9;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

/* ----- Why Choose Us ----- */
.why-us-section {
    background: var(--kcl-surface-soft);
    padding: 50px 0;
    z-index: 8;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 26px;
}

/* ----- Featured Products ----- */
.featured-products-section {
    background: var(--kcl-surface);
    padding: 150px 0 50px;
    margin-top: -80px;
    z-index: 7;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

/* ----- Team Highlights ----- */
.team-highlight-section {
    background: var(--kcl-surface-soft);
    padding: 150px 0 50px;
    margin-top: -80px;
    z-index: 6;
}

.team-highlight-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 26px;
}

/* ----- Insights / Blog Section ----- */
.insights-section {
    background: var(--kcl-surface);
    padding: 150px 0 50px;
    margin-top: -80px;
    z-index: 5;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

/* ----- Testimonials Section (stats + quotes) ----- */
.stats-testimonial-section {
    background: var(--kcl-surface-soft);
    padding: 150px 0 50px;
    margin-top: -80px;
    z-index: 4;
}

.quotes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* ----- Shared Card Styles (applies to service, why, featured, team, insight, testimonial) ----- */
.service-card,
.why-card,
.featured-card,
.team-highlight-card,
.insight-card,
.testimonial-card {
    border-radius: 28px;
    padding: 30px 25px;
    text-align: center;
    transition: all 0.35s ease;
    box-shadow: var(--kcl-shadow-bottom);
}

.service-card,
.featured-card,
.team-highlight-card,
.insight-card,
.testimonial-card {
    background: var(--kcl-surface-soft);
}

.why-card,
.team-highlight-card,
.testimonial-card {
    background: var(--kcl-surface);
}
    .service-card:hover, .why-card:hover, .featured-card:hover, .insight-card:hover, .testimonial-card:hover {
        transform: translateY(-6px);
        background: var(--kcl-hover-bg);
        box-shadow: var(--kcl-shadow-bottom);
    }

.team-highlight-card {
    padding: 0;
    background: transparent;
    box-shadow: none;
}

    .team-highlight-card:hover {
        transform: translateY(-4px);
    }

    .team-highlight-card .team-avatar {
        width: 120px;
        height: 120px;
        margin: 0 auto 1rem;
        background: #fff;
        border-radius: 50%;
        overflow: hidden;
        border: 3px solid rgba(42,126,168,0.15);
        transition: 0.2s;
    }

    .team-highlight-card:hover .team-avatar {
        border-color: var(--kcl-primary);
        transform: scale(1.02);
    }

.team-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-highlight-card h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.team-highlight-card span {
    font-size: 0.8rem;
    color: #5a6874;
}

/* Specific card inner elements */
.service-icon,
.why-icon,
.insight-icon {
    font-size: 2.5rem;
    color: var(--kcl-primary);
    margin-bottom: 1rem;
}

.service-icon {
    font-size: 3rem;
}

.featured-image {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(42,126,168,0.15);
}

    .featured-image img {
        width: 80%;
        height: auto;
    }

.featured-badge {
    display: inline-block;
    background: rgba(42,126,168,0.12);
    color: var(--kcl-primary);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.8rem;
    border-radius: 30px;
    margin-bottom: 0.75rem;
}

.featured-link, .insight-link {
    font-size: 0.8rem;
    font-weight: 600;
/*    color: var(--kcl-primary);*/
    text-decoration: none;
}

    .featured-link:hover, .insight-link:hover {
        text-decoration: underline;
    }

/* Testimonial specific */
.testimonial-card {
    text-align: left;
}

.quote-icon {
    font-size: 1.8rem;
    color: var(--kcl-primary);
    opacity: 0.3;
    margin-bottom: 0.75rem;
    display: block;
}

.testimonial-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-style: italic;
}

.testimonial-author {
    font-weight: 600;
    color: var(--kcl-primary);
    font-size: 0.85rem;
}

/* ----- CTA Section ----- */
.cta-home-section {
    background: var(--kcl-surface);
    padding: 130px 0 150px;
    margin-top: -80px;
    z-index: 3;
}

.cta-icon-wrap {
    width: 80px;
    height: 80px;
    background: #fff;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--kcl-primary);
    box-shadow: var(--kcl-shadow-bottom);
}

.cta-home-section h2 {
    font-size: 48px;
    line-height: 1.2;
    letter-spacing: -1px;
    color: #111;
    margin-bottom: 15px;
}

.cta-home-section p {
    color: #777;
    font-size: 16px;
    margin-bottom: 30px;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons-group {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}

.cta-note {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: #7c7f82;
}

/* ----- Apply overlapping styles to all relevant sections ----- */
.services-section,
.why-us-section,
.featured-products-section,
.team-highlight-section,
.insights-section,
.stats-testimonial-section {
    box-shadow: var(--kcl-shadow-bottom);
    border-bottom-left-radius: var(--kcl-radius-xxl);
    border-bottom-right-radius: var(--kcl-radius-xxl);
}

/* ----- Responsive Breakpoints ----- */
@media (max-width: 1200px) {
    .services-grid, .why-grid, .featured-grid, .team-highlight-grid, .insights-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .quotes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-section {
        justify-content: center;
        border-bottom-left-radius: var(--kcl-radius-mobile, 40px);
        border-bottom-right-radius: var(--kcl-radius-mobile, 40px);
        margin-top: -30px;
        padding-bottom: 20px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .stats-group {
        flex-direction: column;
        gap: 1rem;
    }

    .stat-item {
        width: 100%;
    }

    .section-title {
        font-size: 34px;
    }

    .cta-home-section h2 {
        font-size: 38px;
    }

    .stats-box, .testimonial-box {
        padding: 30px 20px;
    }
    /* Adjust overlapping sections for mobile */
    .services-section,
    .why-us-section,
    .featured-products-section,
    .team-highlight-section,
    .insights-section,
    .stats-testimonial-section,
    .cta-home-section {
        border-bottom-left-radius: var(--kcl-radius-mobile, 40px);
        border-bottom-right-radius: var(--kcl-radius-mobile, 40px);
    }
}

@media (max-width: 576px) {
    .services-grid, .why-grid, .featured-grid, .team-highlight-grid, .insights-grid,
    .quotes-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .hero-card-image {
        width: 100%;
        aspect-ratio: 16 / 9;
        margin-top: 2rem;
        border-radius: var(--kcl-radius-tablet, 30px);
        padding-top: 50px;
        padding-bottom: 65px;
    }

    .hero-image {
        margin: auto;
    }

    .testimonial-card {
        padding: 20px;
    }

    .btn-primary, .btn-outline {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}
