/* =====================================================
   Analog Signalworks - Landing Page Styles
   Modern dark theme with light mode support
   ===================================================== */

/* CSS Variables - Dark Theme (Default) */
:root {
    /* Brand Colors */
    --primary: #FF6519;
    --primary-light: #FF8347;
    --primary-dark: #E55A15;
    --primary-glow: rgba(255, 101, 25, 0.4);

    /* Gradient for headings */
    --gradient-primary: linear-gradient(135deg, #FF6519 0%, #FF8C4B 50%, #FFA366 100%);

    /* Dark Theme Colors */
    --bg-primary: #1a1a1a;
    --bg-secondary: #0d0d0d;
    --bg-card: #1f1f1f;
    --bg-elevated: #252525;

    --text-primary: #E0E0E0;
    --text-secondary: #A0A0A0;
    --text-muted: #707070;

    --border-color: #333333;
    --border-subtle: #2a2a2a;

    /* Navbar */
    --navbar-bg: rgba(26, 26, 26, 0.95);
    --navbar-border: rgba(255, 101, 25, 0.2);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px var(--primary-glow);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Spacing */
    --section-padding: 6rem 2rem;
    --container-max: 1200px;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;

    /* =========================================================
       TEXT SELECTION HIGHLIGHT COLOR
       This controls the background color when selecting text
       with your mouse. Adjust --selection-bg to change it.
       Current: Light orange (#FFBC8C)
       Try: #FFD4B3 (lighter), #FFA366 (more saturated)
       ========================================================= */
    --selection-bg: #FFBC8C;
    --selection-text: #1a1a1a;
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-card: #ffffff;
    --bg-elevated: #fafafa;

    --text-primary: #1a1a1a;
    --text-secondary: #505050;
    --text-muted: #808080;

    --border-color: #e0e0e0;
    --border-subtle: #eeeeee;

    --navbar-bg: rgba(255, 255, 255, 0.95);
    --navbar-border: rgba(255, 101, 25, 0.3);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 20px rgba(255, 101, 25, 0.25);
}

/* =====================================================
   Base Styles
   ===================================================== */

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

html {
    scroll-behavior: smooth;
    /* Always show scrollbar to prevent layout shift when menu opens */
    overflow-y: scroll;
}

/* =========================================================
   GLOBAL ORANGE SCROLLBAR
   Custom scrollbar styling to match brand colors
   ========================================================= */

/* Firefox */
* {
    scrollbar-width: auto;
    scrollbar-color: var(--primary) var(--bg-secondary);
}

/* Webkit (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 5px;
    border: 2px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary) 100%);
}

::-webkit-scrollbar-corner {
    background: var(--bg-secondary);
}

/* =========================================================
   TEXT SELECTION HIGHLIGHT
   Changes the highlight color when selecting text with mouse
   Uses --selection-bg and --selection-text from :root
   ========================================================= */
::selection {
    background-color: var(--selection-bg);
    color: var(--selection-text);
}

::-moz-selection {
    background-color: var(--selection-bg);
    color: var(--selection-text);
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-base), color var(--transition-base);
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-light);
}

/* =====================================================
   Typography
   ===================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

.section-title {
    font-size: clamp(2rem, 5vw, 2.75rem);
    text-align: center;
    margin-bottom: 1rem;

  background-image: repeating-linear-gradient(
    100deg,
    #FF6519 0%,
    #FF6519 5%,
    #df5200 25%,
    #FF6519 65%,
    #ffa125 75%,
    #FF6519 85%,
    #FF6519 100%
  );
  background-size: 200% 100%;
  background-position: 0% 0;

  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;

  animation: sectionFlow 4.2s linear infinite reverse;
}

@keyframes sectionFlow {
  to { background-position: 200% 0; }
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* =====================================================
   Buttons
   ===================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-base);
    border: 2px solid transparent;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #ffffff;
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

/* =====================================================
   Card Glow Effects
   Core effect definitions are in effects.css
   This section applies .glow-effect to specific cards
   ===================================================== */

/* Slow rotation for larger elements like newsletter card */
.newsletter-card:hover::before {
    animation: rotateBorder var(--glow-speed-slow) linear infinite !important;
}

/* =====================================================
   Navigation - New Layout
   Logo (left) | Brand Text + Login + Menu (right)
   ===================================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--navbar-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--navbar-border);
    transition: all var(--transition-base);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

/* Left Side: Logo only */
.nav-left {
    display: flex;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 45px;
    width: auto;
    transition: transform var(--transition-base);
}

.nav-logo:hover .logo-img {
    transform: scale(1.05);
}

/* Menu Wrapper - positions dropdown relative to toggle button */
.nav-menu-wrapper {
    position: relative;
}

/* Menu Toggle Button */
.nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    padding: 0.5rem;
    width: 42px;
    height: 42px;
    z-index: 1001;
    transition: all var(--transition-base);
}

.nav-toggle:hover {
    border-color: var(--primary);
    background: rgba(255, 101, 25, 0.1);
}

.nav-toggle:hover .menu-icon,
.nav-toggle:hover .close-icon {
    color: var(--primary);
}

/* Modern Grid Menu Icon */
.nav-toggle .menu-icon,
.nav-toggle .close-icon {
    width: 22px;
    height: 22px;
    color: var(--text-primary);
    transition: all var(--transition-base);
}

.nav-toggle .menu-icon {
    display: block;
}

.nav-toggle .close-icon {
    display: none;
}

.nav-toggle.active .menu-icon {
    display: none;
}

.nav-toggle.active .close-icon {
    display: block;
}

/* Collapsible Dropdown Menu - right-aligned */
.nav-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 0;
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
    z-index: 999;
}

.nav-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-links {
    display: flex;
    flex-direction: column;
    list-style: none;
    gap: 0;
}

.nav-links li {
    border-bottom: 1px solid var(--border-subtle);
}

.nav-links li:last-child {
    border-bottom: none;
}

.nav-links a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-primary);
    font-weight: 500;
    transition: all var(--transition-base);
    text-align: left;
}

.nav-links a:hover {
    color: var(--primary);
    background: rgba(255, 101, 25, 0.1);
}

/* Menu Footer with Theme Toggle */
.nav-menu-footer {
    padding: 1rem 1.5rem 0.5rem;
    border-top: 1px solid var(--border-color);
    margin-top: 0.5rem;
}

.nav-menu-footer .theme-toggle {
    width: 100%;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
}

.theme-label {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Theme Toggle */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

.theme-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(255, 101, 25, 0.1);
}

.theme-icon {
    width: 20px;
    height: 20px;
    position: relative;
    flex-shrink: 0;
}

.theme-icon svg {
    width: 20px;
    height: 20px;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity var(--transition-base), transform var(--transition-base);
}

.sun-icon {
    opacity: 0;
    transform: rotate(-90deg);
}

.moon-icon {
    opacity: 1;
    transform: rotate(0deg);
}

[data-theme="light"] .sun-icon {
    opacity: 1;
    transform: rotate(0deg);
}

[data-theme="light"] .moon-icon {
    opacity: 0;
    transform: rotate(90deg);
}

/* Right Side: Brand Text + Login + Menu */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Brand Text with Shimmer Animation
   Animation: Solid orange -> white sweep left-to-right -> solid orange (hold 3s) -> repeat
   Total cycle: ~5s (2s sweep + 3s hold) */

.nav-brand-text {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: -0.01em;

  background-image: repeating-linear-gradient(
    90deg,
    /* White sweep */
    /* #FF6519 0%,
    #FF6519 40%,
    #FFFFFF 50%,
    #FF6519 55%,
    #FF6519 100% */
    /* White and black sweeping */
    /* #FF6519 0%,
    #FF6519 5%,
    #404040 25%,
    #FF6519 50%,
    #FFFFFF 75%,
    #FF6519 95%,
    #FF6519 100% */
    #FF6519 0%,
    #FF6519 5%,
    #ad0000 25%,
    #FF6519 65%,
    #ffc400 75%,
    #FF6519 85%,
    #FF6519 100%
  );
  background-size: 200% 100%;
  background-position: 0% 0;

  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;

  animation: brandFlow 5s linear infinite;
  animation-delay: var(--brand-flow-offset, 0s);
}

@keyframes brandFlow {
  to { background-position: 200% 0; }
}

/* Auth elements: hidden by inline style, faded in by auth.js */
.nav-auth-resolved .nav-login-btn,
.nav-auth-resolved .nav-user-actions {
    transition: opacity 0.15s ease;
}

.nav-login-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: #ffffff;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition-base);
}

.nav-login-btn:hover {
    background: var(--primary-dark);
    color: #ffffff;
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.nav-login-btn svg {
    width: 18px;
    height: 18px;
}

/* =====================================================
   Nav User Menu (Logged In State)
   ===================================================== */

.nav-user {
    position: relative;
}

.nav-user-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-base);
}

.nav-user-btn:hover {
    border-color: var(--primary);
    background: rgba(255, 101, 25, 0.1);
}

.nav-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 101, 25, 0.15);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.nav-user-name {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
}

.nav-user-chevron {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
}

.nav-user-btn:hover .nav-user-chevron {
    color: var(--primary);
}

.nav-user-btn.active .nav-user-chevron {
    transform: rotate(180deg);
}

/* User Dropdown Menu */
.nav-user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
    z-index: 999;
    overflow: hidden;
}

.nav-user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    border-bottom: 1px solid var(--border-subtle);
}

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

.nav-user-dropdown a:hover {
    background: rgba(255, 101, 25, 0.1);
    color: var(--primary);
}

.nav-user-dropdown a svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.nav-user-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0;
}

/* Sign Out link - ensure it doesn't look grayed out */
.nav-user-dropdown a.logout-link {
    color: var(--text-primary);
}

.nav-user-dropdown a.logout-link:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.nav-user-dropdown a.logout-link:hover svg {
    color: #ef4444;
}

/* Hide user menu on mobile - show simplified version */
@media (max-width: 768px) {
    .nav-user-name {
        display: none;
    }

    .nav-user-btn {
        padding: 0.4rem;
    }
}

/* =====================================================
   Hero Section
   ===================================================== */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.3);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(13, 13, 13, 0.8) 0%,
        rgba(13, 13, 13, 0.6) 50%,
        rgba(13, 13, 13, 0.8) 100%
    );
}

[data-theme="light"] .hero-overlay {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.85) 0%,
        rgba(255, 255, 255, 0.7) 50%,
        rgba(255, 255, 255, 0.85) 100%
    );
}

[data-theme="light"] .hero-image {
    filter: brightness(0.6);
}

/* Hero Pulse Effect - 8 second cycle */
.hero-pulse {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at center,
        var(--primary-glow) 0%,
        transparent 70%
    );
    animation: heroPulse 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes heroPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    padding: 0 2rem;
    animation: fadeInUp 0.8s ease-out;
}

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

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  margin-bottom: 1.5rem;

  background-image: repeating-linear-gradient(
    100deg,
    #FF6519 0%,
    #FF6519 5%,
    #d17000 25%,
    #FF6519 65%,
    #ffa125 75%,
    #FF6519 85%,
    #FF6519 100%
  );
  background-size: 200% 100%;
  background-position: 0% 0;

  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;

  animation: heroFlow 22s linear infinite reverse;
}

@keyframes heroFlow {
  to { background-position: 200% 0; }
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* =====================================================
   Sections
   ===================================================== */

.section {
    padding: var(--section-padding);
}

.section-alt {
    background: var(--bg-secondary);
}

/* =====================================================
   Services Section
   ===================================================== */

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

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: all var(--transition-base);
    cursor: default;
}

.service-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow), var(--shadow-md);
}

.service-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1.25rem;
    color: var(--primary);
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* =====================================================
   Expertise Section
   ===================================================== */

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

.expertise-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: all var(--transition-base);
}

.expertise-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow), var(--shadow-md);
}

.expertise-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    color: var(--primary);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.expertise-list {
    list-style: none;
}

.expertise-list li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
    transition: color var(--transition-fast);
}

.expertise-list li:last-child {
    border-bottom: none;
}

.expertise-list li::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    margin-right: 0.75rem;
    vertical-align: middle;
}

.expertise-card:hover .expertise-list li {
    color: var(--text-primary);
}

/* =====================================================
   About Section
   ===================================================== */

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.about-highlights {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    font-weight: 500;
}

.highlight-icon {
    width: 24px;
    height: 24px;
    color: var(--primary);
    flex-shrink: 0;
}

.highlight-icon svg {
    width: 100%;
    height: 100%;
}

/* =====================================================
   Contact Section
   ===================================================== */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all var(--transition-base);
}

.contact-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.contact-icon {
    width: 40px;
    height: 40px;
    color: var(--primary);
    flex-shrink: 0;
}

.contact-icon svg {
    width: 100%;
    height: 100%;
}

.contact-details h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.contact-details a,
.contact-details span {
    color: var(--text-primary);
    font-size: 1.05rem;
}

/* Newsletter Card */
.newsletter-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
}

.newsletter-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.newsletter-card > p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.newsletter-form {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-base);
}

.newsletter-form input::placeholder {
    color: var(--text-muted);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.newsletter-note {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* =====================================================
   Footer
   ===================================================== */

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 4rem 2rem 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    height: 40px;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-contact p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer-badge {
    color: var(--primary) !important;
    font-weight: 500;
}

/* =====================================================
   Responsive Design
   ===================================================== */

@media (max-width: 968px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .footer-brand {
        grid-column: 1 / -1;
        max-width: none;
        text-align: center;
    }

    .footer-logo {
        margin: 0 auto 1rem;
        display: block;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 4rem 1rem;
    }

    /* Mobile Navigation */
    .nav-brand-text {
        font-size: 1rem;
    }

    .nav-login-btn span {
        display: none;
    }

    .nav-login-btn {
        padding: 0.5rem;
    }

    .nav-login-btn svg {
        margin: 0;
    }

    .nav-right {
        gap: 1rem;
    }

    .nav-menu {
        right: 0;
        min-width: 200px;
    }

    /* Hero adjustments */
    .hero-content {
        padding: 0 1rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }

    /* Services grid */
    .services-grid {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .footer-links li {
        margin: 0;
    }

    /* Newsletter form */
    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form .btn {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .logo-img {
        height: 38px;
    }

    .nav-brand-text {
        font-size: 0.85rem;
    }

    .nav-toggle {
        width: 36px;
        height: 36px;
    }

    .nav-left {
        gap: 0.5rem;
    }

    .nav-right {
        gap: 0.75rem;
    }

    .nav-menu {
        right: 0;
        min-width: 180px;
    }
}

/* =====================================================
   Utility Classes
   ===================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Smooth transitions for theme changes */
* {
    transition: background-color var(--transition-base),
                border-color var(--transition-base),
                box-shadow var(--transition-base);
}

/* Exceptions - elements that shouldn't transition color */
.hero-title,
.section-title,
.expertise-card h3,
.newsletter-card h3 {
    transition: none;
}

/* =====================================================
   Products Section
   ===================================================== */

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

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    transition: all var(--transition-base);
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow), var(--shadow-md);
}

.product-badge {
    display: inline-block;
    background: var(--primary);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.product-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.product-card > p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.product-features {
    list-style: none;
    margin: 0;
    padding: 0;
}

.product-features li {
    padding: 0.4rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-features li::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
}

.product-card:hover .product-features li {
    color: var(--text-primary);
}

/* =====================================================
   Newsletter Promise Text
   ===================================================== */

.newsletter-promise {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.newsletter-promise em {
    color: var(--primary);
    font-style: italic;
}

.newsletter-card > p:first-of-type {
    margin-bottom: 1rem;
}

/* =====================================================
   Footer Legal Links
   ===================================================== */

.footer-legal {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-legal a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.footer-legal a:hover {
    color: var(--primary);
}

/* =====================================================
   Modal Styles
   ===================================================== */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);

    /* Modern scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg-secondary);
}

/* Webkit scrollbar for Chrome, Safari, Edge */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 4px;
    border: 2px solid var(--bg-secondary);
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary) 100%);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    color: var(--primary);
    background: rgba(255, 101, 25, 0.1);
}

/* Policy Content Styling */
.policy-content h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.policy-content h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.policy-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.policy-content ul {
    margin: 0 0 1rem 1.5rem;
    color: var(--text-secondary);
}

.policy-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.policy-content em {
    color: var(--text-muted);
}

/* Body scroll lock when modal is open */
body.modal-open {
    overflow: hidden;
}

/* =====================================================
   Responsive - Products & Modal
   ===================================================== */

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .modal {
        padding: 1rem;
    }

    .modal-content {
        padding: 1.5rem;
        max-height: 90vh;
    }

    .footer-legal {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .footer-legal {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
}

/* =====================================================
   Custom Context Menu (Right-Click Menu)
   ===================================================== */

.context-menu {
    position: fixed;
    z-index: 3000;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.4rem 0;
    box-shadow: var(--shadow-lg), 0 0 20px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9);
    transform-origin: top left;
    transition: opacity 0.08s ease, transform 0.08s ease, visibility 0.08s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.context-menu.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.context-menu-item:hover {
    background: rgba(255, 101, 25, 0.1);
    color: var(--primary);
}

.context-menu-item:active {
    background: rgba(255, 101, 25, 0.2);
}

.context-menu-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.context-menu-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.7;
}

.context-menu-item:hover svg {
    opacity: 1;
}

.context-menu-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

/* Context menu appearing from different edges */
.context-menu.flip-x {
    transform-origin: top right;
}

.context-menu.flip-y {
    transform-origin: bottom left;
}

.context-menu.flip-x.flip-y {
    transform-origin: bottom right;
}

/* =====================================================
   Mission Statement Section
   ===================================================== */

.mission-section {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.mission-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.mission-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mission-text {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text-secondary);
    line-height: 1.8;
    font-style: italic;
}

/* =====================================================
   Team Members Section
   ===================================================== */

.team-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.team-title {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.team-member {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all var(--transition-base);
}

.team-member:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow), var(--shadow-md);
    transform: translateY(-4px);
}

.team-coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    border: 1px dashed rgba(255,255,255,0.1);
    border-radius: 12px;
    max-width: 700px;
    margin: 0 auto;
}

.team-coming-soon svg {
    width: 48px;
    height: 48px;
    opacity: 0.4;
}

.team-coming-soon-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.team-coming-soon-body {
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
    max-width: 320px;
}

.team-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    overflow: hidden;
    border: 3px solid var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
    position: relative;
}

.team-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.team-member:hover .team-avatar img {
    transform: scale(1.1);
}

.team-member h4 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.team-role {
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.team-bio {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .team-avatar {
        width: 100px;
        height: 100px;
    }

    .team-member {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .team-grid {
        grid-template-columns: 1fr;
    }
}

/* Team Horizontal Layout (single or few members) */
.team-horizontal {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 820px;
    margin: 0 auto;
}

.team-member-horizontal {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all var(--transition-base);
}

.team-member-horizontal:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow), var(--shadow-md);
}

.team-member-horizontal .team-avatar {
    flex-shrink: 0;
    margin: 0;
    width: 100px;
    height: 100px;
}

.team-member-horizontal .team-info {
    flex: 1;
}

.team-member-horizontal h4 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.team-member-horizontal .team-role {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.team-member-horizontal .team-bio {
    font-size: 0.95rem;
    line-height: 1.7;
}

.team-member-horizontal:hover .team-avatar img {
    transform: scale(1.1);
}

@media (max-width: 600px) {
    .team-member-horizontal {
        flex-direction: column;
        text-align: center;
    }

    .team-member-horizontal .team-avatar {
        margin: 0 auto;
    }
}

/* =====================================================
   Footer Mission Statement
   ===================================================== */

.footer-mission {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

.footer-mission p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.6;
}

/* =====================================================
   Partners / Vendor Allies Section
   ===================================================== */

.partners-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.partner-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 200px;
}

.partner-card:hover {
    transform: translateY(-3px);
}

.partner-logo {
    width: 170px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.partner-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
}

.partner-logo-fallback {
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.partner-info {
    text-align: center;
}

.partner-info h4 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
}

.partner-info p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* =====================================================
   Hero Mini (for subpages)
   ===================================================== */

.hero-mini {
    padding: 8rem 2rem 4rem;
    text-align: center;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.hero-mini .hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.75rem;
}

.hero-mini .hero-subtitle {
    max-width: 600px;
    margin: 0 auto;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* =====================================================
   Breadcrumb
   ===================================================== */

.breadcrumb {
    padding: 1rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb .separator {
    margin: 0 0.5rem;
}

/* =====================================================
   Search & Filter Bar
   ===================================================== */

.search-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    max-width: 400px;
    min-width: 200px;
}

.search-input-wrapper svg {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.6rem 0.75rem 0.6rem 2.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: var(--font-family);
    outline: none;
    transition: border-color var(--transition-fast);
}

.search-input:focus {
    border-color: var(--primary);
}

.filter-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.45rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* =====================================================
   Product Detail Page
   ===================================================== */

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.product-gallery {}

.product-main-image {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 12px;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: zoom-in;
    border: 1px solid var(--border-color);
}

.product-main-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-main-image .no-image {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    padding: 2rem;
}

.product-thumbnails {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.product-thumbnail {
    width: 64px;
    height: 64px;
    border-radius: 6px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color var(--transition-fast);
    flex-shrink: 0;
}

.product-thumbnail:hover {
    border-color: var(--text-muted);
}

.product-thumbnail.active {
    border-color: var(--primary);
}

.product-info {}

.product-info h1 {
    font-size: 1.8rem;
    margin: 0 0 0.5rem;
}

.product-info .product-badge-detail {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary);
    color: #fff;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.product-info .product-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.product-specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.product-specs-table tr {
    border-bottom: 1px solid var(--border-subtle);
}

.product-specs-table td {
    padding: 0.6rem 0;
    font-size: 0.9rem;
}

.product-specs-table td:first-child {
    color: var(--text-muted);
    font-weight: 500;
    width: 40%;
}

.product-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-features-list li {
    padding: 0.4rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.product-features-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
}

@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   Articles Toolbar (Search + Category Filters)
   ===================================================== */

.articles-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.articles-search {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 360px;
}

.articles-search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

.articles-search input {
    width: 100%;
    padding: 0.6rem 0.75rem 0.6rem 2.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: border-color var(--transition-fast);
}

.articles-search input::placeholder {
    color: var(--text-muted);
}

.articles-search input:focus {
    border-color: var(--primary);
}

.articles-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.articles-filter-btn {
    padding: 0.4rem 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.articles-filter-btn:hover {
    border-color: var(--primary);
    color: var(--text-primary);
}

.articles-filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.articles-no-results {
    text-align: center;
    color: var(--text-secondary);
    padding: 3rem 0;
}

/* =====================================================
   Article Row Cards (compact horizontal layout)
   ===================================================== */

.articles-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.article-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    text-decoration: none;
    color: inherit;
    transition: background var(--transition-fast);
    border-bottom: 1px solid var(--border-subtle);
}

.article-row:last-child {
    border-bottom: none;
}

.article-row:hover {
    background: var(--bg-elevated);
}

.article-row-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 56px;
    border-radius: 6px;
    overflow: hidden;
}

.article-row-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-row-body {
    flex: 1;
    min-width: 0;
}

.article-row-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.2rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-row-blurb {
    margin: 0 0 0.3rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.article-row-category {
    background: rgba(255, 101, 25, 0.15);
    color: var(--primary);
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

@media (max-width: 600px) {
    .articles-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .articles-search {
        max-width: none;
    }

    .article-row-thumb {
        width: 60px;
        height: 42px;
    }

    .article-row-blurb {
        display: none;
    }
}

/* =====================================================
   Article Cards (homepage grid style)
   ===================================================== */

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.article-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.article-card:hover {
    transform: translateY(-3px);
}

.article-card-image {
    height: 200px;
    overflow: hidden;
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.article-card:hover .article-card-image img {
    transform: scale(1.05);
}

.article-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.article-card-body h3 {
    font-size: 1.1rem;
    margin: 0 0 0.5rem;
    line-height: 1.4;
}

.article-card-body p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* =====================================================
   Article Body (reading view)
   ===================================================== */

.article-header {
    text-align: center;
    padding: 2rem 0;
}

.article-header .article-hero-img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.article-header h1 {
    color: var(--text-primary);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin: 0 0 1rem;
    line-height: 1.3;
}

.article-header .article-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.article-header .article-category-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: rgba(255, 101, 25, 0.15);
    color: var(--primary);
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.article-body {
    max-width: 1200px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.article-body h2 {
    color: var(--primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.article-body h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.article-body u {
    color: var(--primary);
}

.article-body p {
    margin-bottom: 1.25rem;
}

.article-body img {
    max-width: 100%;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.article-body code {
    background: var(--bg-elevated);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
}

.article-body pre {
    background: var(--bg-elevated);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.article-body blockquote {
    border-left: 3px solid var(--primary);
    margin: 1.5rem 0;
    padding: 0.5rem 1.5rem;
    color: var(--text-secondary);
    font-style: italic;
}

.article-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* =====================================================
   Training Cards
   ===================================================== */

.training-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.training-card {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.training-card:hover {
    transform: translateY(-3px);
}

.training-card-icon {
    width: 48px;
    height: 48px;
    color: var(--primary);
    margin-bottom: 1rem;
}

.training-card h3 {
    font-size: 1.2rem;
    margin: 0 0 0.5rem;
}

.training-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 1rem;
    flex: 1;
}

.training-card .training-link {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* =====================================================
   Training Detail Page
   ===================================================== */

.training-content {
    max-width: 800px;
    margin: 0 auto;
}

.training-content h2 {
    color: var(--primary);
    font-size: 1.4rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.training-content h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.training-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.training-content ul {
    color: var(--text-secondary);
    line-height: 1.8;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.training-content .back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.training-content .back-link:hover {
    text-decoration: underline;
}

/* =====================================================
   Calculator Tools Cards
   ===================================================== */

.calculators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.calculator-card {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.calculator-card:hover {
    transform: translateY(-3px);
}

.calculator-card-icon {
    width: 48px;
    height: 48px;
    color: var(--primary);
    margin-bottom: 1rem;
}

.calculator-card h3 {
    font-size: 1.1rem;
    margin: 0 0 0.5rem;
}

.calculator-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 1rem;
    flex: 1;
}

.calculator-card .badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: rgba(255, 101, 25, 0.15);
    color: var(--primary);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    width: fit-content;
}

.calculator-card .badge-available {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

a.calculator-card {
    text-decoration: none;
}

/* Calculator Page */
.calculator-container {
    max-width: 900px;
    margin: 0 auto;
}

.calculator-tool {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.calculator-tool h2 {
    font-size: 1.3rem;
    margin: 0 0 0.5rem;
}

.calculator-tool .calc-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0 0 1.5rem;
    line-height: 1.5;
}

.calc-stages {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.calc-stage {
    display: grid;
    grid-template-columns: 2rem 1fr 1fr auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.calc-stage-num {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.85rem;
}

.calc-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.calc-input-group label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.calc-input-group input {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    width: 100%;
    box-sizing: border-box;
}

.calc-input-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.calc-remove-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1.2rem;
    line-height: 1;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.calc-remove-btn:hover {
    opacity: 1;
    color: #ef4444;
}

.calc-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.calc-btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background 0.2s, border-color 0.2s;
}

.calc-btn:hover {
    border-color: var(--primary);
}

.calc-btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.calc-btn-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
}

.calc-results {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.calc-results h3 {
    font-size: 1rem;
    margin: 0 0 1rem;
}

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

.calc-result-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.calc-result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.calc-result-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.calc-formula {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.calc-formula h4 {
    font-size: 0.85rem;
    margin: 0 0 0.5rem;
    color: var(--text-secondary);
}

.calc-formula code {
    font-size: 0.85rem;
    color: var(--primary);
}

.calc-download {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.calc-download-info h4 {
    margin: 0 0 0.25rem;
    font-size: 0.95rem;
}

.calc-download-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.calc-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.2s;
}

.calc-download-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.calc-download-btn svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 640px) {
    .calc-stage {
        grid-template-columns: 2rem 1fr auto;
    }
    .calc-stage .calc-input-group:nth-child(3) {
        grid-column: 2;
    }
    .calc-download {
        flex-direction: column;
        text-align: center;
    }
}

/* =====================================================
   Lightbox
   ===================================================== */

.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 3rem;
}

.lightbox-image {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    user-select: none;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    z-index: 1;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-radius: 50%;
    opacity: 0.7;
    transition: opacity 0.2s, background 0.2s;
    z-index: 1;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

.lightbox-counter {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* =====================================================
   Products Grid (shared across products listing + homepage)
   ===================================================== */

.products-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.product-list-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.product-list-card:hover {
    transform: translateY(-3px);
}

.product-list-card-image {
    height: 180px;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-list-card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-list-card-image .no-image-placeholder {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.product-list-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-list-card-body .product-card-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: var(--primary);
    color: #fff;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    width: fit-content;
    margin-bottom: 0.5rem;
}

.product-list-card-body h3 {
    font-size: 1rem;
    margin: 0 0 0.5rem;
}

.product-list-card-body p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.no-results p {
    margin: 0.5rem 0;
}
