/* ============================================================
   Cardiofamilia · Tema WordPress · Hoja de estilos principal
   Reconstruido 1:1 desde el Figma "Cardiofamilia_home_00".
   Paleta y tipografía fieles al archivo de diseño.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Source+Serif+4:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  /* ---- Marca ---- */
  --navy:        #142C54;  /* títulos, base de marca */
  --navy-deep:   #002D5D;  /* azul profundo */
  --coral:       #FC4221;  /* acento principal */
  --coral-soft:  #EC663F;  /* squiggle, detalles */
  --teal:        #077467;  /* enlaces, fechas, categorías */
  --teal-mid:    #52B3A5;  /* squiggle bienvenida, autor cita */
  --teal-icon:   #42ABA1;  /* icono de cita */

  /* ---- Superficies ---- */
  --sand:          #DAD8CE;  /* franja superior */
  --mint:          #F2F7F5;  /* sección bienvenida */
  --quote-bg:      #F2F4FC;  /* tarjeta de cita */
  --quote-circle:  #E0ECEF;
  --footer-bg:     #F9F9F7;

  /* ---- Fondos de tarjetas (bento) ---- */
  --card-aprender:  #FDF5F2;
  --card-formacion: #F4F3FC;
  --card-ecg:       #F6F8FD;
  --card-recursos:  #FDF8F6;
  --card-sobre:     #F2F7F5;

  /* ---- Blobs decorativos ---- */
  --blob-ecg:       #EAF1FD;
  --blob-recursos:  #FDECE6;
  --blob-sobre:     #DEEDE9;
  --blob-aprender:  #FCE7DF;

  /* ---- Noticias ---- */
  --news-pill:   #E3F3F2;
  --news-arrow:  #E5F4F3;

  /* ---- Texto ---- */
  --ink:        #000000;       /* navegación */
  --text-body:  #5C6A82;       /* cuerpos y ledes (gris azulado) */

  /* ---- Tipografía ---- */
  --font-sans:  'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;

  /* ---- Sombras ---- */
  --shadow-card:  0 4px 4px rgba(0,0,0,0.10);
  --shadow-news:  0 4px 6px rgba(0,0,0,0.10);
  --shadow-img:   0 10px 12px rgba(20,44,84,0.12);

  /* ---- Motion ---- */
  --ease:  cubic-bezier(0.16, 1, 0.3, 1);

  /* ---- Layout ---- */
  --container: 1240px;
  --gutter: 24px;
}

/* ============ Reset / base ============ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--navy);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* Signature squiggle underlines */
.squiggle {
  display: block;
  width: 55px; height: 7px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 8'><path d='M1 4 Q 8 0, 15 4 T 29 4 T 43 4 T 56 4' fill='none' stroke='%23EC663F' stroke-width='2' stroke-linecap='round'/></svg>") no-repeat;
}
.squiggle.is-teal {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 8'><path d='M1 4 Q 8 0, 15 4 T 29 4 T 43 4 T 56 4' fill='none' stroke='%2352B3A5' stroke-width='2' stroke-linecap='round'/></svg>");
}

/* ============ Franja superior ============ */
.cf-topbar {
  height: 10px;
  background: var(--sand);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  position: relative;
  z-index: 2;
}

/* ============ Logo ============ */
.cf-logo { display: inline-flex; align-items: center; gap: 9px; }
.cf-logo .wordmark {
  font-weight: 700;
  font-size: 27px;
  letter-spacing: -0.03em;
  color: var(--navy);
  line-height: 1;
}
.cf-logo .mark { width: 30px; height: 27px; flex: none; }

/* ============ Header ============ */
.site-header { background: #fff; }
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  padding-bottom: 14px;
}
.main-nav { display: flex; align-items: flex-start; gap: 56px; }
.main-nav a {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  transition: color var(--ease) .18s;
}
.main-nav a .nav-ico { width: 34px; height: 22px; }
.main-nav a .nav-ico svg { width: 100%; height: 100%; }
.main-nav a:hover { color: var(--coral); }

/* ============ Hero ============ */
.hero { position: relative; overflow: hidden; }
.hero .container {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 24px;
  align-items: center;
  padding-top: 40px;
  padding-bottom: 24px;
}
.hero-copy { max-width: 470px; }
.hero-eyebrow {
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #7A88A0;
  margin: 0 0 18px;
}
.hero-title {
  font-weight: 700;
  font-size: 46px;
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin: 0;
  text-wrap: balance;
}
.hero-subtitle {
  font-weight: 700;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--coral);
  margin: 6px 0 0;
}
.hero .squiggle { margin: 22px 0 20px; }
.hero-lede {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-body);
  margin: 0;
  max-width: 360px;
}

.hero-media { position: relative; }
.hero-media .hero-photo { width: 100%; height: auto; position: relative; z-index: 1; }
.hero-media .hero-dots {
  position: absolute;
  top: 4px; right: 4px;
  width: 96px; height: auto;
  z-index: 2;
}
.hero-ecg {
  position: absolute;
  left: -2%; bottom: 6%;
  width: 104%;
  z-index: 0;
  opacity: .85;
  pointer-events: none;
}
.hero-ecg svg { width: 100%; height: auto; }

/* ============ Colaboradores ============ */
.partners { padding: 36px 0 64px; }
.partners .row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 72px;
  flex-wrap: wrap;
}
.partners .partner { display: flex; align-items: center; opacity: .92; }
.partners .partner img { max-height: 56px; width: auto; }
/* Cátedra emblem + text */
.partner-catedra { gap: 12px; }
.partner-catedra .seal {
  width: 54px; height: 54px; flex: none;
  border-radius: 50%;
  border: 2px solid var(--navy-deep);
  display: grid; place-items: center;
  color: var(--navy-deep);
}
.partner-catedra .seal svg { width: 30px; height: 30px; }
.partner-catedra .lines {
  font-size: 9.5px; line-height: 1.25; color: var(--navy-deep); max-width: 150px;
}
.partner-catedra .lines b { font-weight: 700; font-size: 11px; display: block; }
/* dotted square */
.partner-dots { width: 46px; height: 46px; }
.partner-dots svg { width: 100%; height: 100%; }
/* SCHUM */
.partner-schum { flex-direction: column; gap: 4px; }
.partner-schum .heart { width: 56px; height: 50px; }
.partner-schum .name {
  font-weight: 800; font-size: 15px; letter-spacing: 0.28em;
  color: #2A2A2A; padding-left: 0.28em;
}

/* ============ Bento de secciones ============ */
.bento { padding: 0 0 8px; }
.bento .grid {
  display: grid;
  grid-template-columns: 598fr 636fr;
  gap: 15px;
}
.bento-col { display: flex; flex-direction: column; gap: 22px; }
.bento-col.right { gap: 16px; }

.card {
  position: relative;
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  padding: 31px 36px;
}
.card-content { position: relative; z-index: 3; max-width: 240px; }
.card .icon-circle {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: #fff;
  display: grid; place-items: center;
  margin-bottom: 24px;
}
.card .icon-circle svg { width: 34px; height: 24px; color: var(--navy); }
.card h3 {
  font-weight: 700;
  font-size: 26px;
  color: var(--navy);
  margin: 0 0 14px;
}
.card p {
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-body);
  margin: 0 0 22px;
}

.btn-explore {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 196px;
  padding: 9px 16px;
  border-radius: 6px;
  background: var(--navy);
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  border: none;
  transition: background var(--ease) .18s, transform var(--ease) .18s;
}
.btn-explore svg { width: 16px; flex: none; }
.btn-explore:hover { background: var(--navy-deep); }
.btn-explore:hover svg { transform: translateX(3px); }

/* card colors */
.card.aprender  { background: var(--card-aprender);  flex: 1; }
.card.formacion { background: var(--card-formacion); flex: 1; }
.card.ecg       { background: var(--card-ecg); }
.card.recursos  { background: var(--card-recursos); }
.card.sobre     { background: var(--card-sobre); }

/* tall left cards */
.bento-col.left .card { min-height: 359px; }

/* card decorative media */
.card .blob {
  position: absolute;
  z-index: 0;
  pointer-events: none;
}
.card-media {
  position: absolute;
  z-index: 2;
  pointer-events: none;
}

/* Aprender peach blobs */
.card.aprender .aprender-blob { position: absolute; z-index: 1; pointer-events: none; }
.card.aprender .aprender-blob.a { fill: #F9D8CB; width: 230px; right: -34px; top: 2px; }
.card.aprender .aprender-blob.b { fill: #F7E7DC; width: 250px; right: 24px; top: 96px; opacity: .85; }
/* Formación tablet */
.card.formacion { padding-bottom: 0; }
.card.formacion .card-media.tablet {
  right: -6px; bottom: 0;
  width: 300px;
}
/* ECG card — horizontal layout */
.card.ecg { min-height: 245px; padding: 28px 36px; }
.card.ecg .card-content { max-width: 210px; }
.card.ecg .icon-mini {
  position: absolute; top: 28px; right: 28px; z-index: 3;
  width: 50px; height: 50px;
}
.card.ecg .card-media.strip {
  right: -10px; top: 30px;
  width: 320px;
  border-radius: 10px;
  box-shadow: var(--shadow-img);
}
.card.recursos { min-height: 231px; }
.card.recursos .card-media.monitor {
  right: -8px; bottom: -8px;
  width: 290px;
}
.card.sobre { min-height: 231px; }
.card.sobre .icon-mini {
  position: absolute; bottom: 26px; right: 30px; z-index: 3;
  width: 50px; height: 50px;
}
.card.sobre .dots-deco {
  position: absolute; top: 26px; right: 30px; z-index: 1;
  width: 96px; opacity: .9;
}

/* blob fills */
.blob.ecg-blob     { fill: var(--blob-ecg);     top: -17px; right: -20px; width: 300px; }
.blob.recursos-blob{ fill: var(--blob-recursos);right: -40px; top: -10px; width: 230px; }
.blob.sobre-blob   { fill: var(--blob-sobre);   right: -40px; top: -10px; width: 230px; }

/* ============ Bienvenida ============ */
.welcome {
  background: var(--mint);
  text-align: center;
  padding: 96px 0 104px;
}
.welcome-eyebrow {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-mid);
  margin: 0 0 14px;
}
.welcome .squiggle { margin: 0 auto 44px; }
.welcome h2 {
  font-weight: 700;
  font-size: 64px;
  line-height: 1.11;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin: 0 auto;
  max-width: 900px;
  text-wrap: balance;
}
.welcome p {
  font-size: 20px;
  line-height: 1.55;
  color: #46546E;
  margin: 36px auto 0;
  max-width: 720px;
  text-wrap: pretty;
}

/* ============ Cita editorial ============ */
.quote-section { padding: 56px 0; background: #fff; }
.quote-card {
  background: var(--quote-bg);
  border-radius: 18px;
  padding: 58px 68px;
  display: flex;
  align-items: center;
  gap: 64px;
}
.quote-card .qmark {
  flex: none;
  width: 110px; height: 110px;
  border-radius: 50%;
  background: var(--quote-circle);
  display: grid; place-items: center;
}
.quote-card .qmark svg { width: 44px; height: 38px; color: var(--teal-icon); }
.quote-card blockquote {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 42px;
  line-height: 1.11;
  color: var(--navy);
  font-weight: 400;
}
.quote-card .author {
  display: block;
  margin-top: 22px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 24px;
  color: var(--teal-mid);
}

/* ============ Noticias ============ */
.news { padding: 40px 0 88px; }
.news-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 34px;
}
.news-head h2 {
  font-weight: 700;
  font-size: 26px;
  color: var(--navy);
  margin: 0;
}
.news-head .squiggle { margin-top: 16px; }
.news-head .see-all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--teal);
}
.news-head .see-all svg { width: 19px; }
.news-head .see-all:hover { gap: 14px; }

.news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}
.news-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow-news);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--ease) .22s, box-shadow var(--ease) .22s;
}
.news-card:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(0,0,0,0.12); }
.news-thumb {
  height: 153px;
  background: #EEF3F2 center / cover no-repeat;
  position: relative;
}
.news-thumb.ph {
  background: linear-gradient(135deg, #EAF1FD 0%, #F2F7F5 100%);
}
.news-body {
  padding: 20px 20px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.news-pill {
  align-self: flex-start;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--teal);
  background: var(--news-pill);
  padding: 5px 11px;
  border-radius: 11px;
  margin-bottom: 14px;
}
.news-card h3 {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  color: var(--navy);
  margin: 0 0 10px;
}
.news-card .excerpt {
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-body);
  margin: 0 0 18px;
}
.news-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.news-date {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--teal);
}
.news-date svg { width: 13px; height: 14px; }
.news-arrow {
  width: 39px; height: 39px;
  border-radius: 50%;
  background: var(--news-arrow);
  display: grid; place-items: center;
  flex: none;
}
.news-arrow svg { width: 18px; color: var(--teal); }
.news-card:hover .news-arrow svg { transform: translateX(2px); }

/* ============ Footer ============ */
.site-footer { background: var(--footer-bg); }
.site-footer .container {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.site-footer .cf-logo .wordmark { font-size: 19px; }
.site-footer .cf-logo .mark { width: 21px; height: 19px; }
.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  color: var(--navy);
}
.footer-links a { font-weight: 400; }
.footer-links a:hover { color: var(--teal); }
.footer-links .sep { width: 1px; height: 14px; background: rgba(20,44,84,.25); }
.footer-credit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  font-size: 10px;
  color: var(--navy);
}
.footer-credit .stilogo { font-weight: 700; font-style: italic; }

/* ============ Animaciones de entrada (sutiles) ============ */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
  .reveal.in { opacity: 1; transform: none; }
}

/* ============ Responsive ============ */
@media (max-width: 1080px) {
  .hero-title { font-size: 40px; }
  .welcome h2 { font-size: 50px; }
  .quote-card blockquote { font-size: 34px; }
  .quote-card { padding: 44px; gap: 40px; }
}
@media (max-width: 920px) {
  .hero .container { grid-template-columns: 1fr; gap: 40px; }
  .hero-copy { max-width: none; }
  .hero-lede { max-width: 520px; }
  .bento .grid { grid-template-columns: 1fr; }
  .bento-col.left .card { min-height: 0; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .partners .row { gap: 40px; }
  .main-nav { gap: 28px; }
}
@media (max-width: 720px) {
  .container { padding: 0 20px; }
  .site-header .container { flex-direction: column; gap: 18px; }
  .main-nav { gap: 22px; }
  .hero-title { font-size: 34px; }
  .hero-subtitle { font-size: 24px; }
  .welcome { padding: 64px 0; }
  .welcome h2 { font-size: 36px; }
  .welcome p { font-size: 17px; }
  .quote-card { flex-direction: column; align-items: flex-start; gap: 24px; padding: 32px; }
  .quote-card blockquote { font-size: 27px; }
  .quote-card .author { font-size: 19px; }
  .news-grid { grid-template-columns: 1fr; }
  .news-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .site-footer .container { flex-direction: column; align-items: flex-start; gap: 14px; }
  .footer-links { flex-wrap: wrap; }
}
