/* ==========================================================================
   Verpex Solutions - Enterprise Stylesheet
   ========================================================================== */

:root {
    --verpex-dark: #1B2632;
    --verpex-darker: #0d1319;
    --verpex-accent: #2A82DA; /* Clean, professional Tech Blue replacing the gold */
    --verpex-accent-hover: #1e62a8;
    --text-main: #4a4a4a;
    --text-light: #888888;
    --bg-light: #F8F8F8;
    --bg-white: #FFFFFF;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

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

body {
    font-family: var(--font-body);
    color: var(--text-main);
    line-height: 1.7;
    background-color: var(--bg-white);
    padding-top: 0; /* Removed the 60px to fix the white gap */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--verpex-dark);
    margin-bottom: 0.5em;
    font-weight: 600;
}

p {
    margin-bottom: 1.5em;
}

a {
    text-decoration: none;
    color: var(--verpex-accent);
    transition: color 0.3s ease;
}

/* --- Layout Utilities --- */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.text-center { text-align: center; }
.mt-2 { margin-top: 2em; }
.mb-3 { margin-bottom: 3em; }
.bg-light { background-color: var(--bg-light); }
.lead { font-size: 1.25em; font-weight: 300; color: var(--text-light); }
.divider {
    height: 4px; /* Slightly thicker */
    width: 60px;
    background: linear-gradient(90deg, var(--verpex-accent), #1a5f9e); /* Gradient line */
    margin: 1.5em auto 2.5em auto;
    border-radius: 2px;
}

/* --- Navigation --- */
#verpex-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(27, 38, 50, 0.95);
    backdrop-filter: blur(8px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-brand { margin: 0 !important; }
.nav-brand img {
    max-height: 35px;
    width: auto;
    display: block;
}

/* Desktop Nav Links */
.nav-links {
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

#verpex-nav a {
    color: #FFFFFF;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-left: 40px; /* Spaced out slightly more since icons are gone */
    font-size: 0.85rem;
    font-weight: 500;
    position: relative;
}

#verpex-nav a:hover, #verpex-nav a.active {
    color: var(--verpex-accent);
}

/* Hamburger Button Base (Hidden on Desktop) */
.mobile-menu-toggle {
    display: none;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 5px;
    z-index: 1001; /* Keeps button above the dropdown menu */
}

.mobile-menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: #FFFFFF;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* --- Heroes --- */
.hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #FFFFFF;
    background-color: var(--verpex-dark);
    background-size: cover;
    background-position: center;
    padding-top: 70px; /* Offsets the fixed navbar for perfect visual centering */
}

/* Background Images for Heroes with lightened overlays */
#hero-home {
    min-height: 80vh;
    background-image: linear-gradient(rgba(27, 38, 50, 0.4), rgba(27, 38, 50, 0.7)), url('../images/tech-hero.jpg');
}

#hero-services {
    min-height: 40vh;
    background-image: linear-gradient(rgba(27, 38, 50, 0.4), rgba(27, 38, 50, 0.7)), url('../images/services-hero.png');
}

#hero-contact {
    min-height: 40vh;
    background-image: linear-gradient(rgba(27, 38, 50, 0.4), rgba(27, 38, 50, 0.7)), url('../images/contact-hero.jpg');
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
}

.hero-logo {
    max-width: 600px; /* Increased from 400px for a larger desktop presence */
    width: 100%;
    margin-bottom: 2em;
}

.hero-section h1 {
    color: #FFFFFF;
    font-size: 3.5rem; /* Slightly larger */
    letter-spacing: 2px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5); /* Helps it pop off the image */
    margin-bottom: 0.2em;
}

.hero-section p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9); /* Slightly brightened text for better contrast */
}

.hero-small h1 { font-size: 2.5rem; }

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--verpex-accent), #1a5f9e);
    color: #FFFFFF;
    box-shadow: 0 4px 15px rgba(42, 130, 218, 0.3);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, #1a5f9e, var(--verpex-accent));
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.btn-primary:hover {
    color: #FFFFFF;
    box-shadow: 0 6px 20px rgba(42, 130, 218, 0.5);
    transform: translateY(-2px);
}

.btn-primary:hover::before {
    opacity: 1;
}

/* --- Page Sections --- */
.page-section {
    padding: 6em 0;
}

/* --- Services Grid --- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background: var(--bg-white);
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    text-align: center;
    border-top: 4px solid var(--verpex-dark);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    border-top-color: var(--verpex-accent);
}

.service-icon {
    font-size: 3em;
    color: var(--verpex-dark);
    margin-bottom: 20px;
}

.service-promise {
    background-color: var(--bg-light);
    padding: 15px;
    border-radius: 4px;
    font-size: 0.9em;
    margin-top: 20px;
}

/* --- Formspree Form --- */
.form-container {
    max-width: 800px;
}

.contact-icon {
    font-size: 4em;
    color: var(--verpex-dark);
    margin-bottom: 10px;
}

.verpex-form .form-row {
    display: flex;
    gap: 20px;
}

.verpex-form .form-group {
    margin-bottom: 20px;
    width: 100%;
}

.verpex-form .half {
    flex: 1;
}

.verpex-form input,
.verpex-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    background-color: var(--bg-white);
    transition: border-color 0.3s ease;
}

.verpex-form input:focus,
.verpex-form textarea:focus {
    outline: none;
    border-color: var(--verpex-accent);
}

/* --- Footer --- */
#verpex-footer {
    background-color: var(--verpex-darker);
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    padding: 4em 0;
}

#verpex-footer .social-icons a {
    color: #FFFFFF;
    font-size: 1.5rem;
    margin: 0 10px;
}

#verpex-footer .social-icons a:hover {
    color: var(--verpex-accent);
}

#verpex-footer p { margin-bottom: 0.5em; }
.reg-number { font-size: 0.85em; }

/* --- Mobile Responsiveness --- */
@media screen and (max-width: 768px) {
    .grid-3 { grid-template-columns: 1fr; }
    .verpex-form .form-row { flex-direction: column; gap: 0; }
    
    /* Shrink the nav logo slightly on mobile */
    .nav-brand img { max-height: 25px; }
    
    #verpex-nav a { 
        margin: 15px 0;
        font-size: 1.1rem;
        display: block;
        text-align: center;
    }
    
    .hero-section h1 { font-size: 2rem; }
    .hero-small h1 { font-size: 1.8rem; }
    .hero-logo { max-width: 300px; }

    .mobile-menu-toggle {
        display: block;
    }
    
    /* Hide default layout and create the mobile dropdown container */
    .nav-links {
        position: absolute;
        top: 100%; /* Pushes it just below the navbar */
        left: 0;
        width: 100%;
        background-color: rgba(27, 38, 50, 0.98);
        flex-direction: column;
        padding: 0;
        
        /* Hide animation state */
        max-height: 0;
        overflow: hidden;
        opacity: 0;
    }
    
    /* When the .active class is applied via JavaScript */
    .nav-links.active {
        max-height: 300px; /* Arbitrary large number to allow sliding */
        opacity: 1;
        padding: 20px 0;
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    }

    .mobile-menu-toggle.active .bar:nth-child(2) {
        opacity: 0; /* Hides the middle bar */
    }
    .mobile-menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .mobile-menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

}

.services-layout {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    padding: 2rem 0;
}
.service-row {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid #eee;
}
.service-icon-large {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    /* Upgraded to a soft tech gradient */
    background: linear-gradient(135deg, rgba(42, 130, 218, 0.1), rgba(26, 95, 158, 0.05));
    border: 1px solid rgba(42, 130, 218, 0.15);
    border-radius: 16px; /* Slightly rounder for a modern app feel */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--verpex-accent); /* Changed icon color from dark gray to your brand blue */
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}
.service-details h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-family: 'Montserrat', sans-serif;
    color: #1a1a1a;
}
.service-details p {
    line-height: 1.6;
    color: #555;
    margin-bottom: 1.5rem;
}
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}
.tech-tags li {
    background: #e9ecef;
    color: #495057;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: 'Roboto', sans-serif;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .service-row {
        flex-direction: column;
        gap: 1rem;
    }
}

.service-row {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 2.5rem; /* Slightly increased padding for a cleaner card look */
    border-radius: 12px;
    background: #ffffff; /* Makes the card pure white against the gray section */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.04); /* Soft resting shadow */
}

.service-row:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08); /* Deeper shadow when hovered */
}

/* Make the icon pop on hover */
.service-row:hover .service-icon-large i {
    color: var(--verpex-accent); /* Uses your main brand blue */
    transform: scale(1.1);
    transition: all 0.3s ease;
}

@media (min-width: 769px) {
    .service-row:nth-child(even) {
        flex-direction: row-reverse;
        text-align: right;
    }
    .service-row:nth-child(even) .tech-tags {
        justify-content: flex-end;
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.bg-light {
    position: relative;
    background-color: var(--bg-light);
    z-index: 1;
}

/* On desktop, add a slight diagonal cut to light sections */
@media screen and (min-width: 769px) {
    .page-section.bg-light {
        padding: 8em 0;
        clip-path: polygon(0 3vw, 100% 0, 100% calc(100% - 3vw), 0 100%);
        margin-top: -3vw;
        margin-bottom: -3vw;
    }
    
    /* Utility class for light sections touching the footer (slanted top, flat bottom) */
    .page-section.bg-light.flat-bottom {
        clip-path: polygon(0 3vw, 100% 0, 100% 100%, 0 100%);
        margin-bottom: 0;
    }
    
    /* Apply the reversed slant to the top of the dark CTA section */
    .cta-section {
        position: relative;
        z-index: 2;
        /* Reversed slant: Starts flush on the left (0 0), drops down 3vw on the right (100% 3vw) */
        clip-path: polygon(0 0, 100% 3vw, 100% 100%, 0 100%);
        margin-top: -3vw; /* Pulls it up to overlap the section above */
        padding-top: calc(4rem + 3vw) !important; /* Adds inner space so text isn't cut off */
    }
}

/* --- Tech Stack Ribbon --- */
.tech-ribbon { 
    background: var(--verpex-darker); 
    padding: 2rem 0; 
    border-bottom: 3px solid var(--verpex-accent); 
    position: relative;
    z-index: 5;
}
.tech-ribbon-track { 
    display: flex; 
    justify-content: space-between; 
    flex-wrap: wrap; 
    gap: 1.5rem; 
    color: rgba(255,255,255,0.4); 
    font-weight: 600; 
    font-size: 1.1rem; 
}
.tech-ribbon-track span { 
    display: flex; 
    align-items: center; 
    gap: 0.5rem; 
    transition: color 0.3s ease, transform 0.3s ease; 
    cursor: default;
}
.tech-ribbon-track span:hover { 
    color: var(--verpex-accent); 
    transform: translateY(-3px);
}
@media (max-width: 768px) {
    .tech-ribbon-track { justify-content: center; }
}

/* --- Split Layout & Blueprint Graphic --- */
.split-layout {
    display: flex;
    align-items: center;
    gap: 4rem;
}
.split-text { 
    flex: 1; 
}
.split-image { 
    flex: 1; 
    width: 100%;
}
.blueprint-graphic {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #1B2632, #2c3e50);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* This creates a high-tech blueprint grid overlay */
.blueprint-graphic::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(42, 130, 218, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(42, 130, 218, 0.15) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center center;
}
.tech-cycle-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 2;
    transition: opacity 0.4s ease;
}

/* The floating icon */
.tech-cycle-content i {
    font-size: 6rem;
    animation: float 6s ease-in-out infinite;
    /* Removed the hardcoded blue color so JS can inject brand colors */
}

/* The new text label */
.tech-cycle-label {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

/* Floating animation for the center icon */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

@media (max-width: 768px) { 
    .split-layout { flex-direction: column; } 
    .blueprint-graphic { height: 250px; margin-top: 2rem; }
}

.terminal-card {
    background: #111820 !important; /* Extremely dark blue/gray */
    padding: 0 !important; /* Removes default padding to make room for header */
    border-top: none !important;
    text-align: left !important;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2) !important;
}

.terminal-header {
    background: #1B2632;
    padding: 12px 15px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #2c3e50;
}

.terminal-header .dot {
    width: 12px; height: 12px; border-radius: 50%;
}
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.terminal-body {
    padding: 30px;
    font-family: 'Courier New', Courier, monospace;
}

.terminal-prompt {
    color: var(--verpex-accent);
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.terminal-prompt i {
    margin-right: 8px;
    color: #e0e0e0;
}

.terminal-comment {
    color: #6272a4; /* Classic code comment purple/gray */
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.typewriter-text {
    color: #e0e0e0;
    line-height: 1.6;
    margin-bottom: 20px;
    min-height: 150px; /* Prevents the card height from jumping while typing */
}

/* The blinking cursor */
.cursor {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background-color: var(--verpex-accent);
    vertical-align: middle;
    animation: blink 1s step-end infinite;
    margin-left: 2px;
}

@keyframes blink { 50% { opacity: 0; } }

.terminal-output {
    background: rgba(0, 0, 0, 0.3) !important;
    color: #f8f8f2;
    font-size: 0.9rem;
    border: 1px dashed #444;
    padding: 15px !important;
}

/* --- Architecture Lifecycle Timeline --- */
.lifecycle-track {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 2rem 0;
}

/* The connecting line behind the nodes */
.lifecycle-track::before {
    content: '';
    position: absolute;
    top: 50px; /* Aligns with the center of the nodes */
    left: 5%;
    width: 90%;
    height: 3px;
    background: #e9ecef;
    z-index: 1;
}

.lifecycle-step {
    flex: 1;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.step-node {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem auto;
    background: #ffffff;
    border: 3px solid var(--verpex-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--verpex-accent);
    box-shadow: 0 10px 25px rgba(42, 130, 218, 0.15);
    transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.lifecycle-step h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.lifecycle-step p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
}

/* Hover effects for the nodes */
.lifecycle-step:hover .step-node {
    transform: translateY(-10px);
    background: var(--verpex-accent);
    color: #ffffff;
}

@media (max-width: 768px) {
    .lifecycle-track {
        flex-direction: column;
        gap: 3rem;
    }
    .lifecycle-track::before {
        display: none; /* Hide the connecting line on mobile */
    }
}

#hero-clients {
    min-height: 40vh;
    /* You can swap 'tech-hero.jpg' for a specific client header image later if you want */
    background-image: linear-gradient(rgba(27, 38, 50, 0.4), rgba(27, 38, 50, 0.7)), url('../images/clients-hero.png');
}

.client-logo-box {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    padding: 10px;
    background: #fcfcfc;
    border-radius: 8px;
    border: 1px solid #eee;
}

.client-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Small adjustments to cards for the client page */
.service-card h3 {
    margin-bottom: 1rem;
}

/* =========================================
   Client Marquee Section
========================================= */
.client-marquee-section {
    background-color: #f8f9fa; /* Matches your bg-light */
    padding: 3rem 0;
    border-top: 1px solid #eaeaea;
    overflow: hidden;
}

.marquee-title {
    color: #6c757d;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 1.5rem;
}

.marquee-wrapper {
    display: flex;
    overflow: hidden;
    user-select: none;
    gap: 4rem; /* Gap between the two tracks */
    position: relative;
}

/* Optional: Add a fade effect to the left and right edges */
.marquee-wrapper::before,
.marquee-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.marquee-wrapper::before {
    left: 0;
    background: linear-gradient(to right, #f8f9fa 0%, transparent 100%);
}

.marquee-wrapper::after {
    right: 0;
    background: linear-gradient(to left, #f8f9fa 0%, transparent 100%);
}

.marquee-track {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-around;
    min-width: 100%;
    gap: 4rem; /* Gap between logos */
    animation: scroll-marquee 25s linear infinite;
}

/* Pause the animation if the user hovers over the logos */
.marquee-wrapper:hover .marquee-track {
    animation-play-state: paused;
}

.marquee-track img {
    height: 50px; /* Adjust based on how large you want the logos */
    width: auto;
    object-fit: contain;
    /* Makes logos grey/muted until hovered */
    filter: grayscale(100%) opacity(60%);
    transition: filter 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

.marquee-track img:hover {
    filter: grayscale(0%) opacity(100%);
    transform: scale(1.05);
}

/* The actual infinite scroll math */
@keyframes scroll-marquee {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(calc(-100% - 4rem));
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .marquee-track img {
        height: 40px;
    }
    .marquee-wrapper::before,
    .marquee-wrapper::after {
        width: 50px; /* Smaller fade edge on mobile */
    }
}

.marquee-track img[alt="QGTech"] {
    border-radius: 12px; 
}