/*
Theme Name: Ruhaniat.kz
Theme URI: https://ruhaniat.kz
Author: Ғазиза
Description: Ruhaniat.kz — рухани-мәдени, тарихи-танымдық жаңалықтар порталына арналған тема. Түсі — turquoise, стилі — жаңалық порталы.
Version: 0.1.0
Text Domain: ruhaniat
*/

:root {
	--brand: #0ea5e9;
	--brand-dark: #0284c7;
	--brand-light: #38bdf8;
	--brand-soft: #e0f2fe;
	--accent-red: #d62828;
	--accent-green: #2a9d8f;
	--ink: #1f2937;
	--muted: #6b7280;
	--line: #e5e7eb;
	--bg: #f4f6f8;
	--white: #ffffff;
	--radius: 12px;
	--shadow: 0 4px 18px rgba(15, 23, 42, .07);
	--maxw: 1200px;
}

@font-face {
	font-family: 'Cooper Black';
	src: url('assets/fonts/CooperBlack.ttf') format('truetype');
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	font-family: 'Times New Roman', Times, serif;
	color: var(--ink);
	background: var(--bg);
	line-height: 1.6;
}

input, button, textarea, select { font-family: inherit; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { color: var(--brand); }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { margin: 34px 0; }

/* ============ TOP BAR ============ */
.topbar {
	background: var(--brand-dark);
	color: #d7f2ef;
	font-size: 13px;
}
.topbar .container { display: flex; align-items: center; gap: 16px; height: 40px; }
.topbar .date { opacity: .9; }
.badge-live {
	background: var(--accent-red);
	color: #fff;
	padding: 3px 10px;
	border-radius: 20px;
	font-weight: 700;
	font-size: 12px;
	white-space: nowrap;
}
.ticker { flex: 1; overflow: hidden; white-space: nowrap; position: relative; }
.ticker span { display: inline-block; padding-left: 100%; animation: ticker 26s linear infinite; }
.ticker a { color: #eafffb; margin-right: 40px; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-100%); } }
.topbar .socials { display: flex; gap: 12px; align-items: center; }
.topbar .socials a { color: #eafffb; display: inline-flex; transition: color .15s; }
.topbar .socials a:hover { color: #fff; }
.topbar .socials svg { width: 19px; height: 19px; display: block; }

/* ============ HEADER / BRAND ============ */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand .logo-mark {
	width: 52px; height: 52px; border-radius: 14px;
	background: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
	color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 24px;
}
.brand .logo-text { line-height: 1.15; }
.brand .logo-text b { font-size: 26px; color: var(--ink); letter-spacing: -.5px; }
.brand .logo-text b span { color: var(--brand); }
.brand .logo-text small { display: block; color: var(--muted); font-size: 12.5px; }
.brand-logo { display: flex; align-items: center; gap: 24px; }
.brand-logo .custom-logo-link { display: block; line-height: 0; }
.custom-logo { height: 210px; width: auto; display: block; }
.brand-word {
	font-family: 'Cooper Black', 'Times New Roman', serif;
	color: #036D7F;
	font-size: 96px;
	line-height: 1;
	letter-spacing: .5px;
}
.brand-word:hover { color: #036D7F; }
@media (max-width: 700px) {
	.custom-logo { height: 104px; }
	.brand-word { font-size: 44px; }
}
.search-form { display: flex; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 30px; padding: 4px 6px 4px 16px; }
.search-form input[type="search"] { border: 0; background: transparent; outline: none; padding: 8px 4px; font-size: 14px; width: 190px; }
.search-form button { border: 0; background: var(--brand); color: #fff; border-radius: 30px; padding: 8px 16px; cursor: pointer; font-weight: 600; }

/* ============ NAV ============ */
.main-nav { background: var(--brand); }
.main-nav .container { display: flex; align-items: center; }
.main-nav ul { list-style: none; display: flex; flex-wrap: wrap; margin: 0; padding: 0; }
.main-nav li a { display: block; color: #eafffb; padding: 14px 16px; font-weight: 600; font-size: 14.5px; }
.main-nav li a:hover, .main-nav li.current-menu-item a { background: var(--brand-dark); color: #fff; }
.nav-toggle { display: none; }

/* Ашылмалы ішкі мәзір (dropdown) */
.main-nav li { position: relative; }
.main-nav .menu-item-has-children > a::after { content: "▾"; margin-left: 6px; font-size: 11px; opacity: .9; }
.main-nav .sub-menu {
	position: absolute; top: 100%; left: 0; z-index: 60;
	min-width: 250px; margin: 0; padding: 6px 0;
	background: var(--brand-dark);
	box-shadow: var(--shadow);
	display: none; flex-direction: column;
	border-radius: 0 0 8px 8px;
}
.main-nav li:hover > .sub-menu { display: flex; }
.main-nav .sub-menu li a { padding: 11px 18px; font-size: 14px; white-space: nowrap; }
.main-nav .sub-menu li a:hover { background: var(--brand); }

/* ============ HERO / SLIDER ============ */
.hero { display: grid; grid-template-columns: 2fr 1fr; gap: 22px; }
.slider { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #000; }
.slide { display: none; position: relative; }
.slide.active { display: block; }
.slide .media { aspect-ratio: 16 / 9; }
.slide .media img, .slide .media .thumb-placeholder { width: 100%; height: 100%; object-fit: cover; }
.slide .caption {
	position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 26px 22px;
	background: linear-gradient(to top, rgba(0,0,0,.82), rgba(0,0,0,0));
	color: #fff;
}
.slide .caption .meta { font-size: 13px; opacity: .9; margin-bottom: 8px; display: flex; gap: 10px; align-items: center; }
.slide .caption h2 { margin: 0; font-size: 26px; line-height: 1.25; }
.slide .caption h2 a { color: #fff; }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.85); border: 0; width: 42px; height: 42px; border-radius: 50%; cursor: pointer; font-size: 20px; color: var(--ink); }
.slider-btn.prev { left: 12px; } .slider-btn.next { right: 12px; }
.slider-dots { position: absolute; bottom: 14px; right: 20px; display: flex; gap: 7px; }
.slider-dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; background: rgba(255,255,255,.5); cursor: pointer; }
.slider-dots button.active { background: #fff; }

/* Оң жақ — соңғы жаңалықтар */
.latest-box { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.latest-box .list-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.latest-box .list-item:last-child { border-bottom: 0; }
.latest-box .list-item .thumb { width: 84px; height: 62px; border-radius: 8px; overflow: hidden; flex: none; }
.latest-box .list-item .thumb img, .latest-box .list-item .thumb .thumb-placeholder { width: 100%; height: 100%; object-fit: cover; }
.latest-box .list-item h4 { margin: 0 0 4px; font-size: 14.5px; line-height: 1.35; }
.latest-box .list-item .meta { font-size: 12px; color: var(--muted); }

/* ============ SECTION HEADINGS ============ */
.sec-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 16px; }
.sec-head h3 { margin: 0; font-size: 20px; position: relative; padding-left: 14px; }
.sec-head h3::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 5px; border-radius: 4px; background: var(--brand); }
.sec-head a.more { font-size: 13px; color: var(--muted); }

/* ============ CARDS GRID ============ */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s ease; }
.card:hover { transform: translateY(-3px); }
.card .media { aspect-ratio: 16 / 10; }
.card .media img, .card .media .thumb-placeholder { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h4 { margin: 0; font-size: 16.5px; line-height: 1.35; }
.card p { margin: 0; color: var(--muted); font-size: 13.5px; }
.card .meta { margin-top: auto; font-size: 12.5px; color: var(--muted); display: flex; gap: 12px; }

.cat-badge { display: inline-block; background: var(--brand-soft); color: var(--brand-dark); font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 6px; }
.thumb-placeholder { display: grid; place-items: center; color: rgba(255,255,255,.85); }
.thumb-placeholder span { font-size: 40px; font-weight: 800; }

/* ============ PROJECTS ============ */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.project { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 150px; box-shadow: var(--shadow); color: #fff; display: flex; align-items: flex-end; }
.project .bg { position: absolute; inset: 0; }
.project .bg img, .project .bg .thumb-placeholder { width: 100%; height: 100%; object-fit: cover; }
.project::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,.15)); }
.project h4 { position: relative; z-index: 2; margin: 0; padding: 18px; font-size: 17px; }
.project h4 a { color: #fff; }

/* ============ MAIN LAYOUT (archive/single) ============ */
.layout { display: grid; grid-template-columns: 1fr 320px; gap: 30px; align-items: start; }
.widget { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 22px; }
.widget h3 { margin: 0 0 12px; font-size: 16px; }
.article-full { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 30px; }
.article-full h1 { font-size: 30px; line-height: 1.25; margin: 8px 0 12px; }
.article-full .entry-meta { color: var(--muted); font-size: 13.5px; display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.article-full .featured { border-radius: var(--radius); overflow: hidden; margin: 0 0 22px; }
.article-full .content p { margin: 0 0 16px; }
.page-title { font-size: 26px; margin: 0 0 20px; padding-left: 14px; border-left: 5px solid var(--brand); }

/* ============ FOOTER ============ */
.site-footer { background: #0b2740; color: #c3d4e4; margin-top: 44px; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; padding: 40px 0 26px; }
.site-footer h4 { color: #fff; font-size: 16px; margin: 0 0 14px; }
.site-footer a { color: #c3d4e4; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 5px 0; }
.footer-brand b { color: #fff; font-size: 24px; }
.footer-brand b span { color: var(--brand-light); }
.footer-contact { line-height: 1.9; margin-top: 12px; }
.footer-socials li { padding: 6px 0; }
.footer-socials a { display: inline-flex; align-items: center; gap: 9px; }
.footer-socials .ico { display: inline-flex; }
.footer-socials .ico svg { width: 17px; height: 17px; display: block; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 16px 0; font-size: 13px; text-align: center; color: #8ea6bd; }
.tag-placeholder { color: #8ea6bd; font-style: italic; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
	.hero { grid-template-columns: 1fr; }
	.cards, .projects { grid-template-columns: repeat(2, 1fr); }
	.layout { grid-template-columns: 1fr; }
	.site-footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
	.brand-row { flex-direction: column; align-items: flex-start; gap: 14px; }
	.search-form input[type="search"] { width: 100%; }
	.cards, .projects, .site-footer .cols { grid-template-columns: 1fr; }
	.main-nav .container { flex-direction: column; align-items: stretch; }
	.nav-toggle { display: block; background: var(--brand-dark); color: #fff; border: 0; padding: 12px; font-weight: 700; text-align: left; cursor: pointer; }
	.main-nav ul { display: none; flex-direction: column; }
	.main-nav ul.open { display: flex; }
	.main-nav ul.open .sub-menu { position: static; display: flex; min-width: 0; background: rgba(0,0,0,.2); border-radius: 0; }
	.main-nav .sub-menu li a { padding-left: 34px; }
	.slide .caption h2 { font-size: 19px; }
}
