/* --- Root Variables & Reset --- */
:root {
    --primary: #005da4;
    --dark: #0f172a;
    --light: #f8fafc;
    --accent: #06b6d4;
    --text-muted: #475569;
    --white: #ffffff;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border: none; /* Add this only if you want to strip all default borders */
}
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family:
        "Inter",
        system-ui,
        -apple-system,
        sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased; /* Makes text look crisper */
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}

/* --- Navigation --- */
header {
    position: fixed;
    width: 100%;
    padding: 7px 3%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: var(--transition);
}

header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.logo {
    height: 60px;
}

.brand-name {
    font-weight: 700;
    font-size: 1.7rem;
    color: var(--white);
    transition: var(--transition);
}

header.scrolled .brand-name {
    color: var(--dark);
}
header.scrolled .nav-links a.active-link {
    color: var(--primary) !important;
}
.nav-links {
    display: flex;
    list-style: none;
    gap: 18px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--white);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
}

/* 1. The default state for the active link */
.nav-links a.active-link {
    color: var(--accent) !important;
    font-weight: 700; /* Makes it pop without shifting layout */
    /* text-shadow: 0 0 10px rgba(6, 182, 212, 0.3);*/
    transition: var(--transition);
}

header.scrolled .nav-links a {
    color: var(--dark);
}
.nav-links a:hover {
    color: var(--accent) !important;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
}

.menu-toggle span {
    width: 30px;
    height: 3px;
    background: var(--white);
    transition: 0.3s;
    border-radius: 2px;
}

header.scrolled .menu-toggle span {
    background: var(--dark);
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
}

.carousel {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: -1;
    transition: opacity 1.5s ease-in-out;
}

.slide.active {
    opacity: 0.6;
}
.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.3), rgba(15, 23, 42, 0.8));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    background: linear-gradient(to bottom, rgba(24, 29, 38, 0.5), rgba(24, 29, 38, 0.1));
    max-width: 900px;
    padding: 20px;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.2rem);
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.1;
}

.btn-primary {
    padding: 12px 24px;
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    display: inline-block;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: var(--accent);
    transform: translateY(-2px); /* Works beautifully with your bezier transition */
    box-shadow: 0 10px 15px -3px rgba(6, 182, 212, 0.2);
}

/* --- Global Section Styles --- */
section {
    padding: 28px 5%;
}

.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: all 0.8s ease;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
.section-title {
    font-size: 2.5rem;
    margin-bottom: 35px;
    position: relative;
    font-weight: 700;
    text-align: center;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 5px;
    background: var(--primary);
}

/* --- About Section --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 38px;
    align-items: center;
}

.about-text h3 {
    color: var(--primary);
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    text-align: left;
}

.highlight-box {
    background: var(--primary);
    color: var(--white);
    padding: 32px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.highlight-box h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

/* --- Services Section --- */
.services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 50px;
    width: 100%;
    background: var(--white);
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
}

.service-column {
    position: relative;
    padding: 0 4px;
}

.service-column:not(:last-child)::after {
    content: "";
    position: absolute;
    right: -40px;
    top: 20%;
    height: 60%;
    width: 1.5;
    background: #e2e8f0;
}

.service-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 25px;
    color: var(--primary);
    animation: pulse 2s infinite;
}

.service-list {
    list-style: none;
    text-align: left;
}

.service-list li {
    margin-bottom: 12px;
    padding-left: 25px;
    position: relative;
    font-size: 1rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.service-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-size: 1.5rem;
    line-height: 1;
}

.service-list li:hover {
    color: var(--primary);
    transform: translateX(5px);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* --- Portfolio Slider --- */
.portfolio-wrapper {
    width: 100%;
    position: relative;
    overflow: hidden;
    padding: 20px 0;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}
.portfolio-wrapper::-webkit-scrollbar {
    display: none;
} /* Chrome/Safari */

.portfolio-track {
    display: flex;
    gap: 25px;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.project-tile {
    min-width: calc(33.333% - 17px);
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 380px;
    cursor: pointer;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.project-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.8s var(--transition);
}

.project-info {
    position: absolute;
    inset: 0;
    background: rgba(0, 93, 164, 0.92);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    color: var(--white);
    opacity: 0;
    transform: translateY(100%);
    transition: var(--transition);
}

.project-tile:hover img {
    transform: scale(1.1);
}
.project-tile:hover .project-info {
    opacity: 1;
    transform: translateY(0);
}

.slider-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.control-btn {
    background: var(--white);
    border: 1px solid #e2e8f0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark);
}

.control-btn:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* --- Vision & Mission --- */
.vm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.vm-card {
    padding: 32px;
    border-radius: 15px;
    transition: var(--transition);
    position: relative;
}
.vm-card.vision {
    background: var(--dark);
    color: var(--white);
}
.vm-card.mission {
    background: var(--primary);
    color: var(--white);
}

.vm-card h3 {
    font-size: 1.4rem;
    margin-bottom: 25px;
    letter-spacing: 1px;
}
.vm-card p {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.7;
}
.vm-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.2);
}
.workflow-container {
    margin-top: 12px;
    width: 100%;
    background: var(--white);
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
}
.workflow-grid {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.workflow-card {
    background: #e2e8f0;
    border-top: 5px solid #2b4c7e;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 30px;
    flex: 1;
    min-width: 300px;
    max-width: 350px;
    position: relative;
    transition: transform 0.3s ease;
}

.workflow-card:hover {
    transform: translateY(-10px);
}

.step-number {
    text-align: center;
    background: #2b4c7e;
    color: white;
    width: 50px;
    height: 50px;
    line-height: 50px;
    border-radius: 50%;
    font-weight: bold;
    margin: 0 auto 20px;
    font-size: 1.2rem;
}

.workflow-card h3 {
    color: #2b4c7e;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.workflow-card ul {
    text-align: left;
    padding-left: 20px;
    font-size: 0.95rem;
}

.workflow-card li {
    margin-bottom: 10px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .workflow-grid {
        flex-direction: column;
        align-items: center;
    }
}

/* --- Gallery Layout --- */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(193px, 1fr));
    gap: 15px;
    max-width: 1000px;
    margin: 0 auto;
}

.photo-item {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    cursor: pointer;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-item:hover {
    transform: scale(1.09);
}

/* Pop-up Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(36, 38, 39, 0.78);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Polaroid Style */
.polaroid-popup {
    background: var(--white);
    padding: 15px 15px 30px 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    text-align: center;
    max-width: 90%;
    max-height: 93%;
    position: relative;
    transform: rotate(2deg);
}

.polaroid-popup img {
    max-width: 484px;
    display: block;
}

.polaroid-popup p {
    margin-top: 5px;
    font-family: "Brush Script MT", cursive;
    font-size: 1.5rem;
    color: #333;
}

.close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
}
/*---Brands----*/

.brand-cloud-section {
    padding: 57px 11px;
    background-color: #ffffff;
    text-align: center;
    overflow: hidden;
}

.cloud-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px; /* Space between logos */
    max-width: 1155px;
    margin: 0 auto;
}

.cloud-item {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cloud-item img {
    max-width: 100%;
    height: auto;
}

/* Sizing Scales */
.xl img {
    height: 80px;
    opacity: 1;
    filter: none;
} /* "Centerpiece" brands */
.lg img {
    height: 60px;
}
.md img {
    height: 56px;
}
.sm img {
    height: 50px;
}

/* Hover State */
.cloud-item:hover {
    transform: scale(1.2) rotate(0deg);
    z-index: 10;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .cloud-container {
        gap: 15px;
    }
    .rotate {
        transform: rotate(0deg);
    } /* Easier to read on mobile */
    .xl img {
        height: 51px;
    }
}

/* Size Variations like the Image */
.giant img {
    height: 70px;
    filter: none;
    opacity: 1;
} /* The "Antibodies" effect */
.lg img {
    height: 42px;
}
.md img {
    height: 28px;
}
.sm img {
    height: 20px;
}

/* Rotation to match the word cloud layout */
.vertical {
    transform: rotate(-90deg);
}

/* Hover effect */
.logo-item:hover {
    transform: scale(1.2) rotate(0deg); /* Straightens on hover */
    z-index: 10;
}

.logo-item:hover img {
    filter: none;
    opacity: 1;
}

/* Responsive: Flatten the cloud for mobile */
@media (max-width: 600px) {
    .vertical {
        transform: rotate(0deg);
    }
    .giant img {
        height: 60px;
    }
    .cloud-container {
        gap: 20px;
    }
}
/* --- Clients Slider --- */
/* Container for the slider */
.client-slider-container {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    background: white;
    padding: 20px 0;
}
/* The actual moving track */
.slider-track {
    display: inline-flex;
    align-items: center;
    gap: 33px; /* Space between logos */
    animation: scroll 30s linear infinite;
    width: max-content;
}

.slider-track img {
    height: 55px; /* Adjust based on your logo sizes */
    width: auto;
    transition: all 0.3s ease;
}

.slider-track img:hover {
    transform: scale(1.5);
}

/* The Animation Logic */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        /* Move by exactly half the track's width */
        transform: translateX(-50%);
    }
}

/* --- WhatsApp Float --- */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 40px;
    background-color: #25d366;
    color: var(--white);
    border-radius: 50px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 5px 20px rgba(0, 0, 0, 0.3);
    z-index: 99999 !important;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #128c7e;
}

/* --- Footer --- */
footer {
    background: #0a0f1c;
    color: rgba(255, 255, 255, 0.7);
    padding: 15px 10% 12px;
}

.footer-grid {
    display: grid;
    /* This creates columns that wrap automatically based on screen size */
    grid-template-columns: 2fr 2fr 1fr;
    gap: 15px;
    padding: 20px 20px;
}

.footer-bottom {
    text-align: center;
    margin-top: 8px;
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 10px;
}

/* ========================================================================= */
/* --- Responsive Media Queries --- */
/* ========================================================================= */
/* --- Auto-Hide Header Logic --- */
@media (max-width: 768px) {
    header {
        transition:
            transform 0.3s ease-in-out,
            background 0.3s ease;
        will-change: transform;
    }

    /* This class will be added via JS when scrolling down */
    header.scroll-down {
        transform: translateY(-100%);
    }

    /* This class ensures it stays visible when scrolling up */
    header.scroll-up {
        transform: translateY(0);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    }
    /* When at the very top, force transparency and remove shadow */
    header.at-top {
        transform: translateY(0);
        background: transparent !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
    }
}
@media (max-width: 992px) {
    .about-grid,
    .vm-grid,
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .project-tile {
        min-width: calc(50% - 13px);
    }
    .service-column:not(:last-child)::after {
        display: none;
    }
}

@media (max-width: 768px) {
    /* General */
    section {
        padding: 25px 5%;
    }

    /* Navigation Menu */
    .menu-toggle {
        display: flex;
    }
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        height: 111vh;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        transition: 0.6s;
        z-index: 1002;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        right: 0;
    }
    .nav-links a {
        color: var(--dark);
        font-size: 1.2rem;
    }

    /* Portfolio Mobile Adjustments */
    .slider-controls {
        display: none;
    }

    .portfolio-wrapper {
        padding: 15px 0;
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 15px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .portfolio-track {
        gap: 15px;
        transition: none;
    }

    .project-tile {
        min-width: 38vw;
        flex-shrink: 0;
        scroll-snap-align: center;
        height: 380px;
        width: 378px;
    }

    .project-info {
        opacity: 1;
        display: flex;
        flex-direction: column;
        transform: translateY(0);
        background: linear-gradient(transparent, rgba(0, 93, 164, 0.95));
        justify-content: center;
        align-self: flex-end;
        padding: 10px;
    }

    /* Gallery Mobile Adjustments */
    .stack-container {
        display: grid;
        grid-template-columns: 1fr, 1fr;
        height: auto;
        gap: 20px;
    }
    .gallery-container {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(100px, 13fr));
        gap: 15px;
        max-width: 720px;
        margin: 0 auto;
    }
    .polaroid-card {
        position: relative;
        transform: none !important;
        width: 100%;
    }
    .polaroid-popup img {
    max-width: 322px;
    display: block;
}
    
    .footer-grid {
        display: column;
        *:nth-child(3) {
            display: none;
        }
        gap: 10px;
        padding: 8px 10px;
    }
    .footer-grid h4 {
        margin-top: 27px;
        margin-bottom: 5px;
    }
    /* WhatsApp */
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
}
