:root {
  --primary-gold: #ae9051;
  --dark-gold: #8a7340;
  --light-gold: #c4a866;
  --black: #1a1a1a;
  --dark-gray: #2c2c2c;
  --medium-gray: #666666;
  --light-gray: #f8f9fa;
  --white: #ffffff;
}

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

/* Prevenir desbordamiento horizontal */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: var(--black);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Inter", sans-serif;
  font-weight: 600;
}

/* Navigation */
/* Navbar blanco con texto oscuro */
.btn-gold {
  background: var(--primary-gold);
  border-color: var(--primary-gold);
  color: #fff;
}
.btn-gold:hover {
  background: var(--dark-gold);
  border-color: var(--dark-gold);
  color: #fff;
}

/* reCAPTCHA Responsive Styles */
.g-recaptcha {
  display: inline-block;
  margin: 1rem 0;
}

@media (max-width: 576px) {
  .g-recaptcha {
    transform: scale(0.85);
    transform-origin: center;
    margin: 0.5rem 0;
  }
}

@media (max-width: 480px) {
  .g-recaptcha {
    transform: scale(0.75);
    transform-origin: center;
    margin: 0.25rem 0;
  }
}

#recaptcha-error {
  margin-top: 0.5rem;
  font-size: 0.875rem;
}
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  padding: 0.5rem 0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.navbar-brand img {
  transition: all 0.3s ease;
}

.navbar-nav .nav-link {
  color: var(--black) !important;
  font-weight: 500;
  margin: 0 0.5rem;
  transition: color 0.3s ease;
  position: relative;
}

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

/* (removido) bloque anterior de separadores sustituido por uno más robusto al final */

.navbar-toggler {
  border-color: var(--primary-gold);
  padding: 0.25rem 0.5rem;
  font-size: 1rem;
  border-width: 1px;
  border-radius: 0.375rem;
  margin-right: 0;
}

.navbar-toggler:focus {
  text-decoration: none;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(174, 144, 81, 0.25);
}

.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%2826, 26, 26, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  vertical-align: middle;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100%;
}

/* Hero Section - Moderno con Cards Superpuestas */
.hero-modern {
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.4), rgba(174, 144, 81, 0.1));
  color: var(--white);
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

.hero-background-modern {
  position: absolute;
  top: -10%;
  left: -10%;
  width: 120%;
  height: 120%;
  background: url("HGLegal/slide1.jpg");
  background-size: cover;
  background-position: center;
  animation: kenburns 20s ease-in-out infinite alternate;
  z-index: -2;
}

@keyframes kenburns {
  0% {
    transform: scale(1) translateX(0) translateY(0);
  }
  100% {
    transform: scale(1.1) translateX(-2%) translateY(-1%);
  }
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 26, 26, 0.4);
  z-index: -1;
}

.hero-content-modern {
  padding-top: 10rem;
  padding-bottom: 6rem;
  position: relative;
  z-index: 2;
}

.hero-title-main {
  font-size: 3.5rem;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 2rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  line-height: 1.2;
}

.hero-description-main {
  font-size: 1.3rem;
  font-weight: 300;
  margin-bottom: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  color: rgba(255, 255, 255, 0.95);
}

.hero-cta {
  margin-bottom: 2.5rem; /* separa el botón de las cards */
}

.btn-hero-primary {
  background: var(--primary-gold);
  color: white;
  padding: 1rem 3rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 1px;
  transition: all 0.4s ease;
  box-shadow: 0 8px 25px rgba(174, 144, 81, 0.3);
  border: 2px solid var(--primary-gold);
  display: inline-flex;
  align-items: center;
}

.btn-hero-primary:hover {
  background: var(--dark-gold);
  border-color: var(--dark-gold);
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(174, 144, 81, 0.4);
  color: white;
}

/* Hero Cards Superpuestas - En línea */
.hero-cards-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 2rem;
  position: relative;
  width: 100%;
  max-width: 1100px;
  padding: 0 1rem;
  margin: -80px auto 0 auto; /* solapa sin pisar el botón */
  z-index: 1000;
}

.hero-card {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(15px);
  border-radius: 15px;
  padding: 2.5rem 1.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border-top: 3px solid var(--primary-gold);
  width: 280px;
  text-align: center;
  position: relative;
  transform-origin: center;
  z-index: 10001;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(174, 144, 81, 0.02), rgba(26, 26, 26, 0.01));
  border-radius: 15px;
  z-index: -1;
}

.hero-card .card-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-gold), var(--dark-gold));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem auto;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(174, 144, 81, 0.3);
  position: relative;
  z-index: 102;
}

.hero-card:hover {
  transform: translateY(-15px) scale(1.03);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 1);
  border-top-color: var(--dark-gold);
}

.hero-card-1,
.hero-card-2,
.hero-card-3 {
  transform: translateY(0);
}

.hero-card .card-icon {
  z-index: 1002;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-gold), var(--dark-gold));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(174, 144, 81, 0.3);
}

.hero-card:hover .card-icon {
  transform: scale(1.1);
  box-shadow: 0 12px 30px rgba(174, 144, 81, 0.4);
}

.hero-card .card-icon i {
  font-size: 1.5rem;
  color: white;
}

.hero-card .card-content h4 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 0.8rem;
  transition: color 0.3s ease;
}

.hero-card:hover .card-content h4 {
  color: var(--primary-gold);
}

.hero-card .card-content p {
  font-size: 1rem;
  color: var(--medium-gray);
  margin: 0;
  line-height: 1.5;
  transition: color 0.3s ease;
}

.hero-card:hover .card-content p {
  color: var(--dark-gray);
}

/* Sections */
.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--black);
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--primary-gold);
}

.text-center .section-title::after {
  left: 50%;
  transform: translateX(-50%);
}

.text-start .section-title::after,
.section-title::after {
  left: 0;
  transform: none;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--medium-gray);
  margin-bottom: 3rem;
}

/* About Section */
.about-content {
  padding: 6rem 0 2rem 0;
}

.about-content .about-intro {
  font-weight: 600;
  color: var(--dark-gray);
  margin-bottom: 1.5rem;
}

.about-content p {
  margin-bottom: 1.5rem;
  color: var(--medium-gray);
}

.about-values {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.value-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.value-item i {
  color: var(--primary-gold);
  font-size: 1.2rem;
}

.about-image {
  padding: 2rem 0;
  display: flex;
  align-items: stretch;
  height: 100%;
}

.about-image .about-img {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: none;
}

.about-image img:hover {
  transform: scale(1.02);
}

/* Services Section */
/* Cards con efectos hover modernos mejorados */
.service-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  height: 100%;
  border-top: 3px solid var(--primary-gold);
  position: relative;
  overflow: visible; /* no recortar iconos animados */
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(174, 144, 81, 0.05), rgba(26, 26, 26, 0.02));
  border-radius: 15px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.service-card:hover::before {
  opacity: 1;
}

.service-card:hover {
  transform: scale(1.03);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  border-top-color: var(--dark-gold);
}

.service-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary-gold), var(--dark-gold));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(174, 144, 81, 0.3);
}

.service-card:hover .service-icon {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(174, 144, 81, 0.4);
}

.service-icon i {
  font-size: 1.8rem;
  color: var(--white);
}

.service-card h4 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--black);
  transition: color 0.3s ease;
}

.service-card:hover h4 {
  color: var(--primary-gold);
}

.service-card p {
  color: var(--medium-gray);
  line-height: 1.6;
  transition: color 0.3s ease;
}

.service-card:hover p {
  color: var(--dark-gray);
}

/* Contact Section */
/* Estilos para formulario de contacto */
.contact-form-container {
  background: var(--white);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

.contact-form .form-label {
  font-weight: 500;
  color: var(--black);
  margin-bottom: 0.5rem;
}

.contact-form .form-control {
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.contact-form .form-control:focus {
  border-color: var(--primary-gold);
  box-shadow: 0 0 0 0.2rem rgba(174, 144, 81, 0.25);
}

.contact-form .form-control.is-valid {
  border-color: #28a745;
}

.contact-form .form-control.is-invalid {
  border-color: #dc3545;
}

.invalid-feedback {
  display: none;
  color: #dc3545;
  font-size: 0.875em;
  margin-top: 0.25rem;
}

.form-control.is-invalid + .invalid-feedback {
  display: block;
}

.form-text {
  color: var(--medium-gray);
  font-size: 0.85rem;
}

.contact-info .contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.contact-info .contact-item:hover {
  transform: translateY(-2px);
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: var(--primary-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon i {
  font-size: 1.2rem;
  color: var(--white);
}

.contact-details h5 {
  margin-bottom: 0.5rem;
  color: var(--black);
}

.contact-details p {
  color: var(--medium-gray);
  margin-bottom: 0;
}

.contact-details a {
  color: var(--primary-gold);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-details a:hover {
  color: var(--dark-gold);
}

.contact-hours {
  background: var(--light-gray);
  padding: 1rem 1.5rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.contact-hours i {
  color: var(--primary-gold);
}

/* Footer */
/* Footer expandido con más contenido */
.footer {
  background: var(--black);
  color: #e5e5e5;
}

.footer-brand .footer-description {
  color: #d0d0d0;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.footer-contact p {
  color: #d0d0d0;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}

.footer-contact i {
  color: var(--primary-gold);
  width: 20px;
}

.footer-contact a {
  color: #d0d0d0;
  text-decoration: none;
}
.footer-contact a:hover {
  color: var(--primary-gold);
}

.footer-title {
  color: var(--primary-gold);
  font-size: 1.2rem;
  margin-bottom: 1rem;
  font-family: "Inter", sans-serif;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #d0d0d0;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.footer-divider {
  border-color: var(--dark-gray);
  margin: 2rem 0 1rem;
}

.footer-copyright {
  color: #d0d0d0;
  margin-bottom: 0;
  font-size: 0.9rem;
}

.footer-links-inline {
  display: flex;
  gap: 1.5rem;
  justify-content: flex-end;
}

/* El espaciado del footer se maneja con las utilidades g-* de Bootstrap */

.footer-links-inline a {
  color: #d0d0d0;
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 14px;
}

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

/* Animations */
/* Animaciones de entrada mejoradas */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in-up.visible,
.fade-in-left.visible,
.fade-in-right.visible {
  opacity: 1;
  transform: translate(0);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title-main {
    font-size: 2.8rem;
  }

  .hero-description-main {
    font-size: 1.1rem;
    padding: 0 1rem;
  }

  .hero-content-modern {
    padding-top: 8rem;
    padding-bottom: 4rem;
  }

  .hero-cards-container {
  position: relative;
    transform: none;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
    padding: 0 1rem;
  }

  .hero-card {
    width: 100%;
    max-width: 300px;
    transform: none !important;
    margin-bottom: 0;
  position: relative;
  }

  .hero-card-1,
  .hero-card-2,
  .hero-card-3 {
    position: relative;
    transform: none;
  }

  .hero-card:hover {
    transform: translateY(-10px) scale(1.02);
  }

  .btn-hero-primary {
    padding: 0.8rem 2rem;
    font-size: 1rem;
  }

  #about {
  padding-top: 3rem !important;
  position: relative;
  z-index: 0;
  }

  .about-content {
    padding: 2rem 0;
  }

  .about-image {
    align-items: center;
  }

  .about-image .about-img {
    height: auto;
    max-height: 400px;
  }

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

  .about-values {
    flex-direction: column;
    gap: 1rem;
  }

  .footer-links-inline {
    justify-content: center;
    margin-top: 1rem;
  }

  .contact-info .contact-item {
    flex-direction: column;
    text-align: center;
  }
}

/* Ajuste de altura igualada en desktop para Sobre Nosotros */
@media (min-width: 992px) {
  #about .row {
    min-height: 100%;
  }
  #about .about-content,
  #about .about-image {
    display: flex;
    flex-direction: column;
  }
}

/* Footer mejoras visuales */
.footer .footer-links li + li { margin-top: 0.35rem; }
.footer .footer-title { letter-spacing: 0.3px; }
.footer .footer-brand img { filter: drop-shadow(0 2px 6px rgba(0,0,0,.25)); }
.footer .footer-links a { position: relative; padding-left: 0; }
.footer .footer-links a::before {
  content: "\F285"; /* bi-chevron-right */
  font-family: "bootstrap-icons";
  color: var(--primary-gold);
  margin-right: .5rem;
  display: inline-block;
}

/* Separadores del menú: afinado de spacing */
.navbar-nav .nav-item { position: relative; }
.navbar-nav .nav-item.nav-separator { padding-left: .75rem; margin-left: .75rem; }
.navbar-nav .nav-item.nav-separator::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 18px;
  background: rgba(174,144,81,.65);
}
@media (max-width: 991.98px) {
  .navbar-nav .nav-item.nav-separator { padding-left: 0; margin-left: 0; }
  .navbar-nav .nav-item.nav-separator::before { display: none; }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Loading animation */
body.loaded {
  animation: fadeIn 0.5s ease-in;
}

/* Floating Action Buttons (FAB) */
.floating-actions {
  position: fixed;
  right: 18px;
  bottom: 68px;
  z-index: 1050;
}

.fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0,0,0,.25);
  border: 0;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  color: #fff;
}

.fab-contacts { background: var(--dark-gold); margin-bottom: 10px; }
.fab-contacts:hover { background: #6f5d35; transform: translateY(-2px); }

.fab-whatsapp { background: #25D366; text-decoration: none; }
.fab-whatsapp:hover { background: #1ebe57; transform: translateY(-2px); }

.fab i { font-size: 1.4rem; }

.contact-menu {
  position: absolute;
  right: 66px;
  bottom: 66px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0,0,0,.2);
  padding: .5rem 0;
  min-width: 260px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: all .2s ease;
}

.contact-menu.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.contact-menu ul { list-style: none; margin: 0; padding: 0; }
.contact-menu li { border-bottom: 1px solid #eee; }
.contact-menu li:last-child { border-bottom: 0; }
.contact-menu a { display: flex; gap: .6rem; align-items: center; padding: .75rem 1rem; color: var(--black); text-decoration: none; }
.contact-menu a:hover { background: #f7f7f7; }
.contact-menu i { color: var(--primary-gold); }

@media (max-width: 576px) {
  .fab { width: 52px; height: 52px; }
  .fab i { font-size: 1.25rem; }
  .contact-menu { right: 58px; bottom: 58px; min-width: 220px; }
}

/* Navbar mobile: panel moderno (solo en <992px) */
@media (max-width: 991.98px) {
  .navbar-toggler {
    margin-right: 0;
    padding: 0.25rem 0.4rem;
  }
  
  .navbar-collapse {
    background: rgba(255,255,255,.98);
    box-shadow: 0 20px 40px rgba(0,0,0,.12);
    border-radius: 12px;
    padding: .75rem;
    margin-top: .5rem;
  }
  .navbar-collapse.show { animation: menuDrop .18s ease-out; }
}

/* Estilos adicionales para móviles muy pequeños */
@media (max-width: 576px) {
  .navbar-brand img {
    height: 42px;
  }
  
  .navbar-toggler {
    padding: 0.2rem 0.35rem;
    font-size: 0.9rem;
    margin-right: 0.25rem;
  }
  
  .navbar-toggler-icon {
    width: 1.2em;
    height: 1.2em;
  }
}
@keyframes menuDrop { from { opacity: 0; transform: translateY(-6px);} to { opacity:1; transform: translateY(0);} }

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Íconos de justicia en blanco */
.justice-icon-white {
  filter: invert(1) brightness(2);
}
