/* =============================================================================
   responsive.css — mobile-first overrides + scroll-reveal animation
   ============================================================================= */

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* ---- Page outer width ---------------------------------------------------- */
.r-page { width: 100% !important; max-width: 1280px; margin: 0 auto; }

/* ---- Container padding --------------------------------------------------- */
@media (max-width: 768px) {
  .r-container { padding: 0 20px !important; }
}

/* ---- Section vertical rhythm -------------------------------------------- */
@media (max-width: 900px) {
  .r-section   { padding: 72px 0 !important; }
}
@media (max-width: 540px) {
  .r-section   { padding: 56px 0 !important; }
}

/* ---- Typography --------------------------------------------------------- */
@media (max-width: 900px) {
  .r-h1 { font-size: 44px !important; line-height: 1.08 !important; }
  .r-h2 { font-size: 34px !important; line-height: 1.1 !important; }
  .r-h3 { font-size: 22px !important; }
}
@media (max-width: 540px) {
  .r-h1 { font-size: 34px !important; }
  .r-h2 { font-size: 28px !important; }
  .r-h3 { font-size: 20px !important; }
  .r-sub { font-size: 15px !important; }
}

/* ---- Generic grids ------------------------------------------------------- */
@media (max-width: 900px) {
  .r-grid-2 { grid-template-columns: 1fr !important; gap: 32px !important; }
  .r-grid-3 { grid-template-columns: 1fr !important; gap: 16px !important; }
  .r-grid-4 { grid-template-columns: repeat(2, 1fr) !important; gap: 14px !important; }
}
@media (max-width: 540px) {
  .r-grid-4 { grid-template-columns: 1fr !important; }
}

/* ---- Hero ---------------------------------------------------------------- */
@media (max-width: 900px) {
  .r-hero        { padding: 40px 0 64px !important; }
  .r-hero-grid   { grid-template-columns: 1fr !important; gap: 40px !important; }
  .r-hero-img    { width: 100% !important; max-width: 380px; height: 440px !important; margin: 0 auto !important; }
  .r-hero-stats  { gap: 20px !important; flex-wrap: wrap; }
}
@media (max-width: 540px) {
  .r-hero        { padding: 24px 0 48px !important; }
  .r-hero-img    { height: 380px !important; max-width: 320px; }
  .r-hero-actions { flex-direction: column !important; align-items: stretch !important; gap: 10px !important; }
  .r-hero-actions a { justify-content: center; }
  .r-hero-blob-top { display: none; }
  .r-hero-blob-bottom { display: none; }
}

/* ---- Nav ----------------------------------------------------------------- */
@media (max-width: 900px) {
  .r-nav-links { display: none !important; }
  .r-nav-hamburger { display: inline-flex !important; }
}
@media (max-width: 540px) {
  .r-nav-wa-text { display: none !important; }
  .r-nav-tagline { display: none !important; }
  .r-nav         { height: 64px !important; }
  .r-brand       { gap: 8px !important; }
  .r-brand-mark  { width: 46px !important; height: 36px !important; border-radius: 10px !important; }
  .r-brand-word  { font-size: 30px !important; }
}
@media (max-width: 360px) {
  .r-brand-mark  { width: 40px !important; height: 32px !important; }
  .r-brand-word  { font-size: 26px !important; }
}

/* ---- Trust ribbon -------------------------------------------------------- */
@media (max-width: 900px) {
  .r-trust { flex-wrap: wrap !important; justify-content: flex-start !important; gap: 14px 22px !important; padding: 18px 20px !important; }
}

/* ---- Banner under services ---------------------------------------------- */
@media (max-width: 768px) {
  .r-banner { flex-direction: column !important; align-items: flex-start !important; gap: 16px !important; padding: 20px 22px !important; }
  .r-banner-cta { width: 100%; justify-content: center; }
}

/* ---- Nosotros + Cursos image -------------------------------------------- */
@media (max-width: 900px) {
  .r-nosotros-img { width: 100% !important; max-width: 380px; height: 460px !important; margin: 0 auto !important; }
}
@media (max-width: 540px) {
  .r-nosotros-img { max-width: 320px; height: 400px !important; }
}

/* ---- Contact card -------------------------------------------------------- */
@media (max-width: 900px) {
  .r-contact-card { padding: 36px 28px !important; grid-template-columns: 1fr !important; gap: 32px !important; border-radius: 24px !important; }
}
@media (max-width: 540px) {
  .r-contact-card { padding: 28px 20px !important; }
}

/* ---- Footer -------------------------------------------------------------- */
@media (max-width: 900px) {
  .r-footer       { padding: 56px 0 28px !important; }
  .r-footer-grid  { grid-template-columns: 1fr 1fr !important; gap: 32px !important; }
  .r-footer-bottom { flex-direction: column !important; align-items: flex-start !important; gap: 14px !important; }
  .r-footer-social { flex-wrap: wrap; }
}
@media (max-width: 540px) {
  .r-footer-grid  { grid-template-columns: 1fr !important; }
  .r-footer-brand-foot { flex-direction: column !important; align-items: flex-start !important; gap: 18px !important; }
}

/* ---- Hamburger panel ----------------------------------------------------- */
.r-nav-hamburger { display: none; }
.r-mobile-panel {
  position: fixed; inset: 64px 0 0 0;
  background: #EBF6F2;
  z-index: 9;
  padding: 32px 24px;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; gap: 4px;
  overflow-y: auto;
}
.r-mobile-panel.open { transform: translateX(0); }
.r-mobile-panel a {
  display: block; padding: 18px 4px;
  font-size: 22px; font-weight: 500;
  color: #0F1E3A; text-decoration: none;
  border-bottom: 1px solid rgba(15, 30, 58, 0.10);
  font-family: 'Newsreader', Georgia, serif;
}

/* ---- Scroll-reveal animation -------------------------------------------- */
/* Scoped to .js so that, without JavaScript, all content stays fully visible
   (important for crawlers / no-JS users). The `js` class is added in <head>. */
@media (prefers-reduced-motion: no-preference) {
  .js .r-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .9s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1);
    will-change: opacity, transform;
  }
  .js .r-reveal.in { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .r-reveal { opacity: 1; transform: none; }
}

/* ---- Image hover for follow tiles --------------------------------------- */
.r-follow-tile { transition: transform .4s cubic-bezier(.16,1,.3,1), box-shadow .4s ease; }
.r-follow-tile:hover { transform: translateY(-6px); box-shadow: 0 24px 50px rgba(15, 30, 58, 0.18); }

/* ---- CTA button hover --------------------------------------------------- */
.r-cta-wa, .r-cta-ink, .r-cta-teal { transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.r-cta-wa:hover, .r-cta-ink:hover, .r-cta-teal:hover { transform: translateY(-2px); }

/* ---- Service / values / team / testimonial / course cards hover -------- */
.r-card { transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s ease; }
.r-card:hover { transform: translateY(-4px); }
.r-card-team:hover, .r-card-value:hover { box-shadow: 0 14px 32px rgba(15, 30, 58, 0.10); }

/* ---- Focus ring --------------------------------------------------------- */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid #2ACCCE;
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---- Skip link ---------------------------------------------------------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: #0F1E3A; color: #fff; padding: 12px 18px;
  border-radius: 0 0 10px 0; font-size: 14px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ---- Inline icon helper ------------------------------------------------- */
.ic { display: inline-block; vertical-align: middle; flex-shrink: 0; }

/* ---- List check bullet -------------------------------------------------- */
.li-check {
  width: 22px; height: 22px; border-radius: 8px; background: #2ACCCE;
  color: #fff; display: grid; place-items: center; flex-shrink: 0; margin-top: 1px;
}

/* ---- Language pill ------------------------------------------------------ */
.r-lang {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px;
  background: #fff; border-radius: 999px; border: 1px solid rgba(15,30,58,0.10);
}
.r-lang a {
  cursor: pointer; text-decoration: none;
  background: transparent; color: #3A4661;
  font-weight: 700; font-size: 12px; letter-spacing: 0.08em;
  padding: 7px 14px; border-radius: 999px; transition: all .18s ease;
}
.r-lang a.is-active { background: #2ACCCE; color: #fff; }

/* ---- Coverage chips ----------------------------------------------------- */
.r-cobertura li {
  background: #EBF6F2; color: #147678;
  padding: 10px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 600; border: 1px solid rgba(15,30,58,0.06);
}

/* ---- FAQ accordion (native <details>) ----------------------------------- */
.r-faq-item {
  background: #fff; border: 1px solid rgba(15,30,58,0.10);
  border-radius: 18px; margin-bottom: 14px; overflow: hidden;
}
.r-faq-q {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 26px; font-size: 17px; font-weight: 600; color: #0F1E3A;
  font-family: 'Manrope', sans-serif;
}
.r-faq-q::-webkit-details-marker { display: none; }
.r-faq-ic { position: relative; width: 16px; height: 16px; flex-shrink: 0; }
.r-faq-ic::before, .r-faq-ic::after {
  content: ''; position: absolute; background: #147678; border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.r-faq-ic::before { top: 7px; left: 0; width: 16px; height: 2px; }
.r-faq-ic::after  { top: 0; left: 7px; width: 2px; height: 16px; }
.r-faq-item[open] .r-faq-ic::after { transform: scaleY(0); opacity: 0; }
.r-faq-a { padding: 0 26px 24px; font-size: 15.5px; line-height: 1.65; color: #3A4661; }
.r-faq-a p { margin: 0; }
@media (max-width: 540px) {
  .r-faq-q { font-size: 15.5px; padding: 18px 20px; }
  .r-faq-a { padding: 0 20px 20px; }
  .r-cobertura li { font-size: 13px; padding: 9px 14px; }
}
