:root {
   --bg-dark: #011627;
   --accent: #ff8c00;
   --fg-light: #f4f9ff;
   --fg-mid: #aab7c4;
   --radius: 1rem;
   --transition: 0.4s ease;
  }
  *, *::before, *::after { box-sizing: border-box; margin:0; padding:0; }
  html {
   scroll-behavior: smooth;
   scroll-padding-top: 65px; 
  }
  body {
   font-family: 'Inter', sans-serif;
   background: var(--bg-dark);
   color: var(--fg-light);
  }
  a { text-decoration: none; }

  /* --- Menú personalizado (sin perder Bootstrap) --- */
  .nav {
   position: fixed; top: 0; left: 0; right: 0;
   display: flex; align-items: center; justify-content: space-between;
   padding: 1rem 2rem;
   background: rgba(1,22,47,0.8);
   z-index: 1000;
   transition: background var(--transition);
  }
  .nav.scrolled {
   background: rgba(1,22,47,1);
  }
  .nav .logo img {
   height: 40px;
  }
  .nav-toggle {
   font-size: 1.5rem;
   color: var(--fg-light);
   background: none;
   border: none;
   cursor: pointer;
   display: none;
  }
  .nav-menu {
   display: flex;
   gap: 1rem;
  }
  .nav-menu a {
   position: relative;
   font-weight: 500;
   color: var(--fg-light);
   transition: color var(--transition);
  }
  .nav-menu a::after {
   content: '';
   position: absolute; left: 0; bottom: -4px;
   width: 0; height: 2px;
   background: var(--accent);
   transition: width var(--transition);
  }
  .nav-menu a:hover {
   color: var(--accent);
  }
  .nav-menu a:hover::after {
   width: 100%;
  }
  @media (max-width: 768px) {
   .nav-toggle { display: block; }
   .nav-menu {
    position: fixed; top: 0; right: -100%;
    flex-direction: column;
    background: var(--bg-dark);
    height: 100vh; width: 60%;
    padding: 4rem 2rem;
    transition: right var(--transition);
   }
   .nav-menu.open { right: 0; }
   .nav-menu a { margin-bottom: 1.5rem; font-size: 1.2rem; }
  }

  /* --- Sección Destacada --- */
  .featured-section {
   padding-top: 80px; 
   padding-bottom: 3rem;
   min-height: calc(100vh - 56px); 
   display: flex;
   align-items: center;
   justify-content: center;
   background: url('/inicio/imagenes/fondo_abstracto_legal.png') center/cover no-repeat;
   position: relative;
  }

  .featured-section::before {
   content: '';
   position: absolute;
   inset: 0;
   background: rgba(1, 22, 47, 0.85); 
   z-index: 0;
  }
  .featured-section .container {
   position: relative;
   z-index: 1;
  }

  .featured-section .featured-heading {
   color: var(--accent); /* Color del encabezado principal (naranja) */
   font-weight: 700;
   font-size: clamp(1.8rem, 3.5vw, 2.5rem); 
   margin-bottom: 0.5rem; 
   line-height: 1.2;
  }
  .featured-section .featured-heading span {
   display: block;
   color: var(--fg-light);
   font-size: clamp(1.6rem, 3vw, 2.2rem);
   font-weight: 500;
  }

  .featured-section .lead {
   font-size: clamp(1rem, 1.5vw, 1.15rem); 
   color: var(--fg-mid); 
   max-width: 800px; 
   margin-top: 1rem;
   margin-bottom: 1rem;
  }
  
  .featured-section p {
   color: var(--fg-mid);
   margin-bottom: 1rem;
   max-width: 800px;
  }

    /* --- AJUSTE DEL BOTÓN DE ASESORAMIENTO --- */
  .featured-section .btn-warning {
   /* Usa el color de acento (--accent) para que coincida con el H1 */
   background-color: var(--accent);
   border-color: var(--accent);
   color: var(--bg-dark); /* Texto oscuro para contraste */
   font-weight: 700;
  }
  .featured-section .btn-warning:hover {
        background-color: #e67600; /* Ligeramente más oscuro en hover */
        border-color: #e67600;
    }
    
  .featured-section .btn-outline-light {
   color: var(--fg-light);
   border-color: var(--fg-light);
  }
  .featured-section .btn-outline-light:hover {
   background-color: var(--fg-light);
   color: var(--bg-dark);
  }
    /* FIN AJUSTE DEL BOTÓN */


  /* Contenedor para video (glassmorphism) */
  .featured-media-box {
   background: rgba(255, 255, 255, 0.05); 
   backdrop-filter: blur(12px); 
   border: 1px solid rgba(255, 255, 255, 0.2); 
   border-radius: var(--radius);
   padding: 0; 
   box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); 
   width: 100%;
   max-width: 450px; 
   height: auto; 
   display: flex;
   flex-direction: column;
   justify-content: center;
   align-items: center;
   overflow: hidden;
  }


  /* --- Estilos para Video Responsivo (Simulando Bootstrap 4) --- */
  .embed-responsive {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
  }

  .embed-responsive-16by9::before {
    content: "";
    display: block;
    padding-top: 56.25%; /* Relación de aspecto 16:9 */
  }

  .embed-responsive-item {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: var(--radius);
  }
  .featured-media-box video { 
        border-radius: 0; 
    }

  @media (max-width: 991px) { 
   .featured-section {
    text-align: center; 
    min-height: auto; 
   }
   .featured-section .lead, .featured-section p {
    margin-left: auto;
    margin-right: auto;
   }
   .featured-media-box {
    margin-top: 2.5rem; 
    margin-left: auto;
    margin-right: auto;
   }
   .featured-section .col-lg-7 {
    text-align: center !important; 
   }
  }

  /* --- Hero --- */
  .hero {
   height: 85vh; min-height: 450px;
   background: url('/inicio/imagenes/fondo_hero_relieve.png')
         center/cover fixed no-repeat;
   position: relative;
   display: flex; align-items: center; justify-content: center;
   text-align: center;
   padding-top: 0; 
  }
  .hero::before {
   content: '';
   position: absolute; inset: 0;
   background: linear-gradient(180deg,
         rgba(1,22,47,0.7),
         rgba(1,22,47,0.9));
  }
  .hero .container {
   position: relative; z-index: 1; color: #fff;
  }
  .hero h1 {
   font-size: clamp(2rem,5vw,3rem);
   margin-bottom: .5rem;
   color: var(--accent);
  }
  .hero .divider {
   width: 80px; height: 4px;
   background: var(--accent);
   margin: 1rem auto;
  }
  .hero p.lead {
   font-size: 1.125rem;
   margin-bottom: 1.5rem;
  }
  .hero .btn-primary {
   background: var(--accent);
   border: none;
  }
  .hero .btn-primary:hover {
   background: #e67600;
  }

  /* --- Servicios: glass cards con ícono centrado --- */
  .icon-wrapper {
   width: 64px; height: 64px;
   margin: 0 auto 1rem;
   display: flex; align-items: center; justify-content: center;
   background: rgba(255,255,255,0.1);
   border-radius: 50%;
   box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  }
  .icon-wrapper .bi {
   font-size: 1.75rem;
   color: var(--accent);
  }
  .card-glass {
   background: rgba(255,255,255,0.08);
   backdrop-filter: blur(8px);
   border-radius: var(--radius);
   box-shadow: 0 8px 24px rgba(0,0,0,0.2);
   transition: opacity var(--transition), transform var(--transition);
   opacity: 0;
   transform: translateY(30px);
   display: flex; flex-direction: column;
   height: 100%;
   padding: 1.5rem;
  }
  .card-glass.show {
   opacity: 1;
   transform: translateY(0);
  }
  .card-glass h5 {
   color: var(--fg-light);
   margin-bottom: .5rem;
  }
  .card-glass p {
   color: var(--fg-mid);
   flex-grow: 1;
  }
  .card-glass .btn-outline-light {
   border-color: var(--accent);
   color: var(--accent);
  }
  .card-glass .btn-outline-light:hover {
   background: var(--accent);
   color: var(--bg-dark);
  }

  /* --- Títulos de sección --- */
  .section-title {
   color: var(--accent);
   text-align: center;
   margin-bottom: 2rem;
   font-weight: 500;
   position: relative;
  }
  .section-title::after {
   content: '';
   position: absolute; left: 50%; bottom: -8px;
   transform: translateX(-50%);
   width: 60px; height: 3px;
   background: var(--accent);
  }

  /* --- Detalles intercalados --- */
  .detail { padding: 3rem 0; }
  .detail:nth-of-type(even) {
   background: var(--bg-dark);
  }
  .detail:nth-of-type(even) .section-title,
  .detail:nth-of-type(even) p {
   color: var(--fg-light);
  }
  .detail-img {
   width: 100%;
   border-radius: var(--radius);
   box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  }

  /* --- Contacto & Footer --- */
  #contacto {
   padding: 3rem 0;
   text-align: center;
  }
  #contacto .btn-primary {
   background: var(--accent);
   border: none;
  }
  footer {
   padding: 1rem 0;
   text-align: center;
   background: rgba(1,22,47,0.9);
   color: var(--fg-mid);
  }

  /* --- Estilos para la Ventana Modal --- */

/* Asegura que la cabecera, cuerpo y pie de la modal se vean oscuros */
.custom-modal-content {
    background-color: var(--bg-dark);
    color: var(--fg-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); 
}

/* Encabezado */
.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Título */
.modal-header .modal-title {
    color: var(--fg-light);
    font-weight: 700;
}

/* Cuerpo */
.modal-body {
    color: var(--fg-mid);
}

/* Botón de cierre (la 'x') */
.modal-header .btn-close {
    filter: invert(1); /* Hace que el icono blanco sea visible sobre el fondo oscuro */
    opacity: 0.8;
}

/* Ajustes de tipografía para el contenido de la modal */
.modal-body h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 1.5rem;
    color: var(--accent); /* Usamos el color de acento para los subtítulos */
}

.modal-body ul {
    margin-left: 1rem;
    padding-left: 1rem;
}

/* Pie de página */
.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Alerta de Bootstrap adaptada al tema oscuro */
.alert-warning {
    background-color: rgba(255, 140, 0, 0.1); /* Fondo naranja sutil */
    border-color: var(--accent);
    color: var(--accent);
}