/* ══════════════════════════════════════════════
   El Maestro en Casa — Estilos globales
   ElMaestroEnCasaAgs.mx
   ══════════════════════════════════════════════ */

html, body { overflow-x: hidden; max-width: 100%; }

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    :root {
      --navy:   #1F3A5F;
      --teal:   #2E7D7B;
      --orange: #E8722A;
      --gray-bg:#F4F6F8;
      --text:   #2C2C2C;
      --muted:  #666;
      --white:  #FFFFFF;
      --radius: 12px;
    }
    html { scroll-behavior: smooth; }
    body { font-family: 'Inter', system-ui, sans-serif; color: var(--text); background: var(--white); font-size: 16px; line-height: 1.6; }

    /* ── LANGUAGE SYSTEM ── */
    .lang-en { display: none !important; }
    .lang-es { display: inline !important; }
    body.en .lang-en { display: inline !important; }
    body.en .lang-es { display: none !important; }
    .lang-en-block { display: none !important; }
    .lang-es-block { display: block; }
    body.en .lang-en-block { display: block !important; }
    body.en .lang-es-block { display: none !important; }
    .lang-en-flex { display: none !important; }
    .lang-es-flex { display: flex; }
    body.en .lang-en-flex { display: flex !important; }
    body.en .lang-es-flex { display: none !important; }

    /* ── LANG TOGGLE ── */
    .lang-toggle {
      display: flex;
      align-items: center;
      background: var(--gray-bg);
      border: 1px solid #D0D8E2;
      border-radius: 8px;
      overflow: hidden;
      flex-shrink: 0;
    }
    .lang-btn {
      padding: 6px 12px;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      border: none;
      background: transparent;
      color: var(--muted);
      transition: background .15s, color .15s;
      letter-spacing: 0.04em;
    }
    .lang-btn.active { background: var(--navy); color: var(--white); }
    .lang-divider { width: 1px; height: 20px; background: #D0D8E2; flex-shrink: 0; }

    /* ── NAV ── */
    nav { position: sticky; top: 0; background: var(--white); border-bottom: 1px solid #E4E8ED; z-index: 100; padding: 0 5%; }
    .nav-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
    .logo { display: flex; flex-direction: column; line-height: 1.1; text-decoration: none; }
    .logo-main { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 700; color: var(--navy); }
    .logo-sub { font-size: 10px; font-weight: 500; color: var(--teal); letter-spacing: 0.1em; text-transform: uppercase; }
    .nav-right { display: flex; align-items: center; gap: 12px; }
    .nav-links { display: flex; align-items: center; gap: 24px; list-style: none; }
    .nav-links a { text-decoration: none; font-size: 14px; font-weight: 500; color: var(--muted); transition: color .2s; }
    .nav-links a:hover { color: var(--navy); }
    .btn-nav { display: inline-flex; align-items: center; gap: 7px; background: var(--orange); color: var(--white) !important; padding: 9px 18px; border-radius: 8px; font-size: 14px; font-weight: 600; text-decoration: none; transition: background .2s, transform .15s; white-space: nowrap; }
    .btn-nav:hover { background: #d0641e; transform: translateY(-1px); }

    /* ── HERO ── */
    .hero { background: var(--navy); padding: 96px 5% 88px; text-align: center; }
    .hero-eyebrow { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal); background: rgba(46,125,123,.15); padding: 5px 14px; border-radius: 20px; margin-bottom: 28px; }
    .hero h1 { font-family: 'Playfair Display', serif; font-size: clamp(38px, 6vw, 68px); font-weight: 900; color: var(--white); line-height: 1.15; max-width: 780px; margin: 0 auto 20px; }
    .hero h1 .accent { position: relative; display: inline-block; }
    .hero h1 .accent::after { content: ''; position: absolute; left: 0; bottom: -4px; width: 100%; height: 5px; background: var(--orange); border-radius: 3px; }
    .hero-sub { font-size: 18px; color: rgba(255,255,255,.72); max-width: 560px; margin: 0 auto 40px; line-height: 1.65; }
    .hero-ctas { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 56px; }
    .btn-primary { display: inline-flex; align-items: center; gap: 9px; background: var(--orange); color: var(--white); padding: 15px 30px; border-radius: 10px; font-size: 16px; font-weight: 600; text-decoration: none; transition: background .2s, transform .15s; }
    .btn-primary:hover { background: #d0641e; transform: translateY(-2px); }
    .btn-secondary { display: inline-flex; align-items: center; gap: 9px; background: transparent; color: var(--white); padding: 15px 30px; border-radius: 10px; font-size: 16px; font-weight: 500; text-decoration: none; border: 1.5px solid rgba(255,255,255,.35); transition: border-color .2s, background .2s; }
    .btn-secondary:hover { border-color: rgba(255,255,255,.7); background: rgba(255,255,255,.06); }
    .trust-badges { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
    .badge { display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); color: rgba(255,255,255,.85); padding: 8px 16px; border-radius: 30px; font-size: 13px; font-weight: 500; }
    .badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); flex-shrink: 0; }

    /* ── SECTIONS COMMON ── */
    section { padding: 80px 5%; }
    .section-inner { max-width: 1100px; margin: 0 auto; }
    .section-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal); margin-bottom: 12px; }
    .section-title { font-family: 'Playfair Display', serif; font-size: clamp(26px, 4vw, 38px); font-weight: 700; color: var(--navy); line-height: 1.2; margin-bottom: 14px; }
    .section-desc { font-size: 17px; color: var(--muted); max-width: 600px; line-height: 1.65; }

    /* ── SERVICIOS ── */
    #servicios { background: var(--gray-bg); }
    .services-header { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 20px; margin-bottom: 48px; }
    .services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
    .service-card { background: var(--white); border-radius: var(--radius); padding: 28px; border: 1px solid #E4E8ED; transition: transform .2s, box-shadow .2s; }
    .service-card:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(31,58,95,.09); }
    .service-icon { width: 48px; height: 48px; background: rgba(46,125,123,.1); border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 18px; font-size: 22px; }
    .service-card h3 { font-size: 17px; font-weight: 600; color: var(--navy); margin-bottom: 8px; }
    .service-card p { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 16px; }
    .service-price { font-size: 13px; font-weight: 600; color: var(--teal); }

    /* ── CÓMO FUNCIONA ── */
    #como-funciona { background: var(--white); }
    .steps-header { text-align: center; margin-bottom: 56px; }
    .steps-header .section-desc { margin: 0 auto; }
    .steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0; }
    .step { text-align: center; padding: 0 32px; position: relative; }
    .step + .step::before { content: ''; position: absolute; top: 36px; left: 0; width: 1px; height: 32px; background: #E4E8ED; }
    .step-num { width: 72px; height: 72px; border-radius: 50%; background: var(--navy); color: var(--white); font-family: 'Playfair Display', serif; font-size: 26px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
    .step h3 { font-size: 17px; font-weight: 600; color: var(--navy); margin-bottom: 10px; }
    .step p { font-size: 15px; color: var(--muted); line-height: 1.6; }
    .step-note { display: inline-block; margin-top: 12px; font-size: 12px; font-weight: 600; color: var(--teal); background: rgba(46,125,123,.08); padding: 4px 12px; border-radius: 20px; }

    /* ── HISTORIAS ── */
    #historias { background: var(--navy); }
    #historias .section-label { color: var(--teal); }
    #historias .section-title { color: var(--white); }
    .testimonials-header { margin-bottom: 48px; }
    .testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
    .testimonial-card { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 28px; }
    .stars { color: var(--orange); font-size: 18px; letter-spacing: 2px; margin-bottom: 16px; }
    .testimonial-card blockquote { font-size: 15px; color: rgba(255,255,255,.85); line-height: 1.7; font-style: italic; margin-bottom: 20px; }
    .testimonial-author { display: flex; align-items: center; gap: 12px; }
    .author-avatar { width: 40px; height: 40px; border-radius: 50%; background: rgba(46,125,123,.3); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; color: var(--teal); flex-shrink: 0; }
    .author-name { font-size: 14px; font-weight: 600; color: var(--white); }
    .author-detail { font-size: 12px; color: rgba(255,255,255,.5); margin-top: 2px; }
    .service-tag { font-size: 11px; background: rgba(46,125,123,.25); color: #7ECEC9; padding: 3px 10px; border-radius: 12px; margin-top: 6px; display: inline-block; }

    /* ── COBERTURA ── */
    #cobertura { background: var(--gray-bg); }
    .coverage-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
    .coverage-zones { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
    .zone-chip { background: var(--white); border: 1px solid #D0D8E2; border-radius: 20px; padding: 7px 16px; font-size: 14px; font-weight: 500; color: var(--navy); }
    .zone-chip.capital { background: var(--navy); border-color: var(--navy); color: var(--white); }
    .coverage-note { margin-top: 20px; font-size: 14px; color: var(--muted); }
    .coverage-visual { background: var(--white); border-radius: var(--radius); padding: 40px; text-align: center; border: 1px solid #E4E8ED; }
    .map-icon { font-size: 72px; line-height: 1; margin-bottom: 16px; }
    .coverage-visual h3 { font-family: 'Playfair Display', serif; font-size: 22px; color: var(--navy); margin-bottom: 8px; }
    .coverage-visual p { font-size: 14px; color: var(--muted); }

    /* ── CONTACTO ── */
    #contacto { background: var(--white); text-align: center; }
    .contact-box { background: var(--gray-bg); border-radius: 20px; padding: 64px 40px; max-width: 720px; margin: 0 auto; border: 1px solid #E4E8ED; }
    .contact-box .section-label { margin-bottom: 16px; }
    .contact-box .section-title { margin-bottom: 14px; }
    .contact-box .section-desc { margin: 0 auto 36px; }
    .contact-methods { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
    .contact-btn { display: inline-flex; align-items: center; gap: 9px; padding: 14px 26px; border-radius: 10px; font-size: 15px; font-weight: 600; text-decoration: none; transition: transform .15s, opacity .2s; }
    .contact-btn:hover { transform: translateY(-2px); opacity: .9; }
    .contact-btn.wa { background: #25D366; color: var(--white); }
    .contact-btn.phone { background: var(--navy); color: var(--white); }
    .contact-promise { font-size: 13px; color: var(--muted); }
    .contact-promise > span { display: inline-block; margin: 0 8px; }
    .contact-promise > span::before { content: '·'; margin-right: 8px; color: var(--teal); }
    .contact-promise > span:first-child::before { display: none; }

    /* ── FOOTER ── */
    footer { background: var(--navy); padding: 40px 5%; }
    .footer-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
    .footer-logo .logo-main { color: var(--white); font-size: 16px; }
    .footer-logo .logo-sub { color: var(--teal); }
    .footer-links { display: flex; gap: 20px; list-style: none; }
    .footer-links a { font-size: 13px; color: rgba(255,255,255,.5); text-decoration: none; transition: color .2s; }
    .footer-links a:hover { color: var(--white); }
    .footer-copy { font-size: 13px; color: rgba(255,255,255,.35); }


    .footer-social { display: flex; gap: 14px; align-items: center; }
    .social-btn { width: 36px; height: 36px; border-radius: 8px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; text-decoration: none; transition: background .2s, transform .15s; }
    .social-btn:hover { background: rgba(255,255,255,.2); transform: translateY(-2px); }
    .social-btn svg { width: 18px; height: 18px; fill: rgba(255,255,255,.8); }
    .social-btn:hover svg { fill: #fff; }

    /* ── WHATSAPP FLOTANTE ── */
    .wa-float { position: fixed; bottom: 28px; right: 28px; width: 56px; height: 56px; background: #25D366; border-radius: 50%; display: flex; align-items: center; justify-content: center; text-decoration: none; box-shadow: 0 4px 20px rgba(37,211,102,.4); z-index: 200; transition: transform .2s, box-shadow .2s; }
    .wa-float:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(37,211,102,.5); }
    .wa-float svg { width: 28px; height: 28px; fill: white; }

    /* ── RESPONSIVE ── */

    /* ── LIGHTBOX ── */
    .lb-overlay{position:fixed;inset:0;background:rgba(0,0,0,.94);z-index:9999;display:flex;align-items:center;justify-content:center;opacity:0;visibility:hidden;transition:.22s;flex-direction:column;gap:16px}
    .lb-overlay.open{opacity:1;visibility:visible}
    .lb-img{max-width:92vw;max-height:82vh;object-fit:contain;border-radius:8px}
    .lb-video{width:min(860px,90vw);aspect-ratio:16/9;border-radius:8px;border:0}
    .lb-caption{color:rgba(255,255,255,.72);font-size:14px;text-align:center;max-width:600px;padding:0 16px}
    .lb-close{position:fixed;top:18px;right:22px;font-size:38px;color:#fff;cursor:pointer;line-height:1;opacity:.8;background:none;border:none}
    .lb-close:hover{opacity:1}
    .lb-nav{position:fixed;top:50%;transform:translateY(-50%);font-size:40px;color:rgba(255,255,255,.7);cursor:pointer;padding:12px;user-select:none;background:none;border:none}
    .lb-nav:hover{color:#fff}
    .lb-prev{left:8px}
    .lb-next{right:8px}
    /* Zoom cursor en imágenes de evidencia */
    .evidence-panel{cursor:zoom-in}
    .evidence-panel img{transition:transform .25s}
    .evidence-panel:hover img{transform:scale(1.04)}
    /* Links ver más */
    .section-more{display:inline-flex;align-items:center;gap:6px;font-size:14px;font-weight:600;color:var(--teal);text-decoration:none;margin-top:24px;transition:.15s}
    .section-more:hover{color:var(--navy);gap:10px}
    .section-more-wrap{text-align:center;padding-top:8px}

    @media (max-width: 768px) {
      .nav-links { display: none; }
      .nav-right { gap: 8px; }
      .nav-inner { padding: 0; gap: 12px; }
      .hero { padding: 64px 5% 56px; }
      .services-header { flex-direction: column; align-items: flex-start; }
      .step + .step::before { display: none; }
      .steps-grid { gap: 40px; }
      .coverage-layout { grid-template-columns: 1fr; gap: 36px; }
      .coverage-visual { display: none; }
      .contact-box { padding: 40px 24px; }
      .footer-inner { flex-direction: column; text-align: center; }
    }

    /* ── EVIDENCIAS ── */
    #evidencias { background: var(--white); }
    .evidence-header { margin-bottom: 48px; }
    .evidence-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 28px; }
    .evidence-card { background: var(--gray-bg); border: 1px solid #E4E8ED; border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s, transform .2s; }
    .evidence-card:hover { transform: translateY(-3px); box-shadow: 0 10px 32px rgba(31,58,95,.1); }
    .evidence-panels { display: flex; align-items: stretch; gap: 0; }
    .evidence-panel { flex: 1; position: relative; }
    .evidence-label-pill { position: absolute; top: 10px; left: 10px; z-index: 2; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 10px; border-radius: 20px; }
    .evidence-label-pill.before { background: rgba(31,58,95,.85); color: #fff; }
    .evidence-label-pill.after  { background: rgba(46,125,123,.9); color: #fff; }
    .evidence-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: #E8EDF2; }
    .evidence-img.placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 12px; color: #999; font-weight: 500; }
    .evidence-img img, .evidence-img video { width: 100%; height: 100%; object-fit: cover; display: block; }
    .evidence-divider { width: 36px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--navy); position: relative; }
    .divider-arrow { color: var(--white); font-size: 16px; font-weight: 700; }
    .evidence-caption { padding: 14px 16px; font-size: 14px; color: var(--muted); line-height: 1.5; border-top: 1px solid #E4E8ED; background: var(--white); }

    /* ── EVIDENCE VIDEO ── */
    .evidence-card.video-card { grid-column: 1 / -1; }
    .evidence-panel .evidence-img img { width:100%; height:100%; object-fit:cover; display:block; }
    .evidence-video-wrap { position:relative; width:100%; aspect-ratio:4/3; background:#000; overflow:hidden; }
    .evidence-video-wrap iframe { position:absolute; inset:0; width:100%; height:100%; border:0; }

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

    @media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
  
    /* ── LIGHTBOX ── */
    .lb-overlay{position:fixed;inset:0;background:rgba(0,0,0,.94);z-index:9999;display:flex;align-items:center;justify-content:center;opacity:0;visibility:hidden;transition:.22s;flex-direction:column;gap:16px}
    .lb-overlay.open{opacity:1;visibility:visible}
    .lb-img{max-width:92vw;max-height:82vh;object-fit:contain;border-radius:8px}
    .lb-video{width:min(860px,90vw);aspect-ratio:16/9;border-radius:8px;border:0}
    .lb-caption{color:rgba(255,255,255,.72);font-size:14px;text-align:center;max-width:600px;padding:0 16px}
    .lb-close{position:fixed;top:18px;right:22px;font-size:38px;color:#fff;cursor:pointer;line-height:1;opacity:.8;background:none;border:none}
    .lb-close:hover{opacity:1}
    .lb-nav{position:fixed;top:50%;transform:translateY(-50%);font-size:40px;color:rgba(255,255,255,.7);cursor:pointer;padding:12px;user-select:none;background:none;border:none}
    .lb-nav:hover{color:#fff}
    .lb-prev{left:8px}
    .lb-next{right:8px}
    /* Zoom cursor en imágenes de evidencia */
    .evidence-panel{cursor:zoom-in}
    .evidence-panel img{transition:transform .25s}
    .evidence-panel:hover img{transform:scale(1.04)}
    /* Links ver más */
    .section-more{display:inline-flex;align-items:center;gap:6px;font-size:14px;font-weight:600;color:var(--teal);text-decoration:none;margin-top:24px;transition:.15s}
    .section-more:hover{color:var(--navy);gap:10px}
    .section-more-wrap{text-align:center;padding-top:8px}
