/* =========================================================
   MARFEX SOLUTION
   PROJECTS PAGE
   Premium Compact 3D Design
   White + Green + Blue
========================================================= */


/* =========================================================
   VARIABLES
========================================================= */

:root {

    --green: #16a34a;
    --green-dark: #15803d;

    --blue: #2563eb;
    --blue-dark: #1d4ed8;

    --green-light: #dcfce7;
    --blue-light: #dbeafe;

    --dark: #0f172a;
    --text: #334155;
    --muted: #64748b;

    --white: #ffffff;
    --bg: #f8fafc;

    --border: #e2e8f0;

    --shadow:
        0 15px 40px rgba(15, 23, 42, 0.08);

    --shadow-hover:
        0 25px 70px rgba(15, 23, 42, 0.15);

    --transition:
        all 0.35s ease;
}


/* =========================================================
   RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {

    font-family: 'Inter', sans-serif;

    color: var(--text);

    background: #ffffff;

    overflow-x: hidden;
}

a {
    text-decoration: none;
}

img {
    max-width: 100%;
}


/* =========================================================
   LOADER
========================================================= */

.page-loader {

    position: fixed;

    inset: 0;

    z-index: 99999;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #ffffff;

    transition:
        opacity 0.5s ease,
        visibility 0.5s ease;
}

.page-loader.hidden {

    opacity: 0;

    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-logo {

    font-family: 'Poppins', sans-serif;

    font-size: 27px;

    font-weight: 800;

    color: #0D47A1;
}

.loader-logo span {
    color: #4CAF50;
}

.loader-spinner {

    width: 40px;
    height: 40px;

    margin: 18px auto 0;

    border: 4px solid #e2e8f0;

    border-top-color: var(--green);

    border-right-color: var(--blue);

    border-radius: 50%;

    animation:
        spin 0.9s linear infinite;
}

@keyframes spin {

    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   NAVBAR
========================================================= */

.navbar {

    position: sticky;

    top: 0;

    z-index: 1000;

    padding: 12px 0;

    background:
        rgba(255, 255, 255, 0.92) !important;

    backdrop-filter: blur(15px);

    border-bottom:
        1px solid rgba(226, 232, 240, 0.8);

    box-shadow:
        0 5px 25px rgba(15, 23, 42, 0.04);
}

.navbar-brand {

    display: flex;

    align-items: center;

    gap: 6px;

    font-family: 'Poppins', sans-serif;

    font-size: 19px;

    font-weight: 800;

    color: var(--dark) !important;
}

.navbar-brand img {

    width: 40px;
    height: 40px;

    object-fit: contain;
}

.navbar-brand .brand-marfex {
    color: #0D47A1;
}

.navbar-brand .brand-solution {
    color: #4CAF50;
}

.navbar-nav {
    gap: 5px;
}

.nav-link {

    padding: 9px 13px !important;

    border-radius: 9px;

    font-size: 13px;

    font-weight: 600;

    color: var(--text) !important;

    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {

    color: var(--green) !important;

    background:
        var(--green-light);
}

.navbar-toggler {

    border: none;

    color: var(--dark);

    box-shadow: none !important;
}


/* =========================================================
   HERO
========================================================= */

.projects-hero {

    position: relative;

    min-height: 400px;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;

    background:

        radial-gradient(
            circle at 15% 30%,
            rgba(22, 163, 74, 0.10),
            transparent 32%
        ),

        radial-gradient(
            circle at 85% 30%,
            rgba(37, 99, 235, 0.10),
            transparent 32%
        ),

        #ffffff;
}


/* =========================================================
   HERO CIRCLES
========================================================= */

.hero-circle {

    position: absolute;

    border-radius: 50%;

    border: 1px solid rgba(22, 163, 74, 0.12);

    pointer-events: none;
}

.circle-one {

    width: 300px;
    height: 300px;

    left: -140px;
    top: 40px;

    animation:
        circleFloat 7s ease-in-out infinite;
}

.circle-two {

    width: 250px;
    height: 250px;

    right: -110px;
    bottom: -80px;

    border-color:
        rgba(37, 99, 235, 0.12);

    animation:
        circleFloat 9s ease-in-out infinite reverse;
}

@keyframes circleFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-18px);
    }
}


/* =========================================================
   FLOATING ICONS
========================================================= */

.floating-element {

    position: absolute;

    width: 48px;
    height: 48px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 15px;

    background:
        rgba(255, 255, 255, 0.85);

    border:
        1px solid var(--border);

    box-shadow: var(--shadow);

    color: var(--green);

    font-size: 17px;

    animation:
        floating 5s ease-in-out infinite;
}

.floating-one {

    left: 12%;

    top: 28%;
}

.floating-two {

    right: 12%;

    top: 35%;

    color: var(--blue);

    animation-delay: 1s;
}

.floating-three {

    right: 18%;

    bottom: 18%;

    color: var(--green);

    animation-delay: 2s;
}

@keyframes floating {

    0%,
    100% {
        transform:
            translateY(0)
            rotate(0deg);
    }

    50% {
        transform:
            translateY(-12px)
            rotate(4deg);
    }
}


/* =========================================================
   HERO CONTENT
========================================================= */

.hero-content {

    position: relative;

    z-index: 5;

    max-width: 700px;

    margin: auto;

    text-align: center;
}

.hero-badge {

    display: inline-flex;

    align-items: center;

    gap: 7px;

    padding: 7px 14px;

    margin-bottom: 15px;

    border-radius: 50px;

    background:
        rgba(22, 163, 74, 0.08);

    border:
        1px solid rgba(22, 163, 74, 0.15);

    color: var(--green-dark);

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 1.5px;
}

.hero-content h1 {

    font-family: 'Poppins', sans-serif;

    font-size:
        clamp(38px, 5vw, 58px);

    line-height: 1.1;

    font-weight: 800;

    color: var(--dark);

    margin-bottom: 14px;
        background-clip: text;
        -webkit-background-clip: text;
}

.hero-content h1 span {

    background:
        linear-gradient(
            90deg,
            var(--green),
            var(--blue)
        );

    background-clip: text;
    -webkit-background-clip: text;

    -webkit-text-fill-color: transparent;
}

.hero-content p {

    max-width: 570px;

    margin: auto;

    color: var(--muted);

    font-size: 13px;

    line-height: 1.7;
}


/* =========================================================
   PROJECT SECTION
========================================================= */

.projects-section {

    padding: 65px 20px 60px;

    background: #ffffff;
}

.section-heading {

    max-width: 600px;

    margin:
        0 auto 40px;

    text-align: center;
}

.section-heading span {

    display: inline-block;

    margin-bottom: 7px;

    color: var(--green);

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 2px;
}

.section-heading h2 {

    font-family: 'Poppins', sans-serif;

    color: var(--dark);

    font-size: 35px;

    font-weight: 800;

    margin-bottom: 7px;
}

.section-heading h2 b {
    color: var(--green);
}

.section-heading p {

    margin: 0;

    color: var(--muted);

    font-size: 12px;
}


/* =========================================================
   PROJECT GRID
========================================================= */

.projects-container {

    max-width: 820px;

    margin: auto;

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 28px;
}


/* =========================================================
   PROJECT ITEM
========================================================= */

.project-item {

    position: relative;

    min-height: 260px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

    padding: 25px;

    overflow: hidden;

    cursor: pointer;

    background: #ffffff;

    border:
        1px solid var(--border);

    border-radius: 25px;

    box-shadow: var(--shadow);

    transform-style: preserve-3d;

    transition:
        transform 0.45s ease,
        box-shadow 0.45s ease,
        border-color 0.45s ease;
}

.project-item::before {

    content: "";

    position: absolute;

    width: 170px;
    height: 170px;

    left: -80px;
    top: -80px;

    border-radius: 50%;

    background:
        rgba(22, 163, 74, 0.07);

    transition: 0.5s ease;
}

.project-item::after {

    content: "";

    position: absolute;

    width: 160px;
    height: 160px;

    right: -80px;
    bottom: -80px;

    border-radius: 50%;

    background:
        rgba(37, 99, 235, 0.07);

    transition: 0.5s ease;
}

.project-item:hover {

    transform:
        translateY(-9px)
        rotateX(2deg)
        rotateY(-2deg);

    box-shadow:
        var(--shadow-hover);

    border-color:
        rgba(22, 163, 74, 0.35);
}

.project-item:hover::before,
.project-item:hover::after {

    transform: scale(1.4);
}


/* =========================================================
   LOGO BOX
========================================================= */

.project-logo-box {

    position: relative;

    z-index: 3;

    width: 115px;
    height: 115px;

    padding: 17px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #ffffff;

    border:
        1px solid var(--border);

    border-radius: 24px;

    box-shadow:
        0 12px 35px
        rgba(15, 23, 42, 0.09);

    transform:
        translateZ(35px);

    transition:
        transform 0.45s ease,
        box-shadow 0.45s ease;
}

.project-logo-box img {

    position: relative;

    z-index: 2;

    width: 100%;
    height: 100%;

    object-fit: contain;

    transition:
        transform 0.4s ease;
}

.project-item:hover
.project-logo-box {

    transform:
        translateZ(55px)
        scale(1.08)
        rotate(-3deg);

    box-shadow:
        0 20px 45px
        rgba(22, 163, 74, 0.16);
}

.project-item:hover
.project-logo-box img {

    transform: scale(1.05);
}


/* =========================================================
   LOGO GLOW
========================================================= */

.logo-glow {

    position: absolute;

    inset: -15px;

    border-radius: 30px;

    background:
        linear-gradient(
            135deg,
            rgba(22, 163, 74, 0.10),
            rgba(37, 99, 235, 0.10)
        );

    filter: blur(15px);

    opacity: 0;

    transition: 0.4s ease;
}

.project-item:hover
.logo-glow {

    opacity: 1;
}


/* =========================================================
   PROJECT NAME
========================================================= */

.project-item h3 {

    position: relative;

    z-index: 3;

    margin:
        19px 0 7px;

    font-family: 'Poppins', sans-serif;

    color: var(--dark);

    font-size: 19px;

    font-weight: 800;

    transition: var(--transition);
}

.project-item:hover h3 {
    color: var(--green);
}


/* =========================================================
   CLICK TEXT
========================================================= */

.click-text {

    position: relative;

    z-index: 3;

    color: var(--muted);

    font-size: 10px;

    font-weight: 700;

    transition: var(--transition);
}

.click-text i {

    margin-left: 5px;

    color: var(--blue);

    transition: 0.3s ease;
}

.project-item:hover
.click-text {

    color: var(--green);
}

.project-item:hover
.click-text i {

    transform:
        translateX(5px);
}


/* =========================================================
   NUMBER
========================================================= */

.project-number {

    position: absolute;

    right: 17px;
    bottom: 14px;

    z-index: 3;

    font-family: 'Poppins', sans-serif;

    font-size: 11px;

    font-weight: 800;

    color: #cbd5e1;

    transition: 0.3s ease;
}

.project-item:hover
.project-number {

    color: var(--green);
}


/* =========================================================
   MODAL
========================================================= */

.project-modal {

    position: fixed;

    inset: 0;

    z-index: 9999;

    display: none;

    align-items: center;

    justify-content: center;

    padding: 20px;

    background:
        rgba(15, 23, 42, 0.65);

    backdrop-filter:
        blur(10px);
}

.project-modal.active {

    display: flex;

    animation:
        modalFade 0.3s ease;
}

@keyframes modalFade {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


/* =========================================================
   MODAL BOX
========================================================= */

.modal-box {

    position: relative;

    width: 100%;

    max-width: 520px;

    padding: 32px;

    text-align: center;

    background: #ffffff;

    border:
        1px solid var(--border);

    border-radius: 27px;

    box-shadow:
        0 35px 100px
        rgba(0, 0, 0, 0.25);

    animation:
        modalOpen 0.35s ease;
}

@keyframes modalOpen {

    from {

        opacity: 0;

        transform:
            scale(0.85)
            translateY(25px);
    }

    to {

        opacity: 1;

        transform:
            scale(1)
            translateY(0);
    }
}


/* =========================================================
   CLOSE
========================================================= */

.modal-close {

    position: absolute;

    top: 13px;
    right: 13px;

    border-radius: 50%;

    background: #f1f5f9;

    color: var(--dark);

    cursor: pointer;

    transition: 0.3s ease;
}

.modal-close:hover {

    background: var(--green);

    color: #ffffff;

    transform:
        rotate(90deg);
}


/* =========================================================
   MODAL LOGO
========================================================= */

.modal-logo {

    width: 100px;
    height: 100px;

    margin:
        0 auto 18px;

    padding: 14px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #f8fafc;

    border:
        1px solid var(--border);

    border-radius: 22px;

    box-shadow:
        0 10px 30px
        rgba(15, 23, 42, 0.07);
}

.modal-logo img {

    width: 100%;
    height: 100%;

    object-fit: contain;
}


/* =========================================================
   MODAL TITLE
========================================================= */

.modal-box h2 {

    font-family: 'Poppins', sans-serif;

    font-size: 26px;

    font-weight: 800;

    color: var(--dark);

    margin-bottom: 10px;
}


/* =========================================================
   MODAL DESCRIPTION
========================================================= */

.modal-box > p {

    color: var(--muted);

    font-size: 12px;

    line-height: 1.7;

    margin-bottom: 20px;
}


/* =========================================================
   MODAL INFO
========================================================= */

.modal-info {

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 10px;

    margin-bottom: 20px;
}

.modal-info-box {

    display: flex;

    align-items: center;

    gap: 9px;

    text-align: left;

    padding: 12px;

    background: #f8fafc;

    border:
        1px solid var(--border);

    border-radius: 12px;
}

.modal-info-box > i {

    width: 32px;
    height: 32px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 9px;

    background:
        var(--green-light);

    color: var(--green);

    font-size: 12px;
}

.modal-info-box small {

    display: block;

    color: var(--muted);

    font-size: 8px;

    margin-bottom: 2px;
}

.modal-info-box strong {

    color: var(--dark);

    font-size: 10px;
}


/* =========================================================
   MODAL BUTTON
========================================================= */

.modal-btn {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    padding:
        11px 19px;

    border-radius: 10px;

    background:
        linear-gradient(
            135deg,
            var(--green),
            var(--blue)
        );

    color: #ffffff;

    font-size: 11px;

    font-weight: 700;

    box-shadow:
        0 10px 25px
        rgba(37, 99, 235, 0.20);

    transition: 0.3s ease;
}

.modal-btn:hover {

    color: #ffffff;

    transform:
        translateY(-3px);

    box-shadow:
        0 15px 35px
        rgba(37, 99, 235, 0.30);
}


/* =========================================================
   SMALL CTA
========================================================= */

.small-cta {

    padding:
        0 20px 50px;

    background: #ffffff;
}

.cta-box {

    max-width: 820px;

    margin: auto;

    padding:
        25px 30px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    border-radius: 20px;

    background:
        linear-gradient(
            135deg,
            #f0fdf4,
            #eff6ff
        );

    border:
        1px solid #dbeafe;
}

.cta-box span {

    color: var(--green);

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1.5px;
}

.cta-box h3 {

    margin: 5px 0 0;

    font-family: 'Poppins', sans-serif;

    color: var(--dark);

    font-size: 20px;

    font-weight: 800;
}

.cta-box h3 b {
    color: var(--green);
}

.cta-btn {

    flex-shrink: 0;

    display: inline-flex;

    align-items: center;

    gap: 7px;

    padding:
        10px 16px;

    border-radius: 9px;

    background:
        linear-gradient(
            135deg,
            var(--green),
            var(--blue)
        );

    color: #ffffff;

    font-size: 10px;

    font-weight: 700;

    transition: 0.3s ease;
}

.cta-btn:hover {

    color: #ffffff;

    transform:
        translateY(-3px);
}


/* =========================================================
   FOOTER
========================================================= */

footer {

    padding:
        30px 0 18px;

    background:
        #0f172a;

    color: #94a3b8;
}

.footer-content {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;
}

.footer-brand {

    font-family: 'Poppins', sans-serif;

    color: #ffffff;

    font-size: 18px;

    font-weight: 800;
}

.footer-brand span {
    color: var(--green);
}

.footer-content p {

    margin:
        4px 0 0;

    font-size: 10px;
}

.footer-links {

    display: flex;

    gap: 17px;

    flex-wrap: wrap;
}

.footer-links a {

    color: #94a3b8;

    font-size: 10px;

    transition: 0.3s ease;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {

    margin-top: 20px;

    padding-top: 14px;

    text-align: center;

    border-top:
        1px solid rgba(255,255,255,0.08);

    color: #64748b;

    font-size: 9px;
}


/* =========================================================
   WHATSAPP
========================================================= */

.whatsapp-float {

    position: fixed;

    right: 20px;
    bottom: 20px;

    z-index: 1000;

    width: 50px;
    height: 50px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #25d366;

    color: #ffffff;

    font-size: 22px;

    box-shadow:
        0 12px 30px
        rgba(37, 211, 102, 0.30);

    transition: 0.3s ease;
}

.whatsapp-float:hover {

    color: #ffffff;

    transform:
        translateY(-5px)
        scale(1.08);
}


/* =========================================================
   SCROLLBAR
========================================================= */

::-webkit-scrollbar {
    width: 7px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {

    background:
        linear-gradient(
            var(--green),
            var(--blue)
        );

    border-radius: 20px;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {


    /* Navbar */

    .navbar-brand {
        font-size: 17px;
    }

    .navbar-brand img {
        width: 35px;
        height: 35px;
    }


    /* Hero */

    .projects-hero {

        min-height: 350px;

        padding:
            50px 15px;
    }

    .hero-content h1 {
        font-size: 36px;
    }

    .hero-content p {
        font-size: 12px;
    }

    .floating-element {
        display: none;
    }


    /* Projects */

    .projects-section {

        padding:
            50px 15px;
    }

    .section-heading {
        margin-bottom: 30px;
    }

    .section-heading h2 {
        font-size: 29px;
    }


    .projects-container {

        grid-template-columns: 1fr;

        gap: 18px;

        max-width: 390px;
    }


    .project-item {

        min-height: 235px;

        padding: 22px;
    }


    .project-logo-box {

        width: 100px;
        height: 100px;

        padding: 15px;
    }


    .project-item h3 {
        font-size: 18px;
    }


    /* Modal */

    .modal-box {

        padding:
            28px 20px;

        border-radius: 22px;
    }


    .modal-logo {

        width: 85px;
        height: 85px;
    }


    .modal-box h2 {
        font-size: 23px;
    }


    .modal-info {

        grid-template-columns:
            1fr;
    }


    /* CTA */

    .cta-box {

        flex-direction: column;

        align-items: flex-start;

        padding:
            23px 20px;
    }


    .cta-box h3 {
        font-size: 18px;
    }


    /* Footer */

    .footer-content {

        flex-direction: column;

        align-items: flex-start;
    }


    .footer-links {
        gap: 12px;
    }

}


/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media (max-width: 400px) {

    .hero-content h1 {
        font-size: 32px;
    }

    .project-item {
        min-height: 220px;
    }

}


/* Shared loader and header alignment */
#page-loader {
    position: fixed;
    inset: 0;
    background: #ffffff;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    animation: loaderAutoHide 0.5s ease 0.9s forwards;
}

#page-loader.loaded {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none;
}

.loader-center {
    position: relative;
    z-index: 3;
    text-align: center;
}

#page-loader .loader-logo {
    font-family: "Outfit", sans-serif;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    color: #0D47A1;
}

#page-loader .loader-logo span {
    margin-left: 7px;
    color: #4CAF50;
}

.loader-line {
    width: 150px;
    height: 3px;
    margin: 18px auto;
    background: linear-gradient(90deg, #16a765, #2563eb, #16a765);
    animation: loaderLine 1.5s infinite;
}

.loader-center p {
    font-size: 12px;
    color: #667085;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.loader-orbit {
    position: absolute;
    border: 1px solid rgba(22, 167, 101, 0.15);
    border-radius: 50%;
}

.orbit-one {
    width: 300px;
    height: 300px;
    animation: orbit 8s linear infinite;
}

.orbit-two {
    width: 450px;
    height: 450px;
    border-color: rgba(37, 99, 235, 0.1);
    animation: orbit 12s linear infinite reverse;
}

@keyframes loaderLine {
    0%, 100% { transform: scaleX(0); }
    50% { transform: scaleX(1); }
}

@keyframes orbit {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes loaderAutoHide {
    from { opacity: 1; visibility: visible; }
    to { opacity: 0; visibility: hidden; pointer-events: none; }
}

.header-navbar .navbar {
    position: static;
    min-height: 0;
    padding: 0;
    background: transparent !important;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.header-navbar .navbar-brand {
    font-size: inherit;
}

.header-navbar .navbar-nav {
    gap: 0;
}

.header-navbar .navbar-toggler {
    border: 0;
    padding: 8px;
}

.header-navbar .navbar-toggler-icon {
    display: flex;
    width: 30px;
    height: 24px;
    flex-direction: column;
    justify-content: space-between;
    background: none;
}

.header-navbar .navbar-toggler-icon span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--dark);
    border-radius: 2px;
}

@media (max-width: 767px) {

    .project-logo-box {
        width: 90px;
        height: 90px;
    }

    .project-item h3 {
        font-size: 17px;
    }

    .whatsapp-float {

        width: 46px;
        height: 46px;

        right: 14px;
        bottom: 14px;
    }
}