/* MCOY Abogados — hoja de estilos principal */

:root {
  --navy: #1e3a54;
  --navy-dark: #14293c;
  --blue: #5d80a0;
  --blue-light: #eef3f7;
  --accent: #a8265f;
  --accent-dark: #841c4a;
  --gray-900: #22282e;
  --gray-700: #4a5560;
  --gray-500: #7c8894;
  --gray-200: #e4e8ec;
  --gray-100: #f5f7f9;
  --white: #ffffff;
  --radius: 6px;
  --shadow: 0 4px 20px rgba(20, 41, 60, 0.08);
  --shadow-lg: 0 10px 40px rgba(20, 41, 60, 0.15);
  --font: 'Open Sans', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;
  --premio-blue: #004472;
  --icono-azul: #28659b;   /* azul de los iconos de áreas */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
section { padding: 80px 0; }
h1, h2, h3, h4 { font-family: var(--font); font-weight: 700; color: var(--navy); margin: 0 0 20px; line-height: 1.25; }
h2.section-title { font-size: 2.1rem; text-align: center; margin-bottom: 12px; }
p.section-subtitle { text-align: center; color: var(--gray-700); max-width: 720px; margin: 0 auto 48px; }
.text-center { text-align: center; }
.btn {
  display: inline-block; padding: 13px 32px; background: var(--accent); color: var(--white);
  border-radius: 999px; font-weight: 600; letter-spacing: .3px; border: none; cursor: pointer;
  transition: background .2s ease, transform .2s ease; font-size: .95rem;
}
.btn:hover { background: var(--accent-dark); color: var(--white); transform: translateY(-1px); }
.btn-outline { background: transparent; border: 2px solid var(--white); color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--navy); }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 100; background: var(--white);
  box-shadow: 0 2px 12px rgba(20,41,60,.08);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand img { height: 46px; } /* logo completo: 4.2:1, ~194px de ancho */
.brand { flex: 0 0 auto; margin-right: 28px; }
.main-nav { display: flex; align-items: center; gap: 32px; }
.main-nav ul { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; }
.main-nav a { color: var(--navy); font-weight: 600; font-size: .93rem; letter-spacing: .2px; }
.main-nav a:hover { color: var(--accent); }
.lang-switch { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: .85rem; }
.lang-switch a { color: var(--gray-500); }
.lang-switch a.active { color: var(--accent); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 26px; height: 2px; background: var(--navy); display: block; }

/* ===== Slider / Hero ===== */
.hero-slider { position: relative; height: 78vh; min-height: 480px; overflow: hidden; }
.hero-slide {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.2s ease; display: flex; align-items: center;
}
.hero-slide.active { opacity: 1; }
.hero-slide::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(20,41,60,.78) 0%, rgba(20,41,60,.45) 55%, rgba(20,41,60,.15) 100%);
}
.hero-content { position: relative; z-index: 2; color: var(--white); max-width: 620px; }
.hero-content h1 { color: var(--white); font-size: 2.6rem; margin-bottom: 18px; }
.hero-content p { font-size: 1.15rem; margin-bottom: 32px; color: rgba(255,255,255,.9); }
.hero-dots { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 10px; }
.hero-dots button { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--white); background: transparent; cursor: pointer; padding: 0; }
.hero-dots button.active { background: var(--white); }

/* ===== Nosotros ===== */
.nosotros { background: var(--navy); }
.nosotros .section-title { color: var(--white); }
.nosotros-intro { max-width: 820px; margin: 0 auto 56px; text-align: center; color: rgba(255,255,255,.8); font-size: 1.08rem; }
.nosotros-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; margin-bottom: 40px; }
.nosotros-block { text-align: center; padding: 20px 24px; }
.nosotros-icon {
  width: 96px; height: 96px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 22px;
  transition: background-color .3s ease, border-color .3s ease;
}
.nosotros-icon svg { width: 40px; height: 40px; stroke: var(--white); fill: none; transition: stroke .3s ease; }
.nosotros-block:hover .nosotros-icon { background: var(--accent); border-color: var(--accent); }
.nosotros-block h3 { font-size: 1.1rem; margin-bottom: 12px; color: var(--white); }
.nosotros-block p { color: rgba(255,255,255,.75); margin: 0; font-size: .95rem; }
.nosotros-cierre { text-align: center; max-width: 760px; margin: 0 auto; font-size: 1.15rem; color: var(--white); font-family: var(--font-serif); font-style: italic; }

/* ===== Citas destacadas (carrusel) ===== */
.citas { background: var(--white); }
.citas-carousel { position: relative; max-width: 860px; margin: 0 auto; display: flex; align-items: center; gap: 22px; }
.citas-viewport { flex: 1; overflow: hidden; }
.citas-track { display: flex; transition: transform .45s ease; }
.cita-card { flex: 0 0 100%; text-align: center; padding: 10px 20px; }
.cita-texto {
  font-family: var(--font-serif); font-style: italic; font-size: 1.5em; line-height: 1.5;
  color: var(--navy); margin: 0;
}
.cita-comilla { color: var(--accent); font-style: normal; font-weight: 700; }
.carousel-arrow.citas-arrow { border-color: var(--gray-200); color: var(--accent); }
.carousel-arrow.citas-arrow:hover { background: var(--accent); border-color: var(--accent); color: var(--white); }
.carousel-dots.citas-dots button { background: var(--gray-200); }
.carousel-dots.citas-dots button.active { background: var(--accent); }
@media (max-width: 640px) {
  .cita-texto { font-size: 1.15em; }
}

/* ===== Historia (parallax) ===== */
.historia-parallax {
  position: relative; min-height: 460px; display: flex; align-items: center; justify-content: center;
  background-image: linear-gradient(rgba(20,41,60,.6), rgba(20,41,60,.72)), url('/assets/img/mcoy10-historia.jpg');
  background-size: cover; background-position: center; background-attachment: fixed;
}
.historia-parallax .container { text-align: center; max-width: 780px; }
.historia-parallax h2, .historia-parallax p { color: var(--white); }
.historia-parallax p { font-size: 1.05rem; color: rgba(255,255,255,.9); }
@media (max-width: 768px) {
  .historia-parallax { background-attachment: scroll; }
}

/* ===== Tu Equipo ===== */
.tuequipo { background: var(--navy) url('/assets/img/fondotuequipo.svg') no-repeat center / cover; position: relative; }
.tuequipo .section-title, .tuequipo .lema { color: var(--white); }
.tuequipo .lema { text-align: center; letter-spacing: .5px; margin-bottom: 48px; color: rgba(255,255,255,.85); font-weight: 600; font-size: .92rem; text-transform: uppercase; }
.equipo-grid {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 40px 20px; grid-row-gap: 40px; grid-column-gap: 20px;
}
.equipo-card {
  position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  aspect-ratio: 3/4; display: block;
}
.equipo-card .foto { position: absolute; inset: 0; background: var(--gray-200); }
.equipo-card .foto img { width: 100%; height: 100%; object-fit: cover; }
.equipo-card .info {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 12px; text-align: center;
  background: var(--accent); transform: translateY(100%); transition: transform .3s ease;
}
.equipo-card:hover .info { transform: translateY(0); }
.equipo-card .info h3 { font-size: .88rem; margin: 0 0 4px; color: var(--white); line-height: 1.3; }
.equipo-card .info .cargo { color: rgba(255,255,255,.9); font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }
.equipo-card .info a.btn-mini { display: none; }

/* ===== Perfil individual ===== */
.perfil-header { background: var(--gray-100); padding: 56px 0 64px; }
.perfil-grid { display: grid; grid-template-columns: 280px 1fr; gap: 48px; align-items: start; }
.perfil-grid > img { border-radius: var(--radius); box-shadow: var(--shadow-lg); position: sticky; top: 96px; }
.perfil-info .cargo { color: var(--accent); font-weight: 700; text-transform: uppercase; font-size: .85rem; margin-bottom: 8px; }
.perfil-info h1 { margin-bottom: 4px; }
.perfil-body { padding: 56px 0; } /* usado también por areas.php */

.perfil-boxes { display: flex; gap: 20px; margin-top: 30px; align-items: stretch; }
.perfil-boxes-side { flex: 1; display: flex; flex-direction: column; gap: 20px; }
.perfil-box { flex: 1.35; background: var(--white); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); transition: box-shadow .25s ease; }
.perfil-boxes-side .perfil-box { flex: 1; }
.perfil-box:hover { box-shadow: var(--shadow-lg); }
.perfil-box-icon {
  width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: var(--white);
  border: 2px solid var(--accent); display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px; transition: background-color .25s ease, color .25s ease;
}
.perfil-box:hover .perfil-box-icon { background: var(--white); color: var(--accent); }
.perfil-box-icon svg { width: 24px; height: 24px; }
.perfil-box h4 { font-size: .95rem; text-transform: uppercase; letter-spacing: .4px; color: var(--navy); margin: 0 0 12px; }
.perfil-box p { color: var(--gray-700); font-size: .92rem; line-height: 1.7; margin: 0; }
.perfil-box p a { font-weight: 700; }

/* ===== Áreas de práctica ===== */
.areaspractica { background: var(--gray-100); }
.areas-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
/* La imagen trae solo el icono; el título es texto real (indexable y clicable junto con la tarjeta). */
.area-card {
  display: flex; flex-direction: column; background: var(--white);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: box-shadow .25s ease, transform .25s ease;
}
.area-card img { width: 100%; height: auto; display: block; }
.area-card h3 {
  margin: 0; padding: 14px 16px 22px; flex: 1;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: .95rem; font-weight: 700; line-height: 1.35;
  text-transform: uppercase; letter-spacing: .6px; color: var(--gray-700);
}
.area-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.area-card:hover h3 { color: var(--accent); }
.area-subpages { margin-top: 20px; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.area-subpages a { background: var(--white); border: 1px solid var(--gray-200); padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: .85rem; color: var(--navy); }
.area-subpages a:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Submenú de subáreas (dentro de la página del padre) ===== */
.area-submenu { position: sticky; top: 76px; z-index: 50; background: var(--accent); box-shadow: var(--shadow); }
.area-submenu-inner { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 24px; overflow-x: auto; }
.area-submenu a {
  color: var(--white); font-weight: 700; font-size: .86rem; letter-spacing: .2px; white-space: nowrap;
  padding: 9px 20px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.5);
  transition: background-color .2s ease, border-color .2s ease;
}
.area-submenu a:hover { background: rgba(255,255,255,.2); border-color: var(--white); }

.area-subsection-card { background: var(--gray-100); border-radius: var(--radius); padding: 36px; margin-top: 28px; scroll-margin-top: 150px; }

/* ===== Bloques de servicios (arriba del contenido detallado del área) ===== */
.area-bloques { padding: 56px 0; background: var(--white); } /* mismo aire arriba y abajo */
.area-bloques-intro {
  max-width: 820px; margin: 0 auto 44px; text-align: center;
  color: var(--gray-700); font-size: 1.05rem; line-height: 1.7;
}
.area-bloques-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.area-bloque { display: block; text-align: center; color: inherit; }
.area-bloque img { width: 96px; height: 96px; margin: 0 auto 18px; border-radius: 14px; }
.area-bloque h3 { font-size: 1.12rem; color: var(--icono-azul); margin: 0 0 12px; line-height: 1.3; }
.area-bloque p { margin: 0; font-size: .92rem; line-height: 1.65; color: var(--gray-700); }
a.area-bloque { transition: transform .25s ease; }
a.area-bloque:hover { transform: translateY(-4px); color: inherit; }
a.area-bloque:hover h3 { color: var(--accent); }
@media (max-width: 900px) {
  .area-bloques-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}
@media (max-width: 560px) {
  .area-bloques-grid { grid-template-columns: 1fr; }
}
.area-subsection-card h2 { margin-bottom: 22px; }
.checklist { list-style: none; margin: 18px 0 22px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; }
.checklist li { display: flex; align-items: flex-start; gap: 10px; color: var(--gray-700); font-size: .93rem; line-height: 1.5; }
.checklist li svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 3px; color: var(--accent); }

/* ===== Premios ===== */
#premios .container { max-width: 1500px; }
.premios-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; align-items: stretch; margin-bottom: 40px; }
.premio-item {
  position: relative; min-height: 160px; aspect-ratio: 1/1; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); background: var(--gray-100); cursor: pointer;
}
.premio-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.premio-item .premio-overlay {
  position: absolute; inset: 0; background: rgba(0,68,114,.92); color: var(--white);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 18px;
  transform: translateY(-100%); transition: transform .35s ease;
}
.premio-item:hover .premio-overlay, .premio-item.active .premio-overlay { transform: translateY(0); }
.premio-item .premio-overlay strong { font-size: .92rem; margin-bottom: 8px; }
.premio-item .premio-overlay span { font-size: .78rem; color: rgba(255,255,255,.9); }

/* ===== Testimonios (carrusel) ===== */
.loquedicen { background: var(--navy-dark); }
.loquedicen .section-title { color: var(--white); }
.testimonios-carousel { position: relative; max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 18px; }
.testimonios-viewport { flex: 1; overflow: hidden; }
.testimonios-track { display: flex; transition: transform .45s ease; }
.testimonio-card {
  flex: 0 0 100%; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius); padding: 36px 40px; color: rgba(255,255,255,.9); text-align: center; min-height: 220px;
  display: flex; flex-direction: column; justify-content: center;
}
.testimonio-card p.quote { font-family: var(--font-serif); font-style: italic; font-size: 1.05rem; margin-bottom: 20px; line-height: 1.5; }
.testimonio-card .autor { font-weight: 700; color: var(--white); }
.testimonio-card .cargo { font-size: .82rem; color: rgba(255,255,255,.6); }
.carousel-arrow {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3);
  background: transparent; color: var(--white); cursor: pointer; font-size: 1.2rem; transition: background .2s ease;
}
.carousel-arrow:hover { background: var(--accent); border-color: var(--accent); }
.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.carousel-dots button { width: 9px; height: 9px; border-radius: 50%; border: none; background: rgba(255,255,255,.3); padding: 0; cursor: pointer; }
.carousel-dots button.active { background: var(--accent); }
@media (max-width: 640px) {
  .testimonio-card { padding: 28px 20px; }
  .carousel-arrow { width: 36px; height: 36px; font-size: 1rem; }
}

/* ===== Contacto ===== */
.contacto-oficinas { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-bottom: 40px; }
.oficina-card { background: var(--gray-100); border-radius: var(--radius); padding: 32px; cursor: pointer; border: 2px solid transparent; transition: border-color .2s ease; }
.oficina-card:hover, .oficina-card.active { border-color: var(--accent); }
.oficina-card h3 { margin-bottom: 10px; }
.oficina-card .direccion { color: var(--gray-700); margin-bottom: 10px; }
.oficina-card .telefono { font-weight: 700; color: var(--navy); }
.oficina-card .ver-mapa { display: inline-block; margin-top: 14px; font-weight: 700; font-size: .85rem; }
.mapa-wrap { display: none; margin-bottom: 40px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.mapa-wrap.visible { display: block; }
.mapa-wrap iframe { width: 100%; height: 380px; border: 0; }
.correo-general { text-align: center; margin-bottom: 48px; font-size: 1.05rem; }
.correo-general a { font-weight: 700; }
.contacto-form { max-width: 640px; margin: 0 auto; background: var(--gray-100); padding: 40px; border-radius: var(--radius); }
.contacto-form .field { margin-bottom: 20px; }
.contacto-form label { display: block; margin-bottom: 6px; font-weight: 600; font-size: .9rem; color: var(--navy); }
.contacto-form input, .contacto-form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--gray-200); border-radius: var(--radius);
  font-family: var(--font); font-size: .95rem; background: var(--white);
}
.contacto-form textarea { min-height: 130px; resize: vertical; }
.contacto-form .hp-field { position: absolute; left: -9999px; opacity: 0; }
.form-msg { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px; font-size: .9rem; }
.form-msg.ok { background: #e5f6ea; color: #1c6b34; }
.form-msg.error { background: #fbe7e9; color: #a12a35; }

/* ===== Footer ===== */
.site-footer { background: var(--navy-dark); color: rgba(255,255,255,.7); padding: 40px 0; text-align: center; }
.site-footer .footer-logo { height: 32px; margin: 0 auto 16px; filter: brightness(0) invert(1); opacity: .85; }
.site-footer p { margin: 4px 0; font-size: .85rem; }
.site-footer a { color: rgba(255,255,255,.85); }
.site-footer .footer-credit { font-size: .75rem; color: rgba(255,255,255,.45); margin-top: 12px; }
.site-footer .footer-credit a { color: rgba(255,255,255,.6); }
.site-footer .footer-credit a:hover { color: rgba(255,255,255,.9); }

/* ===== Modal Chihuahua (no es popup del navegador, es contenido de la misma página) ===== */
.chihuahua-modal { position: fixed; inset: 0; z-index: 999; display: none; align-items: center; justify-content: center; padding: 20px; }
.chihuahua-modal.open { display: flex; }
.chihuahua-modal-backdrop { position: absolute; inset: 0; background: rgba(20,41,60,.75); }
.chihuahua-modal-dialog {
  position: relative; background: var(--white); border-radius: var(--radius); overflow: hidden;
  max-width: 460px; width: 100%; box-shadow: var(--shadow-lg); animation: chihuahuaPop .3s ease;
  max-height: 90vh; overflow-y: auto;
}
@keyframes chihuahuaPop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
.chihuahua-modal-img { width: 100%; height: 200px; object-fit: cover; display: block; }
.chihuahua-modal-body { padding: 26px 26px 30px; }
.chihuahua-modal-body h3 { color: var(--navy); margin-bottom: 14px; font-size: 1.3rem; }
.chihuahua-modal-body p { color: var(--gray-700); font-size: .93rem; margin: 0 0 12px; line-height: 1.6; }
.chihuahua-modal-signoff { font-weight: 700; color: var(--accent); }
.chihuahua-modal-close {
  position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.92); border: none; font-size: 1.4rem; line-height: 1; cursor: pointer;
  color: var(--navy); z-index: 2; display: flex; align-items: center; justify-content: center;
}
.chihuahua-modal-close:hover { background: var(--white); color: var(--accent); }

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .nosotros-grid, .areas-grid { grid-template-columns: repeat(2, 1fr); }
  .equipo-grid { grid-template-columns: repeat(4, 1fr); }
  .premios-grid { grid-template-columns: repeat(3, 1fr); }
  .historia { grid-template-columns: 1fr; }
  .perfil-grid { grid-template-columns: 1fr; }
  .perfil-boxes { flex-direction: column; }
  .perfil-grid > img { position: static; }
}
/* El menú horizontal no cabe entre ~641-960px con las etiquetas largas (Premios y Reconocimientos, Áreas de Práctica) — el hamburguesa entra antes que el quiebre de columnas de contenido. */
@media (max-width: 1100px) { /* subido de 960: el logo completo ocupa mas ancho */
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute; top: 76px; left: 0; right: 0; background: var(--white);
    flex-direction: column; align-items: flex-start; padding: 20px 24px; box-shadow: var(--shadow);
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav ul { flex-direction: column; gap: 16px; width: 100%; }
}
@media (max-width: 640px) {
  section { padding: 56px 0; }
  .hero-content h1 { font-size: 1.8rem; }
  .nosotros-grid, .areas-grid, .premios-grid, .contacto-oficinas { grid-template-columns: 1fr; }
  .equipo-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  h2.section-title { font-size: 1.6rem; }
  .contacto-form { padding: 24px; }
  .checklist { grid-template-columns: 1fr; }
  .area-subsection-card { padding: 24px; }
}
