/*
Theme Name: NaateKarim
Theme URI: https://naatekarim.com
Author: NaateKarim Team
Author URI: https://naatekarim.com
Description: A premium, fast, and SEO-friendly WordPress theme for Naat lyrics. Features Islamic design aesthetics, RTL support for Urdu/Arabic, custom post types for Naats, live AJAX search, audio player integration, and Schema.org structured data. Perfect for Naat, Hamd, Manqabat and Islamic poetry websites.
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: naatekarim
Tags: islamic, naat, urdu, rtl-language-support, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* =============================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ============================================= */
:root {
    /* Colors */
    --color-primary: #0D4F3C;
    --color-primary-dark: #092E23;
    --color-primary-light: #1A6B51;
    --color-gold: #C9A84C;
    --color-gold-light: #E2C46A;
    --color-gold-dark: #A07E32;
    --color-cream: #FAF6F0;
    --color-cream-dark: #F0E8DA;
    --color-white: #FFFFFF;
    --color-black: #111111;
    --color-text: #2C2C2C;
    --color-text-muted: #6B6B6B;
    --color-text-light: #9A9A9A;
    --color-border: #E5DDD0;
    --color-border-light: #F0E8DA;

    /* Semantic Colors */
    --color-bg: #FAF6F0;
    --color-surface: #FFFFFF;
    --color-surface-alt: #F5EFE6;

    /* Typography */
    --font-urdu: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', serif;
    --font-english: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Amiri', 'Times New Roman', serif;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 32px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(13,79,60,0.08), 0 1px 2px rgba(13,79,60,0.06);
    --shadow-md: 0 4px 16px rgba(13,79,60,0.10), 0 2px 6px rgba(13,79,60,0.08);
    --shadow-lg: 0 10px 40px rgba(13,79,60,0.12), 0 4px 12px rgba(13,79,60,0.08);
    --shadow-xl: 0 20px 60px rgba(13,79,60,0.15);
    --shadow-gold: 0 4px 20px rgba(201,168,76,0.25);

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

    /* Layout */
    --container-max: 1200px;
    --container-wide: 1400px;
    --sidebar-width: 320px;

    /* Z-Index */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 300;
    --z-overlay: 400;
    --z-toast: 500;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: #0A1A14;
        --color-surface: #0F2820;
        --color-surface-alt: #142E22;
        --color-text: #E8E0D0;
        --color-text-muted: #A0A890;
        --color-border: #1E3D2F;
    }
}

/* =============================================
   CSS RESET & BASE
   ============================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-english);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Images */
img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

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

a:hover {
    color: var(--color-gold);
}

a:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
    border-radius: 3px;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-english);
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-primary);
}

/* Lists */
ul, ol {
    padding-left: 1.5rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

/* Code */
code, pre {
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

/* =============================================
   UTILITY CLASSES
   ============================================= */
.container {
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
}

.container--wide {
    max-width: var(--container-wide);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-urdu {
    font-family: var(--font-urdu);
    direction: rtl;
    line-height: 2.2;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--color-gold), var(--color-gold-dark));
    color: var(--color-white);
}

.divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-gold), var(--color-gold-light));
    border-radius: var(--radius-full);
    margin: var(--space-md) auto;
}

/* =============================================
   WORDPRESS CORE CLASSES
   ============================================= */
.alignleft {
    float: left;
    margin-right: var(--space-lg);
    margin-bottom: var(--space-md);
}

.alignright {
    float: right;
    margin-left: var(--space-lg);
    margin-bottom: var(--space-md);
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--space-md);
}

.alignwide { margin-left: -5%; margin-right: -5%; }
.alignfull { margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%); max-width: 100vw; }

.wp-block-image figcaption,
figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: var(--space-sm);
    font-style: italic;
}

.wp-caption { max-width: 100%; }
.gallery { display: grid; gap: var(--space-md); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* =============================================
   SCREEN READER TEXT
   ============================================= */
.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;
    width: 1px;
    word-wrap: normal !important;
}

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

/* Skip link */
#skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 0.5rem 1rem;
    z-index: var(--z-toast);
    transition: top var(--transition-fast);
}

#skip-link:focus {
    top: 0;
}
