:root {
    --color-primary: #050b14;   /* Deepest Navy */
    --color-secondary: #0f1c2e; /* Dark Command Navy */
    --color-accent: #ffd700;    /* Precision Gold */
    --color-text: #e6f1ff;
    --color-muted: #8892b0;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

body {
    background-color: var(--color-primary);
    color: var(--color-text);
    font-family: var(--font-main);
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* --- TACTICAL GRID OVERLAY --- */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* More prominent grid lines */
    background-image: 
        linear-gradient(rgba(255, 215, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 215, 0, 0.03) 1px, transparent 1px);
    background-size: 40px 40px; /* Tighter grid */
    z-index: -1;
    pointer-events: none;
}

/* --- SUBTLE BACKGROUND WATERMARK --- */
body::before {
    content: "";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    background-image: url('assets/images/logo.jpeg');
    background-position: center;
    background-repeat: no-repeat;
    background-size: 200vh; /* Decreased zoom by 5% */
    opacity: 0.2;
    z-index: -2;
    pointer-events: none;
    filter: grayscale(100%) contrast(1.2);
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3 {
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-text);
    font-weight: 700;
}

h1 {
    font-size: 3.5rem;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--color-accent);
    margin: 10px auto 0;
    box-shadow: 0 0 10px var(--color-accent);
}

/* --- NAVIGATION --- */
.main-nav {
    background: rgba(5, 11, 20, 0.95);
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 40px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    align-items: center;
    width: 100%; /* Full width for spacing */
}

.nav-links a, .dropdown-trigger {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.3s;
    font-size: 0.85rem;
    opacity: 0.8;
    cursor: pointer;
}

.nav-links a:hover, .nav-links a.active, .dropdown:hover .dropdown-trigger {
    color: var(--color-accent);
    opacity: 1;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

/* Dropdown Logic */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--color-secondary);
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5);
    z-index: 1;
    border: 1px solid rgba(255, 215, 0, 0.2);
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
}

.dropdown-content a {
    color: var(--color-text);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.75rem;
    border-bottom: 1px solid rgba(255, 215, 0, 0.05);
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: rgba(255, 215, 0, 0.1);
    color: var(--color-accent);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Logo Sizing in Nav */
.nav-logo, .brand-img img, nav img {
    height: 45px !important;
    width: auto !important;
    max-width: 200px !important;
    background: none !important;
    box-shadow: none !important;
    margin-right: 15px;
    border: 1px solid rgba(255, 215, 0, 0.2); /* Tech border */
}

/* --- HERO SECTION --- */
.hero {
    position: relative;
    padding: 0;
    text-align: left;
    background: transparent; /* Made transparent to show logo behind text */
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero::before {
    content: "";
    position: fixed; /* Stays centered when scrolling */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    background-image: url('assets/images/logo_circuit.svg');
    background-position: center;
    background-repeat: no-repeat;
    background-size: 150%; /* Zoomed in to show outlines */
    opacity: 0.05;
    z-index: 0;
    pointer-events: none;
    /* Removed grayscale to keep original SVG colors if applicable */
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    position: relative;
    z-index: 10;
}

.hero-content {
    max-width: 700px;
}

/* Graphic removed in favor of logo watermark */
.hero-graphic {
    display: none; 
}

@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-content {
        margin: 0 auto;
    }
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.text-accent {
    color: var(--color-accent);
}

.hero p {
    font-size: 1.5rem;
    color: var(--color-muted);
    max-width: 600px;
    margin-bottom: 3rem;
    border-left: 4px solid var(--color-accent);
    padding-left: 1.5rem;
}

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 2px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); /* Tactical corners */
}

.btn-primary {
    background: var(--color-accent);
    color: var(--color-primary);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.btn-primary:hover {
    background: #fff;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.6);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    margin-left: 1rem;
}

.btn-secondary:hover {
    background: rgba(255, 215, 0, 0.1);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

/* --- SERVICE GRID --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    max-width: 1400px;
    margin: 5rem auto;
    padding: 0 40px;
}

.service-card {
    background: rgba(15, 28, 46, 0.7);
    border: 1px solid rgba(255, 215, 0, 0.1);
    padding: 3rem 2rem;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
    text-align: center; /* Center icons and text */
    text-decoration: none; /* Remove underline for link version */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.service-card h3, .service-card p {
    color: var(--color-text); /* Ensure text stays white/light */
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 4px; height: 100%;
    background: var(--color-accent);
    opacity: 0;
    transition: opacity 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 215, 0, 0.4);
    background: rgba(15, 28, 46, 0.9);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

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

.service-card i {
    font-size: 2.5rem;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* --- PARTNER & ACCOMPLISHMENT GRIDS --- */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Increased from 180px */
    gap: 2rem;
    max-width: 1400px;
    margin: 4rem auto;
    padding: 0 40px;
}

.partner-card {
    background: rgba(15, 28, 46, 0.6);
    border: 1px solid rgba(255, 215, 0, 0.1);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 180px; /* Fixed height for uniformity */
}

.partner-card:hover {
    background: rgba(15, 28, 46, 0.9);
    border-color: var(--color-accent);
    transform: scale(1.05);
}

.partner-card img {
    max-width: 80%;
    max-height: 80px;
    object-fit: contain;
    filter: brightness(0) invert(1) opacity(0.8); /* White logos */
    transition: all 0.3s;
}

.partner-card:hover img {
    filter: none; /* Full color on hover */
    opacity: 1;
}

.partner-card p, .partner-card h3 {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--color-muted);
}

/* Remove default white backgrounds from sections */
section {
    background: transparent !important;
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 3rem;
    background: var(--color-secondary);
    border-top: 1px solid rgba(255, 215, 0, 0.1);
    color: var(--color-muted);
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* --- REMOVED: PCB Canvas --- */
#pcb-canvas { display: none; }

/* Navigation Spacer for FE Portal */
.nav-spacer {
    margin-left: auto; /* Push to right */
    padding-left: 2rem; /* "Half a space" visual separation */
    border-left: 1px solid rgba(255, 215, 0, 0.2); /* Optional divider */
}

/* --- FIXES 2026-01-04 --- */
/* Fix Logo Sizes */
.review-header img,
.partner-card img,
.summary-logo {
    object-fit: contain !important;
    width: auto !important;
    max-width: 150px !important;
    max-height: 80px !important;
    display: block; /* Ensure they take up space */
}

/* Ensure FE Portal link is visible in nav */
.nav-spacer {
    color: var(--color-accent) !important;
    font-weight: 800 !important;
}
