/* Estilos Generales */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('../fondo.jpg'); /* Fallback */
  background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), image-set(
    url("../fondo.webp") type("image/webp"),
    url("../fondo.jpg") type("image/jpeg")
  );
  background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), -webkit-image-set(
    url("../fondo.webp") type("image/webp"),
    url("../fondo.jpg") type("image/jpeg")
  );
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

* {
  box-sizing: border-box;
}

.main-header {
  background-color: #1d295f;
  color: #D2D2D2;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  z-index: 1000;
  overflow: visible;
}

.logo-container {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.logo-img {
  height: 60px;
  width: auto;
  max-width: 100%;
  display: block;
}

.social-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  padding: 0 1rem;
}

/* Redes Sociales */
.whatsapp-link, .instagram-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: #D2D2D2;
}

.whatsapp-text, .instagram-text {
  margin-left: 8px;
}

/* Estilos del Menú de Navegación */
.main-nav {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: #1d295f;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5); /* Sombra intensa para resaltar */
  z-index: 1000;
  box-sizing: border-box;
}

.main-nav.is-open {
  display: flex !important;
}
.main-nav .nav-link, .main-nav .nav-link-lang {
  padding: 1.2rem 2rem; /* Indentado de 2rem desde la izquierda */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #D2D2D2;
  text-decoration: none;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Ocultar texto de idioma en desktop por defecto */
.lang-text {
  display: inline;
}

@media (min-width: 768px) {
  .lang-text {
    display: none;
  }
}

.main-nav .nav-link:last-child {
  border-bottom: none;
}

/* Contenedor para el botón de hamburguesa o el menú en desktop */
.nav-container {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.hamburger-button {
  display: block;
  background: none;
  border: none;
  color: #D2D2D2;
  cursor: pointer;
  padding: 10px;
  position: relative;
  z-index: 1100;
}

.hamburger-button svg {
  width: 30px;
  height: 30px;
  pointer-events: none; /* Evita que el clic sea capturado por el SVG interno */
}

@media (min-width: 768px) {
  .logo-img {
    height: 100px;
  }

  .hamburger-button {
    display: none;
  }

  .main-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    position: static;
    width: auto;
    background-color: transparent;
    border-top: none;
    font-size: 0.95rem;
    gap: 1rem;
  }

  .nav-link {
    color: #D2D2D2;
    text-decoration: none;
    padding: 0;
    white-space: nowrap;
    border-bottom: none;
    transition: color 0.3s, transform 0.2s;
  }

  .nav-link:hover {
    color: #ffffff;
    transform: scale(1.05);
  }

  .nav-link-lang {
    color: #D2D2D2;
    text-decoration: none;
    font-size: 1.5rem;
    padding: 0;
    border-bottom: none;
  }
}

.nav-link-lang:hover {
  transform: scale(1.1);
}

.main-content {
  padding: 2rem;
  min-height: 80vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

footer {
  background: #1d295f; 
  padding: 2rem 1rem; 
  text-align: center;
}

.footer-social {
  margin-bottom: 2rem; 
  display: flex; 
  justify-content: center; 
  gap: 1.5rem;
}

.footer-info {
  color: #D2D2D2; 
  margin-bottom: 1rem;
}

.footer-info p {
  margin-bottom: 0.5rem;
}

.footer-link {
  color: #D2D2D2; 
  text-decoration: underline; 
  font-weight: bold;
}

.footer-link span {
  margin-right: 0.5rem;
}

.footer-copyright {
  color: #D2D2D2;
}

/* Estilos CTA (comunes) */
.cta-box {
  background-color: rgba(29, 41, 95, 0.9);
  padding: 3rem;
  border-radius: 10px;
  text-align: center;
  color: #D2D2D2;
  max-width: 600px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  margin: 0 auto;
}

.cta-button {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 1rem 2.5rem; /* Un poco más de aire lateral */
  background-color: #d4af37; /* Dorado / Oro (Más distintivo) */
  color: #1d295f;
  text-decoration: none;
  font-weight: bold;
  border-radius: 5px;
  transition: background-color 0.3s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
  background-color: #e0be4e; /* Dorado un poco más brillante */
  transform: translateY(-2px); /* Un pequeño salto hacia arriba */
  color: #1d295f;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Estilos de la Página de Inicio (Home) */
.practice-areas {
  margin-top: 3rem;
  text-align: center;
  padding: 0 2rem;
}

.practice-areas h3 {
  color: white;
  font-size: 2.2rem;
  margin-bottom: 2.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.areas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.area-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

.area-card {
  background-color: rgba(29, 41, 95, 0.9);
  padding: 2.5rem;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  color: #D2D2D2;
  text-align: left;
  transition: transform 0.3s, box-shadow 0.3s;
  height: 100%;
  position: relative; /* Necesario para el icono absoluto */
  overflow: hidden;   /* Para que el icono grande no se salga */
  z-index: 1;
}

.area-icon {
  position: absolute;
  bottom: -15%;
  right: -5%;
  z-index: 0; 
  opacity: 0.35; 
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.6s ease;
}

.area-icon svg,
.area-icon img {
  width: 180px;
  height: 180px;
  color: #ffffff;
  filter: brightness(0) invert(1) drop-shadow(0px 4px 6px rgba(0,0,0,0.3));
}

.area-card:hover .area-icon {
  transform: scale(1.3) translate(-5%, -5%) rotate(-8deg);
  opacity: 0.60;
}

.area-card h4 {
  color: white;
  text-align: left;
  border-bottom: 2px solid #D2D2D2;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  font-size: 1.4rem;
  position: relative;
  z-index: 2;
}

.area-card p {
  font-size: 1rem;
  line-height: 1.6;
  position: relative;
  z-index: 2;
}

/* Estilos Comunes para Contenedores Institucionales (About, FAQ, Locations) */
.about-us-container, .faq-container, .locations-container {
  background-color: rgba(255, 255, 255, 0.95);
  padding: 2rem 3rem;
  border-radius: 10px;
  color: #333;
  max-width: 900px;
  margin: 2rem auto;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  font-family: 'Montserrat', sans-serif;
}

.about-us-container h1, .faq-container h1, .locations-container h1 {
  text-align: center;
  font-size: 2.5rem;
  color: #1d295f;
  border-bottom: 2px solid #1d295f;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.about-us-container h2, .faq-container h2, .locations-container h2 {
  color: #1d295f;
  border-bottom: 2px solid #1d295f;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
}

.about-us-container section {
  margin-bottom: 2.5rem;
}

.about-us-container p, .faq-container p, .locations-container p {
  font-size: 18px;
  line-height: 1.75;
  margin-bottom: 1rem;
  text-align: justify;
  hyphens: auto;
}

/* Específicos de About */
.mission-vision {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .mission-vision {
    grid-template-columns: 1fr 1fr;
  }
}

.mission, .vision {
  background-color: #f4f4f9;
  padding: 2rem;
  border-radius: 8px;
  border-left: 5px solid #1d295f;
}

.professionals-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.professional-card {
  flex: 1 1 300px;
  max-width: 400px;
  background-color: #e9eef7;
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.professional-card h3, .professional-card p {
  margin: 0 0 0.5rem;
  color: #1d295f;
  text-align: center;
}

.staff-note {
  font-style: italic;
  color: #555;
  text-align: center;
  margin-top: 1.5rem;
}

.specialization-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.specialization-button {
  display: block;
  padding: 1rem 1.5rem;
  background-color: rgba(255, 255, 255, 0.95);
  color: #333;
  text-decoration: none;
  border-radius: 5px;
  text-align: center;
  font-weight: bold;
  transition: background-color 0.3s, transform 0.2s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.specialization-button:hover {
  background-color: #e0e0e0;
  transform: translateY(-2px);
  color: #1d295f;
}

/* Específicos de FAQ */
.faq-item {
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(29, 41, 95, 0.3);
  padding-bottom: 1rem;
}

.faq-item h3 {
  color: #1d295f;
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
  line-height: 1.3;
  text-align: left;
}

.faq-link {
  color: #1d295f;
  text-decoration: underline;
}

/* Específicos de Locations */
.appointment-note {
  font-size: 1.1rem;
}

.contact-link {
  color: #1d295f;
  text-decoration: underline;
  font-weight: bold;
}

.location-card {
  margin-bottom: 2.5rem;
}

.location-card h3 {
  color: #1d295f;
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.map-container {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Estilos de las Áreas de Práctica */
.practice-area-container {
  background-color: #f4f4f9; /* Color base */
  background-size: 180px; /* Tamaño tipo mosaico */
  background-position: top left;
  background-repeat: repeat;
  border-radius: 10px;
  color: #333;
  max-width: 800px; /* Un poco más ancho para aprovechar el fondo */
  margin: 2rem auto;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  font-family: 'Montserrat', sans-serif;
  overflow: hidden; /* Para que el overlay respete el border-radius */
  padding: 0; /* Quitamos el padding del contenedor principal */
}

.practice-area-overlay {
  background-color: rgba(255, 255, 255, 0.97); /* Más opaco para que sea más suave */
  padding: 2.5rem 3.5rem;
  width: 100%;
  height: 100%;
}

.practice-area-container h1 {
  color: #1d295f;
  border-bottom: 2px solid #1d295f;
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
  text-align: center;
  font-size: 2.5rem;
}

.practice-area-container .subtitle {
  text-align: center;
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 2.5rem;
}

.content-section {
  margin-bottom: 2.5rem;
}

.content-section h3 {
  color: #1d295f;
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  text-align: left;
}

.content-section p, .content-section li {
  font-size: 18px;
  line-height: 1.75;
  margin-bottom: 1.5rem;
  text-align: justify;
  hyphens: auto;
}

.content-section ul {
  list-style: disc;
  padding-left: 2rem;
}

.cta-section {
  text-align: center;
  background-color: #f4f4f9;
  padding: 2rem;
  border-radius: 8px;
  margin-top: 2rem;
}

.cta-section h2 {
  color: #1d295f;
  margin-bottom: 1rem;
}

/* Estilos de la Página de Contacto */
.contact-container {
  max-width: 600px;
  margin: 0 auto;
  background-color: rgba(29, 41, 95, 0.9);
  padding: 3rem;
  border-radius: 10px;
  color: #D2D2D2;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.direct-contact-suggestion {
  text-align: center;
  margin-bottom: 2.5rem;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  border-radius: 8px;
}

.contact-icons-wrapper {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin: 1.5rem 0;
  font-size: 1.5rem;
}

.form-group { margin-bottom: 1.5rem; }
.contact-form label { display: block; margin-bottom: 0.5rem; font-weight: bold; color: #D2D2D2; border: none; padding: 0; }
.contact-form input, .contact-form textarea { width: 100%; padding: 0.8rem; border: 1px solid #ccc; border-radius: 4px; font-family: 'Montserrat', sans-serif; }
.submit-btn { 
  background-color: #d4af37; /* Mismo dorado que el CTA */
  color: #1d295f; 
  padding: 1rem 1.5rem; 
  border: none; 
  border-radius: 4px; 
  cursor: pointer; 
  font-size: 1.1rem; 
  font-weight: bold; 
  transition: background-color 0.3s, transform 0.2s; 
  width: 100%; 
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
.submit-btn:hover { 
  background-color: #e0be4e;
  transform: scale(1.02);
}

.error {
  color: #ff6b6b;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Estilos de la Página de Clientes */
.clients-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem;
  text-align: center;
  background-color: #f4f4f9;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  color: #333;
  font-family: 'Montserrat', sans-serif;
}

.clients-page .page-title {
  color: #1d295f;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid #1d295f;
  padding-bottom: 0.5rem;
}

.clients-page .page-intro {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 3rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
  border-top: 1px solid #eee;
  margin-top: 2rem;
  align-items: center;
  justify-items: center;
}

.client-logo-link {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  max-width: 400px;
  background-color: black;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.client-logo-link:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.client-logo {
  max-width: 100%;
  width: auto;
  height: auto;
  filter: invert(1) grayscale(100%) brightness(1.5);
  opacity: 0.7;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.client-logo-link:hover .client-logo {
  filter: invert(1) grayscale(0%) brightness(1.8);
  opacity: 1;
}

/* Estilos específicos para el logo de Bute Restaurante */
.client-logo-link--bute {
  background-color: white;
}
.client-logo-link--bute .client-logo {
  filter: grayscale(100%) brightness(1);
  opacity: 0.7;
}
.client-logo-link--bute:hover .client-logo {
  filter: grayscale(0%) brightness(1);
  opacity: 1;
}

/* Estilos específicos para el logo de Comercial Saavedra */
.client-logo-link--comercial-saavedra {
  background-color: black;
}
.client-logo-link--comercial-saavedra .client-logo {
  filter: none;
  opacity: 1;
}
.client-logo-link--comercial-saavedra:hover .client-logo {
  filter: brightness(1.2);
}

/* Estilos específicos para el logo de Ivess del Este S.A. */
.client-logo-link--ivess {
  background-color: white;
}
.client-logo-link--ivess .client-logo {
  filter: none;
  opacity: 1;
}
.client-logo-link--ivess:hover .client-logo {
  filter: brightness(1.1);
}

/* Estilos específicos para el logo de El Faro Bistro */
.client-logo-link--faro {
  background-color: black;
}
.client-logo-link--faro .client-logo {
  filter: none;
  opacity: 1;
}
.client-logo-link--faro:hover .client-logo {
  filter: brightness(1.2);
}

/* Estilos específicos para el logo de Gulerie */
.client-logo-link--gulerie {
  background-color: white;
}
.client-logo-link--gulerie .client-logo {
  filter: none;
  opacity: 1;
}
.client-logo-link--gulerie:hover .client-logo {
  filter: brightness(1.2);
}

/* Estilos específicos para el logo de Gold Hoteles */
.client-logo-link--gold {
  background-color: #5b2432;
}
.client-logo-link--gold .client-logo {
  filter: none;
  opacity: 1;
}
.client-logo-link--gold:hover .client-logo {
  filter: brightness(1.2);
}

/* Estilos específicos para el logo de Premium Tower Suites */
.client-logo-link--premium-tower {
  background-color: #303033;
}
.client-logo-link--premium-tower .client-logo {
  filter: none;
  opacity: 1;
}
.client-logo-link--premium-tower:hover .client-logo {
  filter: brightness(1.1);
}

/* Estilos específicos para el logo de Urbana Suites */
.client-logo-link--urbana {
  background-color: white;
}
.client-logo-link--urbana .client-logo {
  filter: none;
  opacity: 1;
}
.client-logo-link--urbana:hover .client-logo {
  filter: brightness(1.1);
}

/* MEDIA QUERIES CONSOLIDADOS PARA MÓVIL */
@media (max-width: 768px) {
  .social-container {
    gap: 1rem;
  }

  .main-content {
    padding: 1rem 0.5rem;
    flex-direction: column;
    align-items: center;
    padding-top: 2rem;
  }

  .main-content > * {
    width: 100%;
    max-width: 100%;
  }

  .cta-box {
    padding: 2rem 1rem;
    max-width: 100%;
    width: 100%;
    border-radius: 0;
  }

  .practice-areas {
    padding: 0 0.5rem;
    width: 100%;
  }

  .practice-areas h3 {
    font-size: 1.8rem;
  }

  .areas-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    width: 100%;
  }

  .about-us-container, .faq-container, .locations-container {
    padding: 1rem 0.5rem; /* Más estirado a los bordes */
    width: 100%;
    max-width: 100%;
    margin: 1rem 0;
    border-radius: 0;
  }
  
  .area-card {
    padding: 1.5rem; /* Reducido de 2.5rem para aprovechar más el ancho */
  }
  
  .about-us-container h1, .faq-container h1, .locations-container h1 {
    font-size: 1.8rem;
  }

  .specialization-grid {
    grid-template-columns: 1fr;
  }

  .practice-area-container {
    padding: 0; /* Sin padding extra en móvil */
    margin: 1rem 0;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
  }

  .practice-area-overlay {
    padding: 2rem 1rem; /* Reducido ligeramente de 1.2rem */
  }

  .practice-area-container h1 {
    font-size: 2rem;
  }

  .content-section p, .content-section li {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 1rem;
  }

  .contact-container {
    padding: 1rem; /* Reducido de 1.5rem */
    width: 100%;
    max-width: 100%;
    border-radius: 0;
  }

  .clients-page {
    padding: 1.5rem 0.5rem;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
  }

  .clients-page .page-title {
    font-size: 2rem;
  }

  .clients-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    width: 100%;
  }

  .client-logo-link {
    width: 100%;
    max-width: 100%;
  }
}
