:root {
  --primary-color: #214D74;
  --primary-dark: #153550;
  --secondary-color: #2C3E50;
  --text-dark: #2C3E50;
  --text-light: #7F8C8D;
  --bg-light: #F8F9FA;
  --white: #FFFFFF;
  --shadow-light: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-medium: 0 8px 30px rgba(0,0,0,0.12);
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

/* Navigation */
.navbar-custom {
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem 0;
  min-height: 100px;
}

.navbar-brand-custom {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  font-size: 1.2rem;
}

.navbar-nav-custom {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.5rem;
  align-items: center;
}

.navbar-nav-custom li a {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  padding: 0.5rem 0;
  position: relative;
}

.navbar-nav-custom li a:hover,
.navbar-nav-custom li a.active {
  color: var(--primary-color);
}

.navbar-nav-custom li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.navbar-nav-custom li a:hover::after,
.navbar-nav-custom li a.active::after {
  width: 100%;
}

.navbar-toggler-custom {
  display: none;
  background: none;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 1.2rem;
}

/* Dropdown Menu */
.navbar-nav-custom li {
  position: relative;
}

.dropdown-toggle {
  cursor: pointer;
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  padding: 0.5rem 0;
  position: relative;
  display: inline-block;
}

.dropdown-toggle::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  margin-left: 0.5rem;
  vertical-align: middle;
  transition: transform 0.3s ease;
}

.dropdown-toggle:hover,
.dropdown-toggle.active {
  color: var(--primary-color);
}

.dropdown-toggle::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.dropdown-toggle:hover::before,
.dropdown-toggle.active::before {
  width: 100%;
}

.dropdown-toggle.active::after {
  transform: rotate(180deg);
  border-top: none;
  border-bottom: 5px solid currentColor;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  background: var(--white);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  border-radius: var(--border-radius);
  min-width: 280px;
  padding: 0.75rem 0;
  margin: 0;
  z-index: 1000;
  list-style: none;
}

.dropdown-menu ul {
  padding-left: 0.5rem;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-menu li {
  margin: 0;
  padding: 0;
}

.dropdown-menu a {
  display: block;
  padding: 0.85rem 2rem 0.85rem 2.5rem !important;
  padding-left: 2.5rem !important;
  color: var(--text-dark) !important;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

#servicesDropdown a,
.dropdown-menu a {
  padding-left: 2.5rem !important;
}

.dropdown-menu a:hover {
  color: var(--primary-color);
  background: transparent;
}

.dropdown-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 2.5rem;
  right: 2rem;
  height: 2px;
  background: var(--primary-color);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.dropdown-menu a:hover::after {
  transform: scaleX(1);
}

/* Buttons */
.btn-primary {
  background: var(--gradient-primary);
  color: var(--white);
  border: none;
  padding: 0.75rem 2rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: var(--transition);
  box-shadow: var(--shadow-light);
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
  color: var(--white);
}

.btn-outline-primary {
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  background: transparent;
  padding: 0.75rem 2rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: var(--transition);
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  color: var(--white);
  transform: translateY(-2px);
}

/* Botón outline para hero section y secciones con fondo azul (fondo claro sobre oscuro) */
.hero-section .btn-outline-primary,
.hero-section .hero-btn-white {
  color: var(--white) !important;
  border: 2px solid var(--white) !important;
  background: transparent !important;
}

.hero-section .btn-outline-primary:hover,
.hero-section .btn-outline-primary:focus,
.hero-section .hero-btn-white:hover,
.hero-section .hero-btn-white:focus {
  background: #FFFFFF !important;
  color: #214D74 !important;
  border-color: #FFFFFF !important;
}

/* Botones en secciones con fondo azul degradado */
section[style*="gradient-primary"] .btn-outline-primary,
section[style*="gradient-primary"] .hero-btn-white {
  color: #FFFFFF !important;
  border: 2px solid #FFFFFF !important;
  background: transparent !important;
}

section[style*="gradient-primary"] .btn-outline-primary:hover,
section[style*="gradient-primary"] .btn-outline-primary:focus,
section[style*="gradient-primary"] .hero-btn-white:hover,
section[style*="gradient-primary"] .hero-btn-white:focus {
  background: #FFFFFF !important;
  color: #214D74 !important;
  border-color: #FFFFFF !important;
  transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
  background: var(--gradient-primary);
  color: var(--white);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
  min-height: 60vh;
  display: flex;
  align-items: center;
}

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

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

/* Services Grid */
.service-card {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow-light);
  transition: var(--transition);
  height: 100%;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.service-card h4 {
  margin-bottom: 1rem;
  flex-grow: 0;
}

.service-card p {
  flex-grow: 1;
  margin-bottom: 0;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
  border: 2px solid var(--primary-color);
}

.service-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Footer */
.footer-custom {
  background: var(--secondary-color);
  color: var(--white);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

/* Popup Modal Styles */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  justify-content: center;
  align-items: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-popup {
  background: var(--white);
  border-radius: var(--border-radius);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 10;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-dark);
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--bg-light);
}

.modal-body {
  padding: 2rem;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  position: relative;
}

.progress-steps::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 2px;
  background: #eee;
  z-index: 0;
}

.step {
  position: relative;
  z-index: 1;
  text-align: center;
  flex: 1;
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #eee;
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.5rem;
  font-weight: 600;
  transition: var(--transition);
}

.step.active .step-circle {
  background: var(--primary-color);
  color: var(--white);
}

.step-label {
  font-size: 0.85rem;
  color: var(--text-light);
}

.step.active .step-label {
  color: var(--primary-color);
  font-weight: 600;
}

.step-content {
  display: none;
}

.step-content.active {
  display: block;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-dark);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(33, 77, 116, 0.1);
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.radio-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  border: 2px solid #eee;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
}

.radio-item:hover {
  border-color: var(--primary-color);
  background: rgba(33, 77, 116, 0.05);
}

.radio-item input[type="radio"] {
  margin-right: 0.75rem;
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  border: 2px solid #eee;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
}

.checkbox-item:hover {
  border-color: var(--primary-color);
  background: rgba(33, 77, 116, 0.05);
}

.checkbox-item input[type="checkbox"] {
  margin-right: 0.75rem;
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}

.modal-actions button {
  flex: 1;
  padding: 0.75rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-previous {
  background: var(--bg-light);
  color: var(--text-dark);
}

.btn-previous:hover {
  background: #e0e0e0;
}

.btn-next,
.btn-submit {
  background: var(--gradient-primary);
  color: var(--white);
}

.btn-next:hover,
.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.btn-next:disabled,
.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Accordion FAQ Styles */
.accordion-button {
  position: relative;
  padding-right: 3rem !important;
}

.accordion-button::after {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
}

.accordion-button:not(.collapsed) {
  background-color: rgba(33, 77, 116, 0.05);
  color: var(--primary-color);
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.25rem rgba(33, 77, 116, 0.25);
  border-color: transparent;
}

/* Service Detail Cards - Flexbox para alineación */
.service-detail-card {
  display: flex;
  flex-direction: column;
}

.service-detail-card h3,
.service-detail-card h4 {
  flex-grow: 0;
  margin-bottom: 1rem;
}

.service-detail-card p {
  flex-grow: 1;
  margin-bottom: 0;
}

.service-detail-card .btn-outline-primary {
  margin-top: auto;
  align-self: flex-start;
}

/* Asegurar que las columnas tengan la misma altura */
.row.mb-5 {
  display: flex;
}

.row.mb-5 > .col-lg-6 {
  display: flex;
}

/* Responsive */
@media (max-width: 768px) {
  .navbar-custom {
    min-height: auto;
    padding: 0.75rem 0;
  }

  .navbar-brand-custom img {
    height: 60px !important;
  }

  .navbar-toggler-custom {
    display: block;
  }

  .navbar-nav-custom {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    padding: 1rem;
    gap: 0;
  }

  .navbar-nav-custom.active {
    display: flex;
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    margin-top: 0;
    padding-left: 0;
    display: none;
    width: 100%;
    background: transparent;
    min-width: auto;
  }

  .dropdown-menu.show {
    display: block;
  }

  .dropdown-menu a {
    padding: 0.85rem 1.5rem 0.85rem 2.5rem;
  }

  .dropdown-menu a::after {
    left: 2.5rem;
    right: 1.5rem;
  }

  .dropdown-toggle {
    width: 100%;
    padding: 0.5rem 0;
  }

  .hero-title {
    font-size: 2rem;
  }

  .modal-popup {
    width: 95%;
  }

  .accordion-button {
    font-size: 0.95rem;
    padding: 1rem !important;
    padding-right: 2.5rem !important;
  }
}

/* Breadcrumbs */
.breadcrumb-custom {
  background: var(--bg-light);
  padding: 1rem 0;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}

.breadcrumb-custom ol {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
  gap: 0.5rem;
}

.breadcrumb-custom li:not(:last-child)::after {
  content: '/';
  margin-left: 0.5rem;
  color: var(--text-light);
}

.breadcrumb-custom a {
  color: var(--primary-color);
  text-decoration: none;
}

/* Page Hero */
.page-hero {
  background: var(--gradient-primary);
  color: var(--white);
  padding: 3rem 0;
  margin-bottom: 3rem;
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

/* Contact Cards */
.contact-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
  margin-bottom: 2rem;
  height: auto;
  position: relative;
}

.contact-card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.contact-card ul {
  list-style: none;
  padding: 0;
}

.contact-card ul li {
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.contact-card a {
  color: var(--primary-color);
  text-decoration: none;
}

.contact-card a:hover {
  text-decoration: underline;
}

/* Content Section */
.content-section {
  padding: 2rem 0 4rem;
  position: relative;
  overflow: visible;
}

/* Info Card */
.info-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
  margin-bottom: 2rem;
}

.info-card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

/* Imágenes de contenido en páginas de servicios - Tamaño fijo y consistente */
.service-content-image {
  width: 100%;
  max-width: 800px;
  height: 450px;
  object-fit: cover;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
  display: block;
}

/* Brands Slider */
.brands-slider-container {
  overflow: hidden;
  position: relative;
  padding: 2rem 0;
  width: 100%;
}

.brands-slider {
  display: flex;
  animation: slideBrands 40s linear infinite;
  gap: 3rem;
  align-items: center;
  will-change: transform;
}

.brand-slide {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 2.5rem;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-width: 200px;
}

.brand-slide:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.brand-logo {
  width: 150px;
  height: 80px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: all 0.3s ease;
}

.brand-slide:hover .brand-logo {
  filter: grayscale(0%);
  opacity: 1;
}

@keyframes slideBrands {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-50% - 1.5rem));
  }
}

@media (max-width: 768px) {
  .brand-logo {
    width: 120px;
    height: 60px;
  }
  
  .brands-slider {
    gap: 2rem;
    animation-duration: 30s;
  }
  
  .brand-slide {
    padding: 1rem 1.5rem;
    min-width: 160px;
  }
}

@media (max-width: 768px) {
  .page-hero h1 {
    font-size: 2rem;
  }

  .service-content-image {
    height: 300px;
  }

  /* Ajustar sección "Qué podemos ofrecerte" en móvil */
  section[style*="gradient-primary"] h2 {
    font-size: 1.75rem !important;
  }

  section[style*="gradient-primary"] p {
    font-size: 1rem !important;
  }
}
