/* ==========================================================================
   1. DESIGN SYSTEM & VARIABLE TOKENS
   ========================================================================== */
:root[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-primary-rgb: 255, 255, 255;
    --bg-secondary: #f6f8f9;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    
    /* Logo Palette (Light Mode Tuning) */
    --color-teal: #0d5c68;
    --color-teal-hover: #083c44;
    --color-cyan: #1da4c0;
    --color-green: #599851;
    --glow-effect: rgba(29, 164, 192, 0.05);
}

:root[data-theme="dark"] {
    --bg-primary: #0b0f12;
    --bg-primary-rgb: 11, 15, 18;
    --bg-secondary: #12181c;
    --bg-card: #172026;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #23303a;
    --border-hover: #2e3f4c;
    
    /* Logo Palette (Dark Mode Tuning) */
    --color-teal: #147988;
    --color-teal-hover: #1994a7;
    --color-cyan: #4cd3f1;
    --color-green: #7cc374;
    --glow-effect: rgba(76, 211, 241, 0.03);
}

/* ==========================================================================
   1b. HARDWARE MODE VARIABLES
   ========================================================================== */
:root[data-mode="hardware"][data-theme="light"] {
    --color-teal: #005CFF;
    --color-teal-hover: #004BE6;
    --color-cyan: #005CFF;
    --color-green: #005CFF;
    --glow-effect: rgba(0, 92, 255, 0.05);
}

:root[data-mode="hardware"][data-theme="dark"] {
    --color-teal: #005CFF;
    --color-teal-hover: #3377FF;
    --color-cyan: #3377FF;
    --color-green: #3377FF;
    --glow-effect: rgba(0, 92, 255, 0.04);
}

/* Mode visibility */
[data-mode="services"] .hw-section { display: none; }
[data-mode="hardware"] .svc-section { display: none; }

/* ==========================================================================
   2. GLOBAL BASE STYLES
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
                color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ==========================================================================
   3. NAVIGATION HEADER
   ========================================================================== */
header {
    border-bottom: 1px solid var(--border);
    background-color: rgba(var(--bg-primary-rgb), 0.8);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-family: "Oswald", sans-serif;
    font-weight: 600;
    font-size: 1.5rem;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--text-primary);
    text-decoration: none;
}

/* Minimal SVG/CSS representation of your 3D logo geometry */
.logo-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-family: "Oswald", sans-serif;
    font-weight: 400;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    position: relative;
    transition: color 0.2s ease;
}

nav a:hover, nav a.active {
    color: var(--color-cyan);
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-cyan);
}

nav a.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

nav a.disabled span {
    font-size: 0.7rem;
    text-transform: uppercase;
    background: var(--border);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    color: var(--text-muted);
}

.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-primary);
    font-family: "Oswald", sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    border-color: var(--color-cyan);
    background-color: var(--bg-card);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lang-toggle {
    background: transparent;
    border: 1px solid var(--border);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    font-family: "Oswald", sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    transition: all 0.2s ease;
}

.lang-toggle:hover {
    border-color: var(--color-cyan);
    color: var(--color-cyan);
}

/* ==========================================================================
   4. HERO SECTION
   ========================================================================== */
.hero {
    padding: 8rem 0;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 90% 10%, var(--glow-effect), transparent 40%);
}

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

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--color-green);
    border-radius: 4px;
    font-family: "Oswald", sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background-color: var(--color-green);
    border-radius: 50%;
}

h1 {
    font-family: "Oswald", sans-serif;
    font-size: 3.5rem;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

h1 span {
    color: var(--color-cyan);
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 700px;
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
}

/* BUTTONS */
.btn-group {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.85rem 1.75rem;
    border-radius: 6px;
    font-family: "Oswald", sans-serif;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--color-teal);
    color: #ffffff;
    border: 1px solid transparent;
}

.btn-primary:hover {
    background-color: var(--color-teal-hover);
}

.btn-secondary {
    border: 1px solid var(--border);
    color: var(--text-primary);
    background-color: transparent;
}

.btn-secondary:hover {
    background-color: var(--bg-secondary);
    border-color: var(--border-hover);
}

/* ==========================================================================
   5. SECTIONS & CARDS SYSTEM
   ========================================================================== */
.services {
    padding: 6rem 0;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

.section-header {
    margin-bottom: 4rem;
    max-width: 600px;
}

.section-header h2 {
    font-family: "Oswald", sans-serif;
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.section-header p {
    color: var(--text-muted);
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    padding: 3rem 2.5rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    border-color: var(--color-teal);
    transform: translateY(-2px);
}

.card-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-green);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card h3 {
    font-family: "Oswald", sans-serif;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
}

.card-banner {
    margin: -3rem -2.5rem 1.5rem -2.5rem;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    aspect-ratio: 1031 / 462;
}

.card-banner img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.card-banner--contain img {
    object-fit: contain;
}

/* ==========================================================================
   6. CONTACT CTA
   ========================================================================== */
.contact-cta {
    padding: 6rem 0;
    text-align: center;
}

.contact-cta__inner {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-cta h2 {
    font-family: "Oswald", sans-serif;
    font-size: 2.25rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.contact-cta p {
    max-width: 600px;
    margin-bottom: 2.5rem;
    color: var(--text-secondary);
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
}

/* ==========================================================================
   7. FOOTER
   ========================================================================== */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ==========================================================================
   8. LOGO GRIDS
   ========================================================================== */
.logos {
    padding: 6rem 0;
    border-top: 1px solid var(--border);
}

.logos .section-header {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.logo-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2.5rem 3rem;
    padding-top: 1rem;
}

.logo-grid--small {
    gap: 1.75rem 2.25rem;
}

.logo-item {
    display: flex;
    align-items: center;
    justify-content: center;
    filter: grayscale(1);
    opacity: 0.65;
    transition: filter 0.25s ease, opacity 0.25s ease;
}

.logo-item img {
    max-height: 48px;
    max-width: 140px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.logo-grid--small .logo-item img {
    max-height: 40px;
    max-width: 120px;
}

.logo-item:hover {
    filter: grayscale(0);
    opacity: 1;
}

/* Tech grid - logo + name below */
.tech-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 2rem 2.5rem;
    padding-top: 1rem;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    filter: grayscale(1);
    opacity: 0.65;
    transition: filter 0.25s ease, opacity 0.25s ease;
    width: 120px;
}

.tech-item:hover {
    filter: grayscale(0);
    opacity: 1;
}

.tech-item img {
    max-height: 40px;
    max-width: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.tech-item span {
    font-family: "Oswald", sans-serif;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: center;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .tech-grid { gap: 1.25rem; }
    .tech-item { width: 90px; }
    .tech-item img { max-height: 32px; max-width: 80px; }
    .tech-item span { font-size: 0.65rem; }
}

/* Invert white logos to dark in light theme */
[data-theme="light"] .tech-item img[alt="UFOB"],
[data-theme="light"] .tech-item img[alt="EMPARN"] {
    filter: grayscale(1) invert(1);
}

@media (max-width: 768px) {
    .logo-grid { gap: 1.5rem 2rem; }
    .logo-grid--small { gap: 1.25rem 1.5rem; }
    .logo-item img { max-height: 36px; max-width: 110px; }
    .logo-grid--small .logo-item img { max-height: 32px; max-width: 100px; }
}

/* ==========================================================================
   10. WHATSAPP
   ========================================================================== */

/* Floating WhatsApp button */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    width: 56px;
    height: 56px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}

.whatsapp-float img {
    width: 28px;
    height: 28px;
    display: block;
}

/* WhatsApp button inside contact sections */
.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    border-radius: 6px;
    font-family: "Oswald", sans-serif;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background-color: #25D366;
    color: #ffffff;
    border: 1px solid transparent;
}

.btn-whatsapp:hover {
    background-color: #1DA851;
}

.whatsapp-icon {
    width: 18px;
    height: 18px;
    display: block;
}

/* ==========================================================================
   9. RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1024px) {
    h1 { font-size: 3rem; }
    .grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}

@media (max-width: 768px) {
    .nav-wrapper { height: auto; padding: 1.5rem 0; flex-direction: column; gap: 1.5rem; }
    nav ul { flex-direction: column; gap: 1rem; text-align: center; }
    nav a.active::after { display: none; }
    .header-actions { flex-direction: row; gap: 0.5rem; }
    .hero { padding: 4rem 0; text-align: center; }
    .hero-content { display: flex; flex-direction: column; align-items: center; }
    .btn-group { flex-direction: column; width: 100%; }
    .btn { justify-content: center; width: 100%; }
    .btn-whatsapp { justify-content: center; width: 100%; }
    .grid { grid-template-columns: 1fr; }
    .card { padding: 2rem; }
}

/* Prevent content overlap with floating button on mobile */
@media (max-width: 480px) {
    .whatsapp-float {
        bottom: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
    }
    .whatsapp-float img { width: 24px; height: 24px; }
}