/* =====================================================
   DARK THEME CSS - Aligned with web-app-dev
   Bootstrap 5.3.0 Customizations for Fibra-Optica.ro
   ===================================================== */

:root {
  /* === Brand Colors - Fiber Optic Theme === */
  --brand-primary: #FFD700;        /* Golden Yellow - Light from fiber */
  --brand-primary-dark: #FFA500;   /* Orange Yellow - Hover state */
  --brand-primary-light: #FFFF00;  /* Bright Yellow */
  
  --brand-secondary: #00BFFF;      /* Deep Sky Blue - Technology/IT */
  --brand-secondary-light: #1E90FF; /* Dodger Blue - Bright variant */
  --brand-secondary-dark: #0066CC;  /* Dark Blue */
  
  --brand-accent: #87CEEB;         /* Sky Blue - Pale accent */
  --brand-accent-light: #B0E0E6;   /* Powder Blue - Light variant */
  --brand-accent-dark: #6BA3D8;    /* Steel Blue - Dark variant */

  /* === Dark Theme Colors === */
  --bg-color: #000000;              /* Pure Black - Main background */
  --bg-color-soft: #0A0A0A;        /* Soft Black - Subtle variation */
  --bg-black-card: #111111;         /* Card background */
  --bg-black-hover: #1A1A1A;       /* Hover state */
  
  --text-color: #FFFFFF;            /* Primary text - White */
  --text-color-muted: #888888;      /* Muted text - Gray */
  --text-dark: #666666;             /* Dark gray text */

  /* === Borders and Glass Effects === */
  --border-color: #333333;          /* Border color */
  --border-glow-yellow: rgba(255, 215, 0, 0.15);
  --border-glow-blue-pale: rgba(135, 206, 235, 0.15);
  --border-glow-blue: rgba(0, 191, 255, 0.15);
  --glass: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.1);

  /* === Transitions === */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  /* === 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-xl: 0 12px 48px rgba(0, 0, 0, 0.6);

  /* === Bootstrap CSS Variable Overrides === */
  --bs-body-bg: var(--bg-color);
  --bs-body-color: var(--text-color);
  --bs-border-color: var(--border-color);
  --bs-link-color: var(--brand-primary);
  --bs-link-hover-color: var(--brand-primary-light);
  --bs-primary: var(--brand-primary);
  --bs-secondary: var(--brand-secondary);
  --bs-info: var(--brand-accent);
}

/* =====================================================
   BODY & BASE STYLES
   ===================================================== */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

/* Animated gradient background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(255, 215, 0, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(135, 206, 235, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(0, 191, 255, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
  animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

.container, .container-fluid {
  position: relative;
  z-index: 2;
}

/* =====================================================
   PARTICLES CANVAS
   ===================================================== */
.particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.5;
  pointer-events: none;
}

/* =====================================================
   HEADER & NAVBAR - STICKY
   ===================================================== */
.header {
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid rgba(135, 206, 235, 0.1);
  transition: all var(--transition-normal);
}

.header.scrolled {
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-color) !important;
  transition: all var(--transition-normal);
}

.navbar-brand:hover {
  transform: scale(1.05);
  opacity: 0.8;
}

.nav-link {
  color: var(--text-color-muted) !important;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  transition: color var(--transition-normal);
  padding: 8px 0 !important;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
  transition: width var(--transition-normal);
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-color) !important;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.navbar-toggler {
  border-color: var(--border-color);
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.25rem rgba(135, 206, 235, 0.25);
}

.navbar-close {
  color: var(--text-color);
  font-size: 1.5rem;
  border: none;
  background: none;
  cursor: pointer;
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn-primary {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark)) !important;
  border: 2px solid var(--brand-primary) !important;
  color: #000000 !important;
  font-weight: 700;
  box-shadow: 0 8px 32px rgba(255, 215, 0, 0.25), 0 0 20px rgba(255, 215, 0, 0.15);
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left var(--transition-smooth);
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover,
.btn-primary:focus {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 40px rgba(255, 215, 0, 0.35), 0 0 30px rgba(255, 215, 0, 0.25);
  background: linear-gradient(135deg, var(--brand-primary-light), var(--brand-primary)) !important;
  color: #000000 !important;
}

.btn-secondary {
  background: transparent !important;
  border: 2px solid var(--brand-accent) !important;
  color: var(--brand-accent) !important;
  font-weight: 700;
  transition: all var(--transition-smooth);
}

.btn-secondary:hover {
  background: var(--brand-accent) !important;
  color: #000000 !important;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(135, 206, 235, 0.25), 0 0 20px rgba(135, 206, 235, 0.15);
}

.btn-outline-secondary {
  color: var(--brand-accent) !important;
  border-color: var(--brand-accent) !important;
}

.btn-outline-secondary:hover {
  background-color: rgba(135, 206, 235, 0.1) !important;
  color: var(--brand-accent-light) !important;
}

/* =====================================================
   CARDS
   ===================================================== */
.card {
  background: var(--bg-black-card) !important;
  border: 1px solid var(--border-color) !important;
  transition: all var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  color: var(--text-color);
}

.card:hover {
  border-color: rgba(255, 215, 0, 0.25) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 215, 0, 0.1);
  transform: translateY(-8px) scale(1.02);
}

.card-title {
  color: var(--text-color);
  font-weight: 700;
}

.card-text {
  color: var(--text-color-muted);
}

/* Service Cards Special Styling */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.05), rgba(135, 206, 235, 0.05), rgba(0, 191, 255, 0.05));
  opacity: 0;
  transition: opacity var(--transition-smooth);
  z-index: 0;
}

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

.service-card .card-body {
  position: relative;
  z-index: 1;
}

/* Product Cards */
.product-card {
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.05), rgba(135, 206, 235, 0.05), rgba(0, 191, 255, 0.05));
  opacity: 0;
  transition: opacity var(--transition-smooth);
  z-index: 0;
}

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

.product-card .card-body {
  position: relative;
  z-index: 1;
}

/* =====================================================
   FORM ELEMENTS
   ===================================================== */
.form-control {
  background-color: var(--bg-black) !important;
  border: 2px solid var(--border-color) !important;
  color: var(--text-color) !important;
  border-radius: 0.5rem;
  transition: all var(--transition-normal);
}

.form-control::placeholder {
  color: var(--text-color-muted) !important;
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-primary) !important;
  box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.12), 0 0 20px rgba(255, 215, 0, 0.08);
  background-color: var(--bg-black-card) !important;
  transform: translateY(-1px);
}

.form-group {
  margin-bottom: 1.5rem;
}

.honeypot {
  display: none;
}

#form-message {
  margin-top: 1.25rem;
  padding: 1rem;
  border-radius: 0.75rem;
  text-align: center;
  font-weight: 500;
  display: none;
}

#form-message.show {
  display: block;
}

#form-message.success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--brand-accent-light);
  border: 1px solid var(--brand-accent-light);
}

#form-message.error {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
  border: 1px solid #EF4444;
}

/* =====================================================
   BADGES & TAGS
   ===================================================== */
.badge {
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-dark {
  background-color: var(--bg-black-card) !important;
}

/* =====================================================
   SECTIONS & CONTENT
   ===================================================== */
.hero {
  position: relative;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.3) 100%);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-color);
}

.display-4, .display-5 {
  font-weight: 800;
}

.lead {
  color: var(--text-color-muted);
}

/* Section Titles */
.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title .subtitle {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: var(--bg-black-card);
  border: 2px solid var(--brand-accent);
  border-radius: 50px;
  color: var(--brand-accent);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1.25rem;
  box-shadow: 0 0 15px rgba(135, 206, 235, 0.15);
  transition: all var(--transition-normal);
}

.section-title .subtitle:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(135, 206, 235, 0.25);
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
  text-align: center;
  padding: 3rem 0;
  color: var(--text-color-muted);
  font-size: 0.9rem;
  position: relative;
  z-index: 2;
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */
@media (max-width: 768px) {
  .navbar-brand {
    font-size: 1.1rem;
  }

  .nav-link {
    font-size: 1rem;
    padding: 0.75rem 0 !important;
  }

  h1.display-4 {
    font-size: 2rem;
  }

  h2.display-5 {
    font-size: 1.75rem;
  }

  .card {
    margin-bottom: 1rem;
  }

  .contact-container {
    grid-template-columns: 1fr !important;
  }

  .contact-info,
  .contact-form {
    border-left: none !important;
    border-top: 2px solid var(--border-color);
  }

  .row:nth-child(1) .contact-form {
    border-top: 2px solid var(--border-color);
    border-left: none;
  }
}

@media (max-width: 576px) {
  .navbar-brand {
    font-size: 1rem;
  }

  .btn {
    font-size: 0.9rem;
    padding: 0.75rem 1.5rem;
  }

  h1.display-4 {
    font-size: 1.5rem;
  }

  h2.display-5 {
    font-size: 1.25rem;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .card {
    padding: 1rem !important;
  }
}

/* =====================================================
   ACCESSIBILITY
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }

  .particles-canvas {
    display: none;
  }
}

/* =====================================================
   DARK MODE OVERRIDES FOR BOOTSTRAP COMPONENTS
   ===================================================== */
.navbar-dark .navbar-nav .nav-link {
  color: var(--text-color-muted) !important;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
  color: var(--text-color) !important;
}

.btn-close {
  filter: invert(1);
  opacity: 0.8;
}

.btn-close:focus {
  opacity: 1;
}

/* Scrollbar styling for webkit browsers */
::-webkit-scrollbar {
  width: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-color-muted);
}
