/*
Theme Name: Mero Enotes
Theme URI: https://meroenotes.com
Author: Mero Enotes Team
Author URI: https://meroenotes.com
Description: A modern WordPress theme for free handwritten notes and question papers for Nepal NEB students. Built with clean design, responsive layouts, and optimized for educational content delivery.
Version: 1.0.0
Tested up to: 6.4
Requires at least: 6.0
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: mero-enotes
Tags: education, blog, custom-menu, featured-images, footer-widgets, theme-options, translation-ready
*/

/* ========================================
   CSS Custom Properties (Design Tokens)
   ======================================== */
:root {
    /* Brand Colors */
    --color-primary: #E8311A;
    --color-primary-hover: #C9280F;
    --color-primary-light: rgba(232, 49, 26, 0.1);
    --color-navy-dark: #0F1F3D;
    --color-navy-medium: #1A3A6B;
    --color-navy-light: #243F6C;
    --color-white: #FFFFFF;
    --color-light-gray: #F7F8FA;
    --color-body-text: #1C2B3A;
    --color-muted: #637083;
    --color-border: #E8ECF0;

    /* Accent Colors for Subject Cards */
    --color-blue: #2563EB;
    --color-green: #16A34A;
    --color-teal: #059669;
    --color-purple: #7C3AED;
    --color-yellow: #D97706;
    --color-red: #DC2626;
    --color-cyan: #0891B2;
    --color-orange: #EA580C;
    --color-pink: #DB2777;
    --color-indigo: #4338CA;
    --color-lime: #65A30D;
    --color-rose: #E11D48;
    --color-slate: #475569;

    /* Typography */
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Hind', sans-serif;
    --font-display: 'Fraunces', serif;

    /* Font Weights */
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-bold: 700;
    --fw-extrabold: 800;
    --fw-black: 900;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.07);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.12);

    /* Spacing */
    --section-padding: 72px;
    --container-max: 1280px;
    --container-padding: 24px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ========================================
   Global Reset
   ======================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-weight: var(--fw-regular);
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-body-text);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: var(--fw-bold);
    line-height: 1.25;
    color: var(--color-navy-dark);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
}

h2 {
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
}

h3 {
    font-size: clamp(1.15rem, 2.5vw, 1.5rem);
}

h4 {
    font-size: 1.125rem;
}

p {
    margin-bottom: 1rem;
    color: var(--color-body-text);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul,
ol {
    list-style: none;
}

button,
input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    border: none;
    outline: none;
    background: none;
}

button {
    cursor: pointer;
}

/* ========================================
   Utility Classes
   ======================================== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section-padding {
    padding: var(--section-padding) 0;
}

.bg-white {
    background-color: var(--color-white);
}

.bg-light {
    background-color: var(--color-light-gray);
}

.bg-navy {
    background-color: var(--color-navy-dark);
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--color-muted);
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.section-title {
    font-weight: var(--fw-extrabold);
    margin-bottom: 12px;
}

.section-subtitle {
    color: var(--color-muted);
    font-size: 1.05rem;
    max-width: 600px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-header-content {
    flex: 1;
}

.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-heading);
    font-weight: var(--fw-bold);
    font-size: 0.95rem;
    color: var(--color-primary);
    transition: gap var(--transition-fast);
    white-space: nowrap;
}

.view-all-link:hover {
    gap: 10px;
    color: var(--color-primary-hover);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: var(--fw-bold);
    font-size: 0.95rem;
    padding: 12px 28px;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    cursor: pointer;
    border: 2px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 49, 26, 0.35);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-white);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline:hover {
    background-color: var(--color-white);
    color: var(--color-navy-dark);
    border-color: var(--color-white);
    transform: translateY(-2px);
}

/* Screen Reader Only */
.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;
}

/* WordPress Alignment */
.alignwide {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

/* Animate on scroll */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}