/*
Theme Name:        Sanatan Sarita
Theme URI:         https://sanatansarita.com
Author:            Deepak
Author URI:        https://sanatansarita.com
Description:       A premium Hindi spiritual content WordPress theme for Sanatan Sarita — featuring cinematic hero layouts, Devanagari typography, category archives, and a devotional reading experience. Built for Upanishads, Bhagavad Gita, and Puranic content creators.
Version:           1.0.0
Requires at least: 6.4
Tested up to:      6.7
Requires PHP:      8.1
License:           GNU General Public License v2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       sanatan-sarita
Tags:              hindi, spiritual, devotional, blog, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, block-editor-styles, wide-blocks, full-site-editing
*/

/* =============================================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   All colors, fonts, and spacing pulled from your HTML design
   ============================================================= */

:root {
    /* Brand Colors */
    --ss-primary:          #800000;   /* Maroon — main brand */
    --ss-primary-dark:     #600000;   /* Darker maroon for hover */
    --ss-primary-light:    #9a0000;   /* Lighter maroon */
    --ss-accent:           #D97706;   /* Amber — accent highlights */
    --ss-accent-dark:      #B45309;   /* Amber dark */
    --ss-accent-light:     #FDE68A;   /* Amber light / backgrounds */

    /* Backgrounds */
    --ss-bg-soft:          #F9F7F2;   /* Warm off-white — body bg */
    --ss-bg-white:         #ffffff;
    --ss-bg-amber-light:   #FFFBEB;
    --ss-bg-dark:          #1a1a1a;   /* Footer dark bg */

    /* Text */
    --ss-text-main:        #1F2937;
    --ss-text-muted:       #6B7280;
    --ss-text-light:       #9CA3AF;
    --ss-text-white:       #ffffff;

    /* Borders */
    --ss-border:           #E5E7EB;
    --ss-border-dark:      #374151;

    /* Typography */
    --ss-font-body:        'Mukta', sans-serif;
    --ss-font-heading:     'Tiro Devanagari Hindi', serif;

    /* Font Sizes (fluid scale) */
    --ss-text-xs:          0.625rem;   /* 10px */
    --ss-text-sm:          0.875rem;   /* 14px */
    --ss-text-base:        1rem;       /* 16px */
    --ss-text-lg:          1.125rem;   /* 18px */
    --ss-text-xl:          1.25rem;    /* 20px */
    --ss-text-2xl:         1.5rem;     /* 24px */
    --ss-text-3xl:         1.875rem;   /* 30px */
    --ss-text-4xl:         2.25rem;    /* 36px */
    --ss-text-5xl:         3rem;       /* 48px */

    /* Spacing */
    --ss-space-xs:         0.5rem;
    --ss-space-sm:         1rem;
    --ss-space-md:         1.5rem;
    --ss-space-lg:         2rem;
    --ss-space-xl:         3rem;
    --ss-space-2xl:        5rem;

    /* Layout */
    --ss-max-width:        1200px;
    --ss-sidebar-width:    340px;
    --ss-content-width:    820px;
    --ss-nav-height:       80px;

    /* Shadows */
    --ss-shadow-sm:        0 1px 3px rgba(0,0,0,0.08);
    --ss-shadow-md:        0 4px 16px rgba(0,0,0,0.10);
    --ss-shadow-lg:        0 8px 32px rgba(0,0,0,0.14);

    /* Radius */
    --ss-radius-sm:        0.5rem;
    --ss-radius-md:        0.75rem;
    --ss-radius-lg:        1.25rem;
    --ss-radius-xl:        1.5rem;
    --ss-radius-full:      9999px;

    /* Transitions */
    --ss-transition:       all 0.25s ease;
    --ss-transition-slow:  all 0.5s ease;
}

/* =============================================================
   RESET & BASE — Minimal, non-conflicting with block editor
   ============================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--ss-font-body);
    background-color: var(--ss-bg-soft);
    color: var(--ss-text-main);
    line-height: 1.8;
    margin: 0;
    font-size: var(--ss-text-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--ss-transition);
}

a:focus-visible {
    outline: 3px solid var(--ss-accent);
    outline-offset: 3px;
    border-radius: 3px;
}

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

/* =============================================================
   WORDPRESS REQUIRED — Core alignment classes
   ============================================================= */

.alignleft {
    float: left;
    margin-right: var(--ss-space-md);
    margin-bottom: var(--ss-space-sm);
}

.alignright {
    float: right;
    margin-left: var(--ss-space-md);
    margin-bottom: var(--ss-space-sm);
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--ss-space-sm);
}

.alignwide {
    margin-left: calc(-1 * var(--ss-space-lg));
    margin-right: calc(-1 * var(--ss-space-lg));
}

.alignfull {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: 100vw;
    width: 100vw;
}

/* Screen reader text — required by WP */
.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 {
    background-color: var(--ss-bg-white);
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: var(--ss-primary);
    display: block;
    font-size: var(--ss-text-sm);
    font-weight: bold;
    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: -100%;
    left: 0;
    z-index: 999999;
    background: var(--ss-primary);
    color: var(--ss-text-white);
    padding: 0.75rem 1.5rem;
    font-weight: bold;
}

.skip-link:focus {
    top: 0;
}

/* =============================================================
   WORDPRESS COMMENTS — Default styling
   ============================================================= */

.comment-list {
    list-style: none;
    padding: 0;
}

.comment-body {
    padding: var(--ss-space-md) 0;
    border-bottom: 1px solid var(--ss-border);
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: var(--ss-space-sm);
    margin-bottom: var(--ss-space-xs);
}

.comment-author img {
    border-radius: var(--ss-radius-full);
    width: 48px;
    height: 48px;
}

.comment-author .fn {
    font-weight: 700;
    color: var(--ss-text-main);
}

.comment-metadata a {
    font-size: var(--ss-text-xs);
    color: var(--ss-text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.reply a {
    font-size: var(--ss-text-sm);
    font-weight: 700;
    color: var(--ss-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* =============================================================
   WORDPRESS PAGINATION — wp_link_pages, paginate_links
   ============================================================= */

.page-links,
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: var(--ss-space-xl);
}

.page-links a,
.page-links span,
.pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--ss-border);
    border-radius: var(--ss-radius-sm);
    font-weight: 700;
    font-size: var(--ss-text-sm);
    background: var(--ss-bg-white);
    color: var(--ss-text-main);
    transition: var(--ss-transition);
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background: var(--ss-primary);
    color: var(--ss-text-white);
    border-color: var(--ss-primary);
}

/* =============================================================
   WORDPRESS GALLERY
   ============================================================= */

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--ss-space-sm);
    margin: var(--ss-space-md) 0;
}

.gallery-item img {
    border-radius: var(--ss-radius-sm);
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* =============================================================
   STICKY POSTS
   ============================================================= */

.sticky {
    border-left: 4px solid var(--ss-accent);
}

/* =============================================================
   POST FORMAT BADGES — matches your category badge style
   ============================================================= */

.cat-badge {
    display: inline-block;
    font-size: var(--ss-text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ss-accent-dark);
    margin-bottom: var(--ss-space-xs);
}

/* =============================================================
   HINDI TITLE CLASS — matches your .hindi-title
   ============================================================= */

.hindi-title {
    font-family: var(--ss-font-heading);
}

/* Note: All layout, component, and page-specific CSS 
   lives in assets/css/main.css — loaded via enqueue.php */