/* ==========================================================================
   VARIABLES DE IDENTIDAD VISUAL - GRUPO DE ESTUDIO JURÍDICO IMEI
   ========================================================================== */
:root {
  --navy-dark: #07101f;
  --navy-primary: #0b1628;
  --navy-light: #152542;
  --gold-primary: #c9a24b;
  --gold-bright: #dfc075;
  --gold-muted: rgba(201, 162, 75, 0.25);
  --cream-bg: #f5f2ea;
  --cream-card: #fcfbf7;
  --white: #ffffff;
  --text-dark: #161e2c;
  --text-muted: #4a5568;
  --text-light: #e2e8f0;

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-soft: 0 10px 30px rgba(11, 22, 40, 0.08);
  --shadow-card: 0 16px 40px rgba(7, 16, 31, 0.14);
  --transition: all 0.28s ease;
}

/* ==========================================================================
   RESET Y BASE
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--text-dark);
  background-color: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--navy-primary);
  line-height: 1.22;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5.5rem 0;
}

.bg-cream {
  background-color: var(--cream-bg);
}

.bg-navy {
  background-color: var(--navy-primary);
}

.text-light {
  color: var(--text-light);
}

.text-gold {
  color: var(--gold-primary);
}

.text-center {
  text-align: center;
}

/* ==========================================================================
   ELEMENTOS DECORATIVOS Y BOTONES
   ========================================================================== */
.section-kicker {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-primary);
  margin-bottom: 0.6rem;
}

.section-header h2 {
  font-size: clamp(1.85rem, 3.2vw, 2.5rem);
  margin-bottom: 1rem;
}

.section-desc {
  max-width: 680px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.gold-line {
  width: 64px;
  height: 3px;
  background-color: var(--gold-primary);
  margin: 1rem 0 1.5rem;
}

.gold-line.center {
  margin: 1rem auto 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.88rem 1.75rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  text-align: center;
}

.btn-primary {
  background-color: var(--gold-primary);
  color: var(--navy-dark);
}

.btn-primary:hover {
  background-color: var(--gold-bright);
  transform: translateY(-2px);
}

.btn-outline {
  border-color: var(--gold-primary);
  color: var(--white);
  background: transparent;
}

.btn-outline:hover {
  background-color: rgba(201, 162, 75, 0.15);
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--white);
  background: transparent;
}

.btn-outline-light:hover {
  border-color: var(--gold-primary);
  color: var(--gold-bright);
}

.btn-navy {
  background-color: var(--navy-primary);
  color: var(--white);
}

.btn-navy:hover {
  background-color: var(--navy-light);
  transform: translateY(-2px);
}

/* ==========================================================================
   NAVEGACIÓN
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(11, 22, 40, 0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gold-muted);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 50%;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--gold-primary);
  letter-spacing: 0.05em;
  line-height: 1;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--text-light);
  opacity: 0.85;
  margin-top: 3px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  color: var(--text-light);
  font-size: 0.92rem;
  font-weight: 500;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--gold-primary);
}

.btn-nav {
  padding: 0.5rem 1.15rem;
  border: 1px solid var(--gold-primary);
  border-radius: var(--radius-sm);
  color: var(--gold-primary);
}

.btn-nav:hover {
  background-color: var(--gold-primary);
  color: var(--navy-dark);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger, .hamburger::before, .hamburger::after {
  display: block;
  width: 26px;
  height: 2px;
  background-color: var(--gold-primary);
  transition: var(--transition);
  position: relative;
}

.hamburger::before, .hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-primary) 65%, var(--navy-light) 100%);
  color: var(--white);
  padding: 5.5rem 0 6rem;
  border-bottom: 3px solid var(--gold-primary);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 3.5rem;
  align-items: center;
}

.badge-gold {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--gold-primary);
  border-radius: 50px;
  color: var(--gold-bright);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2.3rem, 4.5vw, 3.45rem);
  margin-bottom: 1.25rem;
}

.hero-lead {
  font-size: 1.12rem;
  color: var(--text-light);
  opacity: 0.92;
  margin-bottom: 2rem;
  max-width: 610px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.hero-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--gold-primary);
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-light);
  opacity: 0.82;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.18);
}

.hero-emblem-card {
  display: flex;
  justify-content: center;
}

.emblem-frame {
  background-color: var(--navy-dark);
  border: 1px solid var(--gold-muted);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-card);
  max-width: 360px;
  width: 100%;
}

.hero-logo-img {
  width: 220px;
  height: 220px;
  object-fit: contain;
  margin: 0 auto 1.25rem;
}

.emblem-caption {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--gold-bright);
  font-size: 0.95rem;
}

/* ==========================================================================
   PAÍSES / COMUNIDAD
   ========================================================================== */
.countries-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.5rem;
}

.country-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background-color: var(--white);
  border: 1px solid rgba(11, 22, 40, 0.12);
  padding: 0.7rem 1.35rem;
  border-radius: 50px;
  font-weight: 600;
  color: var(--navy-primary);
  box-shadow: 0 4px 12px rgba(11, 22, 40, 0.04);
}

.country-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--gold-primary);
}

/* ==========================================================================
   TARJETAS DE METODOLOGÍA
   ========================================================================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.feature-card {
  background-color: var(--cream-card);
  border: 1px solid rgba(201, 162, 75, 0.32);
  border-radius: var(--radius-md);
  padding: 2.25rem 1.85rem;
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-soft);
  border-color: var(--gold-primary);
}

.card-number {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold-primary);
  margin-bottom: 0.75rem;
}

.feature-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.85rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.96rem;
}

/* ==========================================================================
   PRÓXIMA SESIÓN Y CALENDARIO
   ========================================================================== */
.session-wrapper {
  background: linear-gradient(145deg, var(--navy-light), var(--navy-dark));
  border: 1px solid var(--gold-primary);
  border-radius: var(--radius-lg);
  padding: 3.5rem;
  box-shadow: var(--shadow-card);
}

.session-badge {
  display: inline-block;
  background-color: var(--gold-primary);
  color: var(--navy-dark);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.35rem 0.9rem;
  border-radius: 4px;
  margin-bottom: 1.25rem;
}

.session-title {
  color: var(--white);
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  max-width: 850px;
}

.session-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.meta-box {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-bright);
  margin-bottom: 0.25rem;
}

.meta-value {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--white);
}

.session-note {
  font-size: 0.95rem;
  color: var(--text-light);
  opacity: 0.85;
  margin-bottom: 2rem;
}

.calendar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   CEO / COORDINADOR GENERAL (AJUSTE AUTOMÁTICO DE IMAGEN COMPLETA)
   ========================================================================== */
.ceo-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 3.5rem;
  align-items: center;
}

.ceo-photo-wrapper {
  position: relative;
}

/* Contenedor responsivo que encuadra fotos de tamaño completo sin distorsión */
.ceo-photo-frame {
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 520px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 3px solid var(--gold-primary);
  background-color: var(--navy-primary);
  box-shadow: var(--shadow-card);
}

.ceo-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top; /* Prioriza el rostro y hombros en fotos verticales u horizontales */
}

.ceo-tag {
  background-color: var(--navy-primary);
  color: var(--white);
  padding: 1.15rem 1.5rem;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--gold-primary);
  margin-top: -1.5rem;
  margin-left: 1.25rem;
  margin-right: 1.25rem;
  position: relative;
  z-index: 2;
  box-shadow: var(--shadow-soft);
}

.ceo-tag strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--gold-bright);
}

.ceo-tag span {
  font-size: 0.88rem;
  color: var(--text-light);
}

.ceo-bio h2 {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
}

.ceo-bio p {
  font-size: 1.03rem;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

.bio-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.bio-highlights li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--text-muted);
  font-size: 0.97rem;
}

.bio-highlights li::before {
  content: '⚖';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--gold-primary);
  font-size: 0.9rem;
}

.bio-highlights strong {
  color: var(--navy-primary);
}

/* ==========================================================================
   SECCIÓN DE CONSULTAS Y CONTACTO
   ========================================================================== */
.contact-card {
  background-color: var(--cream-card);
  border: 1px solid rgba(201, 162, 75, 0.4);
  border-radius: var(--radius-lg);
  padding: 3.5rem;
  box-shadow: var(--shadow-soft);
}

.contact-info {
  max-width: 780px;
  margin: 0 auto;
}

.contact-info p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2.25rem;
}

.direct-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
}

.contact-channel-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.35rem 1.75rem;
  border-radius: var(--radius-md);
  background-color: var(--white);
  border: 1px solid rgba(11, 22, 40, 0.14);
  transition: var(--transition);
}

.contact-channel-btn:hover {
  transform: translateX(6px);
  border-color: var(--gold-primary);
  box-shadow: var(--shadow-soft);
}

.whatsapp-btn {
  border-left: 5px solid #25d366;
}

.email-btn {
  border-left: 5px solid var(--navy-primary);
}

.group-btn {
  border-left: 5px solid var(--gold-primary);
}

.channel-title {
  display: block;
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--navy-primary);
}

.channel-sub {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.channel-arrow {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold-primary);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background-color: var(--navy-dark);
  color: var(--text-light);
  border-top: 3px solid var(--gold-primary);
  padding-top: 3.5rem;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  padding-bottom: 2.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.footer-brand h3 {
  color: var(--gold-primary);
  font-size: 1.2rem;
}

.footer-brand p {
  font-size: 0.88rem;
  opacity: 0.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.92rem;
}

.footer-links a:hover {
  color: var(--gold-primary);
}

.footer-bottom {
  background-color: #040913;
  padding: 1.25rem 0;
  text-align: center;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.65);
}

/* ==========================================================================
   RESPONSIVE DESIGN (MÓVILES Y TABLETS)
   ========================================================================== */
@media (max-width: 960px) {
  .hero-grid,
  .ceo-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .session-meta-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .session-wrapper,
  .contact-card {
    padding: 2.25rem 1.5rem;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    background-color: var(--navy-dark);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.15rem;
    border-bottom: 2px solid var(--gold-primary);
    display: none;
  }

  .nav-menu.active {
    display: flex;
  }

  .brand-subtitle {
    display: none;
  }

  .session-meta-grid {
    grid-template-columns: 1fr;
  }
}