/*
 * Onetone Child – CASD Zvolen: mobil a tablet
 * Súbor sa načítava s media="(max-width: 991px)", takže na PC neplatí.
 * Pre istotu sú pravidlá navyše zabalené do rovnakej podmienky.
 */
@media (max-width: 991px) {

body.casd-m {
	--c-ink: #12201A;
	--c-muted: #55606E;
	--c-bg: #F4F6F8;
	--c-surface: #FFFFFF;
	--c-line: #E3E8EE;
	--c-primary: #1E4634;
	--c-primary-dark: #15332A;
	--c-primary-soft: #E6EFE9;
	--c-gold-soft: #FFF4DE;
	--c-gold-ink: #8A5A00;
	--c-dark: #14271F;
	--c-dark-2: #213A2F;
	--c-dark-line: #2A4538;
	--c-on-dark-muted: #CFE0D5;
	--c-live: #C5221F;
	--c-live-dot: #D93025;
	--c-live-soft: #FDECEA;
	--head-h: 60px;
	--nav-h: 68px;
	--safe-b: env(safe-area-inset-bottom, 0px);
	--radius: 16px;
	--f-body: Inter, -apple-system, "Segoe UI", Roboto, sans-serif;
	--f-head: Manrope, Inter, -apple-system, "Segoe UI", sans-serif;

	font-family: var(--f-body);
	color: var(--c-ink);
	background: var(--c-bg);
	padding-top: var(--head-h);
	-webkit-text-size-adjust: 100%;
	-webkit-tap-highlight-color: rgba(30, 70, 52, 0.12);
}
body.casd-m.casd-has-nav { padding-bottom: calc(var(--nav-h) + var(--safe-b)); }
body.casd-m.admin-bar .casd-mhead { top: 46px; }
body.casd-m.casd-lock { overflow: hidden; }

/* Pomôcka pre čítačky obrazovky */
body.casd-m .casd-sr {
	position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- Pôvodné prvky Onetone, ktoré na mobile nahrádzame --- */
body.casd-m .header-wrap,
body.casd-m .top-wrap > img,
body.casd-m .slider-wrap,
body.casd-m #back-to-top,
body.casd-m .back-to-top,
body.casd-m .mbYTP_wrapper,
body.casd-m #video-controls { display: none !important; }

/* =========================================================
 * Hlavička
 * ========================================================= */
body.casd-m .casd-mhead {
	position: fixed; z-index: 1000; top: 0; left: 0; right: 0;
	height: var(--head-h);
	display: flex; align-items: center; gap: 8px;
	padding: 0 12px 0 14px;
	background: rgba(255, 255, 255, 0.96);
	-webkit-backdrop-filter: saturate(1.4) blur(10px);
	backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid var(--c-line);
	transition: box-shadow .2s ease;
}
body.casd-m.casd-scrolled .casd-mhead { box-shadow: 0 4px 16px rgba(18, 32, 26, 0.08); }

body.casd-m .casd-brand {
	display: flex; align-items: center; gap: 10px; min-width: 0;
	margin-right: auto; text-decoration: none; color: var(--c-ink);
}
body.casd-m .casd-brand__logo { width: 40px; height: 40px; object-fit: contain; flex: none; }
body.casd-m .casd-brand__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
body.casd-m .casd-brand__title {
	font-family: var(--f-head); font-weight: 800; font-size: 16px;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
body.casd-m .casd-brand__tag {
	font-size: 12px; color: var(--c-muted);
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

body.casd-m .casd-menubtn,
body.casd-m .casd-closebtn {
	flex: none; width: 44px; height: 44px; padding: 0;
	display: inline-flex; align-items: center; justify-content: center;
	border: 0; border-radius: 12px; cursor: pointer;
	background: var(--c-bg); color: var(--c-ink);
}
body.casd-m .casd-closebtn { background: var(--c-dark-2); color: #FFFFFF; }
body.casd-m .casd-menubtn:focus-visible,
body.casd-m .casd-closebtn:focus-visible,
body.casd-m .casd-mhead a:focus-visible,
body.casd-m .casd-drawer a:focus-visible,
body.casd-m .casd-bottomnav a:focus-visible,
body.casd-m .casd-btn:focus-visible { outline: 3px solid #E8A317; outline-offset: 2px; }

body.casd-m .casd-livepill {
	flex: none; height: 32px; padding: 0 12px;
	display: inline-flex; align-items: center; gap: 6px;
	border-radius: 999px; background: var(--c-live-soft); color: var(--c-live);
	font-size: 12px; font-weight: 600; text-decoration: none;
}
body.casd-m .casd-livepill[hidden] { display: none; }
body.casd-m .casd-dot {
	width: 8px; height: 8px; border-radius: 50%; background: var(--c-live-dot);
	animation: casd-pulse 1.6s ease-in-out infinite;
}
@keyframes casd-pulse { 50% { opacity: .35; } }

body.casd-m .casd-tabnav { display: none; }

/* =========================================================
 * Menu na celú obrazovku
 * ========================================================= */
body.casd-m .casd-drawer {
	position: fixed; z-index: 1100; inset: 0;
	display: flex; flex-direction: column;
	background: var(--c-dark); color: #FFFFFF;
	overflow-y: auto; -webkit-overflow-scrolling: touch;
	padding-bottom: calc(24px + var(--safe-b));
	opacity: 0; visibility: hidden; transform: translateY(-8px);
	transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
}
body.casd-m .casd-drawer[hidden] { display: flex; } /* skryté cez visibility kvôli animácii */
body.casd-m .casd-drawer.is-open {
	opacity: 1; visibility: visible; transform: none;
	transition: opacity .2s ease, transform .2s ease;
}
body.casd-m .casd-drawer__head {
	flex: none; height: var(--head-h);
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	padding: 0 12px 0 14px; border-bottom: 1px solid var(--c-dark-line);
}
body.casd-m .casd-brand--light { color: #FFFFFF; }
body.casd-m .casd-brand--light .casd-brand__tag { color: var(--c-on-dark-muted); }
body.casd-m .casd-brand__badge {
	width: 40px; height: 40px; flex: none; border-radius: 50%; background: #FFFFFF;
	display: flex; align-items: center; justify-content: center;
}
body.casd-m .casd-brand__badge img { width: 30px; height: 30px; object-fit: contain; }

body.casd-m .casd-drawer__nav { padding: 8px 16px 0; }
body.casd-m .casd-drawer__list { list-style: none; margin: 0; padding: 0; }
body.casd-m .casd-drawer__list li { margin: 0; padding: 0; border-bottom: 1px solid var(--c-dark-line); }
body.casd-m .casd-drawer__list a {
	min-height: 58px; display: flex; align-items: center; gap: 12px;
	color: #FFFFFF; text-decoration: none;
	font-family: var(--f-head); font-weight: 700; font-size: 20px; line-height: 1.25;
	padding: 8px 0;
}
body.casd-m .casd-drawer__list a::after {
	content: ""; flex: none; margin-left: auto; width: 9px; height: 9px;
	border-right: 2px solid #A9C9B5; border-top: 2px solid #A9C9B5; transform: rotate(45deg);
}
body.casd-m .casd-drawer__list a:active { color: var(--c-on-dark-muted); }
body.casd-m .casd-drawer__list .sub-menu { list-style: none; margin: 0 0 8px; padding: 0 0 0 14px; }
body.casd-m .casd-drawer__list .sub-menu li { border: 0; }
body.casd-m .casd-drawer__list .sub-menu a { min-height: 44px; font-size: 16px; font-weight: 600; color: var(--c-on-dark-muted); }
body.casd-m .casd-drawer__list .sub-menu a::after { display: none; }

body.casd-m .casd-drawer__social { padding: 24px 16px 0; display: flex; flex-direction: column; gap: 10px; }
body.casd-m .casd-drawer__social[hidden] { display: none; }
body.casd-m .casd-drawer__label {
	font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--c-on-dark-muted);
}
body.casd-m .casd-social { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
body.casd-m .casd-social a {
	height: 44px; border-radius: 999px; background: var(--c-dark-2); color: #FFFFFF;
	display: flex; align-items: center; justify-content: center;
	font-size: 13px; font-weight: 500; text-decoration: none;
}

/* =========================================================
 * Úvodná fotka
 * ========================================================= */
body.casd-m .casd-hero {
	display: block; position: relative; overflow: hidden;
	margin: 12px 16px 0; border-radius: 20px; background: var(--c-dark);
	aspect-ratio: 358 / 500; max-height: calc(100svh - var(--head-h) - var(--nav-h) - 40px);
	min-height: 360px;
}
body.casd-m .casd-hero picture,
body.casd-m .casd-hero img {
	display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0;
}
body.casd-m .casd-hero__actions {
	position: absolute; left: 12px; right: 12px; bottom: 12px;
	display: flex; gap: 10px;
}
body.casd-m .casd-btn {
	flex: 1; min-height: 48px; padding: 0 10px; box-sizing: border-box;
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	border-radius: 12px; font-family: var(--f-body); font-weight: 600; font-size: 15px;
	text-decoration: none; text-align: center; white-space: nowrap;
}
body.casd-m .casd-btn--light { background: #FFFFFF; color: var(--c-dark); }
body.casd-m .casd-btn--ghost {
	background: rgba(20, 39, 31, 0.72); color: #FFFFFF; border: 1.5px solid #FFFFFF;
}

/* =========================================================
 * Sekcie Onetone na úvodnej stránke
 * ========================================================= */
body.casd-m .post-wrap,
body.casd-m .container-fullwidth,
body.casd-m .page-inner { background: transparent; }

body.casd-m section[class*="home-section-"] {
	padding-top: 36px !important; padding-bottom: 20px !important;
	background-attachment: scroll !important; /* fix pre iPhone pri parallax pozadí */
	min-height: 0 !important;
}
body.casd-m section[class*="home-section-"].fullheight { height: auto !important; }
body.casd-m .home-container,
body.casd-m section[class*="home-section-"] .container {
	padding-left: 16px; padding-right: 16px; width: auto; max-width: 100%;
}

body.casd-m .section-title,
body.casd-m .home-container h1,
body.casd-m .home-container h2,
body.casd-m .home-container h3 {
	font-family: var(--f-head); font-weight: 800; letter-spacing: -0.01em;
}
body.casd-m .section-title {
	font-size: 24px !important; line-height: 1.2 !important;
	margin: 0 0 6px !important; padding: 0 !important; text-align: left;
	text-transform: none !important;
}
body.casd-m .section-title::before,
body.casd-m .section-title::after { display: none !important; }
body.casd-m .section-subtitle {
	font-size: 15px; line-height: 1.5; color: var(--c-muted); margin: 0 0 16px; text-align: left;
}
body.casd-m .home-section-content { font-size: 15px; line-height: 1.6; }
body.casd-m .home-section-content img,
body.casd-m .home-section-content iframe,
body.casd-m .home-section-content video { max-width: 100%; }
body.casd-m .home-section-content iframe { border-radius: 14px; }

/* Kartičky: riadok s viacerými stĺpcami Bootstrapu → mriežka kariet */
body.casd-m .home-section-content .row:has(> [class*="col-"] + [class*="col-"]) {
	display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
	margin: 0;
}
body.casd-m .home-section-content .row:has(> [class*="col-"] + [class*="col-"])::before,
body.casd-m .home-section-content .row:has(> [class*="col-"] + [class*="col-"])::after { display: none; }
body.casd-m .home-section-content .row:has(> [class*="col-"] + [class*="col-"]) > [class*="col-"] {
	position: relative; width: auto; float: none; margin: 0 !important;
	padding: 16px 14px; box-sizing: border-box;
	background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius);
	color: var(--c-ink); text-align: left; overflow: hidden;
	transition: transform .15s ease, box-shadow .15s ease;
}
body.casd-m .home-section-content .row:has(> [class*="col-"] + [class*="col-"]) > [class*="col-"]:active {
	transform: scale(0.98);
}
body.casd-m .home-section-content .row > [class*="col-"] h3,
body.casd-m .home-section-content .row > [class*="col-"] h4,
body.casd-m .home-section-content .row > [class*="col-"] h5 {
	font-family: var(--f-head); font-weight: 700; font-size: 16px; line-height: 1.3;
	margin: 8px 0 4px; color: var(--c-ink);
}
body.casd-m .home-section-content .row:has(> [class*="col-"] + [class*="col-"]) > [class*="col-"] a {
	color: var(--c-ink); text-decoration: none;
}
body.casd-m .home-section-content .row > [class*="col-"] p {
	font-size: 13px; line-height: 1.45; color: var(--c-muted); margin: 0;
}
body.casd-m .home-section-content .row > [class*="col-"] .fa,
body.casd-m .home-section-content .row > [class*="col-"] i[class*="fa-"] {
	width: 44px; height: 44px; line-height: 44px !important; font-size: 20px !important;
	border-radius: 12px; text-align: center;
	background: var(--c-primary-soft); color: var(--c-primary) !important;
	display: inline-block; margin: 0 0 4px !important; border: 0 !important;
}
body.casd-m .home-section-content .row > [class*="col-"] img { border-radius: 12px; height: auto; }

/* Celá kartička klikateľná – použije prvý odkaz v karte (doplní mobile.js) */
body.casd-m .casd-card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }

/* Druhá sekcia s kartami (napr. „Viac o adventistoch“) – teplé zlaté ikony */
body.casd-m .casd-sec-alt .home-section-content .row > [class*="col-"] .fa,
body.casd-m .casd-sec-alt .home-section-content .row > [class*="col-"] i[class*="fa-"] {
	background: var(--c-gold-soft); color: var(--c-gold-ink) !important;
}

/* Tlačidlá Onetone */
body.casd-m .home-container .btn-normal,
body.casd-m .home-container .magee-btn-normal,
body.casd-m .home-container .btn-lg {
	min-height: 48px; padding: 12px 20px; border-radius: 12px;
	font-family: var(--f-body); font-weight: 600; font-size: 15px;
	display: inline-flex; align-items: center; justify-content: center;
}

/* Formuláre (napr. „Pomôžte nám zlepšiť náš web“) */
body.casd-m input[type="text"],
body.casd-m input[type="email"],
body.casd-m input[type="tel"],
body.casd-m input[type="search"],
body.casd-m textarea,
body.casd-m select {
	font-family: var(--f-body); font-size: 16px; /* 16 px zabráni zoomu na iPhone */
	border-radius: 12px; border: 1px solid #C9D2DC; padding: 12px; max-width: 100%;
	box-sizing: border-box;
}
body.casd-m button[type="submit"],
body.casd-m input[type="submit"] {
	min-height: 46px; border-radius: 12px; font-weight: 600;
}

/* Podstránky (články, stránky) */
body.casd-m .post-wrap > .container,
body.casd-m .post-inner,
body.casd-m .page-inner { padding-left: 0; padding-right: 0; }
body.casd-m .post-main { padding: 16px; }
body.casd-m .entry-content,
body.casd-m .post-main article { font-size: 16px; line-height: 1.65; }
body.casd-m .post-main h1 { font-family: var(--f-head); font-weight: 800; font-size: 26px; line-height: 1.2; }
body.casd-m .col-aside-left,
body.casd-m .col-aside-right { width: 100%; float: none; padding: 0 16px; }

/* =========================================================
 * Pätička
 * ========================================================= */
body.casd-m footer { background: var(--c-ink); color: #FFFFFF; margin-top: 32px; }
body.casd-m footer .footer-widget-area { padding: 28px 0 8px; background: transparent; }
body.casd-m footer .footer-widget-area [class*="col-"] { width: 100%; float: none; margin-bottom: 16px; }
body.casd-m footer .footer-info-area { padding: 20px 0 24px; background: transparent; border: 0; }
body.casd-m footer .container { padding: 0 16px; width: auto; }
body.casd-m footer .pull-left,
body.casd-m footer .pull-right { float: none !important; text-align: left; width: 100%; }
body.casd-m footer,
body.casd-m footer p,
body.casd-m footer .site-info { font-size: 13px; color: #BCCBC1; line-height: 1.6; }
body.casd-m footer a { color: #FFFFFF; }
body.casd-m footer .site-social { margin-top: 16px; }
body.casd-m footer .site-social ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 0; margin: 0; list-style: none; }
body.casd-m footer .site-social li { margin: 0 !important; padding: 0; float: none; }
body.casd-m footer .site-social a {
	margin: 0 !important; padding: 0; line-height: 1;
	width: 44px; height: 44px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: #1F3329; color: #FFFFFF; font-size: 19px; text-decoration: none;
}

/* =========================================================
 * Spodná lišta
 * ========================================================= */
body.casd-m .casd-bottomnav {
	position: fixed; z-index: 1000; left: 0; right: 0; bottom: 0;
	height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
	box-sizing: border-box;
	display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
	background: rgba(255, 255, 255, 0.97);
	-webkit-backdrop-filter: saturate(1.4) blur(10px);
	backdrop-filter: saturate(1.4) blur(10px);
	border-top: 1px solid var(--c-line);
}
body.casd-m .casd-bottomnav__item {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
	min-height: 44px; text-decoration: none;
	font-family: var(--f-body); font-size: 11px; font-weight: 600; color: var(--c-muted);
}
body.casd-m .casd-bottomnav__item.is-active { color: var(--c-primary); }
body.casd-m .casd-bottomnav__item--live { color: var(--c-live); }
body.casd-m .casd-bottomnav__item:active { background: var(--c-bg); }

/* =========================================================
 * Tablet (768 – 991 px)
 * ========================================================= */
@media (min-width: 768px) {
	body.casd-m { --head-h: 72px; }
	body.casd-m .casd-mhead { padding: 0 24px; gap: 12px; }
	body.casd-m .casd-brand__logo { width: 44px; height: 44px; }
	body.casd-m .casd-brand__title { font-size: 18px; }
	body.casd-m .casd-brand__tag { font-size: 13px; }

	/* Menu priamo v hlavičke (ak je položiek málo – rozhodne mobile.js) */
	body.casd-m.casd-tabnav-on .casd-tabnav { display: flex; align-items: center; gap: 4px; }
	body.casd-m.casd-tabnav-on .casd-menubtn { display: none; }
	body.casd-m .casd-tabnav a {
		height: 44px; padding: 0 14px; border-radius: 10px;
		display: inline-flex; align-items: center; white-space: nowrap;
		font-weight: 600; font-size: 14px; color: var(--c-ink); text-decoration: none;
	}
	body.casd-m .casd-tabnav a.is-active { background: var(--c-primary-soft); color: var(--c-primary); }

	/* Na tablete bez spodnej lišty */
	body.casd-m .casd-bottomnav { display: none; }
	body.casd-m.casd-has-nav { padding-bottom: 0; }

	body.casd-m .casd-hero {
		margin: 24px 24px 0; border-radius: 24px;
		aspect-ratio: 3 / 2; max-height: none; min-height: 0;
	}
	body.casd-m .casd-hero img { object-position: 50% 50%; }
	body.casd-m .casd-hero__actions { left: 24px; right: auto; bottom: 22px; }
	body.casd-m .casd-btn { flex: none; min-height: 50px; padding: 0 22px; }

	body.casd-m section[class*="home-section-"] { padding-top: 48px !important; padding-bottom: 24px !important; }
	body.casd-m .home-container,
	body.casd-m section[class*="home-section-"] .container { padding-left: 24px; padding-right: 24px; }
	body.casd-m .section-title { font-size: 28px !important; }
	body.casd-m .home-section-content .row:has(> [class*="col-"] + [class*="col-"]) {
		grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
	}
	body.casd-m .home-section-content .row:has(> [class*="col-"] + [class*="col-"]) > [class*="col-"] { padding: 20px; border-radius: 18px; }
	body.casd-m .home-section-content .row > [class*="col-"] h3,
	body.casd-m .home-section-content .row > [class*="col-"] h4 { font-size: 17px; }
	body.casd-m .home-section-content .row > [class*="col-"] p { font-size: 14px; }

	body.casd-m .post-main { padding: 24px; }
	body.casd-m footer .container { padding: 0 24px; }
}

/* Používatelia, ktorí si vypli animácie */
@media (prefers-reduced-motion: reduce) {
	body.casd-m *, body.casd-m *::before, body.casd-m *::after {
		animation: none !important; transition: none !important;
	}
}

} /* koniec @media (max-width: 991px) */
