/* ============================================================
 * AMEFIT VISUAL REFRESH — child theme overlay
 * Wczytywane PO mfn-be-css (BeTheme). Wszystkie reguły ograniczamy
 * do `.amefit-modernized` (klasa body dodana w functions.php),
 * żeby uniknąć !important i podbić specyficzność tam, gdzie BeTheme
 * używa generowanych selektorów typu #menu>ul>li>a.
 *
 * Kolejność sekcji odzwierciedla fazy implementacji:
 *   1. Design tokens (zmienne)
 *   2. Typografia bazowa
 *   3. Header / menu / mobile menu
 *   4. Subheader (pasek z tytułem podstrony)
 *   5. Przyciski (system primary/secondary/ghost) + a11y focus
 *   6. Nagłówki sekcji + eyebrow + ornament pod H2
 *   7. Karty / boxy / logotypy / sylwetki trenerów
 *   8. Tabele (cennik, godziny otwarcia)
 *   9. Footer
 *  10. Mikroanimacje (reveal, image hover) + reduced-motion
 *  11. Polish — drobne korekty domknięte
 * ============================================================ */

/* === 1. DESIGN TOKENS ====================================== */
:root {
	--af-color-bg: #ffffff;
	--af-color-text: #161922;
	--af-color-text-muted: #5f6470;
	--af-color-text-soft: #8a8f99;
	--af-color-accent: #cf0261;
	--af-color-accent-hover: #b00254;
	--af-color-accent-soft: rgba(207, 2, 97, 0.08);
	--af-color-border: rgba(22, 25, 34, 0.08);
	--af-color-border-strong: rgba(22, 25, 34, 0.16);
	--af-color-surface: #fafafa;
	--af-color-surface-2: #f3f4f6;
	--af-color-dark: #0e1018;
	--af-color-dark-2: #1a1d27;

	--af-shadow-sm: 0 1px 2px rgba(22, 25, 34, 0.04);
	--af-shadow-md:
		0 1px 2px rgba(22, 25, 34, 0.04),
		0 8px 24px -8px rgba(22, 25, 34, 0.08);
	--af-shadow-lg:
		0 4px 8px -4px rgba(22, 25, 34, 0.06),
		0 24px 48px -16px rgba(22, 25, 34, 0.16);
	--af-shadow-header: 0 4px 24px -12px rgba(22, 25, 34, 0.18);

	--af-radius-sm: 8px;
	--af-radius-md: 12px;
	--af-radius-lg: 16px;
	--af-radius-pill: 999px;

	--af-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
	--af-duration-fast: 180ms;
	--af-duration-base: 240ms;
	--af-duration-slow: 400ms;

	--af-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		"Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* === 2. TYPOGRAFIA BAZOWA ================================== */
.amefit-modernized,
.amefit-modernized body {
	font-family: var(--af-font-sans);
	color: var(--af-color-text);
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	font-feature-settings: "ss01", "cv02", "cv11";
}

.amefit-modernized p {
	line-height: 1.7;
	color: var(--af-color-text);
}

.amefit-modernized h1,
.amefit-modernized h2,
.amefit-modernized h3,
.amefit-modernized h4,
.amefit-modernized h5,
.amefit-modernized h6 {
	font-family: var(--af-font-sans);
	color: var(--af-color-text);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.015em;
}

.amefit-modernized h1 {
	font-size: clamp(2.25rem, 1.6rem + 2.5vw, 4rem);
	font-weight: 800;
	letter-spacing: -0.025em;
}

.amefit-modernized h2 {
	font-size: clamp(1.75rem, 1.3rem + 1.7vw, 2.75rem);
	font-weight: 800;
	letter-spacing: -0.02em;
}

.amefit-modernized h3 {
	font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
	font-weight: 700;
}

.amefit-modernized h4 {
	font-size: 1.125rem;
	font-weight: 700;
}

.amefit-modernized h5,
.amefit-modernized h6 {
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.amefit-modernized .lead,
.amefit-modernized .big {
	font-size: 1.125rem;
	line-height: 1.65;
	color: var(--af-color-text-muted);
}

.amefit-modernized a {
	color: var(--af-color-accent);
	text-decoration: none;
	transition: color var(--af-duration-fast) var(--af-ease-out);
}

.amefit-modernized a:hover,
.amefit-modernized a:focus {
	color: var(--af-color-accent-hover);
}

.amefit-modernized ::selection {
	background: var(--af-color-accent);
	color: #fff;
}

/* === 3. HEADER / MENU / MOBILE MENU ======================== */

/* Sticky header z subtelnym tłem; pełny cień dopiero po scroll
   (klasa `.is-scrolled` dokleja JS). */
.amefit-modernized #Top_bar {
	transition: background-color var(--af-duration-base) var(--af-ease-out),
		box-shadow var(--af-duration-base) var(--af-ease-out),
		backdrop-filter var(--af-duration-base) var(--af-ease-out);
}

.amefit-modernized.is-scrolled #Top_bar,
.amefit-modernized #Top_bar.is-sticky {
	background-color: rgba(255, 255, 255, 0.92);
	backdrop-filter: saturate(180%) blur(14px);
	-webkit-backdrop-filter: saturate(180%) blur(14px);
	box-shadow: var(--af-shadow-header);
}

/* Pozycje menu — uppercase, letter-spacing, hover linia od dołu */
.amefit-modernized #Top_bar #menu > ul > li > a,
.amefit-modernized #Top_bar #menu ul.menu > li > a {
	position: relative;
	font-family: var(--af-font-sans);
	font-weight: 600;
	font-size: 0.85rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--af-color-text);
	transition: color var(--af-duration-fast) var(--af-ease-out);
}

.amefit-modernized #Top_bar #menu > ul > li > a > span:first-child::after,
.amefit-modernized #Top_bar #menu ul.menu > li > a > span:first-child::after {
	content: "";
	position: absolute;
	left: 20px;
	right: 20px;
	bottom: 12px;
	height: 2px;
	background: var(--af-color-accent);
	border-radius: 2px;
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform var(--af-duration-base) var(--af-ease-out);
}

.amefit-modernized #Top_bar #menu > ul > li:hover > a > span:first-child::after,
.amefit-modernized #Top_bar #menu > ul > li.current-menu-item > a > span:first-child::after,
.amefit-modernized #Top_bar #menu > ul > li.current_page_item > a > span:first-child::after,
.amefit-modernized #Top_bar #menu > ul > li.current-menu-ancestor > a > span:first-child::after {
	transform: scaleX(1);
}

.amefit-modernized #Top_bar #menu > ul > li:hover > a,
.amefit-modernized #Top_bar #menu > ul > li.current-menu-item > a,
.amefit-modernized #Top_bar #menu > ul > li.current_page_item > a,
.amefit-modernized #Top_bar #menu > ul > li.current-menu-ancestor > a {
	color: var(--af-color-accent);
}

/* Submenu — czysty white surface z miękkim cieniem zamiast ostrego boxa */
.amefit-modernized #Top_bar #menu ul.menu ul.sub-menu,
.amefit-modernized #Top_bar #menu ul li ul {
	border-radius: var(--af-radius-md);
	box-shadow: var(--af-shadow-lg);
	border: 1px solid var(--af-color-border);
	background: #fff;
	padding: 6px 0;
	overflow: hidden;
}

.amefit-modernized #Top_bar #menu ul.menu ul.sub-menu li a,
.amefit-modernized #Top_bar #menu ul li ul li a {
	padding: 10px 18px;
	font-weight: 500;
	font-size: 0.875rem;
	letter-spacing: 0.01em;
	text-transform: none;
	transition: background-color var(--af-duration-fast) var(--af-ease-out),
		color var(--af-duration-fast) var(--af-ease-out);
	border-radius: var(--af-radius-sm);
	margin: 2px 6px;
}

.amefit-modernized #Top_bar #menu ul.menu ul.sub-menu li:hover > a {
	background-color: var(--af-color-accent-soft);
	color: var(--af-color-accent);
}

/* Mobile menu — drawer z prawej, animowany hamburger BeTheme dostaje
   subtelne polerowanie kolorów akcentu */
.amefit-modernized #Top_bar a.responsive-menu-toggle {
	color: var(--af-color-text);
	border: 1px solid var(--af-color-border);
	border-radius: var(--af-radius-sm);
	transition: background-color var(--af-duration-fast) var(--af-ease-out),
		color var(--af-duration-fast) var(--af-ease-out),
		border-color var(--af-duration-fast) var(--af-ease-out);
}

.amefit-modernized #Top_bar a.responsive-menu-toggle:hover {
	background-color: var(--af-color-accent);
	color: #fff;
	border-color: var(--af-color-accent);
}

.amefit-modernized.menu-mobile #Top_bar #menu {
	box-shadow: var(--af-shadow-lg);
}

.amefit-modernized #Top_bar #menu ul.menu li {
	border-bottom-color: var(--af-color-border) !important;
}

/* Logo — bez zmian; tylko zapewnij że nie zrobi się rozjazdu z headerem */
.amefit-modernized #Top_bar .logo {
	margin: 0;
}

/* === 4. SUBHEADER (pasek tytułu podstrony) ================= */
.amefit-modernized #Subheader {
	background-color: var(--af-color-surface);
	border-bottom: 1px solid var(--af-color-border);
	padding: 64px 0 56px;
}

.amefit-modernized #Subheader .title {
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--af-color-text);
}

.amefit-modernized #Subheader .breadcrumbs {
	font-size: 0.85rem;
	color: var(--af-color-text-soft);
	letter-spacing: 0.02em;
}

.amefit-modernized #Subheader .breadcrumbs a {
	color: var(--af-color-text-muted);
}

.amefit-modernized #Subheader .breadcrumbs a:hover {
	color: var(--af-color-accent);
}

/* === 5. PRZYCISKI ========================================== */

/* BeTheme generuje przyciski z klas .button, .button-stroke, button-flat itd.
   oraz ze styli woocommerce / contact-form-7. Resetujemy spójnym systemem. */
.amefit-modernized .button,
.amefit-modernized a.button,
.amefit-modernized button,
.amefit-modernized input[type="button"],
.amefit-modernized input[type="submit"],
.amefit-modernized .wpcf7-submit,
.amefit-modernized .woocommerce a.button,
.amefit-modernized .woocommerce button.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.95rem 1.75rem;
	border-radius: var(--af-radius-sm);
	border: 2px solid transparent;
	background: var(--af-color-accent);
	color: #fff;
	font-family: var(--af-font-sans);
	font-weight: 700;
	font-size: 0.9rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	line-height: 1.2;
	cursor: pointer;
	transition: transform var(--af-duration-base) var(--af-ease-out),
		box-shadow var(--af-duration-base) var(--af-ease-out),
		background-color var(--af-duration-fast) var(--af-ease-out),
		color var(--af-duration-fast) var(--af-ease-out),
		border-color var(--af-duration-fast) var(--af-ease-out);
	box-shadow: var(--af-shadow-sm);
	-webkit-appearance: none;
	appearance: none;
}

.amefit-modernized .button > span,
.amefit-modernized a.button > span {
	color: inherit;
	background: transparent;
	padding: 0;
	border-radius: 0;
}

.amefit-modernized .button:hover,
.amefit-modernized a.button:hover,
.amefit-modernized button:hover,
.amefit-modernized input[type="submit"]:hover,
.amefit-modernized .wpcf7-submit:hover,
.amefit-modernized .woocommerce a.button:hover,
.amefit-modernized .woocommerce button.button:hover {
	background: var(--af-color-accent-hover);
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 12px 24px -8px rgba(207, 2, 97, 0.35);
}

.amefit-modernized .button:focus-visible,
.amefit-modernized a.button:focus-visible,
.amefit-modernized button:focus-visible,
.amefit-modernized input[type="submit"]:focus-visible,
.amefit-modernized .wpcf7-submit:focus-visible {
	outline: 2px solid var(--af-color-accent);
	outline-offset: 3px;
}

.amefit-modernized .button:active,
.amefit-modernized a.button:active {
	transform: translateY(0);
	box-shadow: var(--af-shadow-sm);
}

.amefit-modernized .button:disabled,
.amefit-modernized button:disabled,
.amefit-modernized input[type="submit"]:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

/* Wariant outline (stroke) */
.amefit-modernized .button.button-stroke,
.amefit-modernized a.button.button-stroke {
	background: transparent;
	color: var(--af-color-text);
	border: 2px solid var(--af-color-text);
	box-shadow: none;
}

.amefit-modernized .button.button-stroke:hover,
.amefit-modernized a.button.button-stroke:hover {
	background: var(--af-color-text);
	color: #fff;
	border-color: var(--af-color-text);
}

/* Wariant ghost / link-button (BeTheme często używa .button-flat
   dla CTA bez bordera) */
.amefit-modernized .button.button-flat:not(.button-stroke),
.amefit-modernized a.button.button-flat:not(.button-stroke) {
	background: var(--af-color-accent);
	color: #fff;
}

/* CF7 i WooCommerce inputy też dostają nowoczesny look */
.amefit-modernized .wpcf7 input[type="text"],
.amefit-modernized .wpcf7 input[type="email"],
.amefit-modernized .wpcf7 input[type="tel"],
.amefit-modernized .wpcf7 input[type="url"],
.amefit-modernized .wpcf7 textarea,
.amefit-modernized .wpcf7 select,
.amefit-modernized input[type="text"],
.amefit-modernized input[type="email"],
.amefit-modernized input[type="tel"],
.amefit-modernized input[type="search"],
.amefit-modernized input[type="password"],
.amefit-modernized textarea,
.amefit-modernized select {
	width: 100%;
	padding: 0.85rem 1rem;
	border: 1px solid var(--af-color-border-strong);
	border-radius: var(--af-radius-sm);
	background: #fff;
	color: var(--af-color-text);
	font-family: var(--af-font-sans);
	font-size: 1rem;
	line-height: 1.4;
	transition: border-color var(--af-duration-fast) var(--af-ease-out),
		box-shadow var(--af-duration-fast) var(--af-ease-out);
	box-shadow: none;
}

.amefit-modernized .wpcf7 input:focus,
.amefit-modernized .wpcf7 textarea:focus,
.amefit-modernized .wpcf7 select:focus,
.amefit-modernized input:focus,
.amefit-modernized textarea:focus,
.amefit-modernized select:focus {
	border-color: var(--af-color-accent);
	box-shadow: 0 0 0 4px var(--af-color-accent-soft);
	outline: none;
}

/* === 6. NAGŁÓWKI SEKCJI ==================================== */

/* Section header w BeTheme: .section_header / .title_block .title /
   columny z H2. Dodajemy spójny ornament i eyebrow. */
.amefit-modernized .section_wrapper .title_wrapper .title,
.amefit-modernized .section_wrapper h2,
.amefit-modernized .section .title_block .title {
	position: relative;
	margin-bottom: 0.6em;
}

.amefit-modernized .section .title_block,
.amefit-modernized .section_wrapper .title_wrapper {
	position: relative;
	padding-bottom: 0.5rem;
}

/* Ornament — cienka kreska 60×3 px w kolorze akcentu pod H2 sekcji */
.amefit-modernized .section .title_block::after,
.amefit-modernized .section_wrapper .title_wrapper::after {
	content: "";
	display: block;
	width: 60px;
	height: 3px;
	background: var(--af-color-accent);
	border-radius: 3px;
	margin-top: 1rem;
}

/* Eyebrow — BeTheme generuje subtitle jako .section-subtitle. Ujednolicamy. */
.amefit-modernized .section .title_block .subtitle,
.amefit-modernized .section_wrapper .title_wrapper .subtitle,
.amefit-modernized .section-subtitle {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--af-color-accent);
	margin-bottom: 0.75rem;
}

/* Kiedy section ma center alignment, ornament też centrujemy */
.amefit-modernized .section.title-center .title_block::after,
.amefit-modernized .section_wrapper .title_wrapper.align_center::after {
	margin-left: auto;
	margin-right: auto;
}

/* === 7. KARTY / BOXY / LOGOTYPY / TRENERZY ================= */

/* BeTheme renderuje klocki contentu w wielu wariantach. Najczęściej:
   - .feature_box (ikonka + tytuł + opis)
   - .icon_box
   - .pricing-box
   - .team z .team-image / .team-info (sylwetki trenerów)
   - .image_frame (zdjęcia w gallerii / opisach zajęć)
   - .promo_box, .opening-hours
   Ujednolicamy do jednego layered-shadow + border-radius. */

.amefit-modernized .feature_box,
.amefit-modernized .icon_box,
.amefit-modernized .promo_box,
.amefit-modernized .opening-hours,
.amefit-modernized .pricing-box,
.amefit-modernized .pricing-box-table,
.amefit-modernized .team,
.amefit-modernized .testimonial-item,
.amefit-modernized .blog_wrapper article,
.amefit-modernized .post-item {
	background: #fff;
	border: 1px solid var(--af-color-border);
	border-radius: var(--af-radius-lg);
	box-shadow: var(--af-shadow-md);
	overflow: hidden;
	transition: transform var(--af-duration-base) var(--af-ease-out),
		box-shadow var(--af-duration-base) var(--af-ease-out);
}

.amefit-modernized .feature_box:hover,
.amefit-modernized .icon_box:hover,
.amefit-modernized .promo_box:hover,
.amefit-modernized .pricing-box:hover,
.amefit-modernized .team:hover,
.amefit-modernized .testimonial-item:hover {
	transform: translateY(-4px);
	box-shadow: var(--af-shadow-lg);
}

/* feature_box / icon_box — wewnętrzny padding spójny */
.amefit-modernized .feature_box .desc_wrapper,
.amefit-modernized .icon_box .desc_wrapper,
.amefit-modernized .promo_box .desc_wrapper {
	padding: 1.5rem;
}

.amefit-modernized .feature_box .desc_wrapper h2,
.amefit-modernized .feature_box .desc_wrapper h3,
.amefit-modernized .feature_box .desc_wrapper h4,
.amefit-modernized .icon_box .desc_wrapper h2,
.amefit-modernized .icon_box .desc_wrapper h3,
.amefit-modernized .icon_box .desc_wrapper h4 {
	margin-bottom: 0.4em;
	letter-spacing: -0.015em;
}

.amefit-modernized .feature_box .desc_wrapper p,
.amefit-modernized .icon_box .desc_wrapper p {
	color: var(--af-color-text-muted);
	font-size: 0.95rem;
	line-height: 1.6;
}

.amefit-modernized .feature_box .icon_wrapper,
.amefit-modernized .icon_box .icon_wrapper {
	color: var(--af-color-accent);
}

/* Sylwetki trenerów (.team) */
.amefit-modernized .team .team-image,
.amefit-modernized .team .image_frame {
	border-radius: 0;
	overflow: hidden;
	background: var(--af-color-surface-2);
}

.amefit-modernized .team .team-image img,
.amefit-modernized .team .image_frame img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--af-duration-slow) var(--af-ease-out);
}

.amefit-modernized .team:hover .team-image img,
.amefit-modernized .team:hover .image_frame img {
	transform: scale(1.04);
}

.amefit-modernized .team .team-desc,
.amefit-modernized .team .desc_wrapper,
.amefit-modernized .team-info {
	padding: 1.5rem 1.5rem 1.75rem;
}

.amefit-modernized .team .team-desc h3,
.amefit-modernized .team .team-desc h4,
.amefit-modernized .team-info h3,
.amefit-modernized .team-info h4 {
	margin-bottom: 0.25em;
	letter-spacing: -0.015em;
}

.amefit-modernized .team .team-desc p,
.amefit-modernized .team-info p {
	color: var(--af-color-text-muted);
	font-size: 0.95rem;
	line-height: 1.6;
}

/* Logotypy partnerskich kart sportowych — często w .clients lub
   w .image_frame w gridzie. Klasa kontenerowa BeTheme: .image_frame
   z modyfikatorem .no_border. Ujednolicamy do siatki z gracefulnym
   szarym → kolor w hover. */
.amefit-modernized .clients .image_frame,
.amefit-modernized .clients-list .image_frame,
.amefit-modernized .clients .one_third .image_frame {
	border: 1px solid var(--af-color-border);
	border-radius: var(--af-radius-md);
	background: #fff;
	box-shadow: var(--af-shadow-sm);
	padding: 1.25rem;
	transition: transform var(--af-duration-base) var(--af-ease-out),
		box-shadow var(--af-duration-base) var(--af-ease-out),
		filter var(--af-duration-base) var(--af-ease-out);
	filter: grayscale(60%);
	opacity: 0.85;
}

.amefit-modernized .clients .image_frame:hover,
.amefit-modernized .clients-list .image_frame:hover,
.amefit-modernized .clients .one_third .image_frame:hover {
	transform: translateY(-2px) scale(1.02);
	box-shadow: var(--af-shadow-md);
	filter: grayscale(0%);
	opacity: 1;
}

/* Image frames w treści (zdjęcia z opisem zajęć) — łagodniejsze rogi */
.amefit-modernized .image_frame {
	border-radius: var(--af-radius-md);
	overflow: hidden;
}

.amefit-modernized .image_frame .image_wrapper {
	border-radius: var(--af-radius-md);
	overflow: hidden;
}

.amefit-modernized .image_frame img {
	transition: transform var(--af-duration-slow) var(--af-ease-out);
}

.amefit-modernized .image_frame:hover img {
	transform: scale(1.04);
}

/* Listy z ikonkami (.list_item, .iconlist) — czytelniejsze */
.amefit-modernized .list_item .icon,
.amefit-modernized .iconlist li::before {
	color: var(--af-color-accent);
}

/* === 8. TABELE (CENNIK / GODZINY OTWARCIA) ================= */

.amefit-modernized table,
.amefit-modernized .pricing-table,
.amefit-modernized .opening_hours table,
.amefit-modernized .opening-hours table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border: 1px solid var(--af-color-border);
	border-radius: var(--af-radius-md);
	overflow: hidden;
}

.amefit-modernized table th,
.amefit-modernized .pricing-table th {
	background: var(--af-color-surface);
	font-weight: 700;
	font-size: 0.85rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 1rem 1.25rem;
	text-align: left;
	color: var(--af-color-text);
	border-bottom: 1px solid var(--af-color-border);
}

.amefit-modernized table td,
.amefit-modernized .pricing-table td,
.amefit-modernized .opening_hours table td {
	padding: 0.95rem 1.25rem;
	border-bottom: 1px solid var(--af-color-border);
	color: var(--af-color-text);
	background: #fff;
	transition: background-color var(--af-duration-fast) var(--af-ease-out);
}

.amefit-modernized table tr:last-child td,
.amefit-modernized .pricing-table tr:last-child td {
	border-bottom: none;
}

.amefit-modernized table tbody tr:hover td {
	background: rgba(22, 25, 34, 0.02);
}

/* Pricing-box (BeTheme custom) */
.amefit-modernized .pricing-box .plan-header {
	background: var(--af-color-surface);
	padding: 1.5rem;
}

.amefit-modernized .pricing-box .plan-header h2,
.amefit-modernized .pricing-box .plan-header h3 {
	margin-bottom: 0.25em;
}

.amefit-modernized .pricing-box .plan-header .price {
	color: var(--af-color-accent);
	font-weight: 800;
	letter-spacing: -0.02em;
}

.amefit-modernized .pricing-box.featured,
.amefit-modernized .pricing-box.plan-recommended {
	border-color: var(--af-color-accent);
	box-shadow: 0 0 0 1px var(--af-color-accent), var(--af-shadow-lg);
	transform: translateY(-4px);
}

/* Tabela na mobile — scrolluje się horyzontalnie zamiast łamać layout */
@media (max-width: 767px) {
	.amefit-modernized table:not(.no-mobile-scroll) {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		white-space: nowrap;
	}
}

/* === 9. FOOTER ============================================= */

.amefit-modernized #Footer {
	background-color: var(--af-color-dark);
	color: rgba(255, 255, 255, 0.72);
}

.amefit-modernized #Footer .widgets_wrapper {
	padding: 64px 0 40px;
}

.amefit-modernized #Footer .widget {
	margin-bottom: 1.5rem;
}

.amefit-modernized #Footer h1,
.amefit-modernized #Footer h2,
.amefit-modernized #Footer h3,
.amefit-modernized #Footer h4,
.amefit-modernized #Footer h5,
.amefit-modernized #Footer h6,
.amefit-modernized #Footer .widget-title,
.amefit-modernized #Footer .widget_title {
	color: #ffffff;
	font-weight: 800;
	letter-spacing: -0.01em;
	margin-bottom: 1rem;
}

.amefit-modernized #Footer p,
.amefit-modernized #Footer li,
.amefit-modernized #Footer .widget {
	color: rgba(255, 255, 255, 0.72);
}

.amefit-modernized #Footer a {
	color: rgba(255, 255, 255, 0.78);
	transition: color var(--af-duration-fast) var(--af-ease-out);
}

.amefit-modernized #Footer a:hover,
.amefit-modernized #Footer a:focus {
	color: var(--af-color-accent);
}

.amefit-modernized #Footer ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.amefit-modernized #Footer ul li {
	padding: 0.35rem 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.amefit-modernized #Footer ul li:last-child {
	border-bottom: none;
}

/* Bottom bar (copyright) */
.amefit-modernized #Footer .footer_copy,
.amefit-modernized #Footer #bottom {
	background-color: rgba(0, 0, 0, 0.3);
	color: rgba(255, 255, 255, 0.5);
	font-size: 0.85rem;
	padding: 1.25rem 0;
	border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.amefit-modernized #Footer .footer_copy a,
.amefit-modernized #Footer #bottom a {
	color: rgba(255, 255, 255, 0.7);
}

.amefit-modernized #Footer .footer_copy .social,
.amefit-modernized #Footer #bottom .social {
	display: inline-flex;
	gap: 0.75rem;
	align-items: center;
}

.amefit-modernized #Footer .social a,
.amefit-modernized #Footer #bottom .social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: var(--af-radius-pill);
	background: rgba(255, 255, 255, 0.06);
	color: rgba(255, 255, 255, 0.85);
	transition: background-color var(--af-duration-fast) var(--af-ease-out),
		color var(--af-duration-fast) var(--af-ease-out),
		transform var(--af-duration-fast) var(--af-ease-out);
}

.amefit-modernized #Footer .social a:hover,
.amefit-modernized #Footer #bottom .social a:hover {
	background: var(--af-color-accent);
	color: #ffffff;
	transform: translateY(-2px);
}

/* === 10. MIKROANIMACJE ===================================== */

html {
	scroll-behavior: smooth;
}

/* Reveal — JS dodaje klasę .af-reveal do elementów oznaczonych
   data-reveal="1". Stan wyjściowy = ukryty, stan końcowy = widoczny. */
.amefit-modernized .af-reveal {
	opacity: 0;
	transform: translateY(20px);
	transition: opacity var(--af-duration-slow) var(--af-ease-out),
		transform var(--af-duration-slow) var(--af-ease-out);
	will-change: opacity, transform;
}

.amefit-modernized .af-reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* Reduced motion — wyłącz wszystkie animacje warstwy wizualnej */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.amefit-modernized *,
	.amefit-modernized *::before,
	.amefit-modernized *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}

	.amefit-modernized .af-reveal {
		opacity: 1;
		transform: none;
	}
}

/* === 11. POLISH ============================================ */

/* Spójny radius na wszystkich subskrybowanych miejscach z generowanymi
   przez BeTheme borderami */
.amefit-modernized .quick_fact,
.amefit-modernized .counter,
.amefit-modernized .chart_box {
	border-radius: var(--af-radius-md);
}

/* Dyskretniejsze cienie na hover dla generycznych BeTheme contentów */
.amefit-modernized .one_third .image_frame,
.amefit-modernized .one_fourth .image_frame,
.amefit-modernized .one_half .image_frame {
	box-shadow: var(--af-shadow-sm);
}

/* Cookie banner — żeby nie zderzał się z paletą strony */
.amefit-modernized #cookie-law-info-bar,
.amefit-modernized .cli-modal-content {
	border-radius: var(--af-radius-md);
}

/* Lekka korekta WP-Popups — jeśli jest aktywny popup, niech ma nasze radiusy */
.amefit-modernized .wppopups-modal-container,
.amefit-modernized .wppopups-modal-inner {
	border-radius: var(--af-radius-lg);
}

/* CF7 — komunikat błędu / sukcesu */
.amefit-modernized .wpcf7 form .wpcf7-response-output {
	border-radius: var(--af-radius-sm);
	padding: 0.75rem 1rem;
}

.amefit-modernized .wpcf7 form.invalid .wpcf7-response-output,
.amefit-modernized .wpcf7 form.unaccepted .wpcf7-response-output {
	border-color: var(--af-color-accent);
	color: var(--af-color-accent);
}

.amefit-modernized .wpcf7 form.sent .wpcf7-response-output {
	border-color: #1f9d55;
	color: #1f9d55;
}

/* Numbers / liczby (Quick fact, counters) — kolor akcentu, mocniejsza waga */
.amefit-modernized .quick_fact .number-wrapper,
.amefit-modernized .counter .number-wrapper {
	color: var(--af-color-accent);
	font-weight: 800;
	font-feature-settings: "tnum";
}

/* === 12. RESPONSYWNE KOREKTY =============================== */

@media only screen and (max-width: 767px) {
	.amefit-modernized #Subheader {
		padding: 40px 0 32px;
	}

	.amefit-modernized .feature_box .desc_wrapper,
	.amefit-modernized .icon_box .desc_wrapper,
	.amefit-modernized .team .team-desc,
	.amefit-modernized .team-info {
		padding: 1.25rem;
	}

	.amefit-modernized #Footer .widgets_wrapper {
		padding: 48px 0 32px;
	}
}

@media only screen and (min-width: 1240px) {
	.amefit-modernized #Subheader {
		padding: 80px 0 64px;
	}
}
