/*
Theme Name: SchoolHub
Theme URI: https://webstudio.attizazllc.com
Author: Attizaz LLC
Author URI: https://webstudio.attizazllc.com
Description: A school website and portal theme. Public homepage, events, notices, login page and a role-based dashboard for teachers, students and parents.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: schoolhub
*/

:root {
	--sh-primary: #1d4ed8;
	--sh-primary-dark: #1e3a8a;
	--sh-accent: #f59e0b;
	--sh-bg: #f8fafc;
	--sh-card: #ffffff;
	--sh-text: #0f172a;
	--sh-muted: #64748b;
	--sh-border: #e2e8f0;
	--sh-radius: 12px;
	--sh-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Nastaliq Urdu", Arial, sans-serif;
	background: var(--sh-bg);
	color: var(--sh-text);
	line-height: 1.65;
}

img { max-width: 100%; height: auto; }
a { color: var(--sh-primary); }
a:hover { color: var(--sh-primary-dark); }

.sh-container { width: min(1120px, 92%); margin-inline: auto; }

/* Header */
.sh-header { background: var(--sh-card); border-bottom: 1px solid var(--sh-border); position: sticky; top: 0; z-index: 50; }
.sh-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }
.sh-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--sh-text); }
.sh-brand .custom-logo { max-height: 48px; width: auto; }
.sh-brand-name { font-size: 1.25rem; font-weight: 700; }
.sh-brand-tag { display: block; font-size: 0.8rem; color: var(--sh-muted); font-weight: 400; }

.sh-nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; flex-wrap: wrap; }
.sh-nav a { display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--sh-text); font-weight: 500; }
.sh-nav a:hover, .sh-nav .current-menu-item > a { background: var(--sh-bg); color: var(--sh-primary); }

.sh-menu-toggle { display: none; background: none; border: 1px solid var(--sh-border); border-radius: 8px; padding: 8px 12px; font-size: 1rem; cursor: pointer; }

/* Buttons */
.sh-btn { display: inline-block; padding: 11px 22px; border-radius: 10px; background: var(--sh-primary); color: #fff !important; text-decoration: none; font-weight: 600; border: 0; cursor: pointer; font-size: 1rem; }
.sh-btn:hover { background: var(--sh-primary-dark); }
.sh-btn-light { background: #fff; color: var(--sh-primary) !important; }
.sh-btn-light:hover { background: #eff6ff; }
.sh-btn-outline { background: transparent; border: 2px solid #fff; }

/* Hero */
.sh-hero { background: linear-gradient(135deg, var(--sh-primary), var(--sh-primary-dark)); color: #fff; padding: 80px 0; }
.sh-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 12px; line-height: 1.2; }
.sh-hero p { font-size: 1.15rem; max-width: 640px; margin: 0 0 28px; opacity: 0.95; }
.sh-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Sections */
.sh-section { padding: 56px 0; }
.sh-section-title { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; gap: 12px; }
.sh-section-title h2 { margin: 0; font-size: 1.6rem; }

.sh-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.sh-card { background: var(--sh-card); border: 1px solid var(--sh-border); border-radius: var(--sh-radius); box-shadow: var(--sh-shadow); padding: 20px; }
.sh-card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.sh-card p { margin: 0 0 8px; color: var(--sh-muted); }

.sh-feature-icon { font-size: 1.8rem; display: block; margin-bottom: 8px; }

/* Events */
.sh-event { display: flex; gap: 16px; }
.sh-date { flex: 0 0 64px; text-align: center; background: var(--sh-primary); color: #fff; border-radius: 10px; padding: 8px 4px; line-height: 1.1; align-self: flex-start; }
.sh-date strong { display: block; font-size: 1.5rem; }
.sh-date span { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.sh-event h3 a { text-decoration: none; color: var(--sh-text); }
.sh-meta { font-size: 0.85rem; color: var(--sh-muted); }

/* Notices */
.sh-notice { border-left: 4px solid var(--sh-accent); }
.sh-badge { display: inline-block; background: #fef3c7; color: #92400e; border-radius: 999px; padding: 2px 10px; font-size: 0.75rem; font-weight: 600; }

/* Content */
.sh-content { background: var(--sh-card); border: 1px solid var(--sh-border); border-radius: var(--sh-radius); padding: 32px; margin: 40px 0; }
.sh-content h1 { margin-top: 0; }
.sh-page-head { background: #fff; border-bottom: 1px solid var(--sh-border); padding: 32px 0; }
.sh-page-head h1 { margin: 0; }

/* Login */
.sh-login-wrap { max-width: 420px; margin: 56px auto; }
.sh-login-wrap form p { margin: 0 0 14px; }
.sh-login-wrap label { display: block; font-weight: 600; margin-bottom: 4px; }
.sh-login-wrap input[type="text"],
.sh-login-wrap input[type="password"] { width: 100%; padding: 11px 12px; border: 1px solid var(--sh-border); border-radius: 8px; font-size: 1rem; }
.sh-login-wrap input[type="submit"] { width: 100%; padding: 12px; background: var(--sh-primary); color: #fff; border: 0; border-radius: 10px; font-size: 1rem; font-weight: 600; cursor: pointer; }
.sh-login-error { background: #fee2e2; color: #991b1b; padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }

/* Dashboard */
.sh-dash-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin: 32px 0 8px; }
.sh-role-pill { background: #dbeafe; color: var(--sh-primary-dark); border-radius: 999px; padding: 4px 14px; font-weight: 600; font-size: 0.85rem; text-transform: capitalize; }
.sh-dash-card { text-decoration: none; color: var(--sh-text); display: block; transition: transform 0.15s; }
.sh-dash-card:hover { transform: translateY(-3px); }
.sh-dash-card .sh-feature-icon { margin-bottom: 4px; }

/* Footer */
.sh-footer { background: #0f172a; color: #cbd5e1; padding: 40px 0 20px; margin-top: 40px; }
.sh-footer a { color: #e2e8f0; }
.sh-footer-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.sh-footer h4 { color: #fff; margin: 0 0 10px; }
.sh-footer ul { list-style: none; margin: 0; padding: 0; }
.sh-copy { border-top: 1px solid #1e293b; margin-top: 28px; padding-top: 16px; font-size: 0.85rem; text-align: center; }

/* Pagination */
.sh-pagination { margin: 24px 0; display: flex; gap: 8px; flex-wrap: wrap; }
.sh-pagination a, .sh-pagination span { padding: 6px 12px; border: 1px solid var(--sh-border); border-radius: 8px; text-decoration: none; background: #fff; }
.sh-pagination .current { background: var(--sh-primary); color: #fff; border-color: var(--sh-primary); }

/* RTL (Urdu) */
body.rtl { direction: rtl; }
body.rtl .sh-notice { border-left: 1px solid var(--sh-border); border-right: 4px solid var(--sh-accent); }

/* Mobile */
@media (max-width: 800px) {
	.sh-menu-toggle { display: block; }
	.sh-nav { display: none; width: 100%; }
	.sh-nav.is-open { display: block; }
	.sh-nav ul { flex-direction: column; }
	.sh-header-inner { flex-wrap: wrap; }
	.sh-hero { padding: 56px 0; }
	.sh-content { padding: 20px; }
}

.screen-reader-text { position: absolute; left: -9999px; }
