/* ===== VARIABLES CSS ===== */
:root {
    --sfe-orange: #ff6b35;
    --sfe-orange-dark: #ff6b35;
    --sfe-dark: #000000;
    --sfe-gray: #2c2c2c;
    --sfe-dark-gray: #1a1a1a;
    --sfe-light-gray: #404040;
    --sfe-bg-primary: #0f0f0f;
    --sfe-bg-secondary: #1e1e1e;
    --sfe-text-primary: #ffffff;
    --sfe-text-secondary: #e0e0e0;
}

/* ===== RESET Y BASE ===== */
.text-orange {
    color: var(--sfe-orange) !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", sans-serif;
    line-height: 1.6;
    color: var(--sfe-text-primary);
    background: linear-gradient(135deg, var(--sfe-bg-primary) 0%, var(--sfe-dark) 100%);
    min-height: 100vh;
}

/* ===== CLASES DE FONDO ===== */
.bg-gray {
    background: linear-gradient(135deg, #3a3a3a 0%, #4a4a4a 100%) !important;
}

.bg-dark-gray {
    background: linear-gradient(135deg, var(--sfe-bg-secondary) 0%, #2a2a2a 100%) !important;
}

.bg-orange {
    background: linear-gradient(135deg, var(--sfe-orange) 0%, var(--sfe-orange-dark) 100%) !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 ===== */
.hero-services {
    background: linear-gradient(135deg, var(--sfe-bg-primary) 0%, var(--sfe-dark) 50%, var(--sfe-gray) 100%);
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-services::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(255, 107, 53, 0.1) 0%, transparent 50%);
    z-index: 1;
}

.hero-services .container {
    position: relative;
    z-index: 2;
}

.hero-services h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-services .lead {
    color: var(--sfe-text-secondary);
}

/* ===== TARJETAS DE SERVICIOS ===== */
.service-card {
    transition: all 0.4s ease;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--sfe-gray) 0%, var(--sfe-light-gray) 100%);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.service-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;
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(255, 107, 53, 0.3);
    border-color: var(--sfe-orange);
    background: linear-gradient(135deg, var(--sfe-light-gray) 0%, var(--sfe-gray) 100%);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--sfe-orange) 0%, var(--sfe-orange-dark) 100%);
    color: var(--sfe-dark);
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.4);
}

.service-card:hover .service-icon {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 15px 30px rgba(255, 107, 53, 0.6);
}

/* ===== GALERÍA DE SERVICIOS ===== */
.service-gallery {
    margin-top: 1rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.gallery-item:hover {
    transform: scale(1.05);
    border-color: var(--sfe-orange);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

.gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.gallery-item:hover img {
    filter: brightness(0.7);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 107, 53, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-overlay i {
    color: white;
    font-size: 1.5rem;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* ===== IMAGE MODAL ===== */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.image-modal.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.modal-content-img {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(255, 107, 53, 0.3);
    animation: zoomIn 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000;
}

.modal-close:hover {
    color: var(--sfe-orange);
    transform: rotate(90deg);
}

.modal-caption {
    color: white;
    text-align: center;
    padding: 15px 20px;
    font-size: 1.1rem;
    margin-top: 15px;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== BOTONES ===== */
.btn-orange {
    background: linear-gradient(135deg, var(--sfe-orange) 0%, var(--sfe-orange-dark) 100%) !important;
    border: none !important;
    color: white !important;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
    padding: 12px 24px;
    border-radius: 8px;
}

.btn-orange::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-orange:hover::before {
    left: 100%;
}

.btn-orange:hover {
    background: linear-gradient(135deg, var(--sfe-orange-dark) 0%, #d04a1f 100%) !important;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255, 107, 53, 0.6);
    color: white !important;
}

.btn-outline-orange {
    color: var(--sfe-orange) !important;
    border: 2px solid var(--sfe-orange) !important;
    font-weight: 700;
    transition: all 0.3s ease;
    background: transparent !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-outline-orange:hover {
    background: linear-gradient(135deg, var(--sfe-orange) 0%, var(--sfe-orange-dark) 100%) !important;
    border-color: var(--sfe-orange) !important;
    color: white !important;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255, 107, 53, 0.4);
}

/* ===== TEXTO Y CONTENIDO ===== */
.service-card h2 {
    color: var(--sfe-text-primary);
    transition: color 0.3s ease;
}

.service-card:hover h2 {
    color: var(--sfe-orange);
    text-shadow: 0 0 10px rgba(255, 107, 53, 0.3);
}

.service-card h5 {
    color: var(--sfe-orange);
    font-weight: 600;
}

.service-card p {
    color: var(--sfe-text-secondary);
}

.service-card ul li {
    color: var(--sfe-text-secondary);
    transition: all 0.2s ease;
}

.service-card:hover ul li {
    transform: translateX(8px);
    color: var(--sfe-text-primary);
}

.service-card .fas.fa-check {
    color: var(--sfe-orange);
    filter: drop-shadow(0 0 3px rgba(255, 107, 53, 0.5));
}

/* ===== SECCIÓN CTA ===== */
.bg-orange h2,
.bg-orange p {
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.bg-orange .btn-dark {
    background: linear-gradient(135deg, var(--sfe-dark) 0%, var(--sfe-bg-primary) 100%) !important;
    border: none !important;
    color: var(--sfe-orange) !important;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bg-orange .btn-dark:hover {
    background: linear-gradient(135deg, var(--sfe-bg-primary) 0%, var(--sfe-dark) 100%) !important;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    color: var(--sfe-orange) !important;
}

.bg-orange .btn-outline-light {
    color: white !important;
    border: 2px solid white !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: transparent !important;
}

.bg-orange .btn-outline-light:hover {
    background: white !important;
    color: var(--sfe-orange) !important;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255, 255, 255, 0.3);
}

/* ===== FOOTER ===== */
footer {
    background: linear-gradient(135deg, var(--sfe-bg-primary) 0%, var(--sfe-dark) 100%) !important;
    border-top: 2px solid var(--sfe-orange);
}

footer h5,
footer h6 {
    color: var(--sfe-orange) !important;
}

footer p,
footer span {
    color: var(--sfe-text-secondary) !important;
}

footer a {
    color: var(--sfe-text-secondary) !important;
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--sfe-orange) !important;
    text-shadow: 0 0 5px rgba(255, 107, 53, 0.5);
    transform: translateX(3px);
}

footer .fas {
    color: var(--sfe-orange) !important;
}

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 107, 53, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 107, 53, 0.6);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

.glow-effect {
    animation: glow 2s ease-in-out infinite;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .hero-services {
        padding: 100px 0 60px;
    }
    
    .service-card {
        margin-bottom: 2rem;
        padding: 1.5rem !important;
    }

    .service-icon {
        width: 60px;
        height: 60px;
    }

    .service-icon i {
        font-size: 1.5rem !important;
    }

    .gallery-item img {
        height: 120px;
    }

    .modal-content-img {
        max-width: 95%;
        max-height: 70vh;
    }
}

@media (max-width: 576px) {
    .hero-services {
        padding: 90px 0 50px;
    }

    .hero-services h1 {
        font-size: 2.2rem !important;
    }

    .service-card {
        padding: 1.2rem !important;
    }

    .gallery-item img {
        height: 100px;
    }

    .btn-orange {
        font-size: 0.9rem;
        padding: 10px 18px;
    }
}

/* ===== SMOOTH SCROLLING ===== */
html {
    scroll-behavior: smooth;
}

/* ===== SCROLLBAR PERSONALIZADA ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--sfe-bg-primary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--sfe-orange), var(--sfe-orange-dark));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--sfe-orange-dark), #d04a1f);
}

/* ===== EFECTOS DE LOADING ===== */
.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.service-card.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* ===== NAVBAR SCROLL EFFECT ===== */
.navbar {
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(15, 15, 15, 0.98) !important;
    backdrop-filter: blur(15px);
    box-shadow: 0 2px 20px rgba(255, 107, 53, 0.2);
}

/* ===== UTILIDADES ADICIONALES ===== */
.text-gradient {
    background: linear-gradient(135deg, var(--sfe-orange), var(--sfe-orange-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(135deg, var(--sfe-orange), var(--sfe-orange-dark)) 1;
}

.shadow-primary {
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.3);
}

.shadow-primary-lg {
    box-shadow: 0 20px 50px rgba(255, 107, 53, 0.4);
}

/* ===== EFECTOS ESPECIALES ===== */
.service-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 60%, rgba(255, 107, 53, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.service-card:hover::after {
    opacity: 1;
}

/* ===== MEJORAS DE ACCESIBILIDAD ===== */
.btn:focus,
.service-card:focus,
.gallery-item:focus {
    outline: 2px solid var(--sfe-orange);
    outline-offset: 2px;
}

/* ===== EFECTOS DE PARTÍCULAS ===== */
.hero-services::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, var(--sfe-orange), transparent),
        radial-gradient(2px 2px at 40px 70px, var(--sfe-orange-dark), transparent),
        radial-gradient(1px 1px at 90px 40px, var(--sfe-orange), transparent),
        radial-gradient(1px 1px at 130px 80px, var(--sfe-orange-dark), transparent);
    background-repeat: repeat;
    background-size: 200px 200px;
    opacity: 0.1;
    animation: float 20s ease-in-out infinite;
    z-index: 1;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* =================================== */
/* 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: var(--lm-bg-primary) !important;
  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.scrolled {
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow: 0 2px 20px rgba(255, 107, 53, 0.15);
}

.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;
}

/* HERO SECTION - Keep dark for visual impact */
.light-mode .hero-services {
  /* Keep hero section dark for visual contrast */
}

.light-mode .hero-services .text-white {
  color: #ffffff !important;
}

.light-mode .hero-services .text-light {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* SERVICES SECTION - Light Mode */
.light-mode .bg-dark-gray {
  background: var(--lm-bg-secondary) !important;
}

.light-mode #servicios-detallados {
  background: var(--lm-bg-secondary) !important;
}

/* SERVICE CARDS - Light Mode */
.light-mode .service-card {
  background: linear-gradient(135deg, var(--lm-bg-card) 0%, var(--lm-bg-secondary) 100%) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--lm-border) !important;
}

.light-mode .service-card::before {
  background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.05), transparent);
}

.light-mode .service-card:hover {
  box-shadow: 0 20px 40px rgba(255, 107, 53, 0.15);
  border-color: var(--sfe-orange) !important;
  background: linear-gradient(135deg, var(--lm-bg-secondary) 0%, var(--lm-bg-card) 100%) !important;
}

.light-mode .service-card h2 {
  color: var(--lm-text-primary) !important;
}

.light-mode .service-card:hover h2 {
  color: var(--sfe-orange) !important;
}

.light-mode .service-card p {
  color: var(--lm-text-secondary) !important;
}

.light-mode .service-card ul li {
  color: var(--lm-text-secondary) !important;
}

.light-mode .service-card:hover ul li {
  color: var(--lm-text-primary) !important;
}

.light-mode .service-card .text-light {
  color: var(--lm-text-secondary) !important;
}

.light-mode .service-card .text-white {
  color: var(--lm-text-primary) !important;
}

/* GALLERY ITEMS - Light Mode */
.light-mode .gallery-item {
  border: 1px solid var(--lm-border);
}

.light-mode .gallery-item:hover {
  border-color: var(--sfe-orange);
  box-shadow: 0 8px 25px rgba(255, 107, 53, 0.2);
}

/* IMAGE MODAL - Keep dark for better image viewing */
.light-mode .image-modal {
  background-color: rgba(0, 0, 0, 0.95);
}

/* CTA SECTION - Keep orange branding */
.light-mode .bg-orange {
  /* Keep the orange branding section unchanged */
}

/* FOOTER - Light Mode */
.light-mode footer {
  background: linear-gradient(135deg, var(--lm-bg-tertiary) 0%, var(--lm-bg-secondary) 100%) !important;
  border-top: 2px solid var(--sfe-orange);
}

.light-mode footer h5,
.light-mode footer h6 {
  color: var(--sfe-orange) !important;
}

.light-mode footer p,
.light-mode footer span {
  color: var(--lm-text-secondary) !important;
}

.light-mode footer a {
  color: var(--lm-text-secondary) !important;
}

.light-mode footer a:hover {
  color: var(--sfe-orange) !important;
}

.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 hr {
  border-color: var(--lm-border) !important;
}

.light-mode footer .fas {
  color: var(--sfe-orange) !important;
}

/* Border adjustments for light mode */
.light-mode .border-secondary {
  border-color: var(--lm-border) !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,
.service-card,
.bg-dark-gray,
footer,
.gallery-item {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
