/*
Theme Name: Alpha Theme
Theme URI: https://github.com/example/alpha-theme
Author: Alpha Theme Dev Team
Author URI: https://example.com/
Description: A modern, production-ready, ultra-fast WordPress theme purpose-built for Pakistani government schemes, educational grants, BISP/Ehsaas programs, scholarships, and public welfare portals. Features mobile-first responsive architecture, Google AdSense CLS-optimized ad placements, automatic Table of Contents, FAQ schema markup, dynamic ads.txt, dark mode, RTL/Urdu typography, and full WCAG 2.1 AA accessibility.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: alpha-theme
Domain Path: /languages
Tags: news, blog, government-schemes, scholarships, bisp, two-columns, custom-header, custom-menu, featured-images, flexible-header, full-width-template, rtl-language-support, sticky-post, theme-options, translation-ready

Alpha Theme WordPress Theme, (C) 2026 Alpha Theme Dev Team
Alpha Theme is distributed under the terms of the GNU GPL.
*/

/* ==========================================================================
   CSS Custom Properties & Design Tokens
   ========================================================================== */
:root {
  /* Color Palette - Pakistan Green & Trust Accents */
  --color-primary: #005d32;
  --color-primary-hover: #004525;
  --color-primary-light: #e8f5ed;
  --color-primary-rgb: 0, 93, 50;

  --color-secondary: #0a8451;
  --color-secondary-hover: #086b41;

  --color-accent: #d97706;
  --color-accent-hover: #b45309;
  --color-accent-light: #fef3c7;

  --color-danger: #dc2626;
  --color-danger-light: #fee2e2;
  --color-success: #16a34a;
  --color-success-light: #dcfce7;
  --color-warning: #f59e0b;
  --color-warning-light: #fef9c3;
  --color-info: #0284c7;
  --color-info-light: #e0f2fe;

  /* Neutrals & Surfaces */
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-elevated: #ffffff;
  --color-border: #e2e8f0;
  --color-border-subtle: #f1f5f9;

  /* Typography Colors */
  --color-text-main: #1e293b;
  --color-text-muted: #64748b;
  --color-text-subtle: #94a3b8;
  --color-text-inverse: #ffffff;

  /* Typography Scales */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-serif: 'Georgia', Cambria, 'Times New Roman', Times, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-urdu: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', 'Urdu Typesetting', Tahoma, sans-serif;

  --font-size-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);
  --font-size-sm: clamp(0.8125rem, 0.78rem + 0.2vw, 0.875rem);
  --font-size-base: clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem);
  --font-size-md: clamp(1.0625rem, 1rem + 0.35vw, 1.1875rem);
  --font-size-lg: clamp(1.1875rem, 1.1rem + 0.45vw, 1.375rem);
  --font-size-xl: clamp(1.375rem, 1.25rem + 0.65vw, 1.625rem);
  --font-size-2xl: clamp(1.625rem, 1.45rem + 0.9vw, 2rem);
  --font-size-3xl: clamp(2rem, 1.7rem + 1.5vw, 2.625rem);

  --line-height-tight: 1.25;
  --line-height-normal: 1.6;
  --line-height-loose: 1.8;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Layout */
  --container-max: 1280px;
  --container-narrow: 860px;
  --header-height: 70px;
  --topbar-height: 40px;
  --sidebar-width: 340px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 12px 24px -4px rgba(0, 93, 50, 0.12);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Ad Dimensions to prevent CLS */
  --ad-height-leaderboard: 90px;
  --ad-height-rectangle: 250px;
  --ad-height-large-rectangle: 280px;
  --ad-height-banner: 100px;
}

/* ==========================================================================
   Dark Mode Custom Properties
   ========================================================================== */
[data-theme="dark"] {
  --color-primary: #10b981;
  --color-primary-hover: #34d399;
  --color-primary-light: rgba(16, 185, 129, 0.12);
  --color-primary-rgb: 16, 185, 129;

  --color-secondary: #059669;
  --color-secondary-hover: #10b981;

  --color-accent: #fbbf24;
  --color-accent-hover: #f59e0b;
  --color-accent-light: rgba(251, 191, 36, 0.12);

  --color-bg: #0f172a;
  --color-surface: #1e293b;
  --color-surface-elevated: #334155;
  --color-border: #334155;
  --color-border-subtle: #1e293b;

  --color-text-main: #f1f5f9;
  --color-text-muted: #94a3b8;
  --color-text-subtle: #64748b;
  --color-text-inverse: #0f172a;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
  --shadow-hover: 0 12px 24px -4px rgba(16, 185, 129, 0.2);
}

/* ==========================================================================
   CSS Reset & Base Rules
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: var(--line-height-normal);
  color: var(--color-text-main);
  background-color: var(--color-bg);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-color: var(--color-bg);
  color: var(--color-text-main);
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: var(--line-height-tight);
  font-weight: 700;
  color: var(--color-text-main);
  margin-bottom: var(--space-3);
}

h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }
h5 { font-size: var(--font-size-md); }
h6 { font-size: var(--font-size-base); }

p {
  margin-bottom: var(--space-4);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover,
a:focus-visible {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

ul,
ol {
  list-style-position: inside;
  margin-bottom: var(--space-4);
}

/* ==========================================================================
   Accessibility & Screen Readers
   ========================================================================== */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: var(--color-surface);
  border-radius: var(--radius-sm);
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  clip-path: none;
  color: var(--color-primary);
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 700;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

