/*
Theme Name: Forqan
Theme URI: https://yourdomain.com/
Author: Your Name
Author URI: https://yourdomain.com/
Description: A professional, secure, and high-performance custom theme for structured religious content.
Version: 1.0.0
License: GPL v2 or later
Text Domain: forqan
*/

/* ============================================
   COLOR PALETTE
============================================ */
:root {
    --primary: #5b8a72;
    --primary-dark: #426d55;
    --primary-light: #e8f0ec;
    --secondary: #d4a373;
    --secondary-dark: #b88352;
    --text: #2c3e35;
    --text-light: #5a6e65;
    --heading: #1a2e25;
    --border: #dce5e0;
    --bg-white: #ffffff;
    --bg-gray: #f5f7f5;
    --bg-dark: #1a2e25;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.1);
    --shadow-lg: 0 12px 36px rgba(0,0,0,0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s ease;
}

/* ============================================
   GLOBAL RESET & TYPOGRAPHY
============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Tajawal", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 18px;
    line-height: 1.8;
    color: var(--text);
    background: var(--bg-white);
    direction: rtl;
    text-align: right;
    max-width: 100% !important;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--heading);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    font-family: "Tajawal", sans-serif;
}
h1 { font-size: 3rem; }
h2 { font-size: 2rem; margin-bottom: 0.5rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

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

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

/* ============================================
   BUTTONS
============================================ */
.btn {
    display: inline-block;
    padding: 0.85rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
    font-family: "Tajawal", sans-serif;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-secondary:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

/* ============================================
   HEADER
============================================ */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.site-branding { flex-shrink: 0; }
.site-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0;
}
.site-title a {
    color: var(--heading);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.site-description {
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 0;
}

/* Desktop Navigation */
.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}
.main-navigation li { position: relative; }
.main-navigation a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    padding: 0.5rem 0;
    transition: var(--transition);
}
.main-navigation a:hover { color: var(--primary); }
.main-navigation li:after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}
.main-navigation li:hover:after,
.main-navigation .current-menu-item:after { width: 100%; }

/* Dropdown Menu */
.main-navigation .sub-menu {
    position: absolute;
    display: inline-block;
    top: 100%;
    right: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 100;
}
.main-navigation li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.main-navigation .sub-menu a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}
.main-navigation .sub-menu a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* Search Toggle */
.search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text);
    transition: var(--transition);
}
.search-toggle:hover { color: var(--primary); }

/* Search Modal */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}
.search-modal.active { display: flex; }
.search-modal-content {
    width: 90%;
    max-width: 600px;
    position: relative;
    text-align: center;
}
.search-close {
    position: absolute;
    top: -60px;
    left: 0;
    background: none;
    border: none;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
}
.search-modal .search-form {
    display: flex;
    gap: 0.5rem;
}
.search-modal .search-field {
    flex: 1;
    padding: 1rem;
    font-size: 1.125rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: "Tajawal", sans-serif;
}
.search-modal .search-submit {
    padding: 0 1.5rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

/* ============================================
   MOBILE MENU - CLEAN VERSION
============================================ */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1000000;
    position: relative;
    width: 44px;
    height: 44px;
}
.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #333;
    margin: 5px 0;
    transition: all 0.3s ease;
}
.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-container {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100%;
    background: #ffffff;
    z-index: 99999;
    transition: right 0.3s ease;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}
.mobile-menu-container.active { right: 0; }

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eaeaea;
    background: #ffffff;
}
.mobile-menu-logo img { max-height: 40px; width: auto; }
.mobile-site-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}
.mobile-menu-close {
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #666;
    padding: 0;
    line-height: 1;
}

.mobile-navigation { padding: 20px; }
.mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}
.mobile-nav-menu li {
    margin-bottom: 15px;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 10px;
}
.mobile-nav-menu li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.mobile-nav-menu a {
    display: block;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 0;
}
.mobile-nav-menu a:hover { color: #2d6a4f; }
.mobile-nav-menu .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0 0 0 15px;
    display: none;
}
.mobile-nav-menu .menu-item-has-children > a {
    position: relative;
    padding-right: 30px;
}
.mobile-nav-menu .menu-item-has-children > a::after {
    content: '▼';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    transition: transform 0.3s;
}
.mobile-nav-menu .menu-item-has-children.open > a::after {
    transform: translateY(-50%) rotate(180deg);
}
.mobile-nav-menu .menu-item-has-children.open .sub-menu {
    display: block;
}

/* ============================================
   HERO SECTION
============================================ */
.hero-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--bg-white) 100%);
    position: relative;
    overflow: hidden;
}
.hero-section .container {
    display: flex;
    align-items: center;
    gap: 4rem;
    flex-direction: row-reverse;
}
.hero-content { flex: 1; text-align: right; }
.hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-description {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}
.hero-buttons { display: flex; gap: 1rem; justify-content: flex-start; }
.hero-image { flex: 1; }
.hero-illustration {
    position: relative;
    width: 100%;
    height: 400px;
}
.circle {
    position: absolute;
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}
.circle-1 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    top: 20%;
    right: 25%;
    opacity: 0.8;
    animation-delay: 0s;
}
.circle-2 {
    width: 300px;
    height: 300px;
    background: rgba(91, 138, 114, 0.1);
    top: 10%;
    left: 10%;
    animation-delay: 1s;
}
.circle-3 {
    width: 150px;
    height: 150px;
    background: rgba(212, 163, 115, 0.15);
    bottom: 10%;
    right: 30%;
    animation-delay: 2s;
}
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* ============================================
   SECTION HEADERS
============================================ */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}
.section-header-right { flex: 1; }
.section-header-right h2 {
    margin-bottom: 0.25rem;
    font-size: 1.75rem;
    position: relative;
    display: inline-block;
}
.section-header-right h2:after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 0;
    width: 50px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
}
.section-header-right p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-top: 0.75rem;
}
.view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary-light);
    border-radius: 50px;
    color: var(--primary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}
.view-all:hover {
    background: var(--primary);
    color: #fff;
    gap: 0.75rem;
}

/* ============================================
   CATEGORIES SECTION
============================================ */
.categories-section { padding: 5rem 0; background: var(--bg-gray); }
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}
.category-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius-md);
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
.category-card:before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 0;
    background: var(--primary);
    transition: var(--transition);
}
.category-card:hover:before { height: 100%; }
.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}
.category-icon { font-size: 3rem; margin-bottom: 1rem; }
.category-card h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.category-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ============================================
   POSTS & CONTENT GRID
============================================ */
.posts-grid, .content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}
.post-card, .content-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.post-card:hover, .content-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.post-card-thumbnail, .card-thumbnail {
    position: relative;
    overflow: hidden;
}
.post-card-thumbnail img, .card-thumbnail img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.post-card:hover .post-card-thumbnail img,
.content-card:hover .card-thumbnail img { transform: scale(1.05); }
.post-card-content, .card-content { padding: 1.5rem; }
.post-meta, .card-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: var(--text-light);
}
.post-card h3, .card-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}
.post-card h3 a, .card-content h3 a { color: var(--heading); }
.post-card h3 a:hover, .card-content h3 a:hover { color: var(--primary); }
.post-card p, .card-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
}
.read-more {
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
}
.read-more:hover { gap: 1rem; color: var(--primary-dark); }

/* Video Card Specific */
.video-thumbnail { position: relative; cursor: pointer; }
.video-play-icon, .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(91, 138, 114, 0.9);
    border-radius: 50%;
    opacity: 0;
    transition: var(--transition);
    z-index: 2;
}
.video-play-icon::after, .play-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-30%, -50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 16px;
    border-color: transparent transparent transparent #fff;
}
.video-thumbnail:hover .video-play-icon,
.content-card:hover .play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}
.thumbnail-link, .card-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
}

.post-type-badge, .content-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}
.video-badge { background: var(--secondary); color: #fff; }
.article-badge { background: var(--primary); color: #fff; }
.book-badge { background: var(--secondary-dark); color: #fff; }

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

/* ============================================
   BOOKS SECTION
============================================ */
.books-section { padding: 4rem 0; background: var(--bg-gray); }
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}
.book-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.book-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.book-card-link { text-decoration: none; color: inherit; }
.book-card-cover { aspect-ratio: 2/3; overflow: hidden; }
.book-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.book-card:hover .book-card-cover img { transform: scale(1.05); }
.book-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8f0ec;
    font-size: 3rem;
}
.book-card-content { padding: 1rem; }
.book-card-content h3 {
    font-size: 1rem;
    margin: 0 0 0.5rem;
    display: -webkit-box;
    /*-webkit-line-clamp: 2;*/
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.book-author { font-size: 0.75rem; color: #888; margin-bottom: 0.5rem; }

/* ============================================
   VIDEOS SECTION
============================================ */
.featured-videos-section { padding: 5rem 0; background: var(--bg-gray); }
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}
.video-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.video-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.video-card-thumbnail {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}
.video-card-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.video-card:hover .video-card-thumbnail img { transform: scale(1.05); }
.video-link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}
.video-card-content { padding: 1.25rem; }
.video-card-content h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}
.video-card-content h3 a { color: var(--heading); }
.video-card-content h3 a:hover { color: var(--primary); }

/* ============================================
   CTA SECTION
============================================ */
.cta-section {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 4rem 0;
    text-align: center;
}
.cta-content h2 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}
.cta-content p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 2rem;
}
.cta-form {
    display: flex;
    justify-content: center;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}
.cta-form input {
    flex: 1;
    padding: 0.85rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-family: "Tajawal", sans-serif;
}
.cta-form .btn-primary {
    background: #fff;
    color: var(--primary);
}
.cta-form .btn-primary:hover { background: var(--primary-light); }

/* ============================================
   FOOTER
============================================ */
.site-footer {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 3rem 0 1.5rem;
    margin-top: 50px;
}
.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}
.footer-widget h4 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1.125rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}
.footer-widget h4:after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50%;
    height: 2px;
    background: var(--secondary);
}
.footer-widget ul { list-style: none; }
.footer-widget li { margin-bottom: 0.5rem; }
.footer-widget a {
    color: #fff;
    transition: var(--transition);
}
.footer-widget a:hover {
    color: var(--secondary);
    padding-right: 5px;
}
.footer-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.875rem;
}

.site-footer .copyright {
    text-align: center;
}

/* ============================================
   PAGINATION
============================================ */
.pagination {
    text-align: center;
    margin: 3rem 0;
}
.pagination .page-numbers {
    display: inline-block;
    padding: 0.6rem 1rem;
    margin: 0 0.25rem;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
}
.pagination .page-numbers.current {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.pagination .page-numbers:hover:not(.current) {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

/* ============================================
   AUTHOR PAGE
============================================ */
.author-hero {
    background: linear-gradient(135deg, var(--bg-gray) 0%, var(--bg-white) 100%);
    padding: 3rem 0;
    border-bottom: 1px solid var(--border);
}
.author-hero-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}
.author-avatar img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary);
    box-shadow: var(--shadow-md);
}
.author-info { flex: 1; }
.author-name { font-size: 2rem; margin: 0 0 0.25rem 0; }
.author-position {
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 1rem;
}
.author-bio {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}
.author-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
}
.stat-item { text-align: center; }
.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--heading);
}
.stat-label { font-size: 0.8rem; color: var(--text-light); }
.author-social { display: flex; gap: 1rem; }
.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: var(--transition);
}
.social-link.twitter { background: #1DA1F2; color: #fff; }
.social-link.facebook { background: #1877F2; color: #fff; }
.social-link.youtube { background: #FF0000; color: #fff; }
.social-link.website { background: var(--primary); color: #fff; }
.social-link:hover { transform: translateY(-3px); opacity: 0.9; }

.author-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border);
    margin-bottom: 2rem;
}
.tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); }
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeIn 0.3s ease; }

.author-posts-grid, .author-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* ============================================
   AUTHOR LINK
============================================ */
.author-link, .author-name {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
    transition: var(--transition);
}
.author-link:hover, .author-name:hover { color: var(--primary); }
.author-link img { border-radius: 50%; }

/* ============================================
   UTILITY CLASSES
============================================ */
.note {
    font-size: 0.7rem;
    color: #888;
    margin-right: 0.5rem;
}
.author-bio-item p {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    margin-top: 5px;
}
.post-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    max-height: 3.2em;
    line-height: 1.6;
}
.post-excerpt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ============================================
   COMMENTS SECTION STYLES
============================================ */
.comments-section {
    margin: 3rem 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}
.comments-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-light);
}
.comment-list {
    list-style: none;
    margin: 2rem 0;
}
.comment {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.comment-body {
    display: flex;
    gap: 1rem;
}
.comment-author-avatar img {
    border-radius: 50%;
    width: 50px;
    height: 50px;
}
.comment-meta {
    margin-bottom: 0.5rem;
}
.comment-author {
    font-weight: 600;
    color: var(--heading);
}
.comment-date {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-right: 1rem;
}
.comment-content p {
    margin: 0;
}
.comment-reply-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--primary);
}
.children {
    list-style: none;
    margin-top: 1rem;
    padding-right: 2rem;
}
.comment-respond {
    margin-top: 2rem;
}
.comment-reply-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}
.comment-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.comment-form input, 
.comment-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: "Tajawal", sans-serif;
}
.comment-form input:focus, 
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}
.comment-form .submit {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}
.comment-form .submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}
@media (max-width: 768px) {
    .comment-body {
        flex-direction: column;
        text-align: center;
    }
    .children {
        padding-right: 1rem;
    }
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 992px) {
    .hero-section .container { flex-direction: column; text-align: center; }
    .hero-buttons { justify-content: center; }
    .hero-title { font-size: 2.5rem; }
    .hero-content { text-align: center; }
    .section-header { flex-direction: column; gap: 1rem; align-items: flex-start; }
    .section-header-right h2:after { right: 0; transform: none; }
    .circle-1, .circle-2, .circle-3 { display: none; }
    .author-hero-content { flex-direction: column; text-align: center; }
    .author-stats { justify-content: center; }
    .author-social { justify-content: center; }
    .author-tabs { justify-content: center; }
}

@media (max-width: 768px) {
    body { font-size: 16px; }
    .container { padding: 0 1rem; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    .hero-title { font-size: 2rem; }
    .cta-form { flex-direction: column; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .posts-grid, .content-grid, .categories-grid, .videos-grid, .books-grid,
    .author-posts-grid, .author-videos-grid { grid-template-columns: 1fr; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .post-footer { flex-direction: column; gap: 0.5rem; align-items: flex-start; }
    
    /* Mobile Navigation */
    .main-navigation { display: none !important; }
    .mobile-toggle { display: block !important; }
}

/* ============================================
   ANIMATIONS
============================================ */
.category-card, .post-card, .content-card {
    animation: fadeInUp 0.6s ease backwards;
}
.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }
.category-card:nth-child(4) { animation-delay: 0.4s; }
.category-card:nth-child(5) { animation-delay: 0.5s; }
.category-card:nth-child(6) { animation-delay: 0.6s; }
.post-card:nth-child(1) { animation-delay: 0.1s; }
.post-card:nth-child(2) { animation-delay: 0.2s; }
.post-card:nth-child(3) { animation-delay: 0.3s; }
.content-card:nth-child(1) { animation-delay: 0.1s; }
.content-card:nth-child(2) { animation-delay: 0.2s; }
.content-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}













/* ============================================
   VIDEOS SECTION - YOUTUBE STYLE GRID
============================================ */
.featured-videos-section {
    padding: 60px 0;
    background: #f5f7f5;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.section-header-right h2 {
    font-size: 24px;
    margin-bottom: 5px;
    position: relative;
    display: inline-block;
}

.section-header-right h2:after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 0;
    width: 50px;
    height: 3px;
    background: #5b8a72;
    border-radius: 3px;
}

.section-header-right p {
    color: #666;
    font-size: 14px;
    margin-top: 10px;
}

.view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    padding: 8px 18px;
    border-radius: 30px;
    color: #5b8a72;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.view-all:hover {
    background: #5b8a72;
    color: #fff;
}

/* YouTube Style Grid - 2 rows x 4 columns */
.videos-grid-yt {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Video Card - YouTube Style */
.video-card-yt {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
}

.video-card-yt:hover {
    transform: translateY(-4px);
}

.video-thumbnail-yt {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
    cursor: pointer;
}

.video-thumbnail-yt img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.video-card-yt:hover .video-thumbnail-yt img {
    transform: scale(1.05);
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 2;
}

.play-icon-yt {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s;
    z-index: 3;
}

.play-icon-yt::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 0 8px 12px;
    border-color: transparent transparent transparent #fff;
}

.video-thumbnail-yt:hover .play-icon-yt {
    opacity: 1;
}

.video-link-yt {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
}

.no-video-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8f0ec;
    font-size: 48px;
}

/* Video Info - YouTube Style */
.video-info-yt {
    display: flex;
    gap: 12px;
    padding: 12px;
}

.video-channel-avatar {
    flex-shrink: 0;
}

.video-channel-avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.video-details-yt {
    flex: 1;
    min-width: 0;
}

.video-title-yt {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 6px;
    display: -webkit-box;
    /*-webkit-line-clamp: 2;*/
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-title-yt a {
    color: #1a1a1a;
    text-decoration: none;
}

.video-title-yt a:hover {
    color: #5b8a72;
}

.video-channel-name {
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}

.video-meta-yt {
    font-size: 11px;
    color: #888;
    display: flex;
    gap: 6px;
    align-items: center;
}

/* Responsive */
@media (max-width: 1200px) {
    .videos-grid-yt {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .videos-grid-yt {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .featured-videos-section {
        padding: 40px 0;
    }
    
    .videos-grid-yt {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .section-header-right h2 {
        font-size: 20px;
    }
}