/* =========================================================
   Shoof Net — Main Stylesheet
   Table of Contents:
   1. Custom Properties / Theme Colors
   2. Reset & Base
   3. Layout / Utility
   4. Header
   5. Off-canvas Drawer
   6. Search Form
   7. Card Grid
   8. Pagination
   9. Single Post / Page
   10. Comments
   11. Sidebar / Widgets
   12. Footer
   13. 404 / No results
   14. Dark Mode
   15. Responsive
   ========================================================= */

/* 1. Custom Properties -------------------------------------------------- */
:root{
	--sn-primary: #6d3fa8;
	--sn-primary-dark: #4f2c81;
	--sn-primary-light: #8a5cc7;
	--sn-bg: #f4f2f8;
	--sn-surface: #ffffff;
	--sn-text: #1c1424;
	--sn-text-muted: #6b6478;
	--sn-border: #e7e2f0;
	--sn-radius: 12px;
	--sn-radius-sm: 8px;
	--sn-shadow: 0 4px 18px rgba(30, 15, 60, 0.08);
	--sn-shadow-hover: 0 10px 28px rgba(30, 15, 60, 0.16);
	--sn-header-h: 68px;
	--sn-transition: 220ms cubic-bezier(.4,0,.2,1);
	--sn-max-width: 1320px;
	color-scheme: light;
}

html.dark-mode{
	--sn-bg: #120c1a;
	--sn-surface: #1c1526;
	--sn-text: #f2eef8;
	--sn-text-muted: #a79bb8;
	--sn-border: #2e2438;
	--sn-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
	--sn-shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.5);
	color-scheme: dark;
}

/* 2. Reset & Base -------------------------------------------------------- */
*, *::before, *::after{ box-sizing: border-box; }

html{
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body{
	margin: 0;
	background: var(--sn-bg);
	color: var(--sn-text);
	font-family: 'Cairo', 'Tahoma', system-ui, sans-serif;
	font-size: 16px;
	line-height: 1.7;
	overflow-x: hidden;
	transition: background var(--sn-transition), color var(--sn-transition);
}

img{ max-width: 100%; height: auto; display: block; }

a{ color: inherit; text-decoration: none; }

ul, ol{ margin: 0; padding: 0; list-style: none; }

button{
	font-family: inherit;
	cursor: pointer;
	background: none;
	border: none;
	color: inherit;
}

input, textarea, select{ font-family: inherit; font-size: 1rem; color: inherit; }

h1, h2, h3, h4, h5, h6{ margin: 0 0 .6em; font-weight: 700; line-height: 1.35; }

p{ margin: 0 0 1em; }

.screen-reader-text{
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px,1px,1px,1px);
	white-space: nowrap;
	border: 0; padding: 0; margin: -1px;
}

.skip-link{
	position: fixed;
	top: -80px;
	right: 10px;
	z-index: 10000;
	background: var(--sn-primary);
	color: #fff;
	padding: 10px 18px;
	border-radius: var(--sn-radius-sm);
	transition: top var(--sn-transition);
}
.skip-link:focus{ top: 10px; }

/* 3. Layout / Utility ----------------------------------------------------- */
.site{ min-height: 100vh; display: flex; flex-direction: column; }
.site-content{ flex: 1; }

.content-wrap{
	max-width: var(--sn-max-width);
	margin: 0 auto;
	padding: 28px 20px 60px;
}

.content-wrap--single{ max-width: 880px; }

.btn{
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 28px;
	border-radius: 999px;
	font-weight: 700;
	font-size: .95rem;
	transition: background var(--sn-transition), transform var(--sn-transition), box-shadow var(--sn-transition);
}

.btn--primary{
	background: var(--sn-primary);
	color: #fff;
	box-shadow: var(--sn-shadow);
}
.btn--primary:hover{
	background: var(--sn-primary-dark);
	transform: translateY(-2px);
	box-shadow: var(--sn-shadow-hover);
}

.page-header{ margin-bottom: 24px; }
.page-title{ font-size: 1.6rem; }
.page-title span{ color: var(--sn-primary); }
.archive-description{ color: var(--sn-text-muted); }

/* 4. Header --------------------------------------------------------------- */
.site-header{
	position: sticky;
	top: 0;
	z-index: 200;
	background: linear-gradient(90deg, var(--sn-primary), var(--sn-primary-dark));
	box-shadow: 0 2px 14px rgba(0,0,0,.15);
	overflow: visible;
}

.header-inner{
	max-width: var(--sn-max-width);
	margin: 0 auto;
	height: var(--sn-header-h);
	padding: 0 20px;
	display: flex;
	align-items: center;
	gap: 16px;
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

.header-side{ display: flex; align-items: center; gap: 14px; min-width: 0; }
.header-side--start{ order: 1; flex-shrink: 1; min-width: 0; }
.header-search{ order: 2; flex: 1; min-width: 0; }
.header-side--end{ order: 3; flex-shrink: 0; }

.drawer-toggle{ flex-shrink: 0; }
.dark-mode-toggle{ flex-shrink: 0; }
.mobile-search-toggle{ flex-shrink: 0; }

.drawer-toggle{
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	width: 42px;
	height: 42px;
	border-radius: 10px;
	transition: background var(--sn-transition);
}
.drawer-toggle:hover,
.drawer-toggle:focus-visible{ background: rgba(255,255,255,.15); }

.drawer-toggle__bar{
	display: block;
	width: 20px;
	height: 2px;
	background: #fff;
	border-radius: 2px;
	transition: transform var(--sn-transition), opacity var(--sn-transition);
}

.drawer-toggle[aria-expanded="true"] .drawer-toggle__bar:nth-child(1){
	transform: translateY(7px) rotate(45deg);
}
.drawer-toggle[aria-expanded="true"] .drawer-toggle__bar:nth-child(2){ opacity: 0; }
.drawer-toggle[aria-expanded="true"] .drawer-toggle__bar:nth-child(3){
	transform: translateY(-7px) rotate(-45deg);
}

.site-branding{ display: flex; flex-direction: column; justify-content: center; min-width: 0; overflow: hidden; }
.site-logo{ display: flex; align-items: center; min-width: 0; }
.site-logo img{ max-height: 44px; width: auto; max-width: 100%; }

.site-title{
	margin: 0;
	font-size: 1.35rem;
	font-weight: 800;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}
.site-title a{ color: #fff; }
.site-description{
	margin: 0;
	font-size: .78rem;
	color: rgba(255,255,255,.75);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}

.dark-mode-toggle{
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: rgba(255,255,255,.12);
	color: #fff;
	transition: background var(--sn-transition), transform var(--sn-transition);
}
.dark-mode-toggle:hover{ background: rgba(255,255,255,.22); }
.dark-mode-toggle .icon{ width: 20px; height: 20px; }
.dark-mode-toggle .icon-sun{ display: none; }
html.dark-mode .dark-mode-toggle .icon-moon{ display: none; }
html.dark-mode .dark-mode-toggle .icon-sun{ display: block; }

/* Mobile-only search icon (hidden on desktop; shown via media query below) */
.mobile-search-toggle{
	display: none;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: rgba(255,255,255,.12);
	color: #fff;
	transition: background var(--sn-transition);
}
.mobile-search-toggle:hover{ background: rgba(255,255,255,.22); }
.mobile-search-toggle svg{ width: 20px; height: 20px; }

/* Mobile-only overlay that visually replaces the header bar when search is open */
.mobile-search-overlay{
	display: none;
}

/* 5. Off-canvas Drawer ------------------------------------------------------ */
.drawer-overlay{
	position: fixed;
	inset: 0;
	background: rgba(10, 5, 20, .55);
	z-index: 299;
	opacity: 0;
	transition: opacity var(--sn-transition);
}
.drawer-overlay.is-visible{ opacity: 1; }

.site-drawer{
	position: fixed;
	top: 0;
	right: 0;
	height: 100%;
	width: min(340px, 86vw);
	background: var(--sn-surface);
	z-index: 300;
	transform: translateX(100%);
	transition: transform 320ms cubic-bezier(.4,0,.2,1);
	display: flex;
	flex-direction: column;
	box-shadow: -8px 0 30px rgba(0,0,0,.2);
}

html:not([dir="rtl"]) .site-drawer{
	right: auto;
	left: 0;
	transform: translateX(-100%);
}

.site-drawer.is-open{ transform: translateX(0); }

.site-drawer__header{
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 20px;
	border-bottom: 1px solid var(--sn-border);
}

.site-drawer__title{ font-weight: 800; font-size: 1.1rem; }

.drawer-close{
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--sn-bg);
	transition: background var(--sn-transition), transform var(--sn-transition);
}
.drawer-close:hover{ background: var(--sn-border); transform: rotate(90deg); }
.drawer-close svg{ width: 18px; height: 18px; }

.site-drawer__body{ padding: 12px 8px; overflow-y: auto; flex: 1; }

.drawer-menu-list li a{
	display: block;
	padding: 13px 16px;
	border-radius: var(--sn-radius-sm);
	font-weight: 600;
	transition: background var(--sn-transition), color var(--sn-transition);
}
.drawer-menu-list li a:hover{
	background: var(--sn-bg);
	color: var(--sn-primary);
}
.drawer-menu-list .sub-menu{ padding-inline-start: 16px; }

body.drawer-open{ overflow: hidden; }

/* 6. Search Form ----------------------------------------------------------- */
.search-form{ width: 100%; }
.search-form__field{
	position: relative;
	display: flex;
	align-items: center;
	background: rgba(255,255,255,.18);
	border-radius: 999px;
	max-width: 460px;
	margin: 0 auto;
	padding: 0 6px 0 4px;
	transition: background var(--sn-transition);
}
.search-form__field:focus-within{ background: rgba(255,255,255,.28); }

.search-form__icon{
	width: 18px;
	height: 18px;
	color: rgba(255,255,255,.85);
	flex-shrink: 0;
	margin-inline-start: 12px;
}

.search-form__input{
	flex: 1;
	background: transparent;
	border: none;
	outline: none;
	padding: 11px 10px;
	color: #fff;
}
.search-form__input::placeholder{ color: rgba(255,255,255,.75); }

.search-form__submit{
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgba(255,255,255,.2);
	color: #fff;
	flex-shrink: 0;
	transition: background var(--sn-transition);
}
.search-form__submit:hover{ background: rgba(255,255,255,.35); }
.search-form__submit svg{ width: 16px; height: 16px; }

/* Search form used inside content (404, no-results) needs dark-on-light look */
.error-404__search .search-form__field,
.no-results .search-form__field{
	background: var(--sn-surface);
	border: 1px solid var(--sn-border);
	box-shadow: var(--sn-shadow);
	max-width: 480px;
}
.error-404__search .search-form__icon,
.no-results .search-form__icon{ color: var(--sn-text-muted); }
.error-404__search .search-form__input,
.no-results .search-form__input{ color: var(--sn-text); }
.error-404__search .search-form__input::placeholder,
.no-results .search-form__input::placeholder{ color: var(--sn-text-muted); }
.error-404__search .search-form__submit,
.no-results .search-form__submit{ background: var(--sn-primary); color: #fff; }

/* 7. Card Grid --------------------------------------------------------------- */
.shoofnet-grid{
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 22px;
	margin-bottom: 20px;
}

.shoofnet-card{
	background: var(--sn-surface);
	border-radius: var(--sn-radius);
	overflow: hidden;
	box-shadow: var(--sn-shadow);
	transition: transform var(--sn-transition), box-shadow var(--sn-transition);
	display: flex;
	flex-direction: column;
}
.shoofnet-card:hover{
	transform: translateY(-4px);
	box-shadow: var(--sn-shadow-hover);
}

.shoofnet-card__thumb-link{ display: block; }

.shoofnet-card__thumb{
	position: relative;
	aspect-ratio: 16 / 9;
	background: linear-gradient(135deg, #2a1a44, #4f2c81);
	overflow: hidden;
}

.shoofnet-card__img{
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 400ms ease;
}
.shoofnet-card:hover .shoofnet-card__img{ transform: scale(1.06); }

.shoofnet-card__placeholder{
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(255,255,255,.85);
	font-weight: 700;
}

.shoofnet-card__badge{
	position: absolute;
	top: 10px;
	right: 10px;
	background: rgba(20, 10, 35, .55);
	color: #fff;
	font-size: .68rem;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 999px;
	backdrop-filter: blur(4px);
}

.shoofnet-card__duration{
	position: absolute;
	bottom: 10px;
	left: 10px;
	background: rgba(20, 10, 35, .72);
	color: #fff;
	font-size: .74rem;
	font-weight: 700;
	padding: 3px 9px;
	border-radius: 6px;
	letter-spacing: .02em;
}

.shoofnet-card__body{ padding: 14px 16px 18px; }

.shoofnet-card__title{
	font-size: .98rem;
	margin: 0 0 6px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.shoofnet-card__title a:hover{ color: var(--sn-primary); }

.shoofnet-card__meta{
	margin: 0;
	font-size: .8rem;
	color: var(--sn-text-muted);
}

/* 8. Pagination ---------------------------------------------------------------- */
.shoofnet-pagination{
	display: flex;
	justify-content: center;
	margin-top: 24px;
}
.shoofnet-pagination .nav-links{
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
.shoofnet-pagination a,
.shoofnet-pagination span{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border-radius: var(--sn-radius-sm);
	background: var(--sn-surface);
	box-shadow: var(--sn-shadow);
	font-weight: 700;
	font-size: .9rem;
	transition: background var(--sn-transition), color var(--sn-transition);
}
.shoofnet-pagination a:hover{ background: var(--sn-primary); color: #fff; }
.shoofnet-pagination span.current{ background: var(--sn-primary); color: #fff; }

/* 9. Single Post / Page ---------------------------------------------------------- */
.single-post__header{ margin-bottom: 20px; }
.single-post__cats{ display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.cat-pill{
	background: color-mix(in srgb, var(--sn-primary) 12%, transparent);
	color: var(--sn-primary);
	font-size: .78rem;
	font-weight: 700;
	padding: 5px 14px;
	border-radius: 999px;
}
.single-post__title{ font-size: 1.9rem; }
.single-post__meta{
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	color: var(--sn-text-muted);
	font-size: .88rem;
}
.single-post__thumb{
	border-radius: var(--sn-radius);
	overflow: hidden;
	margin: 20px 0;
	box-shadow: var(--sn-shadow);
}
.single-post__content{ font-size: 1.05rem; line-height: 1.9; }
.single-post__content img{ border-radius: var(--sn-radius-sm); }
.single-post__content h2, .single-post__content h3{ margin-top: 1.4em; }
.single-post__content a{ color: var(--sn-primary); text-decoration: underline; }

.single-post__tags{ margin-top: 20px; display: flex; gap: 8px; flex-wrap: wrap; }
.single-post__tags a{
	background: var(--sn-bg);
	border: 1px solid var(--sn-border);
	padding: 5px 12px;
	border-radius: 999px;
	font-size: .78rem;
}

.post-navigation{
	margin-top: 32px;
	padding-top: 20px;
	border-top: 1px solid var(--sn-border);
}
.post-navigation .nav-links{
	display: flex;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}
.post-navigation a{ font-weight: 700; color: var(--sn-primary); }

/* 10. Comments ------------------------------------------------------------------- */
.comments-area{ margin-top: 40px; }
.comments-title{ font-size: 1.3rem; }
.comment-list{ margin: 20px 0; }
.comment-list .comment{
	display: flex;
	gap: 14px;
	padding: 16px 0;
	border-bottom: 1px solid var(--sn-border);
}
.comment-list .avatar{ border-radius: 50%; flex-shrink: 0; }
.comment-author .fn{ font-weight: 700; font-style: normal; }
.comment-metadata{ font-size: .78rem; color: var(--sn-text-muted); }
.comment-list .children{ padding-inline-start: 40px; }
.comment-reply-link{ color: var(--sn-primary); font-weight: 700; font-size: .85rem; }

.comment-respond{ margin-top: 24px; }
.comment-form p{ margin-bottom: 14px; }
.comment-form label{ display: block; margin-bottom: 6px; font-weight: 600; font-size: .9rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea{
	width: 100%;
	padding: 12px 14px;
	border-radius: var(--sn-radius-sm);
	border: 1px solid var(--sn-border);
	background: var(--sn-surface);
	color: var(--sn-text);
}
.comment-form textarea{ resize: vertical; min-height: 120px; }

/* 11. Sidebar / Widgets ------------------------------------------------------------ */
.widget-area{ margin-top: 40px; }
.widget{
	background: var(--sn-surface);
	border-radius: var(--sn-radius);
	padding: 20px;
	margin-bottom: 20px;
	box-shadow: var(--sn-shadow);
}
.widget-title{ font-size: 1.05rem; margin-bottom: 14px; }
.widget ul li{ padding: 6px 0; border-bottom: 1px solid var(--sn-border); }
.widget ul li:last-child{ border-bottom: none; }

/* 12. Footer ------------------------------------------------------------------------ */
.site-footer{
	margin-top: 40px;
	background: var(--sn-surface);
	border-top: 1px solid var(--sn-border);
}
.footer-inner{
	max-width: var(--sn-max-width);
	margin: 0 auto;
	padding: 36px 20px 26px;
	text-align: center;
}
.footer-widgets{
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
	gap: 20px;
	text-align: right;
	margin-bottom: 20px;
}
.footer-menu-list{
	display: flex;
	justify-content: center;
	gap: 20px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}
.footer-menu-list a{ font-weight: 600; color: var(--sn-text-muted); }
.footer-menu-list a:hover{ color: var(--sn-primary); }
.site-info{ color: var(--sn-text-muted); font-size: .85rem; }
.site-info a{ color: var(--sn-primary); font-weight: 700; }

/* 13. 404 / No results ----------------------------------------------------------------- */
.error-404,
.no-results{
	text-align: center;
	padding: 60px 20px;
	max-width: 640px;
	margin: 0 auto;
}
.error-404__code{
	font-size: 5.5rem;
	font-weight: 800;
	color: var(--sn-primary);
	line-height: 1;
}
.error-404__title, .no-results__title{ font-size: 1.6rem; margin-top: 10px; }
.error-404__text, .no-results__text{ color: var(--sn-text-muted); margin-bottom: 26px; }
.error-404__search{ margin-bottom: 26px; }
.error-404__suggestions{ margin-top: 50px; text-align: right; }
.error-404__suggestions h2{ font-size: 1.2rem; margin-bottom: 18px; }
.no-results__icon{
	width: 64px; height: 64px;
	margin: 0 auto 16px;
	color: var(--sn-primary);
}
.no-results .search-form{ margin-bottom: 20px; }

/* 14. Dark mode extras --------------------------------------------------------------- */
html.dark-mode .shoofnet-card__badge,
html.dark-mode .shoofnet-card__duration{
	background: rgba(0,0,0,.6);
}
html.dark-mode .site-header{
	box-shadow: 0 2px 14px rgba(0,0,0,.5);
}

/* Prevent transition flash on load */
.no-transitions *{ transition: none !important; }

/* 15. Responsive ----------------------------------------------------------------------- */
@media (max-width: 1080px){
	.shoofnet-grid{ grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px){
	.header-search{ display: none; }

	.mobile-search-toggle{ display: flex; }

	.mobile-search-overlay{
		display: flex;
		position: absolute;
		inset: 0;
		align-items: center;
		gap: 10px;
		padding: 0 16px;
		background: linear-gradient(90deg, var(--sn-primary), var(--sn-primary-dark));
		z-index: 210;
		transform: translateY(-100%);
		opacity: 0;
		visibility: hidden;
		transition: transform 260ms cubic-bezier(.4,0,.2,1), opacity 260ms ease, visibility 260ms;
	}
	.mobile-search-overlay.is-open{
		transform: translateY(0);
		opacity: 1;
		visibility: visible;
	}

	.mobile-search-overlay__inner{
		display: flex;
		align-items: center;
		gap: 10px;
		width: 100%;
		min-width: 0;
	}

	.mobile-search-overlay .search-form{ flex: 1; min-width: 0; }
	.mobile-search-overlay .search-form__field{ max-width: none; margin: 0; width: 100%; }

	.mobile-search-close{
		display: flex;
		align-items: center;
		justify-content: center;
		width: 38px;
		height: 38px;
		border-radius: 50%;
		background: rgba(255,255,255,.18);
		color: #fff;
		flex-shrink: 0;
		transition: background var(--sn-transition), transform var(--sn-transition);
	}
	.mobile-search-close:hover{ background: rgba(255,255,255,.32); transform: rotate(90deg); }
	.mobile-search-close svg{ width: 18px; height: 18px; }

	.shoofnet-grid{ grid-template-columns: repeat(3, 1fr); }
	.content-wrap{ padding: 22px 16px 50px; }
	.single-post__title{ font-size: 1.5rem; }
	.error-404__suggestions .shoofnet-grid{ grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px){
	.shoofnet-grid{ grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

@media (max-width: 560px){
	:root{ --sn-header-h: 60px; }
	.header-inner{ padding: 0 12px; gap: 8px; }
	.header-side{ gap: 8px; }
	.drawer-toggle,
	.dark-mode-toggle,
	.mobile-search-toggle{ width: 38px; height: 38px; }
	.site-description{ display: none; }
	.mobile-search-overlay{ padding: 0 12px; }
	.shoofnet-grid{ grid-template-columns: repeat(2, 1fr); gap: 12px; }
	.shoofnet-card__body{ padding: 10px 12px 14px; }
	.shoofnet-card__title{ font-size: .86rem; }
	.shoofnet-card__meta{ font-size: .72rem; }
	.site-title{ font-size: 1.1rem; max-width: 40vw; }
	.error-404__code{ font-size: 4rem; }
	.footer-widgets{ text-align: center; }
}

@media (max-width: 380px){
	.header-inner{ padding: 0 8px; gap: 6px; }
	.header-side{ gap: 6px; }
	.drawer-toggle,
	.dark-mode-toggle,
	.mobile-search-toggle{ width: 36px; height: 36px; }
	.site-title{ font-size: 1rem; max-width: 32vw; }
	.mobile-search-overlay{ padding: 0 8px; gap: 8px; }
	.shoofnet-grid{ grid-template-columns: 1fr 1fr; gap: 10px; }
}
