/**
 * Aiden Header v2 — Public styles
 */

:root {
	--aiden-ink: #0a0a0a;
	--aiden-ink-soft: #1d1d1f;
	--aiden-muted: #6e6e73;
	--aiden-line: rgba(0, 0, 0, 0.08);
	--aiden-bg: #fbfbfd;
	--aiden-pill-bg: #f2f2f4;
	--aiden-pill-hover: #eaeaee;
	--aiden-cta-bg: #0a0a0a;
	--aiden-cta-fg: #ffffff;
	--aiden-link-bg: #f2f2f4;
	--aiden-link-fg: #0a0a0a;
	--aiden-radius: 14px;
	--aiden-nav-h: 68px;
	--aiden-announce-h: 40px;
	--aiden-logo-h: 26px;
	--aiden-ease: cubic-bezier(0.32, 0.72, 0, 1);
	--aiden-spring: cubic-bezier(0.34, 1.3, 0.64, 1);
	--aiden-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body.aiden-has-announce { padding-top: var(--aiden-announce-h); }

/* ===== ANNOUNCEMENT ===== */
.aiden-announce {
	position: fixed;
	top: 0; left: 0; right: 0;
	height: var(--aiden-announce-h);
	z-index: 10000;
	font-family: var(--aiden-font);
	font-size: 13px;
	font-weight: 500;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.4s var(--aiden-ease), opacity 0.3s var(--aiden-ease);
}
.aiden-announce.aiden-hidden { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.aiden-announce-inner {
	max-width: 1400px; width: 100%;
	padding: 0 32px;
	display: flex; align-items: center; justify-content: center;
	gap: 12px; position: relative;
}
.aiden-announce-inner a {
	color: inherit; text-decoration: none;
	display: inline-flex; align-items: center; gap: 6px;
}
.aiden-announce-arrow { transition: transform 0.3s var(--aiden-ease); }
.aiden-announce-inner a:hover .aiden-announce-arrow { transform: translateX(3px); }
.aiden-announce-close {
	position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
	width: 24px; height: 24px; border-radius: 50%;
	background: transparent; border: none; color: inherit;
	font-size: 18px; cursor: pointer; opacity: 0.6;
	transition: opacity 0.2s var(--aiden-ease);
	display: grid; place-items: center;
}
.aiden-announce-close:hover { opacity: 1; }

/* ===== HEADER ===== */
.aiden-header {
	position: fixed;
	top: 0; left: 0; right: 0;
	height: var(--aiden-nav-h);
	background: rgba(255, 255, 255, 0.82);
	backdrop-filter: saturate(180%) blur(20px);
	-webkit-backdrop-filter: saturate(180%) blur(20px);
	border-bottom: 1px solid transparent;
	z-index: 9999;
	transition: background 0.3s var(--aiden-ease), border-color 0.3s var(--aiden-ease), top 0.3s var(--aiden-ease);
	font-family: var(--aiden-font);
}
body.aiden-has-announce .aiden-header { top: var(--aiden-announce-h); }
.aiden-header.aiden-scrolled {
	background: rgba(255, 255, 255, 0.92);
	border-bottom-color: var(--aiden-line);
}
body.aiden-menu-open .aiden-header {
	background: rgba(255, 255, 255, 0.95);
	border-bottom-color: var(--aiden-line);
}

.aiden-nav {
	max-width: 1400px;
	height: 100%;
	margin: 0 auto;
	padding: 0 32px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.aiden-logo { display: flex; align-items: center; height: 100%; flex-shrink: 0; text-decoration: none; }
.aiden-logo img { height: var(--aiden-logo-h); width: auto; display: block; }
.aiden-logo-text { font-size: 17px; font-weight: 600; color: var(--aiden-ink); letter-spacing: -0.02em; }

/* Desktop pills */
.aiden-pills { display: flex; gap: 4px; flex: 1; margin-left: 24px; }
.aiden-pill {
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 500;
	color: var(--aiden-ink);
	background: transparent;
	border: none;
	border-radius: 980px;
	letter-spacing: -0.005em;
	cursor: pointer;
	font-family: inherit;
	transition: background 0.25s var(--aiden-ease);
}
.aiden-pill:hover { background: var(--aiden-pill-hover); }
.aiden-pill.active { background: var(--aiden-pill-bg); }

/* Right actions */
.aiden-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.aiden-search-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 10px;
	background: transparent;
	border: none;
	border-radius: 980px;
	color: var(--aiden-ink-soft);
	cursor: pointer;
	font-family: inherit;
	transition: background 0.2s var(--aiden-ease);
}
.aiden-search-btn:hover { background: var(--aiden-pill-hover); }
.aiden-kbd { display: inline-flex; gap: 2px; }
.aiden-kbd kbd {
	font-family: inherit;
	font-size: 10px;
	font-weight: 500;
	padding: 2px 5px;
	background: rgba(0, 0, 0, 0.06);
	border-radius: 4px;
	color: var(--aiden-muted);
	line-height: 1;
}

.aiden-link {
	padding: 10px 16px;
	font-size: 14px;
	font-weight: 500;
	border-radius: 980px;
	background: var(--aiden-link-bg);
	color: var(--aiden-link-fg) !important;
	text-decoration: none;
	transition: filter 0.25s var(--aiden-ease), background 0.25s var(--aiden-ease);
}
.aiden-link:hover { filter: brightness(0.95); }

.aiden-cta {
	display: inline-flex;
	align-items: center;
	padding: 10px 22px;
	font-size: 14px;
	font-weight: 500;
	color: var(--aiden-cta-fg) !important;
	background: var(--aiden-cta-bg);
	border-radius: 980px;
	text-decoration: none;
	letter-spacing: -0.005em;
	transition: background 0.25s var(--aiden-ease), transform 0.2s var(--aiden-ease);
}
.aiden-cta:hover { filter: brightness(1.2); }
.aiden-cta:active { transform: scale(0.97); }

/* Burger → X */
.aiden-burger {
	display: none;
	width: 36px; height: 36px;
	position: relative;
	background: none; border: none; cursor: pointer;
	border-radius: 50%;
	padding: 0;
	transition: background 0.2s var(--aiden-ease);
}
.aiden-burger:hover { background: var(--aiden-pill-hover); }
.aiden-burger span {
	position: absolute;
	left: 10px; right: 10px;
	height: 1.5px;
	background: var(--aiden-ink);
	border-radius: 2px;
	transition: transform 0.4s var(--aiden-spring), top 0.35s var(--aiden-ease);
}
.aiden-burger span:nth-child(1) { top: 14px; }
.aiden-burger span:nth-child(2) { top: 21px; }
body.aiden-menu-open .aiden-burger span:nth-child(1) { top: 17px; transform: rotate(45deg); }
body.aiden-menu-open .aiden-burger span:nth-child(2) { top: 17px; transform: rotate(-45deg); }

/* ===== DESKTOP MEGA PANEL ===== */
.aiden-mega {
	position: fixed;
	top: var(--aiden-nav-h);
	left: 0; right: 0;
	background: #fff;
	border-bottom: 1px solid var(--aiden-line);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity 0.3s var(--aiden-ease), transform 0.3s var(--aiden-ease), visibility 0.3s var(--aiden-ease);
	z-index: 9998;
	box-shadow: 0 16px 40px -20px rgba(0, 0, 0, 0.12);
	font-family: var(--aiden-font);
}
body.aiden-has-announce .aiden-mega { top: calc(var(--aiden-nav-h) + var(--aiden-announce-h)); }
.aiden-mega.aiden-open { opacity: 1; visibility: visible; transform: translateY(0); }
.aiden-mega-inner {
	max-width: 1400px;
	margin: 0 auto;
	padding: 28px 32px 40px;
}

.aiden-discover {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	margin: 0 -14px 20px;
	font-size: 22px;
	font-weight: 600;
	color: var(--aiden-ink);
	letter-spacing: -0.02em;
	border-radius: 12px;
	text-decoration: none;
	transition: background 0.2s var(--aiden-ease);
}
.aiden-discover:hover { background: var(--aiden-pill-hover); }
.aiden-discover .arr { font-size: 18px; transition: transform 0.3s var(--aiden-ease); }
.aiden-discover:hover .arr { transform: translateX(4px); }

.aiden-mega-grid { display: none; }
.aiden-mega-grid.aiden-active {
	display: block;
	animation: aidenMegaIn 0.3s var(--aiden-ease);
}
@keyframes aidenMegaIn {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}

.aiden-mega-columns {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 32px;
}
.aiden-mega-section h4 {
	font-size: 16px;
	font-weight: 600;
	color: var(--aiden-ink);
	letter-spacing: -0.01em;
	margin: 0 0 10px;
	padding: 0 10px;
}
.aiden-mega-section ul {
	list-style: none;
	margin: 0; padding: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.aiden-mega-section a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 7px 10px;
	font-size: 14px;
	font-weight: 400;
	color: var(--aiden-ink-soft);
	letter-spacing: -0.005em;
	text-decoration: none;
	border-radius: 8px;
	transition: background 0.2s var(--aiden-ease), color 0.2s var(--aiden-ease);
}
.aiden-mega-section a:hover {
	background: var(--aiden-pill-hover);
	color: var(--aiden-ink);
}
.aiden-mega-section .aiden-mega-label { flex: 1; min-width: 0; }

.aiden-mega-ico {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 7px;
	font-size: 15px;
	line-height: 1;
	flex-shrink: 0;
	background: var(--aiden-pill-bg);
}
.aiden-mega-ico img {
	width: 18px;
	height: 18px;
	object-fit: contain;
	border-radius: 4px;
}

/* ===== MOBILE OVERLAY ===== */
.aiden-mobile {
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	background: #fff;
	z-index: 9997;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s var(--aiden-ease), visibility 0.3s var(--aiden-ease);
	display: flex;
	flex-direction: column;
	padding-top: var(--aiden-nav-h);
	font-family: var(--aiden-font);
}
body.aiden-has-announce .aiden-mobile { padding-top: calc(var(--aiden-nav-h) + var(--aiden-announce-h)); }
body.aiden-menu-open .aiden-mobile { opacity: 1; visibility: visible; }
body.aiden-menu-open { overflow: hidden; }

.m-pills {
	flex-shrink: 0;
	padding: 18px 22px 14px;
	display: flex;
	gap: 8px;
	overflow-x: auto;
	scrollbar-width: none;
	opacity: 0;
	transform: translateX(-24px);
	transition: opacity 0.4s var(--aiden-ease), transform 0.5s var(--aiden-spring);
}
.m-pills::-webkit-scrollbar { display: none; }
body.aiden-menu-open .m-pills {
	opacity: 1;
	transform: translateX(0);
	transition-delay: 0.05s;
}
.m-pill {
	flex-shrink: 0;
	padding: 9px 18px;
	font-size: 14px;
	font-weight: 500;
	color: var(--aiden-ink);
	background: var(--aiden-pill-bg);
	border: none;
	border-radius: 980px;
	cursor: pointer;
	font-family: inherit;
	transition: background 0.2s var(--aiden-ease), color 0.2s var(--aiden-ease);
}
.m-pill.active { background: var(--aiden-ink); color: #fff; }

.m-content {
	flex: 1;
	overflow-y: auto;
	padding: 0 22px 20px;
	-webkit-overflow-scrolling: touch;
}

.m-overview {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 12px;
	margin: 8px -12px 8px;
	font-size: 20px;
	font-weight: 600;
	color: var(--aiden-ink);
	text-decoration: none;
	letter-spacing: -0.02em;
	border-radius: 14px;
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.45s var(--aiden-ease), transform 0.5s var(--aiden-spring), background 0.2s var(--aiden-ease);
}
body.aiden-menu-open .m-overview {
	opacity: 1;
	transform: translateY(0);
	transition-delay: 0.1s;
}
.m-overview:hover, .m-overview:active { background: var(--aiden-pill-bg); }
.m-overview .arr { font-size: 18px; transition: transform 0.3s var(--aiden-ease); }
.m-overview:hover .arr { transform: translateX(4px); }

.m-overview + .m-tab {
	border-top: 1px solid var(--aiden-line);
	padding-top: 8px;
}

.m-tab { display: none; }
.m-tab.active { display: block; }

.m-row {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 12px;
	margin: 0 -12px;
	font-size: 20px;
	font-weight: 600;
	color: var(--aiden-ink);
	text-decoration: none;
	letter-spacing: -0.02em;
	width: calc(100% + 24px);
	text-align: left;
	position: relative;
	border-radius: 14px;
	transition: background 0.2s var(--aiden-ease);
}
.m-row:hover, .m-row:active, .m-row:focus-visible {
	background: var(--aiden-pill-bg);
	outline: none;
}
.m-row:not(:last-child)::after {
	content: '';
	position: absolute;
	left: 12px; right: 12px; bottom: 0;
	height: 1px;
	background: var(--aiden-line);
	transition: opacity 0.2s var(--aiden-ease);
}
.m-row:hover::after, .m-row:active::after { opacity: 0; }

.m-row-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.m-row-sub {
	display: block;
	font-size: 13px;
	font-weight: 400;
	color: var(--aiden-muted);
	margin-top: 2px;
	letter-spacing: -0.005em;
}

/* Icono cuadrado redondeado estilo iOS */
.m-ico {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	font-size: 22px;
	line-height: 1;
	flex-shrink: 0;
	background: var(--aiden-pill-bg);
}
.m-ico img {
	width: 26px;
	height: 26px;
	object-fit: contain;
	border-radius: 6px;
}
.m-ico-sm {
	width: 32px;
	height: 32px;
	border-radius: 9px;
	font-size: 16px;
}
.m-ico-sm img { width: 18px; height: 18px; }

/* Row cascade animation */
.m-tab.active .m-row { animation: aidenRowIn 0.55s var(--aiden-spring) both; }
.m-tab.active .m-row:nth-child(1) { animation-delay: 0.15s; }
.m-tab.active .m-row:nth-child(2) { animation-delay: 0.20s; }
.m-tab.active .m-row:nth-child(3) { animation-delay: 0.25s; }
.m-tab.active .m-row:nth-child(4) { animation-delay: 0.30s; }
.m-tab.active .m-row:nth-child(5) { animation-delay: 0.35s; }
.m-tab.active .m-row:nth-child(6) { animation-delay: 0.40s; }
.m-tab.active .m-row:nth-child(7) { animation-delay: 0.45s; }
.m-tab.active .m-row:nth-child(8) { animation-delay: 0.50s; }
.m-tab.active .m-row:nth-child(9) { animation-delay: 0.55s; }
.m-tab.active .m-row:nth-child(10) { animation-delay: 0.60s; }
@keyframes aidenRowIn {
	from { opacity: 0; transform: translateY(20px); }
	to { opacity: 1; transform: translateY(0); }
}

.m-section { padding: 28px 0 8px; }
.m-section h5 {
	font-size: 11px;
	font-weight: 600;
	color: var(--aiden-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-bottom: 6px;
	padding: 0 12px;
}
.m-section .m-row {
	font-size: 16px;
	font-weight: 500;
	padding: 14px 12px;
}

.m-bottom {
	flex-shrink: 0;
	padding: 16px 22px calc(16px + env(safe-area-inset-bottom, 0px));
	background: #fff;
	border-top: 1px solid var(--aiden-line);
	display: flex;
	gap: 10px;
	transform: translateY(120%);
	transition: transform 0.55s var(--aiden-spring);
}
body.aiden-menu-open .m-bottom {
	transform: translateY(0);
	transition-delay: 0.12s;
}
.m-btn {
	flex: 1;
	padding: 14px;
	text-align: center;
	border-radius: 980px;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	letter-spacing: -0.01em;
	transition: transform 0.2s var(--aiden-ease), background 0.25s var(--aiden-ease);
}
.m-btn:active { transform: scale(0.97); }
.m-btn-outline { background: var(--aiden-link-bg); color: var(--aiden-link-fg) !important; }
.m-btn-outline:hover { filter: brightness(0.95); }
.m-btn-primary { background: var(--aiden-cta-bg); color: var(--aiden-cta-fg) !important; }
.m-btn-primary:hover { filter: brightness(1.2); }

/* ===== SEARCH MODAL ===== */
.aiden-search-modal {
	position: fixed;
	inset: 0;
	z-index: 10001;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s var(--aiden-ease), visibility 0.3s var(--aiden-ease);
	font-family: var(--aiden-font);
}
.aiden-search-modal.aiden-open { opacity: 1; visibility: visible; }
.aiden-search-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 10, 10, 0.4);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}
.aiden-search-panel {
	position: relative;
	max-width: 640px;
	margin: 120px auto 0;
	background: #fff;
	border-radius: var(--aiden-radius);
	box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.3);
	overflow: hidden;
	transform: translateY(-20px) scale(0.98);
	opacity: 0;
	transition: transform 0.35s var(--aiden-ease), opacity 0.3s var(--aiden-ease);
}
.aiden-search-modal.aiden-open .aiden-search-panel {
	transform: translateY(0) scale(1);
	opacity: 1;
}
.aiden-search-form {
	display: flex;
	align-items: center;
	padding: 16px 20px;
	border-bottom: 1px solid var(--aiden-line);
	gap: 12px;
}
.aiden-search-form svg { color: var(--aiden-muted); flex-shrink: 0; }
.aiden-search-form input {
	flex: 1;
	border: none;
	outline: none;
	background: transparent;
	font-family: inherit;
	font-size: 17px;
	color: var(--aiden-ink);
	padding: 4px 0;
	letter-spacing: -0.01em;
}
.aiden-search-form input::placeholder { color: var(--aiden-muted); }
.aiden-search-close {
	background: rgba(0, 0, 0, 0.05);
	border: none;
	padding: 4px 8px;
	border-radius: 6px;
	cursor: pointer;
	color: var(--aiden-muted);
	font-size: 11px;
	font-family: inherit;
}
.aiden-search-close:hover { background: rgba(0, 0, 0, 0.08); }
.aiden-search-results {
	max-height: 400px;
	overflow-y: auto;
	padding: 8px;
}
.aiden-search-results:empty { display: none; }
.aiden-search-item {
	display: flex;
	flex-direction: column;
	padding: 12px 14px;
	border-radius: 10px;
	text-decoration: none;
	color: var(--aiden-ink);
	transition: background 0.15s var(--aiden-ease);
	cursor: pointer;
}
.aiden-search-item:hover,
.aiden-search-item.aiden-active { background: var(--aiden-pill-bg); }
.aiden-search-item-title { font-size: 14px; font-weight: 500; }
.aiden-search-item-url { font-size: 11px; color: var(--aiden-muted); margin-top: 2px; }
.aiden-search-empty { padding: 30px 20px; text-align: center; color: var(--aiden-muted); font-size: 13px; }

/* ===== BREAKPOINT ===== */
@media (max-width: 960px) {
	.aiden-pills, .aiden-link, .aiden-search-btn { display: none; }
	.aiden-cta { display: none; }
	.aiden-cta.aiden-cta--show-mobile {
		display: inline-flex;
		padding: 8px 14px;
		font-size: 13px;
		letter-spacing: -0.005em;
	}
	.aiden-burger { display: block; }
	.aiden-mega { display: none; }
	.aiden-nav { padding: 0 22px; gap: 12px; }
	:root { --aiden-nav-h: 56px; }
}
@media (max-width: 380px) {
	.aiden-cta.aiden-cta--show-mobile {
		padding: 7px 10px;
		font-size: 12px;
	}
	.aiden-nav { padding: 0 14px; gap: 8px; }
}
