/*
Theme Name: Kalymatrix
Description: Kalymatrix Pvt. Ltd. - IT Services & Technology
Version: 2.0.0
*/

/* =================================
   Kalymatrix Custom Overrides
   ================================= */

/* Import Professional Fonts */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* Override CSS Variables for Professional IT Brand */
:root {
    --theme: #0F4C81;
    --theme2: #1B6DB2;
    --header: #0A1628;
    --base: #0F4C81;
    --text: #4A5568;
    --text2: #718096;
    --border: #E2E8F0;
    --border2: #CBD5E0;
    --button: #0A1628;
    --button2: #0F4C81;
    --ratting: #F6AD55;
    --bg: #F7FAFC;
    --bg2: #EDF2F7;
    --bg3: #F0F5FF;
    --bg4: #0A1628;
    --bg5: #F7FAFC;
    --bg6: #0A1628;
    --bg7: #EDF2F7;
    --color-gradient-1: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 19.36%, rgba(15, 76, 129, 0.55) 71.26%, #0F4C81 100%);
    --color-gradient-2: linear-gradient(180deg, rgba(0, 0, 0, 0.31) 0%, rgba(0, 0, 0, 0.78) 100%);
    ---box-shadow: 0px 9px 21px rgba(0, 0, 0, 0.06);
}

/* Typography Overrides */
body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.hero-content h1,
.hero-content h4,
.section-title h2,
.section-title span,
.page-heading h1 {
    font-family: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif !important;
    letter-spacing: -0.02em;
}

/* Header Refinements */
.header-top-section {
    background: #0A1628;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-top-wrapper .contact-list li,
.header-top-wrapper .contact-list li a {
    font-size: 13px;
    letter-spacing: 0.02em;
}

.header-1 {
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

#header-sticky.sticky {
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Navigation */
.main-menu nav ul li a {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.01em;
    text-transform: none;
}

/* Hero Section */
.hero-section {
    position: relative;
}

.hero-content h1 {
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.hero-content h4 {
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 14px;
    opacity: 0.9;
}

/* Buttons */
.theme-btn {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 76, 129, 0.3);
}

/* Section Titles */
.section-title span {
    color: var(--theme);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.section-title h2 {
    color: var(--header);
    font-weight: 700;
    line-height: 1.2;
}

/* Service Cards - vertical stacked layout */
.service-wrapper .service-card-items {
    flex-direction: column !important;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.service-wrapper .service-card-items:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.service-content .content h4 a {
    font-family: 'Space Grotesk', sans-serif !important;
    font-weight: 600;
    color: var(--header);
    transition: color 0.3s ease;
}

.service-content .content h4 a:hover {
    color: var(--theme);
}

/* Service content area - fixed height for uniform cards */
.service-wrapper .service-card-items .service-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 28px 28px 20px;
    flex-basis: auto !important;
    height: 230px;
    overflow: hidden;
}

.service-wrapper .service-card-items .service-content .icon {
    font-size: 36px;
    margin-bottom: 6px;
    flex-shrink: 0;
}

.service-wrapper .service-card-items .service-content .content {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    flex: 1;
}

.service-wrapper .service-card-items .service-content .content h4 {
    margin-bottom: 6px;
}

.service-wrapper .service-card-items .service-content .content p {
    font-size: 13.5px;
    line-height: 1.55;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Service image - full width, fills remaining space */
.service-wrapper .service-card-items .service-image {
    width: 100% !important;
    height: 200px !important;
    flex-shrink: 0;
}

@media (max-width: 991px) {
    .service-wrapper .service-card-items .service-content {
        height: 220px;
    }
    .service-wrapper .service-card-items .service-image {
        height: 180px !important;
    }
}

@media (max-width: 575px) {
    .service-wrapper .service-card-items .service-content {
        height: auto;
    }
    .service-wrapper .service-card-items .service-image {
        height: 160px !important;
    }
}

/* Hide arrow icon overlay on service images */
.service-wrapper .service-card-items .service-image .arrow-icon {
    display: none !important;
}

/* Service slider dots - visible on light bg */
.service-wrapper .service-carousel-active .slide-dots {
    margin-top: 35px;
    padding-bottom: 10px;
}

.service-wrapper .service-carousel-active .slide-dots li button {
    background-color: #c5d0dc;
    height: 6px;
    width: 50px;
    border-radius: 3px;
}

.service-wrapper .service-carousel-active .slide-dots li.slick-active button {
    background-color: var(--theme);
    width: 70px;
}

.service-wrapper .service-carousel-active .slide-dots li button:hover {
    background-color: var(--theme);
}

/* Feature Items */
.single-feature-items {
    border-radius: 12px;
    transition: all 0.3s ease;
}

.single-feature-items:hover {
    transform: translateY(-2px);
}

/* About Section */
.about-content .section-title h2 {
    font-weight: 700;
}

.circle-progress-bar-wrapper .single-circle-bar .content h6 {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-weight: 600;
    font-size: 14px;
}

/* Project Cards */
.project-image {
    border-radius: 12px;
    overflow: hidden;
}

.project-content h3 a {
    font-family: 'Space Grotesk', sans-serif !important;
    font-weight: 600;
}

/* Breadcrumb */
.breadcrumb-wrapper {
    position: relative;
}

.breadcrumb-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 22, 40, 0.85) 0%, rgba(15, 76, 129, 0.75) 100%);
    z-index: 0;
}

.page-heading h1 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Why Kalymatrix Cards */
.km-why-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px 28px;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.km-why-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(15, 76, 129, 0.12);
    border-color: var(--theme);
}

.km-why-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.km-why-card:hover .km-why-icon {
    background: var(--theme);
}

.km-why-icon i {
    font-size: 36px;
    color: var(--theme);
    transition: all 0.3s ease;
}

.km-why-card:hover .km-why-icon i {
    color: #ffffff;
}

.km-why-title {
    font-family: 'Space Grotesk', sans-serif !important;
    font-weight: 600;
    font-size: 20px;
    color: var(--header);
    margin-bottom: 12px;
}

.km-why-text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    margin: 0;
}

/* Counter / Fun Facts */
.counter-items h2,
.counter-items .count {
    font-family: 'Space Grotesk', sans-serif !important;
    font-weight: 700;
    color: var(--theme);
}

/* Footer */
.footer-section {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
}

.footer-section .widget-head h5 {
    font-family: 'Space Grotesk', sans-serif !important;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Contact Form */
.contact-form-items {
    border-radius: 12px;
}

.contact-form-items input,
.contact-form-items textarea {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    border-radius: 8px;
}

/* FAQ Accordion */
.faq-content .accordion-button {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-weight: 600;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #0A1628 0%, #0F4C81 100%);
}

/* Offcanvas Mobile Menu */
.offcanvas__info {
    background: #0A1628;
}

.offcanvas__contact h4 {
    font-family: 'Space Grotesk', sans-serif !important;
}

/* Image Placeholder Styling */
.image-placeholder {
    background: linear-gradient(135deg, #EDF2F7 0%, #E2E8F0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #A0AEC0;
    font-size: 14px;
    font-weight: 500;
    border: 2px dashed #CBD5E0;
    border-radius: 8px;
    text-align: center;
    padding: 20px;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Brand / Client Carousel */
.brand-image img {
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.brand-image:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Anonymized Client Labels */
.km-client-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 15px;
    min-height: 90px;
}

.km-client-label i {
    font-size: 28px;
    color: var(--theme);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.km-client-label span {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    line-height: 1.3;
}

.brand-image:hover .km-client-label i {
    opacity: 1;
    color: var(--header);
}

.brand-image:hover .km-client-label span {
    color: var(--header);
}

/* Selection Color */
::selection {
    background: var(--theme);
    color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--theme);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0A3A66;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .hero-content h1 {
        font-size: 36px;
        line-height: 1.2;
    }
}

@media (max-width: 575px) {
    .hero-content h1 {
        font-size: 28px;
    }

    .section-title h2 {
        font-size: 28px;
    }
}

/* ================================
   Performance Optimizations
   ================================ */

/* GPU acceleration for animated elements */
.wow,
.slick-slide,
.hero-slider-active,
.service-carousel-active,
.brand-carousel-active,
.mouse-cursor {
    will-change: transform, opacity;
}

/* Faster preloader transition */
.preloader {
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

/* Reduce repaints on hover animations */
.theme-btn,
.service-card-items,
.single-feature-items,
.km-why-card,
.project-image {
    will-change: transform;
    backface-visibility: hidden;
}

/* Smooth image rendering */
img {
    image-rendering: auto;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Optimize font rendering */
body {
    text-rendering: optimizeSpeed;
}

h1, h2, h3, h4, h5, h6 {
    text-rendering: optimizeLegibility;
}

/* Content visibility for off-screen sections */
.footer-section,
.cta-banner-section,
.cta-chat-section,
.map-section {
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .preloader {
        display: none !important;
    }
}
