/* --- Root Variables & Base Styles --- */
:root {
    /* Primary Colors */
    --moss-green: #4D774E;
    --warm-ochre: #C29F0F;
    --terracotta: #CB6D51;
    --deep-tech-blue: #2A5A9C;
    --mid-tone-sky-blue: #5998C5;
    --light-teal-aqua: #87CEBB;

    /* Neutral Colors */
    --deep-charcoal-grey: #333333;
    --off-white: #F0F0F0;
    --mid-grey: #A0A0A0;
}

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

body, html {
    font-family: 'Poppins', sans-serif;
    color: var(--off-white);
    background-color: var(--deep-charcoal-grey); /* Fallback background color */
    overflow-x: hidden;
    overflow-y: auto;
    scroll-behavior: smooth; /* Adds smooth scrolling when clicking nav links */

    /* Hides scrollbar for Firefox and IE */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Hides scrollbar for Chrome, Safari, and Opera */
body::-webkit-scrollbar {
    display: none;
}

.fullscreen-section {
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column; /* Stack content vertically */
    justify-content: center;
    align-items: center;
    position: relative; /* All sections now need a positioning context */
    overflow: hidden;   /* And to hide overflow */
}

/* ... (rest of the old styles) ... */
.hero-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    position: relative; 
    z-index: 2; 
}

header {
    padding-top: 0;
    animation: fadeInDown 1s ease-out;
    width: 95%;
    margin: 0 auto;
    position: relative; 
    z-index: 3; /* Changed: Ensures header and mobile nav are on top */
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 5px 5px 20px 20px;
    padding: 0.5rem 5%;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.logo img {
    height: 60px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--deep-charcoal-grey);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    padding-bottom: 5px;
    position: relative;
    transition: color 0.3s ease;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--warm-ochre);
    transition: width 0.3s ease;
}

.nav-menu a:hover {
    color: var(--warm-ochre);
}

.nav-menu a:hover::after {
    width: 100%;
}


/* --- Hero Content --- */
.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0;
    animation: fadeInUp 1s ease-out 0.2s;
    animation-fill-mode: backwards;
}

.hero-content p {
    font-size: 1.5rem;
    max-width: 600px;
    margin-bottom: 1.4rem;
    animation: fadeInUp 1s ease-out 0.4s;
    animation-fill-mode: backwards;
}

.cta-button {
    display: inline-block;
    background-color: var(--deep-tech-blue);
    color: var(--off-white);
    padding: 1rem 1.4rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
    animation: fadeInUp 1s ease-out 0.6s;
    animation-fill-mode: backwards;
}

.cta-button:hover {
    background-color: var(--mid-tone-sky-blue);
    transform: translateY(-3px);
}


/* --- Animations --- */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- FULLSCREEN SECTION STYLES --- */
#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Overlay for hero video */
    z-index: 1;
}


/* Generic content for sections OTHER THAN web design */
.section-content {
    text-align: center;
    max-width: 800px;
    padding: 2rem;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 15px;
    backdrop-filter: blur(5px);
    position: relative; /* Ensure it's above backgrounds */
    z-index: 2;
}

.section-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-content p {
    font-size: 1.2rem;
    line-height: 1.6;
}

/* Section-specific backgrounds */
#web-design {
    background-color: var(--warm-ochre);
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/webbg2.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    flex-direction: column; /* Stack title and cards vertically */
    justify-content: flex-start; /* Align content to the top */
    align-items: flex-start; /* Align content to the left */
    padding-top: 6rem; /* Add space at the top */
}

#digitalization {
    background-color: var(--mid-tone-sky-blue);
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/3d.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    flex-direction: column; 
    justify-content: flex-start; 
    align-items: flex-start; 
    padding-top: 6rem; 
}

#xr {
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding-top: 6rem;
    background-color: var(--deep-charcoal-grey);
}

/* This pseudo-element creates the dark hue OVER the video */
#xr::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

#about {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/aboutus.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

#about .split-container {
    gap: 4rem; /* More space between cards */
}

/* ===== SECTION TITLE LABEL ===== */
.section-title {
    background-color: var(--deep-charcoal-grey);
    color: var(--off-white);
    padding: 1rem 2rem; /* Match nav padding on the left */
    border-radius: 0 12px 12px 0;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    max-width: 500px;
    position: relative; 
    z-index: 2; 
}
.section-title h2 {
    font-size: 1.5rem;
    font-weight: 700;
}
.section-title p {
    font-size: 1rem;
    font-weight: 400;
    color: var(--mid-grey);
}


/* ===== WEB DESIGN CARD STYLES ===== */
.card-container {
    display: flex;
    flex-wrap: wrap; 
    justify-content: center;
    align-items: center;
    gap: 2rem;
    width: 100%;
    padding: 0 5%;
    margin-top: 6rem; /* Space between title and cards */
}

.service-card {
    width: 280px;
    height: 400px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease-out;
}

.service-card:hover {
    transform: scale(1.05);
}

/* Card Background Images (Replace with your own) */
#card-1 { background-image: url('../images/full-code.png'); }
#card-2 { background-image: url('../images/no-code.png'); }
#card-3 { background-image: url('../images/webxr.png'); }
#card-4 { background-image: url('../images/agentic.png'); }

/* Dark Hue Overlay */
.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    opacity: 0;
    transition: opacity 0.4s ease-out;
}

.service-card:hover::after {
    opacity: 1;
}

/* Text Content on Hover */
.service-card .card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    color: var(--off-white);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
    z-index: 2;
}

.service-card:hover .card-content {
    opacity: 1;
    transform: translateY(0);
}

.card-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.card-content p {
    font-size: 0.9rem;
    line-height: 1.4;
}

/* ===== 3D DIGITALIZATION & ABOUT SECTION STYLES ===== */

.split-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    width: 100%;
    padding: 0 5%;
    margin-top: 6rem;
    position: relative;
    z-index: 2;
}

.text-card, .video-card, .logo-card {
    flex: 1; /* Allows cards to grow */
    min-width: 300px; /* Prevents cards from getting too small */
    max-width: 550px;
    height: 450px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
}

.text-card {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: rgba(203, 109, 81, 0.4); /* Terracotta with opacity */
}

.text-card h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--off-white);
}

.text-card p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--mid-grey);
}

.video-card {
    padding: 0;
    overflow: hidden; /* Important for keeping video inside rounded corners */
    background-color: rgba(0, 0, 0, 0.4); /* Kept original background */
}

.video-card video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures video fills the card without distortion */
}


/* ===== XR & HERO Section Styles ===== */
.video-background-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; 
}

.video-background-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.xr-card {
    align-self: center;
    margin-top: 20rem;
    max-width: 1000px;
    padding: 2rem;
    border-radius: 15px;
    background-color: rgba(42, 90, 156, 0.8);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    text-align: center;
    position: relative;
    z-index: 2;
}

.xr-card h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.xr-card p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--mid-grey);
}

/* ===== ABOUT US STYLES ===== */
.logo-card {
    display: flex;
    flex-direction: column;
    padding: 2.5rem;
    background-color: rgba(0, 0, 0, 0.4);
}

.logo-card h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.logo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: center;
    justify-items: center;
    width: 100%;
}

.logo-grid img {
    max-width: 80px;
}


/* ===== SCROLL ANIMATION STYLES ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== MOBILE NAV & HAMBURGER STYLES ===== */
.hamburger-menu, .close-menu {
    display: none; /* Hidden by default */
    background: none;
    border: none;
    color: var(--deep-charcoal-grey);
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%; /* Start off-screen */
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    transition: right 0.5s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.mobile-nav.is-open {
    right: 0; /* Slide in */
}

.mobile-nav .close-menu {
    display: block;
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2rem;
}

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

.mobile-nav ul li {
    margin: 2rem 0;
    text-align: center;
}

.mobile-nav ul li a {
    color: var(--deep-charcoal-grey);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
}


/* ===== Footer Styles ===== */
footer {
    height: 30vh;
    width: 100%;
    background-color: var(--deep-charcoal-grey);
    color: var(--off-white);
    display: flex;
    padding: 1rem 0.8rem;
}

.footer-content {
    display: flex;
    align-items: flex-start; /* Aligned to top for better look */
    width: 100%;
    gap: 2rem; /* Added gap for spacing */
}

.footer-column {
    padding: 0 2rem;
    height: 100%;
}

.footer-column:not(:last-child) {
    border-right: 1px solid var(--mid-grey);
}

.footer-column h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--off-white);
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.footer-column ul li a {
    color: var(--mid-grey);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: var(--warm-ochre);
}

.footer-social {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem; /* Space between title and icons */
}

.footer-social a {
    transition: opacity 0.2s ease;
}

.footer-social a i {
    font-size: 20px;
    color: var(--mid-grey);
    transition: color 0.2s ease-in-out;
}

.footer-social a:hover i {
    color: var(--off-white);
}

/* ===== Tablet & Smartphone Media Queries ===== */
@media (max-width: 1366px) {
    /* --- Hero Section & Nav --- */
    .logo img {
        height: 50px;
    }
    .nav-menu {
        gap: 1.5rem;
    }
    .nav-menu a {
        font-size: 1rem;
    }
    .hero-content h1 {
        font-size: 2rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    .cta-button {
        padding: 0.8rem 1rem;
        font-size: 0.8rem;
    }

    /* --- Section Title --- */
    .section-title {
        padding: 0.8rem 1.5rem;
        max-width: 400px;
    }
    .section-title h2 {
        font-size: 1.2rem;
    }
    .section-title p {
        font-size: 0.8rem;
    }

    /* --- Web Design Card Slider --- */
    #web-design .card-container {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        padding: 1rem 0;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    #web-design .card-container::-webkit-scrollbar {
        display: none;
    }
    #web-design .service-card {
        scroll-snap-align: center;
        flex-shrink: 0;
    }
    #web-design .card-container .service-card:first-child {
    margin-left: calc(50% - 105px); /* Changed from 140px */
    }
    #web-design .card-container .service-card:last-child {
        margin-right: calc(50% - 105px); /* Changed from 140px */
    }

    /* --- Auto-reveals card content on scroll snap --- */
    #web-design .service-card.is-active-card::after,
    #web-design .service-card:hover::after {
        opacity: 1;
    }
    #web-design .service-card.is-active-card .card-content,
    #web-design .service-card:hover .card-content {
        opacity: 1;
        transform: translateY(0);
    }

    /* --- 3D Digitalization Section --- */
    #digitalization {
        padding-top: 4rem;
    }
    #digitalization .text-card {
        flex: 0.7;
    }
    #digitalization .video-card {
        flex: 1.2;
    }
    #digitalization .text-card h3 {
        font-size: 1.5rem;
    }
    #digitalization .text-card p {
        font-size: 0.8rem;
    }

    /* --- XR Section --- */
    .xr-card {
        max-width: 400px;
        margin-top: 15rem;
        padding: 1.5rem;
    }
    .xr-card h3 {
        font-size: 1.5rem;
    }
    .xr-card p {
        font-size: 0.8rem;
    }
    
    /* --- About Us Section --- */
    #about .split-container {
        gap: 2rem;
    }
    #about .text-card,
    #about .logo-card {
        max-width: 420px;
        height: auto;
        min-height: 400px; /* Ensure a minimum height */
    }
    #about .text-card h3,
    #about .logo-card h3 {
        font-size: 1.5rem;
    }
    #about .text-card p {
        font-size: 0.9rem;
    }
    #about .logo-grid img {
        max-width: 60px;
    }

    /* --- Footer --- */
    footer {
        height: 20vh;
    }
    .footer-content {
        gap: 1rem;
        align-items: center;
    }
    .footer-column {
        padding: 0 1rem;
    }
    .footer-column h4 {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }
    .footer-column ul li {
        font-size: 0.8rem;
    }
    .footer-social a i {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    .hamburger-menu {
        display: block;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    #web-design {
    background-color: var(--warm-ochre);
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/webbg2.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    flex-direction: column; 
    justify-content: flex-start; 
    align-items: flex-start; 
    padding-top: 4rem; /* Changed from 6rem */
    }
    .service-card {
    width: 260px; /* Changed from 280px */
    height: 330px; /* Changed from 400px */
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease-out;
    }
    .card-content h3 {
        margin-bottom: 0.6rem;
        font-size: 1.5rem; /* Changed from 1.5rem */
    }
    .card-content p {
        font-size: 1rem; /* Changed from 0.9rem */
        line-height: 1.4;
    }
    /* New styles for the 3D Digitalization section cards */
    .split-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0;
    width: 100%;
    padding: 0 7%;
    margin-top: 4rem; /* Changed from 6rem */
    position: relative;
    z-index: 2;
    }
    #digitalization .text-card {
        flex-grow: 0; /* Prevents the card from expanding to fill the space */
        max-width: 410px; /* Reduced max-width by ~25% from 550px */
    }
    #digitalization .text-card h3 {
        font-size: 1.3rem; /* Scaled down from 2rem */
    }
    #digitalization .text-card p {
        font-size: 0.98rem; /* Scaled down from 1rem */
    }
    #digitalization .video-card {
        display: none; /* Hides the video card */
    }
    #xr {
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding-top: 4rem; /* Changed from 6rem */
    background-color: var(--deep-charcoal-grey);
    }
    .xr-card {
    align-self: center;
    margin-top: 5rem; /* Reduced from 20rem */
    width: 80%; /* Changed from 100% */
    max-width: 600px; /* Reduced from 1000px */
    padding: 2rem;
    border-radius: 15px;
    background-color: rgba(42, 90, 156, 0.7); /* Opacity changed from 0.8 */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    text-align: center;
    position: relative;
    z-index: 2;
    }

    .xr-card h3 {
        font-size: 1.3rem; /* Scaled down from 2rem */
        margin-bottom: 1rem;
    }

    .xr-card p {
        font-size: 0.98rem; /* Scaled down from 1.1rem */
        line-height: 1.6;
        color: var(--mid-grey);
    }

    /* New styles for the About Us section layout */
    #about .logo-card {
        display: none; /* Hides the logo card */
    }

    #about .text-card {
        flex-grow: 0; /* Prevents the card from expanding */
        max-width: 500px; /* Scales down the card from 550px */
    }

    #about .text-card h3 {
        font-size: 1.8rem; /* Scales down the text */
    }

    #about .text-card p {
        font-size: 0.9rem; /* Scales down the text */
    }

    /* --- Footer on Small Screens --- */
    footer {
        height: auto; /* Allow footer to grow to fit content */
        padding: 3rem 1rem;
    }
    .footer-content {
        flex-direction: column; /* Stack the columns vertically */
        align-items: center;    /* Center the stacked columns */
        text-align: center;
        gap: 2rem;
    }
    .footer-column {
        padding: 0;
        height: auto; /* Let each column determine its own height */
        width: 100%;
    }
    .footer-column:not(:last-child) {
        border-right: none; /* Remove vertical divider */
        padding-bottom: 2rem;
        border-bottom: 1px solid var(--mid-grey); /* Add horizontal divider */
    }

    /* Keep font sizes readable on mobile */
    .footer-column h4 {
        font-size: 1.1rem;
    }
    .footer-column ul li {
        font-size: 0.9rem;
    }
    /* Centers the social icons in their column on mobile */
    .footer-social {
        justify-content: center;
    }

    /* Increases icon size on mobile */
    .footer-social a i {
        font-size: 24px;
    }
}