/* ==========================================================================
   Ideas Lab Africa - New Design Stylesheet (Refined & Perfected)
   ========================================================================== */

:root {
    --primary-color: #F59E0B;
    --primary-hover: #D97706;
    --dark-bg: #1E2229;
    --dark-card: #252A34;
    --dark-header: #13151A;
    --text-dark: #1F2937;
    --text-light: #FFFFFF;
    --text-muted: #9CA3AF;
    --border-color: #E5E7EB;
    --border-dark: #374151;
    --font-main: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Base Setup */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    background-color: #ffffff;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

a {
    text-decoration: none;
    transition: color 0.25s ease, background-color 0.25s ease;
}

a:hover {
    text-decoration: none;
}

/* Preloader */
.preloader {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    background-color: #181B20;
    background-image: url('../images/logo-yellow.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 130px;
}

/* Typography & Subtitles */
.section-subtitle {
    display: inline-block;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
}

.section-title-dark {
    color: #ffffff;
    font-weight: 700;
    font-size: 2.25rem;
    margin-bottom: 25px;
}

.section-title-light {
    color: var(--text-dark);
    font-weight: 700;
    font-size: 2.25rem;
    margin-bottom: 25px;
}

/* Buttons */
.btn-yellow {
    background-color: var(--primary-color);
    color: #000000;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 6px;
    display: inline-block;
    border: none;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.btn-yellow:hover {
    background-color: var(--primary-hover);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Main Header Navigation */
.site-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: background-color 0.3s ease, padding 0.3s ease;
}

.site-header.fixed-header {
    position: fixed;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    padding: 12px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.site-header .logo img {
    height: 55px;
    width: auto;
    object-fit: contain;
}

.site-header .logo .logo-sticky {
    display: none;
}

.site-header.fixed-header .logo .logo-default {
    display: none;
}

.site-header.fixed-header .logo .logo-sticky {
    display: block;
}

.site-header.fixed-header .nav-links a {
    color: var(--text-dark);
}

.site-header.fixed-header .nav-links a.active,
.site-header.fixed-header .nav-links a:hover {
    color: var(--primary-color);
}

.site-header.fixed-header .hamburger-btn {
    color: var(--text-dark);
}

.site-header .nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-header .nav-links a {
    color: #ffffff;
    font-weight: 500;
    font-size: 1rem;
    padding: 5px 0;
    transition: color 0.25s ease;
}

.site-header .nav-links a.active,
.site-header .nav-links a:hover {
    color: var(--primary-color);
}

.hamburger-btn {
    display: none;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.75rem;
    cursor: pointer;
    padding: 5px;
}

/* Mobile Slide-in Drawer Menu */
.mobile-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 85%;
    max-width: 340px;
    height: 100%;
    background-color: var(--dark-bg);
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.35s ease-in-out;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mobile-drawer.active {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px;
    border-bottom: 1px solid var(--border-dark);
}

.drawer-header .logo img {
    height: 48px;
}

.drawer-close-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

.drawer-close-btn:hover {
    color: var(--primary-color);
}

.drawer-nav {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-dark);
}

.drawer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.drawer-nav li a {
    display: block;
    padding: 12px 24px;
    color: #ffffff;
    font-weight: 500;
    font-size: 1.05rem;
}

.drawer-nav li a.active,
.drawer-nav li a:hover {
    color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.05);
}

.drawer-contact-info {
    padding: 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.contact-item .icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1rem;
    flex-shrink: 0;
}

.contact-item .details {
    display: flex;
    flex-direction: column;
}

.contact-item .details .label {
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.contact-item .details a,
.contact-item .details span {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
}

.drawer-social-grid {
    margin-top: auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--border-dark);
}

.drawer-social-grid a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    color: #ffffff;
    font-size: 1.05rem;
    border-right: 1px solid var(--border-dark);
}

.drawer-social-grid a:last-child {
    border-right: none;
}

.drawer-social-grid a:hover {
    background-color: var(--primary-color);
    color: #000000;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 130px 0 90px 0;
    overflow: hidden;
}

.hero-slider-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    will-change: opacity;   /* keeps fade on its own GPU layer */
    transform: translateZ(0);
}

.hero-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.32);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 750px;
}

.hero-subtitle {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 14px;
}

.hero-title {
    color: #ffffff;
    font-size: 3.6rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 22px;
}

.hero-title .highlight {
    color: var(--primary-color);
}

.hero-text {
    color: #ffffff;
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 620px;
    line-height: 1.6;
}

/* About Section (Smaller Images, Matching Image 2 Proportions) */
.about-section {
    padding: 100px 0;
    background-color: #ffffff;
}

.about-images-container {
    position: relative;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    min-height: 350px;
}

.about-img-main {
    width: 60%;
    height: auto;
    display: block;
    border-radius: 0;
}

.about-img-sub {
    position: absolute;
    top: 85px;
    left: 32%;
    width: 52%;
    height: auto;
    display: block;
    border-radius: 0;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 28px;
}

.about-feature-item {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.about-feature-icon {
    width: 42px;
    height: 42px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.about-feature-info h5 {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 4px;
    color: var(--text-dark);
}

.about-feature-info p {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin: 0;
}

/* Services Section with Uniform Polygon Clip Path Across Devices */
.services-section {
    position: relative;
    background-color: var(--dark-bg);
    padding-top: 140px;
    padding-bottom: 110px;
    clip-path: polygon(28% 4%, 65% 6%, 100% 6%, 100% 100%, 0 100%, 0% 60%, 0 0);
    margin-top: 20px;
}

.service-card {
    background-color: transparent;
    border-radius: 0;
    height: 100%;
    /* No card-level transform — only the image animates */
}

.service-card .card-img-wrap {
    height: 210px;
    border-radius: 4px;
    overflow: hidden;   /* clips the zoomed image cleanly */
    margin-bottom: 18px;
}

.service-card .card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    transform-origin: center center;
    transition: transform 0.45s ease;
    will-change: transform;   /* GPU layer, avoids layout recalc */
}

/* Only the image zooms — card stays still */
.service-card:hover .card-img-wrap img {
    transform: scale(1.08);
}

.service-card .card-body {
    padding: 0;
}

.service-card .card-title {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.service-card .card-text {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 0;
}

/* Recent Projects Section */
.projects-section {
    padding: 100px 0;
    background-color: #ffffff;
}

.project-block {
    padding: 8px;
}

.project-block .inner-box {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-block .inner-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.project-block .image-box {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #ffffff;
    position: relative;
}

.project-block .image-box img {
    max-height: 100px;
    max-width: 80%;
    width: auto;
    object-fit: contain;
}

.project-block .image-box .icon {
    position: absolute;
    right: 15px;
    bottom: 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.project-block .inner-box:hover .image-box .icon {
    opacity: 1;
}

.project-block .caption {
    display: block;
    text-align: center;
    padding: 10px;
    font-weight: 700;
    color: var(--primary-color);
    background-color: transparent;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Owl Carousel Custom Nav Controls */
.project-carousel .owl-nav {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 25px;
}

.project-carousel .owl-nav button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #F3F4F6 !important;
    color: var(--text-dark) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.project-carousel .owl-nav button:hover {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
}

/* CTA Banner Section */
.cta-banner-section {
    position: relative;
    padding: 100px 0;
    background-size: cover;
    background-position: center;
    text-align: center;
}

.cta-banner-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.38);
    z-index: 1;
}

.cta-banner-content {
    position: relative;
    z-index: 2;
}

.cta-banner-title {
    color: #ffffff;
    font-size: 2.8rem;
    font-weight: 800;
    margin: 0;
}

/* Tech Stack Section */
.techstack-section {
    padding: 90px 0;
    background-color: #ffffff;
    width: 100%;
}

.techstack-logos {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    width: 100%;
    margin-top: 45px;
}

.techstack-logos img {
    height: 55px;
    width: auto;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.techstack-logos img:hover {
    transform: scale(1.08);
}

/* Contact Section (Ready to Build - Equal Image Height Matching Form) */
.contact-section {
    padding: 100px 0;
    background-color: var(--dark-bg);
}

.contact-row {
    align-items: stretch;
}

.contact-form-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.contact-form-wrap h3 {
    color: #ffffff;
    font-weight: 700;
    font-size: 2.2rem;
    margin-bottom: 6px;
}

.contact-form-wrap p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.contact-form .form-control {
    background-color: var(--dark-card);
    border: 1px solid var(--border-dark);
    color: #ffffff;
    border-radius: 4px;
    padding: 12px 16px;
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.contact-form .form-control:focus {
    background-color: var(--dark-card);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
    color: #ffffff;
}

.contact-form textarea.form-control {
    min-height: 120px;
}

.contact-image-wrap {
    height: 100%;
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
}

.contact-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Map Section (Black & White Grayscale Map Matching Pasted Image 2) */
.map-section {
    position: relative;
    width: 100%;
    height: 460px;
}

.map-section iframe {
    width: 100%;
    height: 100%;
    border: 0;
    filter: grayscale(100%) contrast(1.1) opacity(0.95);
}

.branch-card-overlay {
    position: absolute;
    bottom: 35px;
    left: 35px;
    background: #ffffff;
    padding: 28px 32px;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    z-index: 10;
    max-width: 360px;
}

.branch-card-overlay h5 {
    font-weight: 800;
    font-size: 1.25rem;
    margin-bottom: 14px;
    color: var(--text-dark);
}

.branch-card-overlay ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.branch-card-overlay li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.92rem;
    color: var(--text-dark);
}

.branch-card-overlay li i {
    color: var(--primary-color);
    font-size: 1rem;
    width: 18px;
}

/* Footer (Matching Pasted Image 3) */
.site-footer {
    background-color: var(--dark-bg);
    color: #ffffff;
    padding: 80px 0 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-widget-logo img {
    height: 65px;
    margin-bottom: 12px;
}

.footer-widget-logo p {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.footer-widget-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 22px;
    position: relative;
    padding-bottom: 8px;
}

.footer-widget-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    max-width: 240px;
    height: 1px;
    background-color: var(--border-dark);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a,
.footer-links span {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.footer-contact-item .icon-box {
    width: 32px;
    height: 32px;
    background-color: var(--primary-color);
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    border-radius: 3px;
    flex-shrink: 0;
}

.footer-contact-item a {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.footer-contact-item a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    background-color: var(--dark-bg);
    padding: 24px 0;
    margin-top: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--text-muted);
    text-decoration: underline;
}

.footer-bottom a:hover {
    color: var(--primary-color);
}

/* Responsive Media Queries */
@media (max-width: 991.98px) {

    .site-header .nav-links,
    .site-header .btn-yellow {
        display: none;
    }

    .hamburger-btn {
        display: block;
    }

    .hero-title {
        font-size: 2.7rem;
    }

    .about-images-container {
        min-height: 300px;
        margin-bottom: 30px;
    }

    .services-section {
        clip-path: polygon(28% 4%, 65% 6%, 100% 6%, 100% 100%, 0 100%, 0% 60%, 0 0);
        padding-top: 120px;
    }

    .contact-image-wrap {
        min-height: 320px;
    }

    .cta-banner-title {
        font-size: 2.2rem;
    }

    .techstack-logos {
        gap: 25px;
    }

    .branch-card-overlay {
        position: relative;
        bottom: 0;
        left: 0;
        max-width: 100%;
        margin: 20px;
    }

    .map-section {
        height: auto;
    }

    .map-section iframe {
        height: 320px;
    }
}

@media (max-width: 767.98px) {

    .hero-content,
    .hero-title,
    .hero-subtitle,
    .hero-text {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .section-subtitle,
    .section-title-dark,
    .section-title-light {
        text-align: center;
    }

    .hero-title {
        font-size: 2.1rem;
    }

    .hero-text {
        font-size: 1rem;
    }

    .section-title-dark,
    .section-title-light {
        font-size: 1.85rem;
    }

    .about-images-container {
        min-height: 260px;
    }

    .about-img-main {
        width: 65%;
    }

    .about-img-sub {
        width: 52%;
        top: 70px;
        left: 32%;
    }

    .services-section {
        clip-path: polygon(28% 4%, 65% 6%, 100% 6%, 100% 100%, 0 100%, 0% 60%, 0 0);
        padding-top: 110px;
    }

    .techstack-logos {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }

    .techstack-logos img {
        height: 42px;
    }

    .footer-widget-logo,
    .footer-widget-title {
        text-align: center;
    }

    .footer-widget-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-links {
        align-items: center;
    }

    .footer-contact-item {
        justify-content: center;
    }
}