/* Smartiflix header & footer components. Colors/sizes come from CSS variables set in the Customizer. */

.sfx-header, .sfx-footer { font-family: var(--sfx-font); -webkit-font-smoothing: antialiased; }
.sfx-header *, .sfx-footer * { box-sizing: border-box; }
.sfx-wrap { max-width: var(--sfx-max, 1200px); margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.sfx-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border-radius: 999px; font-weight: 700; font-size: 15px; line-height: 1; text-decoration: none; white-space: nowrap; transition: background-color .2s, color .2s, box-shadow .2s, transform .2s; }
.sfx-btn--primary { background: var(--sfx-accent); color: var(--sfx-accent-text); }
.sfx-btn--primary:hover { color: var(--sfx-accent-text); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 0, 0, .15); filter: brightness(1.05); }
.sfx-btn--ghost { border: 2px solid currentColor; color: var(--sfx-brand); }
.sfx-btn--ghost:hover { background: var(--sfx-brand); border-color: var(--sfx-brand); color: #fff; }
.sfx-btn:focus-visible, .sfx-header a:focus-visible, .sfx-footer a:focus-visible, .sfx-burger:focus-visible { outline: 3px solid var(--sfx-accent); outline-offset: 3px; }

/* ---------- Top bar ---------- */
.sfx-topbar { background: var(--sfx-topbar-bg); color: var(--sfx-topbar-text); font-size: 14px; }
.sfx-topbar .sfx-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 16px; min-height: 40px; padding-top: 6px; padding-bottom: 6px; text-align: center; }
.sfx-topbar a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Header bar ---------- */
.sfx-header { position: relative; z-index: 999; }
.sfx-header.is-sticky { position: sticky; top: 0; }
.admin-bar .sfx-header.is-sticky { top: 32px; }
.sfx-bar { background: var(--sfx-header-bg); color: var(--sfx-header-text); transition: box-shadow .2s; }
.sfx-header.has-shadow .sfx-bar { box-shadow: 0 1px 0 rgba(15, 27, 45, .08); }
.sfx-header.has-shadow.is-scrolled .sfx-bar { box-shadow: 0 8px 28px rgba(15, 27, 45, .12); }
.sfx-header__inner { display: flex; align-items: center; gap: 28px; min-height: var(--sfx-header-h, 76px); }

.sfx-logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; flex-shrink: 0; color: var(--sfx-brand); }
.sfx-logo__img { display: block; height: var(--sfx-logo-h, 40px); width: auto; }
.sfx-logo__text { font-family: var(--sfx-font-logo); font-size: 24px; letter-spacing: .5px; line-height: 1; }
.sfx-logo__badge { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; padding: 4px 8px; border-radius: 6px; background: var(--sfx-brand); color: #fff; line-height: 1; }

.sfx-nav { display: flex; align-items: center; flex: 1; }
.sfx-menu-center .sfx-nav { justify-content: center; }
.sfx-menu-right .sfx-nav { justify-content: flex-end; }
.sfx-menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.sfx-menu li { position: relative; }
.sfx-menu a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--sfx-header-text); font-size: 15px; font-weight: 500; text-decoration: none; transition: background-color .15s, color .15s; }
.sfx-menu a:hover, .sfx-menu .current-menu-item > a, .sfx-menu .current_page_item > a { color: var(--sfx-brand); background: rgba(8, 56, 97, .07); }
.sfx-menu .menu-item-has-children > a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.sfx-menu .sub-menu { list-style: none; margin: 0; padding: 8px; position: absolute; top: 100%; left: 0; min-width: 220px; background: var(--sfx-header-bg); border-radius: 14px; box-shadow: 0 16px 40px rgba(15, 27, 45, .16); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s; }
.sfx-menu li:hover > .sub-menu, .sfx-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.sfx-nav__buttons { display: none; }
.sfx-header__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.sfx-menu-left .sfx-header__actions { margin-left: 0; }
.sfx-menu-left .sfx-nav { flex: 1; }

/* Burger */
.sfx-burger { display: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--sfx-header-text); cursor: pointer; position: relative; }
.sfx-burger span { position: absolute; left: 11px; right: 11px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s, opacity .2s; }
.sfx-burger span:nth-child(1) { top: 15px; }
.sfx-burger span:nth-child(2) { top: 21px; }
.sfx-burger span:nth-child(3) { top: 27px; }
.sfx-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.sfx-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.sfx-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1024px) {
	.sfx-burger { display: inline-block; }
	.sfx-header__actions .sfx-btn { display: none; }
	.sfx-header__inner { gap: 12px; }
	.sfx-nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 12px 24px 24px; background: var(--sfx-header-bg); box-shadow: 0 18px 30px rgba(15, 27, 45, .14); max-height: calc(100vh - var(--sfx-header-h, 76px)); overflow-y: auto; display: none; }
	.sfx-nav.is-open { display: flex; }
	.sfx-menu { flex-direction: column; align-items: stretch; gap: 0; }
	.sfx-menu a { padding: 14px 8px; border-radius: 0; border-bottom: 1px solid rgba(15, 27, 45, .08); }
	.sfx-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding: 0 0 0 16px; min-width: 0; }
	.sfx-menu .menu-item-has-children > a::after { display: none; }
	.sfx-nav__buttons { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
	.sfx-nav__buttons .sfx-btn { width: 100%; }
}
@media (max-width: 782px) { .admin-bar .sfx-header.is-sticky { top: 46px; } }
@media (max-width: 600px) { .admin-bar .sfx-header.is-sticky { top: 0; } }

/* ---------- Footer ---------- */
.sfx-footer { background: var(--sfx-footer-bg); color: var(--sfx-footer-text); font-size: 15px; line-height: 1.7; }
.sfx-footer__grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 40px; padding-top: 72px; padding-bottom: 56px; }
.sfx-footer .sfx-logo { color: var(--sfx-footer-head); margin-bottom: 16px; }
.sfx-footer .sfx-logo__badge { background: var(--sfx-accent); color: var(--sfx-accent-text); }
.sfx-footer__brand p { margin: 0 0 20px; max-width: 360px; }
.sfx-footer__title { margin: 0 0 16px; color: var(--sfx-footer-head); font-family: var(--sfx-font); font-size: 15px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
.sfx-footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sfx-footer a { color: var(--sfx-footer-text); text-decoration: none; transition: color .15s; }
.sfx-footer a:hover { color: var(--sfx-footer-head); text-decoration: underline; text-underline-offset: 3px; }
.sfx-social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sfx-social a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .22); font-size: 13px; font-weight: 600; }
.sfx-social a:hover { background: var(--sfx-accent); border-color: var(--sfx-accent); color: var(--sfx-accent-text); text-decoration: none; }
.sfx-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .12); font-size: 14px; }
.sfx-footer__bottom .sfx-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 20px; padding-bottom: 20px; }
.sfx-footer__bottom p { margin: 0; }
.sfx-footer__legal { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }

@media (max-width: 1024px) { .sfx-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sfx-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 600px) {
	.sfx-wrap { padding: 0 16px; }
	.sfx-footer__grid { grid-template-columns: 1fr; gap: 32px; padding-top: 56px; padding-bottom: 40px; }
	.sfx-footer__bottom .sfx-wrap { flex-direction: column; align-items: flex-start; }
}


@media (prefers-reduced-motion: reduce) { .sfx-header *, .sfx-footer * { transition: none !important; } }
