/* Main CSS File for Verge Global */

:root {
    /* Core Palette */
    --brand-navy: #032D55;
    --brand-blue: #199aff;
    --brand-cyan: #29e8d9;

    /* Light Mode Variables */
    --bg-color: #f8f9fa;
    --bg-secondary: #e9ecef;
    --text-color: var(--brand-navy);
    --text-secondary: #4a4a4a;
    --text-muted: #666;

    --nav-bg: rgba(255, 255, 255, 0.95);

    --card-bg: white;
    --card-border: #f0f0f0;
    --card-shadow: rgba(3, 45, 85, 0.08);
    /* Navy tinted shadow */
    --card-hover-shadow: rgba(3, 45, 85, 0.12);

    --badge-bg: var(--brand-navy);
    --badge-text: white;

    --cta-bg: var(--brand-blue);
    --cta-text: white;
    --cta-hover-bg: var(--brand-navy);
    --cta-hover-text: white;

    --contact-bg: #f4f4f4;
    --contact-text: var(--brand-navy);
    --contact-card-bg: #ffffff;
    --contact-card-border: #e0e0e0;

    --footer-bg: #ffffff;
    --footer-text: var(--brand-navy);
}

body.dark-mode {
    /* Dark Mode (Navy Background) */
    --bg-color: var(--brand-navy);
    --bg-secondary: #02203e;
    /* Darker navy */

    --text-color: #ffffff;
    --text-secondary: #b9dcf7;
    /* Light blue tint */
    --text-muted: #8ab4d6;

    --nav-bg: rgba(3, 45, 85, 0.95);

    --card-bg: #0b3d6b;
    /* Lighter navy for cards */
    --card-border: #0e4b82;
    --card-shadow: rgba(0, 0, 0, 0.3);
    --card-hover-shadow: rgba(0, 0, 0, 0.5);

    --badge-bg: var(--brand-cyan);
    --badge-text: var(--brand-navy);

    --cta-bg: var(--brand-cyan);
    --cta-text: var(--brand-navy);
    --cta-hover-bg: white;
    --cta-hover-text: var(--brand-navy);

    --contact-bg: #021a30;
    --contact-text: #ffffff;
    --contact-card-bg: #0b3d6b;
    --contact-card-border: #0e4b82;

    --footer-bg: #021a30;
    --footer-text: #8ab4d6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

/* Navigation */
nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: 50px;
    transition: background 0.3s, box-shadow 0.3s, width 0.4s ease, padding 0.4s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Nav Scrolled State (Global Shrink & Glow) */
nav.nav-scrolled {
    padding: 0.5rem 1.5rem;
    /* Shrink padding */
    top: 10px;
    /* Move slightly up */
    width: 60%;
    /* Shrink width by ~30% (from 90% -> 60%) */

    /* Blue Glow - User requested ONLY glow, background same. 
       But to make glow visible, we usually need border color too? 
       Using box-shadow for glow.
    */
    box-shadow: 0 0 20px var(--brand-blue), inset 0 0 10px rgba(25, 154, 255, 0.1);
    border-color: var(--brand-blue);
}

body.dark-mode nav {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-content {
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 48px;
    width: auto;
}

/* Old nav-links styles removed/placeholder */
/* .nav-links { display: none; } */
.cta-button {
    background: var(--cta-bg);
    color: var(--cta-text);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid var(--cta-bg);
    font-size: 0.95rem;
}

.cta-button:hover {
    background: var(--cta-hover-bg);
    color: var(--cta-hover-text);
    border-color: var(--cta-bg);
}

/* Toggle Switch */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 90px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #e0e0e0;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 34px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
    box-sizing: border-box;
}

/* Knob */
.slider:before {
    background-color: #333;
    bottom: 4px;
    content: "";
    height: 26px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 26px;
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Text Labels */
.slider::after {
    content: 'DAY';
    color: #333;
    font-size: 12px;
    font-weight: 700;
    position: absolute;
    left: 12px;
    transition: opacity 0.3s;
}

input:checked+.slider {
    background-color: var(--brand-navy);
}

input:checked+.slider:before {
    background-color: var(--brand-cyan);
    transform: translateX(0);
}

input:not(:checked)+.slider:before {
    transform: translateX(56px);
    background-color: #333;
}

input:checked+.slider::after {
    content: 'NIGHT';
    color: white;
    left: auto;
    right: 12px;
}

input:not(:checked)+.slider::after {
    content: 'DAY';
    color: #333;
    left: 12px;
    right: auto;
}

/* Hero Section */
.hero {
    margin-top: 30px;
    padding: 4rem 5% 4rem;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--bg-secondary) 100%);
    text-align: center;
    transition: background 0.3s;
}

.hero h1 {
    font-size: 5rem;
    /* Increased by ~3 points (0.3rem) */
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
    line-height: 1.1;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-color);
}

.hero p {
    font-size: 1.4rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.7;
}

/* Products/Services Section */
/* .service-detail-container moved to shared grid styles at bottom */

.products {
    padding: 2rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 3rem;
    text-align: center;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.product-card,
.job-card {
    background: var(--card-bg);
    padding: 0;
    /* Removed padding so header image fills top */
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.job-card {
    padding: 2.5rem;
    /* Restore padding for Job Cards as they don't use full-width images yet */
}

.product-card:hover,
.job-card:hover {
    transform: translateY(-5px);
    /* Matching the 'Nav Scrolled' Blue Glow */
    box-shadow: 0 0 20px var(--brand-blue), inset 0 0 10px rgba(25, 154, 255, 0.1);
    border-color: var(--brand-blue);
}

.product-badge {
    display: inline-block;
    background: var(--badge-bg);
    color: var(--badge-text);
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
}

.product-card h3,
.job-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-weight: 700;
}

.product-card p,
.job-description {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 1rem;
}

/* Service List */
.service-list {
    text-align: left;
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.service-item {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--card-border);
}

.service-item:last-child {
    border-bottom: none;
}

.service-item h4 {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.service-item p {
    font-size: 0.95rem;
    margin: 0;
}

/* Page Header (Careers, Blogs, etc) */
.page-header {
    margin-top: 120px;
    padding: 4rem 5%;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.page-header p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
}

/* Job Specifics */
.job-type {
    display: inline-block;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
}

.apply-btn {
    display: inline-block;
    background: var(--cta-bg);
    color: var(--cta-text);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: 1px solid var(--cta-bg);
}

.apply-btn:hover {
    background: var(--cta-hover-bg);
    color: var(--cta-hover-text);
    border-color: var(--cta-bg);
}

/* Contact Section */
.contact {
    padding: 2rem 5%;
    background: var(--contact-bg);
    color: var(--contact-text);
    transition: background 0.3s, color 0.3s;
}

.contact-content {
    max-width: 1400px;
    margin: 0 auto;
}

.contact-title {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 3rem;
    text-align: center;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
    justify-items: center;
}

.contact-card {
    background: var(--contact-card-bg);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--contact-card-border);
    width: 100%;
    max-width: 640px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--card-shadow);
    transition: background 0.3s, border-color 0.3s;
}

.contact-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
    font-weight: 700;
    color: var(--contact-text);
}

.contact-card .role {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: center;
}

.contact-info a {
    color: var(--contact-text);
    text-decoration: none;
    transition: color 0.3s, background 0.2s;
    display: inline-block;
    padding: 8px 12px;
    border-radius: 8px;
}

.contact-info a:hover {
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.05);
}

body.dark-mode .contact-info a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Footer */
footer {
    padding: 2rem 5%;
    background: var(--footer-bg);
    color: var(--footer-text);
    text-align: center;
    border-top: 1px solid var(--card-border);
}

/* Clients Section */
.clients {
    padding: 1rem 0;
    background: var(--bg-color);
    width: 100%;
    overflow: hidden;
    /* Essential for marquee */
}

/* Restored Marquee Containers */
.marquee-wrapper {
    display: flex;
    width: 100%;
    overflow: hidden;
}

.marquee-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    animation: marquee 30s linear infinite;
    /* Increased speed slightly or adjusted */
    padding: 2rem;
    /* Ensure width is enough */
    width: max-content;
}

.marquee-wrapper:hover .marquee-content {
    animation-play-state: paused;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
        /* Move half way because we duplicated content once */
    }
}

/* Flip Card Styles */
.client-card {
    background-color: transparent;
    width: 300px;
    /* Fixed width */
    height: 180px;
    perspective: 1000px;
    flex: 0 0 auto;
    /* Prevent shrinking in flex container */
    cursor: pointer;
}

.client-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
}

.client-card:hover .client-card-inner {
    transform: rotateY(180deg);
}

.client-card-front,
.client-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

/* Front Side */
.client-card-front {
    background-color: var(--card-bg);
    color: black;
    border: 1px solid var(--card-border);
    padding: 1rem;
}

.client-card-front img {
    max-width: 80%;
    max-height: 80px;
    width: auto;
    filter: none;
    opacity: 1;
    transition: all 0.3s ease;
}

.client-card:hover .client-card-front img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Back Side */
.client-card-back {
    background-color: var(--brand-navy);
    color: white;
    transform: rotateY(180deg);
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.client-card-back h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.client-card-back p {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #e0e0e0;
    margin: 0;
}

/* Dark Mode Adjustments */
body.dark-mode .client-card-front {
    background-color: white;
    /* Dark navy */
    border-color: var(--card-border);
}

body.dark-mode .client-card-front img {
    filter: none;
    opacity: 1;
}

body.dark-mode .client-card:hover .client-card-front img {
    filter: none;
    opacity: 1;
}

body.dark-mode .client-card-back {
    background-color: var(--brand-blue);
    /* Lighter blue for contrast in dark mode? Or stick to brand-navy/cyan */
    background-color: #0e4b82;
    /* Slightly lighter navy */
}

/* Scroll Progress Button */
.progress-wrap {
    position: fixed;
    right: 30px;
    bottom: 30px;
    height: 46px;
    width: 46px;
    cursor: pointer;
    display: block;
    border-radius: 50px;
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 200ms linear;
}

.progress-wrap.active-progress {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.progress-wrap svg path {
    fill: none;
}

.progress-wrap svg.progress-circle path {
    stroke: var(--cta-bg);
    stroke-width: 4;
    box-sizing: border-box;
    transition: all 200ms linear;
}

.progress-wrap::after {
    position: absolute;
    font-family: sans-serif;
    content: '↑';
    text-align: center;
    line-height: 46px;
    font-size: 24px;
    color: var(--text-color);
    left: 0;
    top: 0;
    height: 46px;
    width: 46px;
    cursor: pointer;
    display: block;
    z-index: 1;
    transition: all 200ms linear;
}

.progress-wrap:hover::after {
    opacity: 0;
}

.progress-wrap::before {
    position: absolute;
    font-family: sans-serif;
    content: '↑';
    text-align: center;
    line-height: 46px;
    font-size: 24px;
    opacity: 0;
    background: var(--cta-bg);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    left: 0;
    top: 0;
    height: 46px;
    width: 46px;
    cursor: pointer;
    display: block;
    z-index: 2;
    transition: all 200ms linear;
}

.progress-wrap:hover::before {
    opacity: 1;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .nav-links {
        display: none;
    }

    .products-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: 2rem;
    }
}

/* End of Media Query */

/* Blog and Service Grid & Card Styles */
.blog-container,
.service-detail-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    /* Matched minmax 350px */
    gap: 2rem;
    padding: 2rem 5%;
    /* Adjusted padding to match Product section */
    max-width: 1400px;
    margin: 0 auto;
}

.blog-card,
.service-detail-card {
    background: var(--card-bg);
    border-radius: 16px;
    /* Increased from 12px to 16px */
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
}

.blog-card:hover,
.service-detail-card:hover {
    transform: translateY(-5px);
    /* Matching the 'Nav Scrolled' Blue Glow from .product-card */
    box-shadow: 0 0 20px var(--brand-blue), inset 0 0 10px rgba(25, 154, 255, 0.1);
    border-color: var(--brand-blue);
}

.blog-image,
.card-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--brand-navy), var(--brand-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    opacity: 0.9;
}

/* Optional: Different gradients for variety if we had nth-child logic, but standard is fine */

.blog-content,
.card-content {
    padding: 2.5rem;
    /* Increased from 1.5rem to match .product-card padding */
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-card h2,
.service-detail-card h2 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    color: var(--text-color);
}

.blog-card p,
.service-detail-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    /* For simple paragraphs */
}

/* Service Card Specifics */
.service-detail-card .section-block {
    margin-bottom: 1.5rem;
}

.service-detail-card h3 {
    font-size: 1rem;
    text-transform: uppercase;
    color: var(--brand-blue);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.service-detail-card ul {
    list-style-position: inside;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.service-detail-card li {
    margin-bottom: 0.25rem;
}

.read-more {
    display: inline-block;
    color: var(--brand-blue);
    font-weight: 600;
    text-decoration: none;
    align-self: flex-start;
    transition: color 0.2s;
}

.read-more:hover {
    color: var(--brand-navy);
}

body.dark-mode .read-more:hover {
    color: white;
}

@media (max-width: 768px) {
    .blog-container {
        padding: 2rem 5%;
        grid-template-columns: 1fr;
    }
}

/* Cache Buster: 2 */