/*
Theme Name: Maram Developer Blog
Theme URI: https://blog.maram.iq
Author: Maram Host
Author URI: https://maram.iq
Description: A stunning, professional developer blog theme for Maram Host - Iraqi web hosting and design company.
Version: 3.0.0
License: GNU General Public License v2 or later
Text Domain: maram-developer-blog
Tags: blog, rtl-language-support, custom-logo, custom-menu, featured-images, threaded-comments
*/

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

:root {
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --primary-light: #818cf8;
    --primary-ultra-light: #eef2ff;
    --accent: #f43f5e;
    --accent-dark: #e11d48;
    --accent-light: #fda4af;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-gray: #f1f5f9;
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-light: #cbd5e1;
    --text-white: #ffffff;
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0,0,0,0.25);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    --font-main: 'Readex Pro', sans-serif;
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    --container-max: 1280px;
    --header-height: 80px;
}

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

body {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.75;
    color: var(--text-primary);
    background-color: var(--bg-white);
    direction: rtl;
    text-align: right;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

a:hover {
    color: var(--primary-dark);
}

ul, ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.375rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.section-title {
    font-size: 2.25rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-lg);
    font-family: var(--font-main);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    line-height: 1.5;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--text-white);
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
    color: var(--text-white);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: var(--text-white);
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.4);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.5);
    color: var(--text-white);
}

.btn-outline {
    background: transparent;
    color: var(--text-white);
    border: 2px solid rgba(255,255,255,0.4);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.8);
    color: var(--text-white);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2.25rem;
    font-size: 1.0625rem;
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    transition: all var(--transition-base);
    height: var(--header-height);
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-lg);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.site-logo img {
    height: 45px;
    width: auto;
    transition: transform var(--transition-base);
}

.site-logo:hover img {
    transform: scale(1.05);
}

.main-navigation {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.main-navigation ul {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    color: var(--primary);
    background: var(--primary-ultra-light);
}

.main-navigation .sub-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 220px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light);
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-base);
    flex-direction: column;
    z-index: 100;
}

.main-navigation li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-navigation .sub-menu a {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-search-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--bg-gray);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1.125rem;
}

.header-search-toggle:hover {
    background: var(--primary-ultra-light);
    color: var(--primary);
}

.header-cta {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--text-white) !important;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all var(--transition-base);
}

.header-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
    color: var(--text-white) !important;
}

.mobile-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--bg-gray);
    border-radius: var(--radius-md);
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 12px;
}

.mobile-menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-base);
}

/* Search overlay */
.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay-inner {
    width: 90%;
    max-width: 640px;
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-2xl);
    transform: translateY(-20px);
    transition: transform var(--transition-base);
}

.search-overlay.active .search-overlay-inner {
    transform: translateY(0);
}

.search-overlay form {
    display: flex;
    gap: 0.75rem;
}

.search-overlay input[type="search"] {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    font-family: var(--font-main);
    font-size: 1rem;
    outline: none;
    transition: border-color var(--transition-fast);
    direction: rtl;
}

.search-overlay input[type="search"]:focus {
    border-color: var(--primary);
}

.search-overlay button {
    padding: 0.875rem 1.5rem;
    background: var(--primary);
    color: var(--text-white);
    border: none;
    border-radius: var(--radius-lg);
    font-family: var(--font-main);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.search-overlay button:hover {
    background: var(--primary-dark);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--header-height) + 3rem) 1.5rem 4rem;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 40%, #312e81 70%, #3730a3 100%);
}

.hero-bg-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    mix-blend-mode: luminosity;
}

.hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-particles .particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(129, 140, 248, 0.5);
    border-radius: 50%;
    animation: float-particle 6s infinite ease-in-out;
}

@keyframes float-particle {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0; }
    25% { opacity: 1; }
    50% { transform: translateY(-100px) translateX(30px); opacity: 0.5; }
    75% { opacity: 0.3; }
}

.hero-grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(79, 70, 229, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 70, 229, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
}

.hero-logo {
    margin-bottom: 2rem;
}

.hero-logo img {
    height: 70px;
    margin: 0 auto;
    filter: drop-shadow(0 4px 20px rgba(79, 70, 229, 0.3));
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(79, 70, 229, 0.2);
    border: 1px solid rgba(129, 140, 248, 0.3);
    color: var(--primary-light);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(4px);
}

.hero-title {
    font-size: 3.25rem;
    font-weight: 800;
    color: var(--text-white);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-title .gradient-text {
    background: linear-gradient(135deg, #818cf8, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.1875rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3.5rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-white);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.hero-stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
    opacity: 0.7;
}

/* ============================================
   BLOG POSTS GRID
   ============================================ */
.posts-section {
    padding: 5rem 0;
    background: var(--bg-light);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.blog-card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.blog-card-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.08);
}

.blog-card-category {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--text-white);
    padding: 0.3rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.blog-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.blog-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.blog-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.blog-card-title a {
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

.blog-card-title a:hover {
    color: var(--primary);
}

.blog-card-excerpt {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.25rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.blog-card-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-card-author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 0.75rem;
    font-weight: 700;
}

.blog-card-author-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.blog-card-read-more {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: gap var(--transition-fast);
}

.blog-card-read-more:hover {
    gap: 0.5rem;
}

/* ============================================
   SERVICES SECTION
   ============================================ */
.services-section {
    padding: 5rem 0;
    background: var(--bg-white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.service-card {
    padding: 2rem 1.5rem;
    border-radius: var(--radius-xl);
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    text-align: center;
    transition: all var(--transition-base);
    text-decoration: none;
    display: block;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
    background: var(--primary-ultra-light);
}

.service-card-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--text-white);
    transition: transform var(--transition-base);
}

.service-card:hover .service-card-icon {
    transform: scale(1.1) rotate(-5deg);
}

.service-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.service-card-desc {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* CTA Banner */
.cta-banner {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary-dark), #1e1b4b);
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(129, 140, 248, 0.15), transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(244, 63, 94, 0.1), transparent 50%);
}

.cta-content {
    position: relative;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    color: var(--text-white);
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.cta-content p {
    color: var(--text-light);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--bg-dark);
    color: var(--text-light);
    padding-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-col h3 {
    color: var(--text-white);
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
}

.footer-about p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all var(--transition-base);
    font-size: 1.125rem;
}

.footer-social a:hover {
    background: var(--primary);
    color: var(--text-white);
    transform: translateY(-2px);
}

.footer-links li {
    margin-bottom: 0.625rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: var(--text-white);
    padding-right: 0.25rem;
}

.footer-links a::before {
    content: '\2190';
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.footer-links a:hover::before {
    opacity: 1;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.footer-contact-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: rgba(79, 70, 229, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
    flex-shrink: 0;
    font-size: 0.875rem;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-bottom a {
    color: var(--primary-light);
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

/* ============================================
   SINGLE POST
   ============================================ */
.single-hero {
    padding: calc(var(--header-height) + 3rem) 0 3rem;
    background: linear-gradient(135deg, #0f172a, #1e1b4b);
}

.single-hero-inner {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.single-hero .post-category-badge {
    display: inline-block;
    background: rgba(79, 70, 229, 0.2);
    color: var(--primary-light);
    padding: 0.35rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(129, 140, 248, 0.2);
}

.single-hero h1 {
    color: var(--text-white);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.single-post-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
    flex-wrap: wrap;
}

.single-post-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.single-content-area {
    padding: 3rem 0 5rem;
}

.single-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.post-featured-image {
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.post-featured-image img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.post-content {
    font-size: 1.0625rem;
    line-height: 2;
    color: var(--text-secondary);
}

.post-content h2 {
    font-size: 1.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.post-content h3 {
    font-size: 1.375rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content ul, .post-content ol {
    margin-bottom: 1.5rem;
    padding-right: 1.5rem;
}

.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content blockquote {
    border-right: 4px solid var(--primary);
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    background: var(--primary-ultra-light);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--text-primary);
}

.post-content code {
    background: var(--bg-gray);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
}

.post-content pre {
    background: var(--bg-dark);
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.post-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

.post-content img {
    border-radius: var(--radius-lg);
    margin: 1.5rem 0;
}

/* Share buttons */
.post-share {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.post-share-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 1rem;
    transition: all var(--transition-base);
    text-decoration: none;
}

.share-btn:hover {
    transform: translateY(-2px);
    color: var(--text-white);
}

.share-btn.twitter { background: #1da1f2; }
.share-btn.facebook { background: #1877f2; }
.share-btn.linkedin { background: #0a66c2; }
.share-btn.whatsapp { background: #25d366; }

/* Related posts */
.related-posts {
    padding: 4rem 0;
    background: var(--bg-light);
}

/* Post tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
}

.post-tags a {
    background: var(--bg-gray);
    color: var(--text-secondary);
    padding: 0.35rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    transition: all var(--transition-fast);
}

.post-tags a:hover {
    background: var(--primary);
    color: var(--text-white);
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
}

.sidebar-widget {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-light);
}

.sidebar-widget h3 {
    font-size: 1.0625rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-ultra-light);
    position: relative;
}

.sidebar-widget h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 40px;
    height: 2px;
    background: var(--primary);
}

.sidebar-widget ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-widget ul li:last-child {
    border-bottom: none;
}

.sidebar-widget ul li a {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-widget ul li a:hover {
    color: var(--primary);
}

/* Popular Posts Widget */
.popular-posts-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.popular-post-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.625rem;
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    text-decoration: none;
    border: 1px solid transparent;
}

.popular-post-item:hover {
    background: var(--bg-gray);
    border-color: var(--border-light);
    transform: translateX(-4px);
}

.popular-post-thumb {
    position: relative;
    width: 72px;
    height: 72px;
    min-width: 72px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.popular-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.popular-post-item:hover .popular-post-thumb img {
    transform: scale(1.1);
}

.popular-post-number {
    position: absolute;
    top: 0;
    right: 0;
    width: 22px;
    height: 22px;
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 var(--radius-md) 0 var(--radius-md);
}

.popular-post-info {
    flex: 1;
    min-width: 0;
}

.popular-post-info h4 {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-primary);
    margin: 0 0 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition-base);
}

.popular-post-item:hover .popular-post-info h4 {
    color: var(--primary);
}

.popular-post-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.sidebar-cta {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    text-align: center;
    border: none;
}

.sidebar-cta h3 {
    color: var(--text-white);
    border-bottom-color: rgba(255,255,255,0.2);
}

.sidebar-cta h3::after {
    background: var(--accent);
}

.sidebar-cta p {
    color: rgba(255,255,255,0.8);
    font-size: 0.9375rem;
    margin-bottom: 1.25rem;
}

/* ============================================
   ARCHIVE / CATEGORY PAGE
   ============================================ */
.archive-header {
    padding: calc(var(--header-height) + 3rem) 0 3rem;
    background: linear-gradient(135deg, #0f172a, #1e1b4b);
    text-align: center;
}

.archive-header h1 {
    color: var(--text-white);
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
}

.archive-header p {
    color: var(--text-light);
    font-size: 1.0625rem;
}

.archive-content {
    padding: 4rem 0;
    background: var(--bg-light);
}

/* ============================================
   COMMENTS
   ============================================ */
.comments-area {
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border-light);
}

.comments-title {
    font-size: 1.375rem;
    margin-bottom: 2rem;
}

.comment-list .comment {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
}

.comment-list .children {
    padding-right: 2rem;
    margin-top: 1rem;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.comment-meta img {
    border-radius: 50%;
}

.comment-author {
    font-weight: 700;
    color: var(--text-primary);
}

.comment-date {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.comment-body p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.comment-reply-link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
}

.comment-respond {
    margin-top: 2.5rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    font-family: var(--font-main);
    font-size: 0.9375rem;
    transition: border-color var(--transition-fast);
    direction: rtl;
    margin-bottom: 1rem;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--primary);
    outline: none;
}

.comment-form .form-submit input {
    background: var(--primary);
    color: var(--text-white);
    padding: 0.75rem 2rem;
    border: none;
    border-radius: var(--radius-lg);
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.comment-form .form-submit input:hover {
    background: var(--primary-dark);
}

/* ============================================
   SEARCH PAGE
   ============================================ */
.search-results-header {
    padding: calc(var(--header-height) + 3rem) 0 2rem;
    background: linear-gradient(135deg, #0f172a, #1e1b4b);
    text-align: center;
}

.search-results-header h1 {
    color: var(--text-white);
    font-size: 2rem;
}

.search-results-header .search-query {
    color: var(--primary-light);
}

/* ============================================
   404 PAGE
   ============================================ */
.error-404-section {
    padding: calc(var(--header-height) + 4rem) 0 4rem;
    text-align: center;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
}

.error-404-number {
    font-size: 8rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 1rem;
}

.error-404-section h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.error-404-section p {
    font-size: 1.0625rem;
    margin-bottom: 2rem;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--bg-white);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9375rem;
    border: 1px solid var(--border-light);
    transition: all var(--transition-fast);
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--primary);
    color: var(--text-white);
    border-color: var(--primary);
}

/* ============================================
   PAGE TEMPLATE
   ============================================ */
.page-hero {
    padding: calc(var(--header-height) + 3rem) 0 3rem;
    background: linear-gradient(135deg, #0f172a, #1e1b4b);
    text-align: center;
}

.page-hero h1 {
    color: var(--text-white);
    font-size: 2.5rem;
}

.page-content-area {
    padding: 4rem 0;
}

.page-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.0625rem;
    line-height: 2;
}

/* Landing page template */
.landing-hero {
    padding: calc(var(--header-height) + 4rem) 0 4rem;
    background: linear-gradient(135deg, #0f172a, #1e1b4b, #312e81);
    text-align: center;
}

.landing-hero h1 {
    color: var(--text-white);
    font-size: 3rem;
    margin-bottom: 1.25rem;
}

.landing-hero .subtitle {
    color: var(--text-light);
    font-size: 1.1875rem;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.landing-features {
    padding: 5rem 0;
    background: var(--bg-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius-xl);
    text-align: center;
    border: 1px solid var(--border-light);
    transition: all var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    border-radius: var(--radius-lg);
    background: var(--primary-ultra-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--primary);
}

.feature-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

/* ============================================
   ANIMATIONS
   ============================================ */
.animate-on-scroll{opacity:1;transform:translateY(0);transition:opacity .6s ease,transform .6s ease;}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

.animate-delay-1 { transition-delay: 0.1s; }
.animate-delay-2 { transition-delay: 0.2s; }
.animate-delay-3 { transition-delay: 0.3s; }
.animate-delay-4 { transition-delay: 0.4s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .single-layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: static;
    }
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 64px;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.375rem; }

    .main-navigation, .header-cta {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-nav {
        position: fixed;
        top: var(--header-height);
        right: 0;
        width: 300px;
        height: calc(100vh - var(--header-height));
        background: var(--bg-white);
        box-shadow: var(--shadow-2xl);
        z-index: 999;
        padding: 1.5rem;
        transform: translateX(100%);
        transition: transform var(--transition-base);
        overflow-y: auto;
    }

    .mobile-nav.active {
        transform: translateX(0);
    }

    .mobile-nav ul {
        display: flex;
        flex-direction: column;
    }

    .mobile-nav li a {
        display: block;
        padding: 0.75rem 0;
        color: var(--text-primary);
        font-weight: 500;
        border-bottom: 1px solid var(--border-light);
    }

    .mobile-nav .sub-menu {
        padding-right: 1rem;
    }

    .mobile-nav .sub-menu a {
        font-size: 0.9375rem;
        color: var(--text-secondary);
    }

    .hero-section {
        min-height: auto;
        padding-top: calc(var(--header-height) + 2rem);
        padding-bottom: 3rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .hero-stat-number {
        font-size: 1.75rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .single-hero h1 {
        font-size: 1.75rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .landing-hero h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.25rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* ============================================
   WORDPRESS CORE STYLES
   ============================================ */
.wp-block-image {
    margin-bottom: 1.5rem;
}

.alignleft {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.alignright {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.aligncenter {
    display: block;
    margin: 0 auto 1.5rem;
}

.wp-caption-text {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.5rem;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Back to top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: var(--text-white);
    border: none;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-lg);
    z-index: 99;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Services page template */
.services-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

@media (max-width: 768px) {
    .services-page-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
        padding: 1.5rem 0;
    }
    .services-page-card {
        padding: 1.5rem 1.25rem;
    }
    .services-page-card .icon {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    .services-page-card h3 {
        font-size: 1.1rem;
    }
    .services-page-card .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .services-page-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.services-page-card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem;
    border: 1px solid var(--border-light);
    text-align: center;
    transition: all var(--transition-base);
}

.services-page-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.services-page-card .icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, var(--primary-ultra-light), rgba(79, 70, 229, 0.12));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    transition: all var(--transition-base);
}

.services-page-card:hover .icon {
    background: var(--primary);
    color: #fff;
    transform: scale(1.1);
}

.services-page-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.services-page-card p {
    font-size: 0.9375rem;
    margin-bottom: 1.25rem;
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--bg-gray) 25%, var(--border-light) 50%, var(--bg-gray) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}


/* PAGINATION FIX - FORCE HORIZONTAL */
.pagination, 
.pagination .nav-links,
nav.navigation.pagination .nav-links {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 6px !important;
}

.pagination nav.navigation.pagination {
    width: 100%;
}

a.page-numbers,
span.page-numbers {
    display: inline-flex !important;
    width: 42px !important;
    height: 42px !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

/* BLOG GRID FIX */
.blog-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px !important;
}

@media (max-width: 1024px) {
    .blog-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 768px) {
    .blog-grid { grid-template-columns: 1fr !important; }
}
