/*
Theme Name:   SMS Theme
Theme URI:    https://example.com/sms-theme
Description:  Clean school management theme that displays SMS plugin shortcodes. Pairs perfectly with the School Management System plugin.
Version:      1.0.0
Author:       Senior WP Developer
Text Domain:  sms-theme
Tags:         education, school, management, shortcodes, responsive
*/

/* ═══════════════════════════════════════════════
   CSS Variables
═══════════════════════════════════════════════ */
:root {
  --c-primary:    #1a56db;
  --c-primary-d:  #1341b0;
  --c-primary-l:  #e8f0fe;
  --c-accent:     #f59e0b;
  --c-bg:         #f0f4ff;
  --c-surface:    #ffffff;
  --c-border:     #e2e8f0;
  --c-text:       #1e293b;
  --c-text-2:     #64748b;
  --c-text-3:     #94a3b8;
  --c-sidebar-bg: #0f172a;
  --c-sidebar-tx: #cbd5e1;
  --c-sidebar-ac: #1a56db;
  --nav-w:        240px;
  --header-h:     64px;
  --radius:       10px;
  --shadow:       0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-lg:    0 10px 25px rgba(0,0,0,.1);
  --font-body:    'Plus Jakarta Sans', 'Nunito', -apple-system, sans-serif;
  --font-display: 'Outfit', 'Plus Jakarta Sans', sans-serif;
}

/* ═══════════════════════════════════════════════
   Reset & Base
═══════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ═══════════════════════════════════════════════
   Layout — Sidebar + Main
═══════════════════════════════════════════════ */
.sms-layout {
  display: flex;
  min-height: 100vh;
}

/* ─── Sidebar ─── */
.sms-sidebar {
  width: var(--nav-w);
  background: var(--c-sidebar-bg);
  color: var(--c-sidebar-tx);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  overflow-y: auto;
  z-index: 100;
  transition: transform .3s ease;
}
.sms-sidebar-brand {
  padding: 28px 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.sms-brand-logo {
  width: 48px; height: 48px;
  background: var(--c-primary);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 12px;
}
.sms-brand-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.sms-brand-tagline { font-size: 11px; color: #64748b; margin-top: 2px; }

.sms-nav { padding: 16px 12px; flex: 1; }
.sms-nav-section { margin-bottom: 24px; }
.sms-nav-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #475569;
  padding: 0 12px;
  margin-bottom: 6px;
}
.sms-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--c-sidebar-tx);
  font-size: 14px;
  font-weight: 500;
  transition: all .15s;
  margin-bottom: 2px;
  text-decoration: none;
}
.sms-nav-item:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.sms-nav-item.active, .sms-nav-item.current-menu-item {
  background: var(--c-primary);
  color: #fff;
}
.sms-nav-item .nav-icon { width: 20px; text-align: center; font-size: 1rem; flex-shrink: 0; }
.sms-nav-item .nav-badge {
  margin-left: auto;
  background: rgba(255,255,255,.15);
  color: #fff;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.sms-sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,.07);
  font-size: 12px;
  color: #475569;
}
.sms-sidebar-footer a { color: #64748b; }
.sms-sidebar-footer a:hover { color: #fff; }

/* ─── Main area ─── */
.sms-main {
  margin-left: var(--nav-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ─── Top header ─── */
.sms-header {
  height: var(--header-h);
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow);
}
.sms-header-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
  color: var(--c-text-2);
  padding: 6px;
}
.sms-header-breadcrumb {
  flex: 1;
  font-size: 14px;
  color: var(--c-text-2);
}
.sms-header-breadcrumb strong { color: var(--c-text); font-weight: 600; }
.sms-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sms-header-school {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-2);
}
.sms-user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-primary), #8b5cf6);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

/* ─── Page content ─── */
.sms-content {
  flex: 1;
  padding: 28px;
  max-width: 1400px;
  width: 100%;
}
.sms-page-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 6px;
}
.sms-page-subtitle {
  color: var(--c-text-2);
  font-size: 14px;
  margin-bottom: 28px;
}

/* ─── Page hero (home) ─── */
.sms-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 60%, #1a56db 100%);
  border-radius: 16px;
  padding: 48px;
  color: #fff;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}
.sms-hero::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 300px; height: 300px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
}
.sms-hero::after {
  content: '';
  position: absolute;
  bottom: -60px; right: 60px;
  width: 200px; height: 200px;
  background: rgba(255,255,255,.03);
  border-radius: 50%;
}
.sms-hero-content { position: relative; z-index: 1; }
.sms-hero h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.2;
}
.sms-hero p { color: rgba(255,255,255,.8); font-size: 15px; max-width: 500px; margin-bottom: 24px; }
.sms-hero-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.sms-hero-badge {
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.15);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,.9);
}

/* ─── Content card wrapper ─── */
.sms-card {
  background: var(--c-surface);
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow);
  padding: 24px;
}

/* ═══════════════════════════════════════════════
   Footer
═══════════════════════════════════════════════ */
.sms-footer {
  margin-top: auto;
  padding: 16px 28px;
  font-size: 12px;
  color: var(--c-text-3);
  border-top: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--c-surface);
  gap: 16px;
}

/* ═══════════════════════════════════════════════
   WordPress alignment & content
═══════════════════════════════════════════════ */
.sms-entry-content h1, .sms-entry-content h2, .sms-entry-content h3 { margin: 24px 0 12px; }
.sms-entry-content p   { margin-bottom: 16px; }
.sms-entry-content ul, .sms-entry-content ol { margin: 0 0 16px 24px; }
.wp-block-image { margin: 16px 0; }

/* ═══════════════════════════════════════════════
   Responsive
═══════════════════════════════════════════════ */
@media (max-width: 900px) {
  .sms-sidebar {
    transform: translateX(-100%);
  }
  .sms-sidebar.is-open {
    transform: translateX(0);
  }
  .sms-main {
    margin-left: 0;
  }
  .sms-header-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .sms-content { padding: 20px 16px; }
  .sms-hero { padding: 28px 24px; }
  .sms-hero h1 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  .sms-content { padding: 16px 12px; }
}

/* ── Overlay for mobile nav ── */
.sms-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 90;
}
.sms-overlay.is-visible { display: block; }

/* ── Print ── */
@media print {
  .sms-sidebar, .sms-header, .sms-footer { display: none; }
  .sms-main { margin: 0; }
  .sms-content { padding: 0; }
}
