:root {
  --sfe-orange: #ff6b35;
  --sfe-dark: #000000;
  --sfe-gray: #2c2c2c;
  --sfe-dark-gray: #1a1a1a;
  --sfe-light-gray: #404040;
}

/* Override Bootstrap's text-warning to use our custom orange */
.text-warning {
  color: var(--sfe-orange) !important;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: #fff;
  background-color: var(--sfe-dark);
}

/* Custom Background Classes */
.bg-gray {
  background-color: var(--sfe-gray) !important;
}

.bg-dark-gray {
  background-color: var(--sfe-dark-gray) !important;
}

/* Navigation */
.navbar-brand {
  font-size: 1.2rem;
}

.navbar-nav .nav-link {
  font-weight: 500;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--sfe-orange) !important;
}


/* Hero Section - IMAGEN SE DEFINE EN EL HTML */
.hero-section {
  position: relative;
  overflow: hidden;
  min-height: 60vh;
  padding-top: 80px; /* Compensar el navbar fijo */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Imagen de fondo del hero */
.hero-background-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Overlay oscuro para legibilidad del texto */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

/* Contenido del hero centrado */
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.fade-in-title {
  animation: fadeInUp 1s ease-out;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.fade-in-subtitle {
  animation: fadeInUp 1s ease-out 0.3s both;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.fade-in-breadcrumb {
  animation: fadeInUp 1s ease-out 0.6s both;
}

/* Section Titles */
.section-title {
  animation: fadeInUp 0.8s ease-out;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--sfe-orange), #e55a2b);
  border-radius: 2px;
}

.section-description {
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.breadcrumb {
  background: none;
  padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  color: var(--primary-color);
}

/* Specialty Cards */
.specialty-card {
  transition: all 0.4s ease;
  border-radius: 15px;
  background-color: var(--sfe-gray) !important;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.specialty-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.1), transparent);
  transition: left 0.6s ease;
}

.specialty-card:hover::before {
  left: 100%;
}

.specialty-card:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: 0 20px 40px rgba(255, 107, 53, 0.3);
  border: 2px solid var(--sfe-orange);
}

.specialty-icon {
  transition: all 0.4s ease;
}

.specialty-card:hover .specialty-icon {
  transform: scale(1.2) rotate(5deg);
  color: var(--sfe-orange) !important;
  text-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
}

/* Process Steps */
.process-title {
  animation: fadeInUp 0.8s ease-out;
  margin-bottom: 3rem !important;
}

.process-step {
  transition: all 0.4s ease;
  cursor: pointer;
  position: relative;
}

.process-step:hover {
  transform: translateY(-10px);
}

.step-number {
  transition: all 0.4s ease;
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.process-step:hover .step-number {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(255, 107, 53, 0.5);
  background: linear-gradient(135deg, var(--sfe-orange), #e55a2b) !important;
}

/* Process Step Animation on Scroll */
.process-step[data-step="1"] {
  animation: slideInLeft 0.8s ease-out;
}

.process-step[data-step="2"] {
  animation: slideInLeft 0.8s ease-out 0.2s both;
}

.process-step[data-step="3"] {
  animation: slideInLeft 0.8s ease-out 0.4s both;
}

.process-step[data-step="4"] {
  animation: slideInLeft 0.8s ease-out 0.6s both;
}

/* Technology Cards */
.tech-title {
  animation: fadeInUp 0.8s ease-out;
}

.tech-card {
  transition: all 0.4s ease;
  border-radius: 15px;
  background-color: var(--sfe-gray) !important;
  position: relative;
  overflow: hidden;
}

.tech-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.1) 0%, transparent 70%);
  transform: scale(0);
  transition: transform 0.6s ease;
}

.tech-card:hover::before {
  transform: scale(1);
}

.tech-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(255, 107, 53, 0.2);
  border: 1px solid rgba(255, 107, 53, 0.3);
}

.tech-item {
  transition: all 0.3s ease;
  padding: 2px 0;
}

.tech-item:hover {
  transform: translateX(10px);
  color: var(--sfe-orange) !important;
}

/* CTA Section */
.cta-section {
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--sfe-orange), #e55a2b);
  opacity: 0.95;
}

.cta-section .container {
  position: relative;
  z-index: 2;
}

.cta-title {
  animation: bounceIn 1s ease-out;
}

.cta-description {
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.cta-buttons {
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.cta-btn-primary,
.cta-btn-secondary {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.cta-btn-primary::before,
.cta-btn-secondary::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.4s ease;
}

.cta-btn-primary:hover::before,
.cta-btn-secondary:hover::before {
  width: 300px;
  height: 300px;
}

.cta-btn-primary:hover,
.cta-btn-secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Buttons */
.btn-warning {
  background-color: var(--sfe-orange) !important;
  border-color: var(--sfe-orange) !important;
  color: white !important;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-warning:hover {
  background-color: #e55a2b !important;
  border-color: #e55a2b !important;
  color: white !important;
  transform: translateY(-2px);
}

.btn-outline-warning {
  color: var(--sfe-orange) !important;
  border-color: var(--sfe-orange) !important;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-outline-warning:hover {
  background-color: var(--sfe-orange) !important;
  border-color: var(--sfe-orange) !important;
  color: white !important;
  transform: translateY(-2px);
}

/* Footer */
footer a:hover {
  color: var(--sfe-orange) !important;
  transition: color 0.3s ease;
}

footer .navbar-brand {
  font-size: 1.2rem;
}

footer .navbar-brand span {
  color: var(--sfe-orange);
}

/* Breadcrumb */
.breadcrumb-item a {
  text-decoration: none;
  transition: all 0.3s ease;
}

.breadcrumb-item a:hover {
  text-decoration: underline;
  color: #e55a2b !important;
}

/* Form Controls */
.form-control:focus {
  border-color: var(--sfe-orange);
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
  background-color: var(--sfe-gray) !important;
  color: #fff !important;
}

.form-control,
.form-select {
  background-color: var(--sfe-gray) !important;
  color: #fff !important;
  border-color: #6c757d !important;
}

.form-control::placeholder {
  color: #adb5bd !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .fade-in-title {
    font-size: 2.5rem;
  }

  .specialty-card {
    margin-bottom: 2rem;
  }

  .process-step {
    margin-bottom: 2rem;
  }

  .tech-card {
    margin-bottom: 2rem;
  }


}

@media (max-width: 576px) {
  .fade-in-title {
    font-size: 2rem;
  }

  .display-5 {
    font-size: 2rem;
  }

  .navbar-brand span {
    font-size: 1rem;
  }


}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--sfe-dark-gray);
}

::-webkit-scrollbar-thumb {
  background: var(--sfe-orange);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #e55a2b;
}

/* Text Color Overrides */
.text-muted {
  color: #adb5bd !important;
}

/* Newsletter */
.newsletter .input-group .form-control:focus {
  border-color: var(--sfe-orange);
  box-shadow: none;
}

.newsletter .btn-warning:hover {
  transform: none;
}

/* =================================== */
/* THEME TOGGLE BUTTON */
/* =================================== */

.theme-toggle-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--sfe-orange);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s ease;
  overflow: hidden;
}

.theme-toggle-btn:hover {
  background: rgba(255, 107, 53, 0.15);
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 107, 53, 0.3);
}

.theme-toggle-btn:active {
  transform: scale(0.95);
}

.theme-toggle-btn .theme-icon-light,
.theme-toggle-btn .theme-icon-dark {
  position: absolute;
  font-size: 1.2rem;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Dark mode: show sun icon (to switch to light) */
.dark-mode .theme-toggle-btn .theme-icon-light {
  opacity: 1;
  transform: rotate(0deg) scale(1);
  color: var(--sfe-orange);
}

.dark-mode .theme-toggle-btn .theme-icon-dark {
  opacity: 0;
  transform: rotate(-180deg) scale(0);
}

/* Light mode: show moon icon (to switch to dark) */
.light-mode .theme-toggle-btn .theme-icon-light {
  opacity: 0;
  transform: rotate(180deg) scale(0);
}

.light-mode .theme-toggle-btn .theme-icon-dark {
  opacity: 1;
  transform: rotate(0deg) scale(1);
  color: var(--sfe-orange);
}

/* =================================== */
/* LIGHT MODE STYLES */
/* =================================== */

/* Light mode variables */
.light-mode {
  --lm-bg-primary: #ffffff;
  --lm-bg-secondary: #f8f9fa;
  --lm-bg-tertiary: #e9ecef;
  --lm-bg-card: #ffffff;
  --lm-text-primary: #1a1a1a;
  --lm-text-secondary: #4a4a4a;
  --lm-text-muted: #6c757d;
  --lm-border: #dee2e6;
}

/* Body styles for light mode */
.light-mode {
  background-color: var(--lm-bg-primary);
  color: var(--lm-text-primary);
}

/* NAVBAR - Light Mode */
.light-mode .navbar {
  background-color: var(--lm-bg-primary) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.light-mode .navbar-nav .nav-link {
  color: var(--lm-text-primary) !important;
}

.light-mode .navbar-nav .nav-link:hover,
.light-mode .navbar-nav .nav-link.active {
  color: var(--sfe-orange) !important;
}

.light-mode .brand-text-white {
  color: var(--lm-text-primary) !important;
}

.light-mode .navbar-toggler {
  border-color: var(--lm-text-secondary);
}

.light-mode .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(26, 26, 26, 0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Dark mode navbar brand text */
.dark-mode .brand-text-white {
  color: #ffffff !important;
}

/* MAIN CONTENT SECTION - Light Mode */
.light-mode .bg-dark-gray {
  background-color: var(--lm-bg-secondary) !important;
}

.light-mode .bg-dark-gray h2.text-white,
.light-mode .bg-dark-gray .section-title.text-white {
  color: var(--lm-text-primary) !important;
}

.light-mode .bg-dark-gray .lead.text-light,
.light-mode .bg-dark-gray .section-description {
  color: var(--lm-text-secondary) !important;
}

/* SPECIALTY CARDS - Light Mode */
.light-mode .specialty-card,
.light-mode .bg-gray {
  background-color: var(--lm-bg-card) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--lm-border) !important;
}

.light-mode .specialty-card:hover {
  box-shadow: 0 15px 35px rgba(255, 107, 53, 0.15);
  border: 2px solid var(--sfe-orange) !important;
}

.light-mode .specialty-card h4.text-white,
.light-mode .specialty-card .fw-bold.text-white {
  color: var(--lm-text-primary) !important;
}

.light-mode .specialty-card .text-light,
.light-mode .specialty-card p.text-light {
  color: var(--lm-text-secondary) !important;
}

/* PROCESS STEPS - Light Mode */
.light-mode .process-title.text-white {
  color: var(--lm-text-primary) !important;
}

.light-mode .process-step h5.text-white {
  color: var(--lm-text-primary) !important;
}

.light-mode .process-step .text-light {
  color: var(--lm-text-secondary) !important;
}

/* TECH CARDS - Light Mode */
.light-mode .tech-title.text-white {
  color: var(--lm-text-primary) !important;
}

.light-mode .tech-card {
  background-color: var(--lm-bg-card) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--lm-border) !important;
}

.light-mode .tech-card:hover {
  box-shadow: 0 15px 35px rgba(255, 107, 53, 0.15);
}

.light-mode .tech-card h5.text-warning {
  color: var(--sfe-orange) !important;
}

.light-mode .tech-card .text-light,
.light-mode .tech-item {
  color: var(--lm-text-secondary) !important;
}

.light-mode .tech-item:hover {
  color: var(--sfe-orange) !important;
}

/* CTA SECTION - Stays with brand colors */
.light-mode .cta-section {
  /* Keep the orange branding */
}

/* FOOTER - Light Mode */
.light-mode footer,
.light-mode footer.bg-black {
  background-color: var(--lm-bg-tertiary) !important;
}

.light-mode footer .text-white,
.light-mode footer .text-light {
  color: var(--lm-text-primary) !important;
}

.light-mode footer .text-muted {
  color: var(--lm-text-muted) !important;
}

.light-mode footer h5.text-warning,
.light-mode footer h6.text-warning {
  color: var(--sfe-orange) !important;
}

.light-mode footer a.text-light {
  color: var(--lm-text-primary) !important;
}

.light-mode footer a.text-light:hover,
.light-mode footer a.text-muted:hover {
  color: var(--sfe-orange) !important;
}

.light-mode footer hr {
  border-color: var(--lm-border) !important;
}

.light-mode footer .social-section a {
  color: var(--lm-text-primary) !important;
}

.light-mode footer .social-section a:hover {
  color: var(--sfe-orange) !important;
}

/* BUTTONS - Light Mode adjustments */
.light-mode .btn-outline-warning {
  color: var(--sfe-orange) !important;
  border-color: var(--sfe-orange) !important;
  background-color: transparent !important;
}

.light-mode .btn-outline-warning:hover {
  background-color: var(--sfe-orange) !important;
  color: white !important;
}

/* MODAL - Light Mode */
.light-mode .modal-content.bg-gray {
  background-color: var(--lm-bg-card) !important;
  border: 1px solid var(--lm-border);
}

.light-mode .modal-content .text-light {
  color: var(--lm-text-secondary) !important;
}

.light-mode .modal-header.border-secondary,
.light-mode .modal-footer.border-secondary {
  border-color: var(--lm-border) !important;
}

/* Ensure hero section stays unchanged */
.light-mode .hero-section,
.light-mode .hero-section * {
  /* Hero section maintains its dark appearance with the image */
}

.light-mode .hero-section .text-white,
.light-mode .hero-section .fade-in-title {
  color: #ffffff !important;
}

.light-mode .hero-section .text-light,
.light-mode .hero-section .fade-in-subtitle {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* Responsive adjustments for theme toggle */
@media (max-width: 991px) {
  .theme-toggle-btn {
    margin-top: 10px;
    margin-bottom: 10px;
  }
}

@media (max-width: 768px) {
  .theme-toggle-btn {
    width: 40px;
    height: 40px;
  }
  
  .theme-toggle-btn .theme-icon-light,
  .theme-toggle-btn .theme-icon-dark {
    font-size: 1rem;
  }
}

/* Smooth transitions for theme change */
body,
.navbar,
.specialty-card,
.tech-card,
.bg-dark-gray,
footer,
.form-control,
.form-select,
.modal-content {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
