/* ElektroMeister GmbH - Custom Styles */
/* This file should be named styles.css and placed in the css/ folder */
/* Import the original Bootstrap CSS first, then add these custom styles */

@charset "UTF-8";
/*!
* ElektroMeister GmbH - Custom Electrical Company Styles
* Based on Bootstrap 5.2.3
* Mobile-First Responsive Design
*/

/* Import Bootstrap (this should be the first line if not already included) */
@import url('https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css');

/* Custom CSS Variables */
:root {
  /* Override Bootstrap primary color for electrical theme */
  --bs-primary: #1e40af;
  --bs-primary-rgb: 30, 64, 175;
  --bs-secondary: #64748b;
  --bs-secondary-rgb: 100, 116, 139;
  --bs-success: #16a34a;
  --bs-info: #0ea5e9;
  --bs-warning: #f59e0b;
  --bs-danger: #dc2626;
  --bs-light: #f8fafc;
  --bs-dark: #1e293b;
  
  /* Electric theme colors */
  --electric-blue: #3b82f6;
  --electric-yellow: #fbbf24;
  --voltage-blue: #1d4ed8;
  --safety-red: #dc2626;
}

/* Base improvements */
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

/* Navigation improvements */
.navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
}

@media (min-width: 768px) {
  .navbar-brand {
    font-size: 1.5rem;
  }
}

.navbar-nav .nav-link {
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

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

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--electric-yellow);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

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

/* Service icons (replaces the old .feature class) */
.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  font-size: 1.5rem;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .service-icon {
    width: 3rem;
    height: 3rem;
    font-size: 1.25rem;
  }
}

.service-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Emergency section styling */
.emergency-icon {
  width: 5rem;
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  animation: pulse-danger 2s infinite;
}

@keyframes pulse-danger {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@media (max-width: 768px) {
  .emergency-icon {
    width: 4rem;
    height: 4rem;
    font-size: 2rem;
  }
}

/* Card improvements */
.card {
  border: none;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Button improvements */
.btn {
  font-weight: 600;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  border-width: 2px;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--bs-primary) 0%, var(--voltage-blue) 100%);
  border-color: var(--bs-primary);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, var(--voltage-blue) 0%, var(--bs-primary) 100%);
  border-color: var(--voltage-blue);
}

/* Form improvements */
.form-floating > .form-control:focus,
.form-floating > .form-select:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.25rem rgba(30, 64, 175, 0.25);
}

.form-check-input:checked {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

/* Hero section electric effect */
.electric-hero-icon {
  animation: electric-glow 3s ease-in-out infinite alternate;
}

@keyframes electric-glow {
  0% {
    filter: drop-shadow(0 0 20px rgba(251, 191, 36, 0.4));
  }
  100% {
    filter: drop-shadow(0 0 40px rgba(251, 191, 36, 0.8));
  }
}

/* Stats styling */
.stats-grid .bg-light {
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
}

.stats-grid .bg-light:hover {
  border-color: var(--bs-primary);
  background-color: rgba(30, 64, 175, 0.05) !important;
  transform: translateY(-2px);
}

/* Alert improvements */
.alert {
  border: none;
  border-radius: 0.5rem;
  border-left: 4px solid;
}

.alert-danger {
  background-color: #fef2f2;
  color: #991b1b;
  border-left-color: var(--safety-red);
}

/* Mobile-specific improvements */
@media (max-width: 767.98px) {
  /* Reduce hero text size on mobile */
  .display-5 {
    font-size: 2rem !important;
  }
  
  .lead {
    font-size: 1.1rem;
  }
  
  /* Stack hero buttons on mobile */
  .d-grid.gap-3.d-sm-flex .btn {
    margin-bottom: 0.75rem;
  }
  
  /* Improve mobile form spacing */
  .bg-light.rounded-3.py-5 {
    padding: 2rem 1rem !important;
  }
  
  /* Better mobile card spacing */
  .card {
    margin-bottom: 1rem;
  }
  
  /* Mobile navigation */
  .navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
  }
  
  .navbar-toggler:focus {
    box-shadow: none;
  }
  
  /* Mobile alert */
  .alert .d-flex {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
  
  .alert .btn {
    align-self: center;
  }
}

/* Tablet optimizations */
@media (min-width: 768px) and (max-width: 991.98px) {
  .service-icon {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.4rem;
  }
}

/* Large screen enhancements */
@media (min-width: 1200px) {
  .service-icon {
    width: 4.5rem;
    height: 4.5rem;
    font-size: 1.75rem;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .electric-hero-icon,
  .emergency-icon {
    animation: none;
  }
  
  .service-icon,
  .card,
  .btn,
  .nav-link {
    transition: none;
  }
}

/* Focus improvements for keyboard navigation */
.btn:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

.nav-link:focus {
  outline: 2px solid var(--electric-yellow);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

/* Print styles */
@media print {
  .navbar,
  .alert-danger,
  footer,
  .btn {
    display: none !important;
  }
  
  .card {
    box-shadow: none !important;
    border: 1px solid #dee2e6 !important;
    break-inside: avoid;
    margin-bottom: 1rem;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
}

/* Utility classes */
.text-electric-blue {
  color: var(--electric-blue) !important;
}

.bg-electric-blue {
  background-color: var(--electric-blue) !important;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Selection styling */
::selection {
  background-color: var(--electric-yellow);
  color: var(--bs-dark);
}

/* Loading state for buttons */
.btn.loading {
  position: relative;
  color: transparent;
}

.btn.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}