:root {
    --primary-color: #F57C00;      /* naranjo coral */
    --primary-dark: #E66A00;       /* naranjo profundo */
    --secondary-color: #424242;    /* gris grafito */
    --accent-color: #F57C00;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;

    --text-dark: #222222;
    --text-light: #424242;
    --text-lighter: #6f6f6f;

    --bg-light: #f4f4f4;
    --bg-white: #ffffff;
    --border-color: #d6d6d6;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);

    --transition-base: all 0.3s ease;
    --transition-fast: all 0.15s ease;
}

[data-theme="dark"] {
    --primary-color: #F57C00;
    --primary-dark: #E66A00;
    --text-dark: #222222;
    --text-light: #424242;
    --text-lighter: #6f6f6f;
    --bg-light: #f4f4f4;
    --bg-white: #ffffff;
    --border-color: #d6d6d6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] body {
    background-color: var(--bg-white);
}

.navbar {
    background-color: var(--bg-white) !important;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    transition: var(--transition-base);
}

[data-theme="dark"] .navbar {
    background-color: var(--bg-white) !important;
}

.navbar-brand {
    font-size: 1.25rem;
    color: var(--text-dark);
    transition: var(--transition-fast);
}

.navbar-brand:hover {
    color: var(--primary-color);
}

.nav-link {
    color: var(--text-light);
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: var(--transition-fast);
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition-base);
    transform: translateX(-50%);
}

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

.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;

    /* Color que se muestra mientras carga la imagen */
    background-color: #1c1c1c;

    /* Placeholder (no incluye la foto todavía) */
    background-image: linear-gradient(
        rgba(0, 0, 0, 0.5),
        rgba(0, 0, 0, 0.5)
    );

    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding-top: 80px;
}

/* Se aplica cuando la imagen ya está cargada */
.hero-loaded {
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
        url('/images/inicio/contratistas.webp') !important;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(245, 124, 0, 0.2) 0%, rgba(15, 23, 42, 0.8) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.page-header {
    padding: 8rem 0 4rem;
    background-color: #424242 !important; /* Gris grafito real */
    color: #ffffff !important;
    border-bottom: 1px solid #333333;
}

.page-header h1,
.page-header p {
    color: #ffffff !important;
}

[data-theme="dark"] .page-header {
    background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-light) 100%);
}

.feature-card {
    background: var(--bg-white);
    border-radius: 12px;
    transition: var(--transition-base);
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(245, 124, 0, 0.1) 0%, rgba(245, 124, 0, 0.05) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/images/inicio/contratistas.webp');
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    z-index: 0;
}

.cta-section .container {
    position: relative;
    z-index: 1;
}

.contact-form-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.form-control,
.form-select {
    border: 2px solid var(--border-color);
    padding: 0.75rem 1rem;
    transition: var(--transition-fast);
    background-color: var(--bg-white);
    color: var(--text-dark);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(245, 124, 0, 0.15);
    background-color: var(--bg-white);
    color: var(--text-dark);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: var(--transition-fast);
    border-radius: 8px;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    transition: var(--transition-fast);
    border-radius: 8px;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}
.footer {
    background-color: #1e293b;
    color: #cbd5e1;
}

.footer h5 {
    color: #f1f5f9;
}

.footer-contact li {
    display: flex;
    align-items: center;
    color: #cbd5e1;
}

.footer a {
    color: #cbd5e1;
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer a:hover {
    color: var(--primary-color);
}

.about-image-wrapper img {
    border-radius: 12px;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.mission-card {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
}

.mission-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.value-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
}

.value-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.advantage-item {
    position: relative;
    padding-left: 4rem;
}

.advantage-number {
    position: absolute;
    left: 0;
    top: 0;
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

.service-detail-card {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.service-list {
    list-style: none;
    padding-left: 0;
}

.service-list li {
    padding: 0.5rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--text-light);
}

.service-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
}

.process-step {
    position: relative;
    padding: 2rem;
    background: var(--bg-white);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
}

.process-step:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.process-number {
    position: absolute;
    top: -1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
}

.gallery-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
}

.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.gallery-image {
    position: relative;
    overflow: hidden;
    height: 280px;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-card:hover .gallery-image img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: var(--transition-base);
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-content {
    width: 100%;
    transform: translateY(20px);
    transition: var(--transition-base);
}

.gallery-card:hover .gallery-content {
    transform: translateY(0);
}

.filter-buttons {
    margin-bottom: 3rem;
}

.btn-filter {
    background: var(--bg-white);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
    padding: 0.5rem 1.5rem;
    margin: 0.25rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition-fast);
}

.btn-filter:hover,
.btn-filter.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.stats-row {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.stat-item {
    flex: 1;
    min-width: 150px;
}

.contact-form-wrapper,
.contact-info-wrapper {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.contact-info-item {
    padding-bottom: 1.5rem;
}

.contact-info-icon {
    flex-shrink: 0;
}

.map-wrapper {
    border-radius: 0;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.info-box {
    background: var(--bg-white);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
}

.info-box:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.py-lg-7 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

@media (min-width: 992px) {
    .py-lg-7 {
        padding-top: 7rem;
        padding-bottom: 7rem;
    }
}

.theme-icon {
    transition: var(--transition-fast);
}

#themeToggle:hover .theme-icon {
    transform: rotate(20deg);
}

.gallery-item {
    transition: var(--transition-base);
}

.gallery-item.hidden {
    display: none;
}

.text-primary {
    color: var(--primary-color) !important;
}

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

[data-theme="dark"] .bg-light {
    background-color: var(--bg-light) !important;
}

[data-theme="dark"] .text-muted {
    color: var(--text-light) !important;
}

[data-theme="dark"] .border {
    border-color: var(--border-color) !important;
}

.text-light-emphasis {
    color: var(--text-lighter) !important;
}

img {
    max-width: 100%;
    height: auto;
}
@media (max-width: 991px) {
    .hero-section {
        min-height: 80vh;
        padding-top: 100px;
    }

    .page-header {
        padding: 6rem 0 3rem;
    }

    .navbar-collapse {
        background: var(--bg-white);
        padding: 1rem;
        border-radius: 8px;
        margin-top: 1rem;
        border: 1px solid var(--border-color);
    }

    .nav-link::after {
        display: none;
    }

    .stats-row {
        gap: 1rem;
    }

    .stat-item {
        min-width: 100%;
    }
}

@media (max-width: 575px) {
    .display-3 {
        font-size: 2rem;
    }

    .display-4 {
        font-size: 1.75rem;
    }

    .display-5 {
        font-size: 1.5rem;
    }

    .lead {
        font-size: 1rem;
    }
}

/* ================================
   💬 BOTÓN FLOTANTE DE WHATSAPP
   Versión con globito de mensaje
=================================== */

/* 📦 Contenedor del botón + mensaje */
.whatsapp-container {
  position: fixed;
  bottom: 25px;
  right: 25px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 999;
}

/* 💭 Globito de texto */
.whatsapp-bubble {
  background-color: #ffffff;
  color: #333333;
  padding: 8px 14px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  font-size: 15px;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.4s ease;
  pointer-events: none;
  white-space: nowrap;
}

/* 🟢 Botón circular */
.btn-wsp {
  background-color: #25d366;
  color: #ffffff;
  font-size: 26px;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease-in-out;
}

.btn-wsp:hover {
  transform: scale(1.1);
}

/* ✨ Mostrar burbuja */
.whatsapp-container:hover .whatsapp-bubble {
  opacity: 1;
  transform: translateX(0);
}

/* 💡 Pulso */
.animated-wsp {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* ===============================
   🎨 MODALES
================================= */

.modal-content {
  background-color: #ffffff !important;
  color: var(--text-dark) !important;
  border-radius: 12px;
  border: 3px solid var(--primary-dark);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-content h3,
.modal-content h4,
.modal-content h5 {
  color: var(--primary-dark) !important;
  font-weight: 700;
}

.modal-content p,
.modal-content li {
  color: var(--text-dark) !important;
}

.modal-content .text-muted {
  color: var(--text-light) !important;
}

.modal-content .btn-close {
  filter: invert(0.4);
  transition: 0.2s ease;
}

.modal-content .btn-close:hover {
  filter: invert(0);
}

.modal-content {
  border-radius: 16px;
  box-shadow: 0 0 15px rgba(66, 66, 66, 0.3); /* gris grafito suave */
}

/* =====================================
   🎨 Info Boxes modo claro/oscuro
===================================== */

.info-box {
  border-radius: 12px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  padding: 2rem;
  transition: all 0.3s ease;
  background-color: var(--bg-white);
  color: var(--text-dark);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.info-icon svg {
  color: var(--primary-color);
  stroke: var(--primary-color);
  transition: transform 0.3s ease, color 0.3s ease;
}

.info-box h4 {
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.info-box p {
  color: var(--text-light);
  margin-bottom: 0;
}

.info-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 18px rgba(66, 66, 66, 0.15); /* sombreado grafito */
}

.info-box:hover .info-icon svg {
  transform: scale(1.1);
}

/* 🌙 Modo oscuro */
[data-theme="dark"] .info-box {
  background-color: var(--bg-white);
  color: var(--text-light);
  border-color: var(--border-color);
  box-shadow: 0 4px 10px rgba(66, 66, 66, 0.5);
}

[data-theme="dark"] .info-box h4 {
  color: var(--text-dark);
}

[data-theme="dark"] .info-box p {
  color: var(--text-light);
}

[data-theme="dark"] .info-icon svg {
  color: var(--primary-color);
}

/* ====================================
   🤝 Logos de Clientes
==================================== */

.cliente-logo {
  max-height: 100px;
  width: auto;
  object-fit: contain;
  filter: grayscale(0%);
  transition: all 0.3s ease;
}

.gallery-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(66, 66, 66, 0.15); /* sombra grafito */
}

.gallery-card:hover .cliente-logo {
  transform: scale(1.05);
  filter: grayscale(0%);
}

/* ===========================================
   🎨 Modo Oscuro - Clientes
=========================================== */

[data-theme="dark"] .gallery-card {
  background-color: #1e293b !important;
  border: 1px solid #334155;
  color: #f8fafc !important;
}

[data-theme="dark"] .gallery-card h5 {
  color: #f8fafc !important;
}

[data-theme="dark"] .cliente-logo {
  filter: brightness(0.95) contrast(1.1);
}

[data-theme="dark"] .gallery-card:hover {
  background-color: #273449 !important;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.4);
}
