/*
Theme Name:   IPRoyals
Theme URI:    https://iproyals.com/
Description:  Custom branded child theme for IPRoyals (built on Ideal Magazine). Teal/navy brand, own logo, SEO meta tags, faster thumbnails.
Author:       IPRoyals
Template:     ideal-magazine
Version:      1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License:      GPL-2.0-or-later
Text Domain:  iproyals
*/

/* ===== Brand tokens ===== */
:root {
	--ipr-ink: #0F172A;
	--ipr-ink-2: #334155;
	--ipr-muted: #64748B;
	--ipr-line: #E2E8F0;
	--ipr-bg: #F8FAFC;
	--ipr-card: #FFFFFF;
	--ipr-brand: #0E7490;
	--ipr-brand-2: #14B8A6;
	--ipr-accent: #F59E0B;
	--ipr-navy: #0B1220;
	--ipr-radius: 14px;
	--ipr-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
	--ipr-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--ipr-font-head: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;

	/* Override parent theme variables where it uses them */
	--primary-color: var(--ipr-brand);
	--secondary-color: var(--ipr-ink);
}

/* ===== Base ===== */
body {
	background: var(--ipr-bg);
	color: var(--ipr-ink-2);
	font-family: var(--ipr-font);
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6,
.entry-title, .widget-title, .wp-block-heading {
	font-family: var(--ipr-font-head);
	color: var(--ipr-ink);
	letter-spacing: -.01em;
}
a { color: var(--ipr-brand); transition: color .15s ease; }
a:hover, a:focus { color: var(--ipr-brand-2); }
:focus-visible { outline: 2px solid var(--ipr-brand-2); outline-offset: 2px; }

/* Remove the full-page loader (it delays first paint) */
#loader, .loader-1 { display: none !important; }

/* ===== Header ===== */
.site-header { background: #fff; border-bottom: 1px solid var(--ipr-line); }
.ideal-magazine-middle-header { padding: 18px 0 !important; background: #fff !important; }
.ideal-magazine-middle-header-wrapper { justify-content: flex-start !important; }
.site-branding .custom-logo { max-height: 48px; width: auto; }
.site-title { margin: 0; font-size: 0 !important; line-height: 0; }
.site-title a {
	display: inline-block;
	width: 220px; height: 48px;
	background: url("assets/logo.svg") left center / contain no-repeat;
	text-indent: -9999px; overflow: hidden;
}
.site-description { color: var(--ipr-muted) !important; font-family: var(--ipr-font) !important; font-size: 13px !important; font-weight: 500; letter-spacing: .02em; margin: 2px 0 0 !important; }

/* Navigation bar */
.ideal-magazine-bottom-header,
.ideal-magazine-navigation { background: var(--ipr-navy) !important; }
.main-navigation ul li a {
	color: #E2E8F0 !important;
	font-family: var(--ipr-font);
	font-weight: 600; font-size: 14px;
	letter-spacing: .04em;
	text-transform: uppercase;
}
.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item > a,
.main-navigation ul li.current-menu-parent > a { color: #5EEAD4 !important; }
.main-navigation ul ul { background: var(--ipr-navy); border-top: 2px solid var(--ipr-brand-2); border-radius: 0 0 10px 10px; }
.menu-toggle .ham-icon { background: #fff !important; }

/* The "social icons" area was filled with category links (broken icons) - hide it */
.header-social-icon { display: none !important; }

/* ===== Post cards ===== */
.blog-archieve-layout.grid-layout { gap: 24px; }
.blog-post-inner {
	background: var(--ipr-card);
	border: 1px solid var(--ipr-line);
	border-radius: var(--ipr-radius);
	box-shadow: var(--ipr-shadow);
	overflow: hidden;
	transition: transform .2s ease, box-shadow .2s ease;
	height: 100%;
}
.blog-post-inner:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(15, 23, 42, .10); }
.blog-post-image { aspect-ratio: 16 / 10; overflow: hidden; margin: 0; }
.blog-post-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.blog-post-inner:hover .blog-post-image img { transform: scale(1.04); }
.blog-post-detail { padding: 18px 20px 22px; }

.post-categories .cat-links a {
	display: inline-block;
	background: rgba(20, 184, 166, .12);
	color: var(--ipr-brand) !important;
	font-size: 11px; font-weight: 700;
	letter-spacing: .08em; text-transform: uppercase;
	padding: 4px 10px; border-radius: 999px;
}
.blog-post-inner .entry-title { font-size: 20px; line-height: 1.3; margin: 10px 0 8px; }
.blog-post-inner .entry-title a { color: var(--ipr-ink); }
.blog-post-inner .entry-title a:hover { color: var(--ipr-brand); }
.post-meta, .post-meta a { color: var(--ipr-muted) !important; font-size: 13px; }
.post-meta .post-author a { color: var(--ipr-brand) !important; font-weight: 600; }
.post-excerpt p { color: var(--ipr-ink-2); font-size: 15px; margin: 8px 0 0; }

/* ===== Single post ===== */
.single .entry-header .entry-title { font-size: clamp(28px, 4vw, 42px); line-height: 1.2; }
.single .entry-content { font-size: 17px; line-height: 1.8; color: var(--ipr-ink-2); }
.single .entry-content h2 { font-size: 28px; margin-top: 1.8em; }
.single .entry-content h3 { font-size: 22px; margin-top: 1.5em; }
.single .entry-content img { border-radius: var(--ipr-radius); }
.single .entry-content blockquote { border-left: 4px solid var(--ipr-brand-2); background: #F0FDFA; padding: 16px 20px; border-radius: 0 10px 10px 0; }

/* ===== Sidebar ===== */
.widget-area .widget {
	background: var(--ipr-card);
	border: 1px solid var(--ipr-line);
	border-radius: var(--ipr-radius);
	padding: 20px;
	box-shadow: var(--ipr-shadow);
	margin-bottom: 24px;
}
.widget-area .widget h2, .widget-area .widget .wp-block-heading, .widget-title {
	font-size: 17px; margin: 0 0 12px; padding-bottom: 10px;
	border-bottom: 2px solid var(--ipr-line); position: relative;
}
.widget-area .widget h2::after, .widget-area .widget .wp-block-heading::after {
	content: ""; position: absolute; left: 0; bottom: -2px; width: 40px; height: 2px; background: var(--ipr-brand-2);
}
.widget-area ul { list-style: none; padding: 0; margin: 0; }
.widget-area li { padding: 8px 0; border-bottom: 1px dashed var(--ipr-line); }
.widget-area li:last-child { border-bottom: 0; }
.widget-area li a { color: var(--ipr-ink-2); }
.widget-area li a:hover { color: var(--ipr-brand); }

/* Search */
.wp-block-search__input { border: 1px solid var(--ipr-line) !important; border-radius: 10px !important; padding: 10px 12px !important; }
.wp-block-search__button, button, input[type="submit"], .wp-block-button__link {
	background: var(--ipr-brand) !important; color: #fff !important;
	border: 0 !important; border-radius: 10px !important; font-weight: 600;
}
.wp-block-search__button:hover, button:hover, input[type="submit"]:hover { background: var(--ipr-brand-2) !important; }

/* Pagination */
.posts-navigation a, .pagination .page-numbers {
	display: inline-block; padding: 10px 18px; border-radius: 10px;
	background: #fff; border: 1px solid var(--ipr-line); color: var(--ipr-ink); font-weight: 600;
}
.posts-navigation a:hover, .pagination .page-numbers.current { background: var(--ipr-brand); color: #fff; border-color: var(--ipr-brand); }

/* ===== Footer ===== */
.site-footer, .ideal-magazine-bottom-footer { background: var(--ipr-navy) !important; color: #94A3B8; }
.ipr-footer-brand { padding: 40px 0 8px; text-align: center; }
.ipr-footer-brand img { height: 40px; width: auto; }
.ipr-footer-brand p { color: #94A3B8; max-width: 560px; margin: 12px auto 0; font-size: 14px; }
.ipr-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; padding: 14px 0 0; margin: 0; list-style: none; }
.ipr-footer-links a { color: #CBD5E1 !important; font-size: 14px; }
.ipr-footer-links a:hover { color: #5EEAD4 !important; }
.bottom-footer-content { text-align: center; border-top: 1px solid rgba(148, 163, 184, .15); padding: 18px 0; }
.bottom-footer-content, .bottom-footer-content a { color: #94A3B8 !important; font-size: 13px; }

.scroll-to-top { background: var(--ipr-brand) !important; border-radius: 12px !important; }

/* ===== Mobile ===== */
@media (max-width: 768px) {
	.site-title a { width: 170px; height: 40px; }
	.blog-post-inner .entry-title { font-size: 18px; }
	.ideal-magazine-middle-header { padding: 12px 0 !important; }
	.main-navigation ul ul { border-radius: 0; }
}
