/* ==========================================================================
   Pfennig Haustechnik - Custom CSS Styles
   BEM Methodology | Google Font Inter | Bootstrap 5 Compatible
   ========================================================================== */

/* Import Google Font Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ==========================================================================
   CSS Variables - Farbpalette basierend auf dem Logo
   ========================================================================== */
:root {
  --brand-red: #D51224;           /* Primär (Brand-Red): Logo-Rot */
  --deep-black: #000000;          /* Sekundär (Deep-Black): "HAUSTECHNIK"-Schwarz */
  --anthracite-dark: #1E1E1E;     /* Anthrazit-Dunkel: Menü-/Footer-Hintergrund */
  --light-gray: #F4F4F4;          /* Hellgrau: Section-Backgrounds, Hover-Effekte */
  --white: #FFFFFF;
  --text-muted: #6C757D;
  --border-color: #DEE2E6;
  --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--deep-black);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Smooth scrolling für Anker-Links */
html {
  scroll-behavior: smooth;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--deep-black);
}

.display-4 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.display-5 {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.lead {
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.7;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-gradient {
  background: linear-gradient(135deg, var(--brand-red) 0%, #B30F1E 100%);
  position: relative;
  overflow: hidden;
}

.hero-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.1);
  z-index: 1;
}

.hero-gradient .container {
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   Blog Navigation Buttons
   ========================================================================== */
.blog-nav-btn {
  transition: all 0.3s ease;
  border-radius: 25px;
}

.blog-nav-btn:hover:not([style*="background-color: var(--brand-red)"]) {
  background-color: var(--brand-red) !important;
  border-color: var(--brand-red) !important;
  box-shadow: 0 4px 8px rgba(213, 18, 36, 0.3) !important;
  transform: translateY(-2px);
}

/* ==========================================================================
   Utility Classes - Farben
   ========================================================================== */
.text-brand-red {
  color: var(--brand-red) !important;
}

.text-deep-black {
  color: var(--deep-black) !important;
}

.text-anthracite-dark {
  color: var(--anthracite-dark) !important;
}

.bg-brand-red {
  background-color: var(--brand-red) !important;
}

.bg-deep-black {
  background-color: var(--deep-black) !important;
}

.bg-anthracite {
  background-color: var(--anthracite-dark) !important;
}

.bg-light-gray {
  background-color: var(--light-gray) !important;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  letter-spacing: 0.025em;
  border-radius: 0.375rem;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.btn-brand-red {
  background-color: var(--brand-red);
  border-color: var(--brand-red);
  color: var(--white);
}

.btn-brand-red:hover,
.btn-brand-red:focus {
  background-color: #B10E1F;
  border-color: #B10E1F;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(213, 18, 36, 0.3);
}

.btn-outline-brand-red {
  border-color: var(--brand-red);
  color: var(--brand-red);
  background-color: transparent;
}

.btn-outline-brand-red:hover,
.btn-outline-brand-red:focus {
  background-color: var(--brand-red);
  border-color: var(--brand-red);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(213, 18, 36, 0.3);
}

.btn-outline-light:hover,
.btn-outline-light:focus {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
  padding: 0.75rem 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.navbar-brand img {
  height: 50px;
  width: auto;
}

.navbar-nav .nav-link {
  font-weight: 500;
  color: var(--deep-black);
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  color: var(--brand-red);
  transform: translateY(-1px);
}

.dropdown-menu {
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border-radius: 0.5rem;
  padding: 0.5rem 0;
}

.dropdown-item {
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: var(--light-gray);
  color: var(--brand-red);
  transform: translateX(5px);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  padding: 3rem 0 2rem;
  background: linear-gradient(135deg, var(--light-gray) 0%, var(--white) 100%);
  display: flex;
  align-items: center;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .hero {
    padding: 5rem 0 2rem;
    min-height: 50vh;
  }
  
  .hero h1 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
  }
  
  .hero .lead {
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .hero {
    padding: 4rem 0 1.5rem;
    min-height: 45vh;
  }
  
  .hero h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
  }
  
  .hero .btn {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
  }
  
  .hero .d-flex.gap-2 {
    gap: 0.5rem !important;
  }
}

/* ==========================================================================
   KPIs Section
   ========================================================================== */
.kpi-item {
  text-align: center;
  padding: 2rem 1rem;
  transition: all 0.3s ease;
}

.kpi-item:hover {
  transform: translateY(-10px);
}

.kpi-number, .kpi-suffix {
  display: inline-block;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  color: var(--brand-red);
}

.kpi-number {
  min-width: 120px;
}

.kpi-suffix {
  margin-left: 0.3rem;
}

@media (max-width: 768px) {
  .kpi-item {
    padding: 1.5rem 0.5rem;
  }
  
  .kpi-number, .kpi-suffix {
    font-size: 2.2rem;
  }
  
  .kpi-number {
    min-width: 80px;
  }
  
  .kpi-suffix {
    margin-left: 0.2rem;
  }
  
  .kpi-label {
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .kpi-number, .kpi-suffix {
    font-size: 1.8rem;
  }
  
  .kpi-number {
    min-width: 60px;
  }
  
  .kpi-suffix {
    margin-left: 0.1rem;
  }
  
  .kpi-label {
    font-size: 0.8rem;
  }
}

@media (max-width: 768px) {
  .kpi-number, .kpi-suffix {
    font-size: 2.5rem;
  }
}

/* ==========================================================================
   Service Cards
   ========================================================================== */
.service-card {
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: var(--brand-red);
}

.service-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.service-icon i {
  transition: all 0.3s ease;
}

.service-card:hover .service-icon i {
  transform: scale(1.1);
}

/* ==========================================================================
   Testimonials
   ========================================================================== */
.testimonial-content {
  padding: 2rem;
}

.testimonial-content .fa-quote-left {
  font-size: 2rem;
  opacity: 0.3;
}

.testimonial-author {
  font-weight: 600;
  color: var(--deep-black);
  margin-bottom: 0.5rem;
}

.testimonial-rating i {
  font-size: 1.125rem;
  margin-right: 0.25rem;
}

.carousel-control-prev,
.carousel-control-next {
  width: 5%;
  color: var(--brand-red);
}

.carousel-control-prev,
.carousel-control-next {
  width: 5%;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  background: none;
  border: none;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: var(--brand-red);
  transition: all 0.3s ease;
}

.carousel-control-prev-icon:hover,
.carousel-control-next-icon:hover {
  background-color: var(--deep-black);
  transform: scale(1.1);
}

.carousel-control-prev-icon:before,
.carousel-control-next-icon:before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: white;
  font-size: 1.2rem;
}

.carousel-control-prev-icon:before {
  content: "\f104"; /* Font Awesome chevron-left */
}

.carousel-control-next-icon:before {
  content: "\f105"; /* Font Awesome chevron-right */
}

/* ==========================================================================
   Forms
   ========================================================================== */
.contact-form {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
}

.form-label {
  font-weight: 500;
  color: var(--deep-black);
  margin-bottom: 0.5rem;
}

.form-control,
.form-select {
  border: 2px solid var(--border-color);
  border-radius: 0.375rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 0.2rem rgba(213, 18, 36, 0.25);
}

.form-check-input:checked {
  background-color: var(--brand-red);
  border-color: var(--brand-red);
}

.form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(213, 18, 36, 0.25);
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  background-color: var(--anthracite-dark);
  color: var(--white);
  padding: 3rem 0 1rem;
}

footer h5 {
  color: var(--brand-red);
  margin-bottom: 1rem;
}

footer a {
  color: var(--white);
  text-decoration: none;
  transition: all 0.3s ease;
}

footer a:hover {
  color: var(--brand-red);
  transform: translateX(5px);
}

.social-links a {
  display: inline-block;
  font-size: 1.5rem;
  margin-right: 1rem;
  transition: all 0.3s ease;
}

.social-links a:hover {
  transform: translateY(-3px);
  color: var(--brand-red);
}

/* ==========================================================================
   Fixed Buttons
   ========================================================================== */
.mobile-call-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
}

.mobile-call-btn .btn {
  width: 60px;
  height: 60px;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: pulse 2s infinite;
}

.contact-widget {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
}

.contact-options {
  display: none;
  flex-direction: column;
  align-items: center;
  margin-bottom: 10px;
}

@media (max-width: 768px) {
  .contact-options {
    gap: 8px;
  }
  
  .contact-options .btn {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    margin: 0;
  }
}

.contact-options.show {
  display: flex;
}

.contact-toggle {
  text-align: center;
}

.contact-widget .btn {
  width: 60px;
  height: 60px;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  margin: 0;
}

.contact-widget .btn-success {
  background-color: #25D366;
  border-color: #25D366;
}

.contact-widget .btn-success:hover {
  background-color: #128C7E;
  border-color: #128C7E;
}



/* ==========================================================================
   Scroll to Top Button
   ========================================================================== */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.scroll-to-top.show {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top .btn {
  width: 50px;
  height: 50px;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   Object Fit Support
   ========================================================================== */
.object-fit-cover {
  object-fit: cover;
  object-position: center;
}

/* ==========================================================================
   Animated Red Gradient
   ========================================================================== */
.animated-red-gradient {
  background: linear-gradient(135deg, 
    rgba(139,14,29,0.7) 0%, 
    rgba(213,18,36,0.85) 25%, 
    rgba(139,14,29,0.75) 50%, 
    rgba(213,18,36,0.9) 75%, 
    rgba(139,14,29,0.7) 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease-in-out infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ==========================================================================
   Dynamic Animations
   ========================================================================== */
.fade-in-up {
  animation: fadeInUp 1.2s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hover Effects for Cards */
.hover-lift {
  transition: all 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

/* Pulse Animation for Important Elements */
.pulse-glow {
  animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(213,18,36,0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(213,18,36,0.6);
  }
}

/* Floating Animation for Icons */
.float-animation {
  animation: floating 4s ease-in-out infinite;
}

@keyframes floating {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Text Reveal Animation */
.text-reveal {
  opacity: 0;
  animation: textReveal 0.8s ease-out forwards;
}

@keyframes textReveal {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Service Card Hover Effects */
.service-card {
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.service-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 15px 35px rgba(213,18,36,0.15);
  border-color: rgba(213,18,36,0.2);
}

.service-icon {
  transition: all 0.3s ease;
}

.service-card:hover .service-icon {
  transform: scale(1.1) rotate(5deg);
}

/* Typewriter effect */
@keyframes blink {
  0%, 50% { border-color: transparent; }
  51%, 100% { border-color: #fff; }
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(213, 18, 36, 0.4);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Blog & Content Pages
   ========================================================================== */
article {
  line-height: 1.8;
}

article h2 {
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--deep-black);
}

article h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

article p {
  margin-bottom: 1.5rem;
  text-align: justify;
}

article ul, article ol {
  margin-bottom: 1.5rem;
}

article li {
  margin-bottom: 0.5rem;
}

.accordion-button {
  font-weight: 500;
  color: var(--deep-black);
  background-color: var(--light-gray);
  border: none;
}

.accordion-button:not(.collapsed) {
  color: var(--brand-red);
  background-color: var(--light-gray);
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(213, 18, 36, 0.25);
}

.accordion-body {
  background-color: var(--white);
  border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   Responsive Utilities
   ========================================================================== */
@media (max-width: 576px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .display-4 {
    font-size: 2rem;
  }
  
  .display-5 {
    font-size: 1.75rem;
  }
  
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
  
  .mobile-call-btn {
    bottom: 1rem;
    right: 1rem;
  }
  
  .whatsapp-btn {
    bottom: 1rem;
    right: 4rem;
  }
  
  .scroll-to-top {
    bottom: 1rem;
    left: 1rem;
  }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */
.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;
}

/* Focus styles für bessere Zugänglichkeit */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--brand-red);
  outline-offset: 2px;
}

/* Reduzierte Bewegungen für Nutzer mit Vestibular Disorders */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
  .navbar,
  .mobile-call-btn,
  .whatsapp-btn,
  .scroll-to-top,
  footer {
    display: none !important;
  }
  
  body {
    color: black !important;
    background: white !important;
  }
  
  .btn {
    border: 1px solid black !important;
  }
}


/* ==========================================================================
   Cookie Notice & Settings
   ========================================================================== */
.cookie-notice {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  color: #333;
  padding: 25px;
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  border-top: 3px solid var(--brand-red);
  max-height: 80vh;
  overflow-y: auto;
}

.cookie-notice.show {
  transform: translateY(0);
}

.cookie-content {
  max-width: 800px;
  margin: 0 auto;
}

.cookie-header h5 {
  color: var(--deep-black);
  font-weight: 600;
}

.cookie-categories {
  border-top: 1px solid #e9ecef;
  padding-top: 20px;
}

.cookie-category {
  padding: 15px 0;
  border-bottom: 1px solid #f8f9fa;
}

.cookie-category:last-child {
  border-bottom: none;
}

.cookie-category strong {
  color: var(--deep-black);
  font-weight: 500;
}

.cookie-category .text-muted {
  font-size: 0.875rem;
  margin-top: 4px;
}

.cookie-actions {
  border-top: 1px solid #e9ecef;
  padding-top: 20px;
}

.cookie-actions .btn {
  border-radius: 6px;
  font-weight: 500;
  padding: 8px 16px;
}

.cookie-actions .btn-success {
  background-color: var(--brand-red);
  border-color: var(--brand-red);
}

.cookie-actions .btn-success:hover {
  background-color: #b8101f;
  border-color: #b8101f;
}

/* Cookie Settings Button (reopener) */
.cookie-settings-btn {
  position: fixed;
  bottom: 100px;
  left: 20px;
  z-index: 9998;
  display: none;
}

.cookie-settings-btn.show {
  display: block;
}

.cookie-settings-btn .btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  padding: 0;
  font-size: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  background-color: white;
  border: 1px solid #ddd;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cookie-settings-btn .btn:hover {
  background-color: var(--light-gray);
  border-color: var(--brand-red);
  color: var(--brand-red);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Form switches styling */
.form-switch .form-check-input {
  width: 2.5rem;
  height: 1.25rem;
  cursor: pointer;
}

.form-switch .form-check-input:checked {
  background-color: var(--brand-red);
  border-color: var(--brand-red);
}

.form-switch .form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(213, 18, 36, 0.25);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .cookie-notice {
    padding: 20px 15px;
  }
  
  .cookie-content {
    padding: 0;
  }
  
  .cookie-category {
    padding: 12px 0;
  }
  
  .cookie-category .d-flex {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 10px;
  }
  
  .cookie-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .cookie-actions .btn {
    width: 100%;
  }
  
  .cookie-settings-btn {
    bottom: 110px;
    left: 15px;
  }
  
  .cookie-settings-btn .btn {
    width: 50px;
    height: 50px;
    font-size: 18px;
  }
}


/* ==========================================================================
   Service Boxes
   ========================================================================== */
.service-box {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #f1f1f1;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

@media (max-width: 768px) {
  .service-box {
    padding: 20px;
    margin-bottom: 20px;
  }
}

.service-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(213, 18, 36, 0.15);
  border-color: rgba(213, 18, 36, 0.2);
}

.service-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #D51224 0%, #ff4757 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.service-box:hover::before {
  transform: scaleX(1);
}

.service-box-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #D51224 0%, #ff4757 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .service-box-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
  }
}

.service-box-icon i {
  font-size: 24px;
  color: white;
}

.service-box:hover .service-box-icon {
  transform: scale(1.1) rotate(5deg);
}

.service-box-title {
  font-size: 18px;
  font-weight: 600;
  color: #000;
  margin-bottom: 15px;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .service-box-title {
    font-size: 16px;
    margin-bottom: 12px;
  }
}

.service-box-text {
  color: #666;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}


/* ==========================================================================
   Mobile Responsive Improvements
   ========================================================================== */

/* Navigation responsive adjustments */
@media (max-width: 991px) {
  .navbar-nav {
    text-align: center;
    margin-top: 15px;
  }
  
  .navbar-nav .nav-item {
    margin: 5px 0;
  }
  
  .d-flex.gap-2 {
    flex-direction: column;
    margin-top: 15px;
    gap: 10px !important;
  }
  
  .d-flex.gap-2 .btn {
    width: 100%;
  }
}

/* Section spacing for mobile */
@media (max-width: 768px) {
  .section-divider {
    margin: 2rem 0 !important;
  }
  
  .h3.fw-bold {
    font-size: 1.3rem;
  }
  
  .h4.fw-bold {
    font-size: 1.1rem;
  }
  
  .lead {
    font-size: 1rem;
  }
  
  /* Content padding adjustments */
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }
  
  /* Remove text stretching on mobile */
  p, .lead, .text-muted, .service-box-text, 
  .accordion-body, .blog-content, article {
    text-align: left !important;
    text-justify: none !important;
    hyphens: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  /* Keep KPI items centered */
  .kpi-item, .kpi-item * {
    text-align: center !important;
  }
  
  /* Blog content mobile optimization */
  .blog-hero {
    height: 40vh;
    min-height: 300px;
  }
  
  .blog-hero h1 {
    font-size: 2.2rem;
    line-height: 1.2;
    word-wrap: break-word;
    hyphens: auto;
  }
  
  .blog-hero .lead {
    font-size: 0.85rem;
    line-height: 1.3;
  }
  
  /* Accordion mobile styling */
  .accordion-button {
    font-size: 0.9rem;
    padding: 12px 15px;
  }
  
  .accordion-body {
    font-size: 0.85rem;
    padding: 15px;
  }
}

/* Small mobile devices */
@media (max-width: 576px) {
  .row.mb-5 > .col-lg-6 {
    margin-bottom: 1.5rem !important;
  }
  
  .service-box-text {
    font-size: 13px;
    line-height: 1.5;
  }
  
  .blog-hero {
    height: 35vh;
    min-height: 250px;
  }
  
  .blog-hero h1 {
    font-size: 1.8rem !important;
    line-height: 1.1 !important;
    margin-bottom: 0.5rem !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  
  .blog-hero .lead {
    font-size: 0.8rem;
    line-height: 1.2;
  }
  
  /* Contact widget mobile adjustments */
  .contact-widget .contact-toggle {
    width: 50px;
    height: 50px;
    font-size: 18px;
  }
  
  .contact-options {
    bottom: 70px;
    right: 15px;
    min-width: 200px;
  }
}

/* Tablet landscape adjustments */
@media (min-width: 768px) and (max-width: 1024px) {
  .service-box {
    padding: 25px;
  }
  
  .service-box-title {
    font-size: 17px;
  }
  
  .blog-hero h1 {
    font-size: 2.5rem;
  }
  
  .hero h1 {
    font-size: 3rem;
  }
}

/* Text readability improvements */
@media (max-width: 768px) {
  p {
    line-height: 1.6;
    margin-bottom: 1rem;
  }
  
  ul.list-unstyled li {
    margin-bottom: 8px;
    font-size: 14px;
  }
  
  /* Footer responsive adjustments */
  .footer-content {
    text-align: center;
  }
  
  .footer-content .row > div {
    margin-bottom: 20px;
  }
  
  .social-icons {
    justify-content: center !important;
    margin-top: 15px;
  }
}


/* Mobile button spacing fixes */
@media (max-width: 768px) {
  .hero .btn-group,
  .hero .d-flex {
    flex-direction: column;
    align-items: stretch;
  }
  
  .hero .btn {
    width: 100%;
    margin: 0.25rem 0;
  }
  
  .hero .gap-2 {
    gap: 0.5rem !important;
  }
  
  /* Mobile hero text optimization */
  .hero .position-absolute h3 {
    font-size: 1.5rem !important;
  }
}

/* Blog hero mobile button positioning */
@media (max-width: 576px) {
  .blog-hero .btn,
  .hero .btn {
    position: relative;
    z-index: 10;
    margin: 0.3rem 0;
  }
  
  .blog-hero .d-flex,
  .hero .d-flex {
    margin-top: 1rem;
  }
}

/* Ensure buttons dont overlap with background images on mobile */
@media (max-width: 768px) {
  .blog-hero::before,
  .hero::before {
    opacity: 0.8;
  }
  
  .blog-hero .container,
  .hero .container {
    position: relative;
    z-index: 5;
  }
}


/* Desktop hero section optimization */
@media (min-width: 992px) {
  .hero-section h1.display-2 {
    font-size: 3.5rem !important;
    line-height: 1.1 !important;
    max-width: 95%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}

/* Tablet optimization */
@media (min-width: 768px) and (max-width: 991px) {
  .hero-section h1.display-2 {
    font-size: 2.8rem !important;
    line-height: 1.1 !important;
    max-width: 90%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}

/* Additional hero section mobile fixes */
@media (max-width: 767px) {
  .hero-section h1.display-2 {
    font-size: 2.2rem !important;
    line-height: 1.2 !important;
    max-width: 90%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}

@media (max-width: 576px) {
  .hero-section h1.display-2 {
    font-size: 1.8rem !important;
    line-height: 1.2 !important;
    max-width: 90%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  .hero-section .text-white {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  .hero-section .container {
    padding: 0 15px;
  }
  
  .hero-section .col-lg-8 {
    padding: 0 10px;
  }
}

/* Medium mobile devices */
@media (max-width: 480px) {
  .hero-section h1.display-2 {
    font-size: 1.6rem !important;
    max-width: 85%;
  }
  
  .hero-section .lead {
    font-size: 0.75rem !important;
  }
}

/* Very small devices */
@media (max-width: 360px) {
  .hero-section h1.display-2 {
    font-size: 1.4rem !important;
    max-width: 80%;
  }
}


/* Mobile text optimization - no stretching */
@media (max-width: 768px) {
  /* Ensure all text elements use normal alignment */
  body, p, div, span, h1, h2, h3, h4, h5, h6,
  .container *, .row *, .col-* * {
    text-align: left !important;
    text-justify: none !important;
  }
  
  /* Override any justified text */
  .text-justify {
    text-align: left !important;
  }
  
  /* Specific mobile text fixes */
  .hero p, .hero .lead,
  .blog-hero p, .blog-hero .lead,
  .service-box p, .service-box .text,
  .footer p, .footer div {
    text-align: left !important;
    line-height: 1.5;
  }
  
  /* Center only specific elements that should be centered */
  .text-center, .kpi-item, .social-icons,
  .btn-group, .text-md-center {
    text-align: center !important;
  }
  
  /* Improve readability */
  .container, .container-fluid {
    line-height: 1.6;
  }
}

/* Very small mobile devices - extra text optimization */
@media (max-width: 576px) {
  /* Ensure optimal reading on small screens */
  p, .lead, .service-box-text {
    font-size: 14px !important;
    line-height: 1.6 !important;
    text-align: left !important;
    margin-bottom: 1rem;
  }
  
  /* Prevent text from being too wide */
  .container {
    max-width: 100%;
    padding: 0 15px;
  }
  
  /* Better spacing for small screens */
  .row {
    margin: 0 -10px;
  }
  
  .col-12, [class*="col-"] {
    padding: 0 10px;
  }
}

/* Desktop hero text optimization for service pages */
@media (min-width: 992px) {
  .blog-hero h1 {
    font-size: 3.5rem !important;
    line-height: 1.1 !important;
    max-width: 95% !important;
  }
}

/* Tablet hero text optimization */
@media (min-width: 768px) and (max-width: 991px) {
  .blog-hero h1 {
    font-size: 2.8rem !important;
    line-height: 1.1 !important;
    max-width: 90% !important;
  }
}
