/* ============================================================================
   Farmacia Centro Medicinal San Miguel — design system
   Centralizes the brand palette, typography pairing, the component styles that
   used to live as per-page inline <style> blocks, and subtle clinical
   micro-interactions. Palette is fixed (navy/blue/gold) — do not introduce
   green/neon/saturated colors.
   ============================================================================ */

:root {
	--fsm-navy:        #1B3A6B;  /* primary */
	--fsm-navy-deep:   #0F2444;  /* gradient anchor */
	--fsm-blue:        #2163AE;
	--fsm-blue-bright: #2B72C2;
	--fsm-bg-blue:     #EEF3FB;  /* light section bg */
	--fsm-bg-soft:     #F0F4F9;
	--fsm-tint:        #DBEAFE;
	--fsm-gold:        #C4973A;  /* THE gold — reconciled (was also #B8972E) */
	--fsm-gray:        #6B7280;
	--fsm-ink:         #1f2a3a;  /* body text, softer than pure black */
	--fsm-line:        #E2E8F0;
	--fsm-white:       #ffffff;

	--fsm-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
	--fsm-sans:  'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

	--fsm-radius: 14px;
	--fsm-shadow: 0 6px 24px rgba(27, 58, 107, 0.10);
	--fsm-shadow-lg: 0 14px 40px rgba(27, 58, 107, 0.16);
	--fsm-ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---- Typography pairing ------------------------------------------------- */
body,
.ast-container,
button, input, select, textarea {
	font-family: var(--fsm-sans);
	color: var(--fsm-ink);
}

h1, h2, h3, h4, h5,
.entry-title,
.fsm-mag-hero h1, .fsm-med-hero h1, .fsm-pac-hero h1,
.wp-block-heading {
	font-family: var(--fsm-serif);
	font-optical-sizing: auto;
	letter-spacing: -0.01em;
	font-weight: 600;
}

h1, .entry-title { line-height: 1.12; }
h2 { line-height: 1.18; }
p  { line-height: 1.7; }

/* Refined site title (when text logo is used) */
.site-title a { font-family: var(--fsm-serif); letter-spacing: -0.01em; }

/* ---- Buttons: consistent clinical-premium hover --------------------------- */
.wp-block-button__link,
.fsm-mag-btn, .fsm-mag-btn2, .fsm-mag-cta-btn,
.fsm-med-btn-primary, .fsm-med-btn-secondary, .fsm-med-cta-btn1, .fsm-med-cta-btn2,
.fsm-pac-btn1, .fsm-pac-btn2, .fsm-pac-cta-btn1, .fsm-pac-cta-btn2,
.fsm-btn-servicios {
	transition: transform .2s var(--fsm-ease), box-shadow .2s var(--fsm-ease), background-color .2s var(--fsm-ease), opacity .2s var(--fsm-ease);
	will-change: transform;
}
.wp-block-button__link:hover,
.fsm-mag-btn:hover, .fsm-mag-btn2:hover, .fsm-mag-cta-btn:hover,
.fsm-med-btn-primary:hover, .fsm-med-cta-btn1:hover, .fsm-med-cta-btn2:hover,
.fsm-pac-btn1:hover, .fsm-pac-cta-btn1:hover, .fsm-pac-cta-btn2:hover,
.fsm-btn-servicios:hover {
	transform: translateY(-2px);
	box-shadow: var(--fsm-shadow);
}

/* ---- Gutenberg homepage: card columns get depth + hover ------------------- */
.wp-block-columns .wp-block-column[style*="EEF3FB"],
.wp-block-columns .wp-block-column[style*="eef3fb"] {
	transition: transform .25s var(--fsm-ease), box-shadow .25s var(--fsm-ease);
}
.wp-block-columns .wp-block-column[style*="EEF3FB"]:hover,
.wp-block-columns .wp-block-column[style*="eef3fb"]:hover {
	transform: translateY(-3px);
	box-shadow: var(--fsm-shadow);
}

/* ============================================================================
   Migrated component styles (single source of truth — replaces per-page
   inline <style> blocks once pages are cleaned to plain markup).
   ============================================================================ */

/* Generic hero shared shape */
.fsm-mag-hero, .fsm-med-hero, .fsm-pac-hero {
	font-family: var(--fsm-sans);
}

/* Cards: magistrales / servicios / médicos */
.fsm-mag-card, .fsm-card, .fsm-prep-card {
	transition: box-shadow .25s var(--fsm-ease), transform .25s var(--fsm-ease), border-color .25s var(--fsm-ease);
}
.fsm-mag-card:hover, .fsm-card:hover, .fsm-prep-card:hover {
	box-shadow: var(--fsm-shadow);
	transform: translateY(-3px);
	border-color: var(--fsm-tint);
}

/* FAQ rows: gentle highlight on hover */
.fsm-faq-item { transition: background-color .2s var(--fsm-ease); }
.fsm-faq-item:hover { background-color: var(--fsm-bg-blue); }

/* Process step numbers / cards lift */
.fsm-step, .fsm-paso, .fsm-pac-step {
	transition: transform .25s var(--fsm-ease), box-shadow .25s var(--fsm-ease);
}
.fsm-step:hover, .fsm-paso:hover, .fsm-pac-step:hover {
	transform: translateY(-3px);
	box-shadow: var(--fsm-shadow);
}

/* Gold accent helper (use sparingly per brand rules) */
.fsm-gold { color: var(--fsm-gold); }
.fsm-rule-gold { height: 3px; width: 56px; background: var(--fsm-gold); border: 0; border-radius: 3px; margin: 18px 0; }

/* ---- Site footer (Astra footer-html-1 widget) ---------------------------
   Styles moved here out of the widget's inline <style> (Astra printed that as
   literal text). Negative margins keep the bar full-bleed inside Astra padding. */
.smfooter-wrap { background: var(--fsm-navy); margin: -20px -30px; padding: 20px 36px; font-family: var(--fsm-sans); }
.smfooter-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.smfooter-brand { color: #fff; font-size: 13px; font-weight: 600; letter-spacing: .04em; }
.smfooter-loc { color: #9bb8d4; font-size: 11px; margin-top: 3px; }
.smfooter-contacts { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
.smfooter-phone { color: var(--fsm-gold); font-size: 12px; font-weight: 600; text-decoration: none; }
.smfooter-mail { color: #9bb8d4; font-size: 11px; text-decoration: none; }
.smfooter-contacts a { transition: color .2s var(--fsm-ease); }
.smfooter-contacts a:hover { color: #fff; }
.smfooter-legal { border-top: 1px solid rgba(255,255,255,.12); margin-top: 14px; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; }
.smfooter-legal span { color: rgba(155,184,212,.55); font-size: 10px; }
@media (max-width: 768px) {
	.smfooter-wrap { margin: -20px -16px; padding: 18px 20px; }
	.smfooter-row { flex-direction: column; gap: 10px; }
}

/* ============================================================================
   Scroll-reveal micro-interaction (paired with fsm.js). Respects reduced motion.
   ============================================================================ */
.fsm-reveal {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity .6s var(--fsm-ease), transform .6s var(--fsm-ease);
	will-change: opacity, transform;
}
.fsm-reveal.is-visible {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.fsm-reveal { opacity: 1; transform: none; transition: none; }
	*, *::before, *::after { transition-duration: .001ms !important; }
}

/* ============================================================================
   Mobile polish for migrated components (keeps existing per-page @media working)
   ============================================================================ */
@media (max-width: 768px) {
	h1, .entry-title { font-size: clamp(1.8rem, 7vw, 2.2rem); }
	.fsm-mag-grid, .fsm-pasos, .fsm-prep-grid, .fsm-proceso-steps,
	.fsm-med-garantias-inner, .fsm-med-stats-inner, .fsm-pac-que-es-inner,
	.fsm-servicios-grid { grid-template-columns: 1fr !important; }
	.fsm-pac-steps { grid-template-columns: repeat(2, 1fr) !important; }
}
