/* Portada Ferias en México */
:root {
	--pink: #e0267d;
	--pink-d: #c01868;
	--purple: #5b2a86;
	--purple-d: #3b1560;
	--orange: #f08a24;
	--teal: #19b3a6;
	--blue: #2f6fd6;
	--ink: #231a2e;
	--muted: #6b6277;
	--line: #eadff0;
	--bg: #ffffff;
	--soft: #faf6fc;
	--radius: 14px;
	--shadow: 0 4px 16px rgba(60, 20, 90, .10);
}
*, *::before, *::after { box-sizing: border-box; }
body.fm-home { margin: 0; font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.5; -webkit-font-smoothing: antialiased; }
.fm-home a { color: inherit; text-decoration: none; }
.fm-home img { max-width: 100%; height: auto; display: block; }
.fm-home ul { list-style: none; margin: 0; padding: 0; }
.fm-home h1, .fm-home h2, .fm-home h3, .fm-home p { margin: 0; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fm-skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 14px; z-index: 100; }
.fm-skip:focus { left: 8px; top: 8px; }
.fm-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.fm-home :focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* Botones */
.fm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border-radius: 999px; font-weight: 700; font-size: 14px; border: 2px solid transparent; cursor: pointer; font-family: inherit; line-height: 1.2; }
.fm-btn-pink { background: var(--pink); color: #fff; }
.fm-btn-pink:hover { background: var(--pink-d); }
.fm-btn-line { background: #fff; color: var(--pink); border-color: var(--pink); }
.fm-btn-line:hover { background: #fff0f7; }

/* Header */
.fm-header { background: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 0 var(--line); }
.fm-header-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 8px; }
.fm-logo img { max-height: 56px; width: auto; }
.fm-logo-text { font-weight: 800; font-size: 28px; color: var(--purple); letter-spacing: -.02em; line-height: 1; }
.fm-logo-text em { font-style: normal; color: var(--pink); }
.fm-burger { display: none; background: none; border: 0; font-size: 28px; line-height: 1; cursor: pointer; color: var(--purple); padding: 4px 8px; }
.fm-nav-in { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; padding-bottom: 6px; }
.fm-nav a, .fm-dd-btn { padding: 8px 16px; font-weight: 600; font-size: 14.5px; color: var(--ink); border-radius: 999px; background: none; border: 0; cursor: pointer; font-family: inherit; }
.fm-nav a:hover, .fm-dd-btn:hover { color: var(--pink); }
.fm-nav a.is-current { color: var(--pink); box-shadow: inset 0 -3px 0 var(--pink); border-radius: 0; }
.fm-nav a.fm-nav-publica { display: none; }
.fm-dd { position: relative; }
.fm-dd-menu { display: none; position: absolute; top: 100%; left: 0; z-index: 60; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; width: 560px; max-width: 90vw; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.fm-dd.is-open .fm-dd-menu, .fm-dd:hover .fm-dd-menu { display: grid; }
.fm-dd-menu a { padding: 7px 10px; font-weight: 500; border-radius: 8px; }
.fm-dd-menu a:hover { background: var(--soft); }

/* Hero */
.fm-hero { background: linear-gradient(135deg, #3b1560 0%, #7a2a8f 45%, #e0267d 100%); background-size: cover; background-position: center; color: #fff; text-align: center; padding: 64px 0 56px; }
.fm-hero h1 { font-size: clamp(28px, 4.6vw, 48px); font-weight: 800; line-height: 1.15; text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
.fm-hl { display: inline-block; background: var(--pink); padding: 0 .35em; border-radius: .3em; text-shadow: none; transform: rotate(-1deg); }
.fm-hero p { margin: 14px auto 26px; max-width: 640px; font-size: clamp(15px, 1.8vw, 18px); opacity: .95; }
.fm-search { display: flex; align-items: center; gap: 10px; background: #fff; color: var(--ink); border-radius: 999px; padding: 8px 8px 8px 20px; max-width: 760px; margin: 0 auto; box-shadow: 0 8px 28px rgba(0, 0, 0, .25); }
.fm-search svg { flex: 0 0 auto; color: var(--purple); }
.fm-search input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 15px; background: transparent; color: var(--ink); padding: 10px 4px; }
.fm-search .fm-btn { padding: 12px 28px; }

/* Botones rápidos */
.fm-quick { display: flex; gap: 12px; padding: 22px 0 6px; overflow-x: auto; scrollbar-width: thin; }
.fm-quick li { flex: 0 0 auto; }
.fm-quick a { display: inline-flex; align-items: center; padding: 12px 26px; border-radius: 999px; color: #fff; font-weight: 700; font-size: 15px; box-shadow: 0 4px 10px rgba(0, 0, 0, .12); white-space: nowrap; }
.fm-quick .c1 { background: var(--pink); }
.fm-quick .c2 { background: var(--orange); }
.fm-quick .c3 { background: var(--teal); }
.fm-quick .c4 { background: var(--purple); }
.fm-quick .c5 { background: var(--blue); }
.fm-quick .c6 { background: #d9731a; }

/* Secciones */
.fm-sec { padding-top: 34px; padding-bottom: 6px; }
.fm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; border-left: 4px solid var(--pink); padding-left: 12px; }
.fm-head h2 { font-size: clamp(20px, 2.6vw, 26px); font-weight: 800; color: var(--purple-d); line-height: 1.2; }
.fm-head p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.fm-more { display: inline-flex; align-items: center; gap: 6px; color: var(--pink); font-weight: 700; font-size: 14px; white-space: nowrap; }
.fm-more:hover { text-decoration: underline; }

/* Estados */
.fm-states { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.fm-states a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); font-weight: 700; }
.fm-states a small { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.fm-states a:hover { border-color: var(--pink); color: var(--pink); }
.fm-all-states { margin-top: 14px; }
.fm-all-states summary { cursor: pointer; font-weight: 700; color: var(--pink); width: max-content; }
.fm-states-all { margin-top: 12px; grid-template-columns: repeat(4, 1fr); }

/* Tarjetas */
.fm-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.fm-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.fm-card-img { position: relative; display: block; aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--purple), var(--pink)); overflow: hidden; }
.fm-card-img img { width: 100%; height: 100%; object-fit: cover; }
.fm-card-ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 54px; font-weight: 800; color: rgba(255, 255, 255, .85); }
.fm-tag { position: absolute; font-size: 12px; font-weight: 700; color: #fff; border-radius: 999px; padding: 3px 12px; }
.fm-tag-hoy { top: 10px; right: 10px; background: var(--pink); }
.fm-tag-fecha { left: 10px; bottom: 10px; background: var(--purple); }
.fm-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.fm-card h3 { font-size: 15.5px; font-weight: 700; line-height: 1.3; }
.fm-card h3 a:hover { color: var(--pink); }
.fm-line { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.fm-line svg { color: var(--pink); flex: 0 0 auto; }
.fm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.fm-pill { font-size: 11.5px; font-weight: 600; padding: 2px 10px; border-radius: 999px; }
.fm-pill.ok { background: #e3f6ea; color: #1b6b36; }
.fm-pill.pend { background: #fff2dc; color: #8a5300; }
.fm-pill.pal { background: #efe7fb; color: #4b2a8a; }
.fm-guide .fm-card-img { aspect-ratio: 16 / 9; }

/* Trío */
.fm-trio { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 16px; padding-top: 40px; }
.fm-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.fm-box h2 { font-size: 18px; font-weight: 800; color: var(--purple-d); }
.fm-sub { color: var(--muted); font-size: 13px; }
.fm-box .fm-btn { align-self: flex-start; }
.fm-box-promo { background: var(--soft); }
.fm-cal { width: 100%; border-collapse: collapse; text-align: center; font-size: 13px; }
.fm-cal caption { font-weight: 700; padding: 8px 0; background: #f1e6f7; border-radius: 10px; color: var(--purple-d); margin-bottom: 4px; }
.fm-cal th { color: var(--muted); font-weight: 600; padding: 4px 0; }
.fm-cal td { padding: 6px 0; }
.fm-cal td.has { position: relative; font-weight: 700; color: #fff; z-index: 0; }
.fm-cal td.has::before { content: ''; position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; background: var(--pink); z-index: -1; }
.fm-cal td.today.has::after { content: ''; position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 2px solid var(--purple); z-index: -1; }
.fm-cal td.today:not(.has) { font-weight: 800; color: var(--pink); box-shadow: inset 0 -2px 0 var(--pink); }
.fm-next { display: flex; flex-direction: column; gap: 10px; }
.fm-next a { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; }
.fm-next a:hover { background: var(--soft); }
.fm-next-d { flex: 0 0 48px; text-align: center; background: var(--purple); color: #fff; border-radius: 10px; padding: 4px 0; line-height: 1.1; }
.fm-next-d b { display: block; font-size: 18px; }
.fm-next-d i { display: block; font-style: normal; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.fm-next-t strong { display: block; font-size: 14px; line-height: 1.3; }
.fm-next-t small { color: var(--muted); font-size: 12.5px; }
.fm-seo { color: var(--muted); font-size: 14.5px; max-width: 900px; }
.fm-seo p { margin-bottom: 10px; }

/* Footer */
.fm-footer { margin-top: 48px; background: var(--purple-d); color: #e9dcf3; padding: 40px 0 0; }
.fm-foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 28px; }
.fm-footer .fm-logo-text { color: #fff; font-size: 24px; }
.fm-foot-brand p { margin-top: 10px; font-size: 14px; }
.fm-social { display: flex; flex-wrap: wrap; gap: 8px; }
.fm-social a { border: 1px solid rgba(255, 255, 255, .4); border-radius: 999px; padding: 4px 14px; font-size: 13px; }
.fm-social a:hover { background: rgba(255, 255, 255, .12); }
.fm-footer h3 { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.fm-footer li { margin-bottom: 6px; font-size: 14px; }
.fm-footer li a:hover { color: #fff; text-decoration: underline; }
.fm-two { columns: 2; column-gap: 20px; }
.fm-copy { text-align: center; padding: 22px 12px; margin-top: 28px; border-top: 1px solid rgba(255, 255, 255, .15); font-size: 13px; }

/* Tablet */
@media (max-width: 1000px) {
	.fm-grid4 { grid-template-columns: repeat(2, 1fr); }
	.fm-trio { grid-template-columns: 1fr 1fr; }
	.fm-trio .fm-box:first-child { grid-column: 1 / -1; }
	.fm-states-all { grid-template-columns: repeat(3, 1fr); }
	.fm-foot-grid { grid-template-columns: 1fr 1fr; }
}

/* Móvil */
@media (max-width: 720px) {
	.fm-wrap { padding-left: 16px; padding-right: 16px; }
	.fm-burger { display: block; }
	.fm-publica { display: none; }
	.fm-nav { display: none; border-top: 1px solid var(--line); }
	.fm-nav.is-open { display: block; }
	.fm-nav-in { flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 12px; }
	.fm-nav a, .fm-dd-btn { display: block; width: 100%; text-align: left; padding: 12px 8px; border-radius: 0; }
	.fm-nav a.is-current { box-shadow: none; }
	.fm-nav a.fm-nav-publica { display: block; margin-top: 8px; text-align: center; background: var(--pink); color: #fff; border-radius: 999px; }
	.fm-dd-menu { position: static; width: 100%; max-width: none; box-shadow: none; border: 0; padding: 0 0 0 12px; grid-template-columns: 1fr 1fr; }
	.fm-hero { padding: 40px 0 36px; }
	.fm-search { padding-left: 14px; }
	.fm-search .fm-btn { padding: 11px 18px; }
	.fm-states, .fm-states-all { grid-template-columns: 1fr 1fr; }
	.fm-states a { padding: 12px 14px; flex-direction: column; align-items: flex-start; gap: 0; }
	.fm-grid4 { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin-right: -16px; padding-right: 16px; scrollbar-width: thin; }
	.fm-grid4 > .fm-card { scroll-snap-align: start; }
	.fm-head { flex-direction: column; align-items: flex-start; gap: 6px; }
	.fm-trio { grid-template-columns: 1fr; }
	.fm-foot-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
	.fm-card, .fm-states a, .fm-btn { transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease; }
	.fm-card:hover, .fm-states a:hover { transform: translateY(-2px); }
}
