/* ============================================================
   PSICOMEDIOS — Sistema de diseño base
   ============================================================ */

/* ── Variables ── */
:root {
  --primary:       #2a2494;
  --primary-dark:  #16123f;
  --primary-light: #4a3fd8;
  --accent:        #3329cd;
  --accent-light:  #6c62e8;
  --violet-detail: #7a278d;
  --success:       #1E8449;
  --text-dark:     #1A202C;
  --text-body:     #4A5568;
  --text-muted:    #718096;
  --bg:            #F7F9FC;
  --bg-white:      #FFFFFF;
  --bg-section:    #EEF3F8;
  --border:        #D1DCE8;
  --shadow-sm:     0 2px 8px rgba(22,18,63,.08);
  --shadow-md:     0 6px 24px rgba(22,18,63,.12);
  --shadow-lg:     0 12px 40px rgba(22,18,63,.16);
  --radius-sm:     8px;
  --radius-md:     12px;
  --radius-lg:     20px;
  --header-h:      72px;
  --max-w:         1200px;
  --transition:    .25s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text-body);
  background: var(--bg-white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

/* ── Tipografía ── */
h1, h2, h3, h4, h5 {
  color: var(--text-dark);
  font-weight: 700;
  line-height: 1.2;
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.1rem; }
p  { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ── Layout helpers ── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section { padding: 80px 0; }
.section--alt { background: var(--bg-section); }
.section__header { text-align: center; margin-bottom: 3rem; }
.section__header p { color: var(--text-muted); font-size: 1.1rem; max-width: 640px; margin: .75rem auto 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* ── Botones ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .95rem;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn--primary {
  background: var(--primary);
  color: #fff;
}
.btn--primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn--secondary:hover { background: var(--primary); color: #fff; }
.btn--accent {
  background: var(--accent);
  color: #fff;
}
.btn--accent:hover { background: var(--primary); transform: translateY(-1px); }
.btn--white {
  background: #fff;
  color: var(--primary);
}
.btn--white:hover { background: var(--bg-section); }
.btn--outline-white {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.7);
}
.btn--outline-white:hover { background: rgba(255,255,255,.15); }
.btn--lg { padding: 1rem 2.25rem; font-size: 1rem; }

/* ── Cards ── */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem;
  border: 1px solid var(--border);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card__icon {
  width: 48px; height: 48px;
  background: var(--bg-section);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  color: var(--accent);
  flex-shrink: 0;
}
.card__icon svg { width: 22px; height: 22px; }
.card h3 { margin-bottom: .5rem; font-size: 1.1rem; }
.card p  { color: var(--text-muted); font-size: .95rem; }

/* ── Badge / tag ── */
.badge {
  display: inline-block;
  padding: .3rem .85rem;
  border-radius: 100px;
  font-size: .82rem;
  font-weight: 600;
  background: rgba(51,41,205,.12);
  color: var(--accent);
  letter-spacing: .03em;
  margin-bottom: 1rem;
}

/* ── Stat number ── */
.stat-number {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.stat-label { color: var(--text-muted); font-size: .9rem; margin-top: .3rem; }

/* ── Divider ── */
.divider {
  width: 56px; height: 4px;
  background: var(--accent);
  border-radius: 2px;
  margin: 1rem auto;
}
.divider--left { margin-left: 0; }

/* ── Check list ── */
.check-list { display: flex; flex-direction: column; gap: .6rem; }
.check-list li {
  display: flex; align-items: flex-start; gap: .65rem;
  color: var(--text-body);
  font-size: .97rem;
}
.check-list li svg {
  color: var(--success);
  flex-shrink: 0;
  margin-top: .15rem;
  width: 18px; height: 18px;
}

/* ── Table ── */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border); }
.styled-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.styled-table thead { background: var(--primary); color: #fff; }
.styled-table thead th { padding: 1rem 1.25rem; text-align: left; font-weight: 600; }
.styled-table tbody tr { border-bottom: 1px solid var(--border); transition: background var(--transition); }
.styled-table tbody tr:last-child { border-bottom: none; }
.styled-table tbody tr:hover { background: var(--bg-section); }
.styled-table tbody td { padding: .9rem 1.25rem; color: var(--text-body); }
.styled-table tbody td:first-child { font-weight: 600; color: var(--text-dark); }

@media (max-width: 640px) {
  .table-wrapper { overflow-x: visible; border: none; }
  .styled-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .styled-table, .styled-table tbody, .styled-table tr, .styled-table td { display: block; width: 100%; }
  .styled-table tbody tr { margin-bottom: 1rem; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
  .styled-table tbody tr:last-child { margin-bottom: 0; }
  .styled-table tbody td { padding: .75rem 1rem; border-bottom: 1px solid var(--border); }
  .styled-table tbody td:last-child { border-bottom: none; }
  .styled-table tbody td::before { content: attr(data-label); display: block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--primary); margin-bottom: .25rem; }
}

/* ── Tag device ── */
.device-tag {
  display: inline-block;
  padding: .2rem .65rem;
  background: rgba(42,36,148,.08);
  color: var(--primary);
  border-radius: 100px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  margin-bottom: .5rem;
}

/* ── Steps ── */
.steps { display: flex; gap: 0; flex-wrap: wrap; }
.step {
  flex: 1;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem;
  position: relative;
}
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 2rem;
  right: -1px;
  width: 2px; height: 40px;
  background: var(--border);
}
.step__num {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: .75rem;
  flex-shrink: 0;
}
.step p { font-size: .9rem; color: var(--text-muted); }

/* ── Quote block ── */
.quote-block {
  background: linear-gradient(135deg, var(--primary), var(--violet-detail));
  color: #fff;
  padding: 4rem 2rem;
  text-align: center;
  border-radius: var(--radius-lg);
}
.quote-block blockquote {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-style: italic;
  line-height: 1.5;
  max-width: 700px;
  margin: 0 auto 1.25rem;
  color: #fff;
}
.quote-block cite { color: rgba(255,255,255,.75); font-size: .95rem; font-style: normal; }

/* ── Info banner ── */
.info-banner {
  background: rgba(51,41,205,.1);
  border: 1px solid rgba(51,41,205,.3);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.info-banner svg { color: var(--accent); flex-shrink: 0; width: 22px; height: 22px; margin-top: .1rem; }
.info-banner p { margin: 0; font-size: .97rem; color: var(--text-dark); }
.info-banner a { color: var(--accent); font-weight: 600; }
.info-banner a:hover { text-decoration: underline; }

/* ── CTA section ── */
.cta-section {
  background: var(--primary);
  padding: 80px 0;
  text-align: center;
  color: #fff;
}
.cta-section h2 { color: #fff; margin-bottom: 1rem; }
.cta-section p { color: rgba(255,255,255,.8); font-size: 1.1rem; margin-bottom: 2rem; max-width: 560px; margin-left: auto; margin-right: auto; }
.cta-section .btn-group { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

/* ── Contact ── */
.contact-info { display: flex; flex-direction: column; gap: 1.25rem; }
.contact-item { display: flex; align-items: flex-start; gap: 1rem; }
.contact-item__icon {
  width: 44px; height: 44px;
  background: var(--bg-section);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.contact-item__icon svg { width: 20px; height: 20px; }
.contact-item__text strong { display: block; color: var(--text-dark); font-size: .88rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .15rem; }
.contact-item__text a { color: var(--text-body); }
.contact-item__text a:hover { color: var(--accent); }
.map-placeholder {
  height: 220px;
  background: linear-gradient(135deg, var(--bg-section), var(--border));
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: .9rem;
  gap: .5rem;
  border: 1px dashed var(--border);
  margin-top: 1.5rem;
}
/* Form */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; font-size: .9rem; color: var(--text-dark); margin-bottom: .4rem; }
.form-control {
  width: 100%;
  padding: .75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dark);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(51,41,205,.12); }
.form-control::placeholder { color: var(--text-muted); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }
.form-status { padding: .9rem 1rem; border-radius: var(--radius-sm); font-size: .95rem; font-weight: 500; display: none; margin-top: .75rem; }
.form-status.success { background: rgba(30,132,73,.1); color: var(--success); border: 1px solid rgba(30,132,73,.3); display: block; }
.form-status.error   { background: rgba(192,57,43,.1); color: #C0392B; border: 1px solid rgba(192,57,43,.3); display: block; }

/* ── HEADER ── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow-md); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.logo {
  display: flex; align-items: center; gap: .5rem;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--primary);
  letter-spacing: -.02em;
}
.logo span { color: var(--accent); }
.logo__dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}
.nav { display: flex; align-items: center; gap: .25rem; }
.nav a {
  padding: .5rem .85rem;
  border-radius: var(--radius-sm);
  color: var(--text-body);
  font-weight: 500;
  font-size: .93rem;
  transition: all var(--transition);
}
.nav a:hover, .nav a.active { color: var(--primary); background: var(--bg-section); }
.nav a.btn { color: #fff; }
.nav a.btn:hover { color: #fff; background: var(--primary-dark); }
.nav__cta { margin-left: .5rem; }

/* ── Nav Campus Virtual button ── */
.nav a.nav__campus {
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: .45rem .9rem;
  font-weight: 600;
  color: var(--primary);
  margin-left: .25rem;
}
.nav a.nav__campus:hover { background: var(--primary); color: #fff; }
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: .5rem;
  background: none;
  border-radius: var(--radius-sm);
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: all var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 1rem 1.5rem;
  z-index: 999;
  flex-direction: column;
  gap: .25rem;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-body);
  font-weight: 500;
  transition: all var(--transition);
}
.mobile-nav a:hover, .mobile-nav a.active { background: var(--bg-section); color: var(--primary); }
.mobile-nav .btn { width: 100%; justify-content: center; margin-top: .5rem; }

/* ── FOOTER ── */
.site-footer {
  background: var(--text-dark);
  color: rgba(255,255,255,.75);
  padding: 60px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand .logo { color: #fff; margin-bottom: 1rem; }
.footer-brand p { font-size: .92rem; line-height: 1.7; max-width: 300px; }
.footer-brand .footer-phrase {
  font-style: italic;
  color: rgba(255,255,255,.5);
  font-size: .88rem;
  margin-top: 1rem;
}
.footer-col h4 { color: #fff; font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.footer-col ul { display: flex; flex-direction: column; gap: .6rem; }
.footer-col ul a { font-size: .92rem; color: rgba(255,255,255,.65); transition: color var(--transition); }
.footer-col ul a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  font-size: .85rem;
  color: rgba(255,255,255,.45);
  flex-wrap: wrap;
  gap: .5rem;
}

/* ── Page hero ── */
.page-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--accent) 100%);
  padding: calc(var(--header-h) + 80px) 0 80px;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  top: -200px; right: -200px;
}
.page-hero::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,.03);
  bottom: -100px; left: -100px;
}
.page-hero h1 { color: #fff; margin-bottom: 1rem; position: relative; }
.page-hero p  { color: rgba(255,255,255,.85); font-size: 1.15rem; max-width: 680px; margin: 0 auto 2rem; position: relative; }
.page-hero .btn-group { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; position: relative; }

/* ── Fade-in animation ── */
.fade-in { opacity: 0; transform: translateY(28px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── Metric cards ── */
.metric-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  padding: 2rem 1.75rem;
  text-align: center;
}
.metric-card .metric-value {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
  margin-bottom: .5rem;
}
.metric-card .metric-label { color: var(--text-muted); font-size: .9rem; line-height: 1.5; }

/* ── Platform features ── */
.platform-features { display: flex; flex-direction: column; gap: 1rem; }
.platform-feature { display: flex; align-items: flex-start; gap: 1rem; padding: 1.1rem; background: var(--bg-section); border-radius: var(--radius-sm); }
.platform-feature svg { color: var(--accent); flex-shrink: 0; width: 20px; height: 20px; margin-top: .15rem; }
.platform-feature p  { margin: 0; font-size: .95rem; color: var(--text-body); }

/* ── Nosotros ── */
.director-card { display: grid; grid-template-columns: 200px 1fr; gap: 2rem; align-items: start; }
.director-photo {
  width: 200px; height: 240px;
  background: linear-gradient(160deg, var(--bg-section), var(--border));
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: .85rem;
  text-align: center;
  flex-direction: column;
  gap: .5rem;
}
.director-photo svg { width: 48px; height: 48px; opacity: .4; }
.director-info .badge { margin-bottom: .5rem; }
.director-info h3 { font-size: 1.4rem; margin-bottom: .25rem; }
.director-info .title { color: var(--violet-detail); font-weight: 600; font-size: .95rem; margin-bottom: 1rem; }

/* ── Numbers strip ── */
.numbers-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.num-cell {
  background: var(--bg-white);
  padding: 2rem 1rem;
  text-align: center;
}
.num-cell .num { font-size: 2.5rem; font-weight: 800; color: var(--primary); line-height: 1; }
.num-cell .lbl { font-size: .85rem; color: var(--text-muted); margin-top: .4rem; }

/* ── Responsive ── */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .numbers-strip { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .director-card { grid-template-columns: 1fr; }
  .director-photo { width: 100%; height: 200px; flex-direction: row; justify-content: center; }
}

@media (max-width: 768px) {
  :root { --header-h: 64px; }
  .section { padding: 56px 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .nav, .nav__cta { display: none; }
  .hamburger { display: flex; }
  .numbers-strip { grid-template-columns: repeat(2, 1fr); }
  .step:not(:last-child)::after { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .numbers-strip { grid-template-columns: 1fr 1fr; }
  .cta-section .btn-group { flex-direction: column; align-items: center; }
}
