/* ===============================
   ESTILO GENERAL
================================== */

:root {
  --primary-color: #B89B5F;   /* Dorado/Mostaza de la tarjeta */
  --dark-bg: #3A4A62;        /* Azul oscuro/grisáceo de la tarjeta */
  --light-bg: #F9F9F9;       /* Blanco crema para fondos claros */
  --text-light: #FFFFFF;     /* Blanco puro para texto sobre fondos oscuros */
  --text-dark: #333333;      /* Negro suave para texto sobre fondos claros */
  --font-title: 'Playfair Display', serif;
  --font-body: 'Open Sans', sans-serif;
   --accent-color: #B89B5F;   /* Dorado/Mostaza de la tarjeta */
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-light);
  background-color: var(--dark-bg); /* ✅ mismo fondo que el resto */
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* ===============================
   NAVEGACIÓN
================================== */

.header {
  background-color: var(--dark-bg);
  padding: 1rem 0;
  color: var(--text-light);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* Sutil sombra para el header sticky */
}

.nav {
  max-width: 1100px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
}

.logo {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-color);
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-menu a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

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

.hamburger-icon {
  display: none;
  color: var(--text-light);
  font-size: 1.5rem;
}

/* ===============================
   HERO SECTION
================================== */

.hero {
  background-color: var(--dark-bg);
  color: var(--text-light);
  text-align: center;
  padding: 8rem 2rem 6rem;
}

.hero-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.hero h1 {
  font-family: var(--font-title);
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.hero h2 {
  font-size: 1.3rem;
  letter-spacing: 2px;
  margin-bottom: 1rem;
  color: #ddd; /* Un gris claro para el subtítulo */
}

.hero p {
  margin-bottom: 2rem;
}

.cta-button {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--text-light); /* Color de texto claro para el botón */
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s;
}

.cta-button:hover {
  background-color: #d1b26f; /* Un dorado un poco más claro para el hover */
}

/* ===============================
   SECCIONES GENERALES
================================== */

.section {
  padding: 5rem 2rem;
}

.section-dark {
  background-color: var(--dark-bg);
  color: var(--text-light);
  position: relative;
  z-index: 0;
}

.section-title {
  font-family: var(--font-title);
  font-size: 2.4rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color); /* Títulos de secciones en dorado */
  text-align: center; /* Centrar títulos por defecto */
}

.section-title-light {
  font-family: var(--font-title);
  font-size: 2.4rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  text-align: center;
}

.section-subtitle {
  text-align: center;
  margin-bottom: 3rem;
  opacity: 0.9;
  color: #ccc; /* Un gris más claro para subtítulos oscuros */
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

/* ===============================
   SOBRE MÍ (Optimizado)
================================== */

#sobre-mi {
  background-color: var(--light-bg);
  color: var(--text-dark);
  position: relative;
  z-index: 1;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.about-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-image img {
  width: 100%;
  max-width: 420px; /* ✅ limita el tamaño máximo */
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  object-fit: cover;
  aspect-ratio: 3 / 4; /* ✅ mantiene proporción equilibrada */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-image img:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.about-text {
  text-align: left;
}

.about-text .section-title {
  text-align: left;
  margin-bottom: 1.5rem;
}

.about-text p {
  margin-bottom: 1rem;
  color: var(--text-dark);
  line-height: 1.7;
}

/* ✅ En móviles: centra todo */
@media (max-width: 768px) {
  #sobre-mi {
    text-align: center;
  }

  .about-text .section-title {
    text-align: center;
  }

  .about-image img {
    max-width: 80%;
  }
}


/* ===============================
   SERVICIOS
================================== */

.practice-areas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.area-card {
  background-color: #4a5a75; /* Un tono intermedio entre el oscuro y el acento */
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  transition: transform 0.3s;
  border: 1px solid var(--primary-color); /* Borde dorado */
}

.area-card:hover {
  transform: translateY(-5px);
}

.area-card i {
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.area-card h4 {
  font-family: var(--font-title);
  margin-bottom: 0.5rem;
  color: var(--text-light);
}
.area-card p {
    color: var(--text-light);
}

/* ===============================
   FORMULARIO DE CONTACTO
================================== */

form {
  background-color: #4a5a75; /* Fondo del formulario en un tono intermedio */
  padding: 2rem;
  border-radius: 10px;
}

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

label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 600;
  color: var(--text-light); /* Labels blancas sobre fondo oscuro del form */
}

input, textarea {
  width: 100%;
  padding: 0.8rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  background-color: rgba(255,255,255,0.9); /* Inputs casi blancos */
  color: var(--text-dark);
}

textarea {
  resize: vertical;
}

.contact-info {
  color: var(--text-light);
  font-size: 1rem;
}

.contact-info p {
  margin-bottom: 0.8rem;
}

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

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

/* Estilos para el mensaje de éxito del formulario */
#form-success-message {
    display: none; /* Oculto por defecto */
    text-align: center;
    padding: 20px;
    color: var(--text-light);
}
#form-success-message i {
    color: var(--primary-color);
    font-size: 3rem;
    margin-bottom: 10px;
}
#form-success-message h3 {
    font-family: var(--font-title);
    font-size: 1.8rem;
    margin-top: 10px;
    color: var(--primary-color);
}
#form-success-message p {
    font-size: 1.1rem;
    margin-top: 10px;
}

/* ===============================
   CTA BUTTON (Unificado)
================================== */

.cta-button {
  display: inline-block;
  background-color: var(--accent-color);
  color: white;
  text-decoration: none;
  padding: 0.9rem 1.8rem;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1rem;
  border: none; /* ✅ quita bordes nativos de los <button> */
  cursor: pointer;
  transition: all 0.3s ease;
}

.cta-button:hover {
  background-color: #d4a93a;
  transform: translateY(-2px);
}

/* ✅ evita contornos azules al hacer click */
.cta-button:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(244, 197, 66, 0.4);
}

/* ===============================
   CTA FINAL
================================== */

.cta-final {
  background-color: var(--light-bg); /* Fondo claro */
  color: var(--text-dark); /* Texto oscuro */
  text-align: center;
  padding: 4rem 2rem;
}

.cta-final h3 {
  font-family: var(--font-title);
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--primary-color); /* Título dorado */
}

.cta-final p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

/* ===============================
   FOOTER
================================== */

.footer {
  background-color: #2b3a50; /* Un tono un poco más oscuro que el dark-bg */
  color: #ccc; /* Gris claro para el texto */
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* ===============================
   WHATSAPP FLOAT (final)
================================== */

.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #25d366;
  color: white;
  font-size: 1.6rem;
  width: 55px;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
  text-decoration: none;     /* ✅ elimina subrayado */
  z-index: 1000;
}

.whatsapp-float i {
  color: white;              /* ✅ asegura color correcto del ícono */
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

/* ===============================
   CORRECCIÓN DE FOOTER EN PÁGINAS CORTAS
================================== */

html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

footer {
  margin-top: auto;  /* Empuja el footer al fondo si hay poco contenido */
}

/* ===============================
   RESPONSIVE
================================== */

@media (max-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .section-title,
  .section-title-light {
    font-size: 1.8rem; /* Tamaño original para móvil */
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    background-color: var(--dark-bg);
    width: 100%;
    text-align: center;
    position: absolute;
    top: 60px;
    left: 0;
    padding: 1rem 0;
  }

  .nav-menu.active {
    display: flex;
  }

  .hamburger-icon {
    display: block;
  }

  .hero {
    padding-top: 6rem; /* Ajustar padding superior para que el header no lo tape */
  }

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

  .hero h2 {
    font-size: 1.1rem;
  }

  .whatsapp-float {
    font-size: 1.4rem;
    padding: 0.7rem; /* Achicado para móvil */
  }

  .about-text .section-title {
    text-align: center; /* Centrar el título "Sobre Mí" en móvil */
  }
}

/* ===============================
   ACCESIBILIDAD
================================== */

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 3px;
}
