/*
Theme Name: KSB Medical Education Center
Description: A modern, professional WordPress theme for KSB Medical Education Center. Features responsive design, custom post types for members and announcements, advanced member directory, library management, and FAQ system. Perfect for medical education institutions.
Author: KSB Medical Team
Author URI: https://ksbmedical.org
Version: 1.0.0
Text Domain: ksb-medical
Domain Path: /languages/
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: medical, education, professional, healthcare, custom-post-types, responsive, rtl-language-support, accessibility-ready
Network: false
*/

/* ===== CSS VARIABLES ===== */
:root {
    --primary-color: #2873B4;
    --secondary-color: #1e5a8a;
    --accent-color: #FFB25B;
    --text-color: #22314D;
    --text-light: #6c757d;
    --background-color: #F6F9FC;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --border-color: #e9ecef;
    --shadow: 0 2px 10px rgba(40, 115, 180, 0.1);
    
    /* Typography */
    --font-primary: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;
    
    /* Spacing */
    --container-max-width: 1200px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--text-color);
    background-color: var(--background-color);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== UTILITY CLASSES ===== */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* ===== SITE LOGO ===== */
.site-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    font-size: 1.5rem;
}

.site-logo-image {
    margin-right: 12px;
    flex-shrink: 0;
    border-radius: 4px; /* زوايا مدورة قليلاً للشعار */
    transition: transform 0.3s ease; /* تأثير حركي عند التفاعل */
}

.site-title {
    color: var(--primary-color);
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 1.4rem;
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap; /* منع كسر النص */
}

.site-logo:hover .site-title {
    color: var(--accent-color);
}

/* Custom Logo Styling */
.custom-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.custom-logo-link .site-title {
    color: var(--primary-color);
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 1.4rem;
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap; /* منع كسر النص */
}

.custom-logo-link:hover .site-title {
    color: var(--accent-color);
}

.custom-logo-image {
    margin-right: 12px;
    flex-shrink: 0;
    vertical-align: middle;
    border-radius: 4px; /* زوايا مدورة قليلاً للشعار */
    transition: transform 0.3s ease; /* تأثير حركي عند التفاعل */
}

.custom-logo-link:hover .custom-logo-image,
.site-logo:hover .site-logo-image {
    transform: scale(1.05); /* تكبير بسيط عند التمرير */
}

.site-description {
    margin: 5px 0 0 52px;
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
}

@media (max-width: 768px) {
    .site-logo {
        font-size: 1.3rem;
    }
    
    .site-logo-image {
        width: 35px;
        height: 35px;
        margin-right: 10px;
    }
    
    .custom-logo-image {
        width: 35px;
        height: 35px;
        margin-right: 10px;
    }
    
    .custom-logo-link .site-title,
    .site-title {
        font-size: 1.2rem;
    }
    
    .site-description {
        margin-left: 45px;
        font-size: 0.8rem;
    }
    
    .site-branding {
        flex-shrink: 0;
        min-height: 50px; /* ارتفاع أقل للهاتف */
    }
    
    .header-container {
        min-height: 60px; /* ارتفاع أقل للهاتف */
        padding: 10px 0;
    }
    
    .custom-logo-link,
    .site-logo {
        min-height: 40px;
    }
    
    .custom-logo-link .custom-logo-image,
    .site-logo .site-logo-image {
        margin-right: 8px; /* مسافة أقل للهاتف */
    }
}

.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary-color);
}

.text-accent {
    color: var(--accent-color);
}

.bg-primary {
    background-color: var(--primary-color);
}

.bg-accent {
    background-color: var(--accent-color);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-family: var(--font-primary);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #1e5a8a;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-accent {
    background-color: var(--accent-color);
    color: var(--white);
}

.btn-accent:hover {
    background-color: #e6a049;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: var(--text-light);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--text-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.125rem;
}

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}

.badge-pdf {
    background-color: #dc3545;
    color: var(--white);
}

.badge-video {
    background-color: #28a745;
    color: var(--white);
}

.badge-article {
    background-color: #17a2b8;
    color: var(--white);
}

.badge-research {
    background-color: #6f42c1;
    color: var(--white);
}

.badge-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.badge-accent {
    background-color: var(--accent-color);
    color: var(--white);
}

.badge-secondary {
    background-color: var(--text-light);
    color: var(--white);
}

.section-padding {
    padding: var(--spacing-xl) 0;
}

/* ===== HEADER ===== */
.site-header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
}

/* ===== SITE BRANDING ===== */
.site-branding {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    min-height: 60px; /* تضمن ارتفاع ثابت للشعار */
    position: relative;
}

/* تحسينات إضافية للتوازن */
.custom-logo-link,
.site-logo {
    display: flex;
    align-items: center;
    min-height: 50px; /* ارتفاع أدنى للتوازن */
    text-decoration: none;
    transition: all 0.3s ease;
}

/* تطبيق المسافة بين الشعار والنص */
.custom-logo-link .custom-logo-image,
.site-logo .site-logo-image {
    margin-right: 12px;
}

/* تأكد من أن الشعار والقائمة على نفس المستوى */
.header-container {
    min-height: 70px;
    align-items: center;
}

/* تأثيرات تفاعلية للشعار */
.custom-logo-link:hover,
.site-logo:hover {
    transform: translateY(-1px);
}

/* ===== NAVIGATION ===== */
.main-navigation {
    display: flex;
    align-items: center;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.main-navigation li {
    margin-left: var(--spacing-md);
}

.main-navigation a {
    color: var(--text-color);
    font-weight: 500;
    padding: var(--spacing-xs) 0;
    position: relative;
    transition: color 0.3s ease;
    text-decoration: none;
    font-size: 1rem;
    display: inline-block;
}

.main-navigation a:hover,
.main-navigation a.current {
    color: var(--primary-color);
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.main-navigation a:hover::after,
.main-navigation a.current::after {
    width: 100%;
}

/* Mobile Navigation */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: var(--background-color);
}

/* Hamburger Icon Animation */
.hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 18px;
    cursor: pointer;
}

.hamburger-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--primary-color);
    border-radius: 1px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-icon span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Hide mobile menu on desktop */
@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .nav-menu {
        position: static !important;
        width: auto !important;
        height: auto !important;
        background: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        overflow: visible !important;
        display: flex !important;
        flex-direction: row !important;
    }
    
    .nav-menu li {
        display: inline-block !important;
        margin: 0 0 0 var(--spacing-md) !important;
        border-bottom: none !important;
        list-style: none !important;
    }
    
    .nav-menu a {
        padding: var(--spacing-xs) 0 !important;
        color: var(--text-color) !important;
        background: none !important;
        border-left: none !important;
    }
    
    .nav-menu a:hover {
        background: none !important;
        color: var(--primary-color) !important;
        padding-left: 0 !important;
    }
    
    .nav-menu a::after {
        display: block !important;
    }
}

/* MOBILE MENU - SIMPLE & CLEAN */
@media (max-width: 768px) {
    /* Hide normal navigation completely */
    .main-navigation .nav-menu:not(.menu-open) {
        display: none !important;
    }
    
    .mobile-menu-toggle {
        display: block !important;
    }
    
    /* Mobile menu styles - only when opened */
    .main-navigation .nav-menu.menu-open {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        background: white !important;
        box-shadow: 2px 0 10px rgba(0,0,0,0.2);
        z-index: 1000000;
        padding: 80px 0 20px 0;
        margin: 0;
        list-style: none;
        overflow-y: auto;
        flex-direction: column;
    }
    
    .main-navigation .nav-menu.menu-open li {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        border-bottom: 1px solid #eee;
        list-style: none !important;
    }
    
    .main-navigation .nav-menu.menu-open a {
        display: block !important;
        padding: 15px 20px !important;
        color: #333 !important;
        text-decoration: none !important;
        font-size: 16px !important;
        font-weight: 500 !important;
        border: none !important;
        background: white !important;
        pointer-events: auto !important;
        cursor: pointer !important;
    }
    
    .main-navigation .nav-menu.menu-open a:hover {
        background: #f5f5f5 !important;
        color: var(--primary-color) !important;
    }
    
    /* Close button */
    .main-navigation .nav-menu.menu-open::before {
        content: '×';
        position: absolute;
        top: 20px;
        right: 20px;
        width: 30px;
        height: 30px;
        background: #f0f0f0;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 20px;
        color: #666;
        z-index: 1000001;
    }
    
    /* Overlay - behind menu */
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999999;
        pointer-events: none;
    }
    
    body.menu-open {
        overflow: hidden;
    }
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e5a8a 100%);
    color: var(--white);
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.hero-content h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.9;
}

.hero-buttons {
    margin-top: var(--spacing-md);
}

.hero-buttons .btn {
    margin: 0 var(--spacing-xs);
}

/* ===== CARDS & SECTIONS ===== */
.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.card {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(40, 115, 180, 0.15);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

/* ===== MEMBER CARDS ===== */
.member-card {
    text-align: center;
}

.member-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto var(--spacing-sm);
    border: 4px solid var(--accent-color);
}

.member-name {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
}

.member-specialty {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.member-role {
    color: var(--text-color);
    font-style: italic;
    margin-bottom: var(--spacing-sm);
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: var(--spacing-sm);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(40, 115, 180, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* ===== FOOTER ===== */
.site-footer {
    background-color: var(--text-color);
    color: var(--white);
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.footer-section h3 {
    color: var(--white);
    margin-bottom: var(--spacing-sm);
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-section a:hover {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    transition: background-color 0.3s ease;
}

.social-links a:hover {
    background-color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-sm);
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    :root {
        --spacing-xl: 2rem;
        --spacing-lg: 1.5rem;
    }
    
    .header-container {
        justify-content: space-between;
        align-items: center;
    }
    
    .main-navigation {
        position: relative;
    }
    
    /* Default mobile nav menu styles are handled above in Mobile Navigation section */
    
    .main-navigation li {
        margin: var(--spacing-xs) 0;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-buttons .btn {
        display: block;
        margin: var(--spacing-xs) 0;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-xs);
    }
    
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
}

/* ===== ACCESSIBILITY ===== */
.screen-reader-text {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    width: 1px !important;
    height: 1px !important;
    overflow: hidden;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 8px 16px;
    text-decoration: none;
    z-index: 100000;
}

.skip-link:focus {
    top: 6px;
}

/* Focus styles */
button:focus,
input:focus,
textarea:focus,
select:focus,
a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Members & Announcements Pages Styles
================================================================ */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    opacity: 0.3;
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.page-description {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.page-description p {
    margin: 0;
    color: inherit;
}

/* Responsive page header */
@media (max-width: 768px) {
    .page-header {
        padding: 40px 0;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-description {
        font-size: 1rem;
    }
}

/* Members Page Styles */
.members-filter {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.filter-btn {
    background: var(--background-color);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.member-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.member-photo {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.member-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.member-info {
    padding: 1.5rem;
    overflow: hidden;
    position: relative;
}

.member-name {
    margin-bottom: 0.5rem;
}

.member-name a {
    color: var(--text-color);
    text-decoration: none;
}

.member-position {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 1rem;
}

.member-specialties {
    margin-bottom: 1rem;
}

.specialty-tag {
    background: var(--accent-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.member-excerpt {
    margin-bottom: 1rem;
    color: #666;
}

.member-contact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.contact-link {
    background: var(--background-color);
    color: var(--primary-color);
    padding: 0.5rem;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-link:hover {
    background: var(--primary-color);
    color: white;
}

.view-profile {
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    width: auto;
    height: auto;
    margin-left: auto;
    flex-shrink: 0;
    white-space: nowrap;
}

.view-profile:hover {
    background: var(--secondary-color);
}

.no-members {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #666;
}

.no-members i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.stats-widget .stats-list {
    display: flex;
    justify-content: space-between;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

.specialties-list {
    list-style: none;
    padding: 0;
}

.specialties-list li {
    margin-bottom: 0.5rem;
}

.specialty-filter {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.specialty-filter:hover {
    background: var(--background-color);
    color: var(--primary-color);
}

.count {
    color: #999;
    font-size: 0.9rem;
}

/* Announcements Page Styles */
.announcements-list {
    margin-bottom: 2rem;
}

.announcement-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 5px solid var(--primary-color);
}

.announcement-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.announcement-card.high-priority {
    border-left-color: #e74c3c;
}

.announcement-card.medium-priority {
    border-left-color: #f39c12;
}

.announcement-card.low-priority {
    border-left-color: #27ae60;
}

.announcement-header {
    background: var(--background-color);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eee;
}

.announcement-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    font-size: 0.9rem;
}

.announcement-priority {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-weight: 500;
}

.high-priority .announcement-priority {
    background: #e74c3c;
    color: white;
}

.medium-priority .announcement-priority {
    background: #f39c12;
    color: white;
}

.low-priority .announcement-priority {
    background: #27ae60;
    color: white;
}

.announcement-type {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
}

.announcement-date {
    color: #666;
}

.announcement-content {
    padding: 1.5rem;
}

.announcement-title {
    margin-bottom: 1rem;
}

.announcement-title a {
    color: var(--text-color);
    text-decoration: none;
}

.announcement-title a:hover {
    color: var(--primary-color);
}

.announcement-excerpt {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.announcement-details {
    background: var(--background-color);
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.detail-item {
    display: block;
    margin-bottom: 0.5rem;
    color: #666;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-item i {
    color: var(--primary-color);
    margin-right: 0.5rem;
    width: 16px;
}

.announcement-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.announcement-author {
    color: #999;
    font-size: 0.9rem;
}

.no-announcements {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.no-announcements i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.priority-filters {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-link {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-link:hover,
.filter-link.active {
    background: var(--primary-color);
    color: white;
}

.recent-news-list {
    margin-bottom: 1rem;
}

.recent-news-item {
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.recent-news-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.recent-news-item h5 {
    margin-bottom: 0.25rem;
}

.recent-news-item h5 a {
    color: var(--text-color);
    text-decoration: none;
}

.recent-news-item h5 a:hover {
    color: var(--primary-color);
}

.news-date {
    color: #999;
    font-size: 0.8rem;
}

.view-all-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.action-btn {
    background: var(--background-color);
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn:hover {
    background: var(--primary-color);
    color: white;
}

.newsletter-form {
    margin-top: 1rem;
}

.newsletter-form input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #eee;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.newsletter-form button {
    width: 100%;
}

/* ===== PARTNERS SECTION ===== */
.partners-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--light-gray);
}

/* Partners page specific header styling */
.page-template-template-partners .page-header,
.page-template-page-partners .page-header,
.post-type-archive-partner .page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    position: relative;
}

.page-template-template-partners .page-title,
.page-template-page-partners .page-title,
.post-type-archive-partner .page-title {
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.page-template-template-partners .page-description,
.page-template-page-partners .page-description,
.post-type-archive-partner .page-description {
    color: rgba(255,255,255,0.9);
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.partner-item {
    background: white;
    border-radius: 12px;
    padding: var(--spacing-lg);
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.partner-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.partner-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.partner-logo {
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.partner-logo img {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.partner-item:hover .partner-logo img {
    transform: scale(1.05);
}

.partner-placeholder {
    width: 120px;
    height: 120px;
    background: var(--light-gray);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 2px dashed #ddd;
}

.partner-icon {
    font-size: 2.5rem;
    opacity: 0.5;
}

.partner-info {
    text-align: center;
}

.partner-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 var(--spacing-sm) 0;
    line-height: 1.3;
}

.partner-description {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: var(--spacing-sm);
}

.partner-link-indicator {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.partner-item:hover .partner-link-indicator {
    opacity: 1;
}

.no-partners {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Hide no-partners message for regular visitors */
.no-partners:not(.admin-only) {
    display: none;
}

/* Show admin-only messages only to logged-in administrators */
.no-partners.admin-only {
    background: #f0f8ff;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
}

/* Hide partners section entirely if no partners for visitors */
body:not(.logged-in) .partners-section:has(.no-partners:not(.admin-only)) {
    display: none;
}

/* Alternative: Hide the entire page content if no partners for visitors */
body:not(.logged-in) .post-type-archive-partner .partners-section .partners-grid:empty ~ .no-partners:not(.admin-only) {
    display: none;
}

/* Partners responsive */
@media (max-width: 768px) {
    .partners-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: var(--spacing-md);
    }
    
    .partner-item {
        padding: var(--spacing-md);
    }
    
    .partner-logo {
        min-height: 100px;
    }
    
    .partner-logo img {
        max-height: 100px;
    }
    
    .partner-placeholder {
        width: 100px;
        height: 100px;
    }
    
    .partner-icon {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .partners-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== SINGLE PARTNER ===== */
.single-partner-section {
    padding: var(--spacing-xl) 0;
}

.partner-content {
    max-width: 800px;
    margin: 0 auto;
}

.partner-header {
    display: flex;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    align-items: flex-start;
}

.partner-featured-image {
    flex-shrink: 0;
    width: 200px;
}

.partner-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.partner-meta {
    flex: 1;
}

.partner-title {
    font-size: 2.5rem;
    color: var(--text-color);
    margin: 0 0 var(--spacing-md) 0;
    line-height: 1.2;
}

.partner-website-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 20px;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    transition: all 0.3s ease;
}

.partner-website-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.partner-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-color);
    margin-bottom: var(--spacing-xl);
}

.partner-actions {
    display: flex;
    gap: var(--spacing-md);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--light-gray);
}

.breadcrumb {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: var(--spacing-xs);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Single partner responsive */
@media (max-width: 768px) {
    .partner-header {
        flex-direction: column;
        text-align: center;
    }
    
    .partner-featured-image {
        width: 150px;
        margin: 0 auto;
    }
    
    .partner-title {
        font-size: 2rem;
    }
    
    .partner-actions {
        flex-direction: column;
    }
    
    .partner-actions .btn {
        text-align: center;
    }
}

/* ===== LIBRARY GRID STYLES ===== */

/* Library Card - Similar to Announcements Design */
.library-card {
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    height: auto;
    min-height: 280px;
}

.library-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Remove image styles since we're not using images */
.library-image {
    display: none !important;
}

.library-content {
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Library Header - Exactly like announcement-header */
.library-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

/* Resource Type Badge - Exactly like announcement-badge */
.resource-type-badge {
    background: rgba(243, 156, 18, 0.1);
    border: 2px solid rgba(243, 156, 18, 0.3);
    color: var(--accent-color);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* Different colors for different resource types */
.library-card[data-type="pdf"] .resource-type-badge {
    background: rgba(220, 53, 69, 0.1);
    border: 2px solid rgba(220, 53, 69, 0.3);
    color: #dc3545;
}

.library-card[data-type="video"] .resource-type-badge {
    background: rgba(23, 162, 184, 0.1);
    border: 2px solid rgba(23, 162, 184, 0.3);
    color: #17a2b8;
}

.library-card[data-type="article"] .resource-type-badge {
    background: rgba(40, 167, 69, 0.1);
    border: 2px solid rgba(40, 167, 69, 0.3);
    color: #28a745;
}

.library-card[data-type="research"] .resource-type-badge {
    background: rgba(111, 66, 193, 0.1);
    border: 2px solid rgba(111, 66, 193, 0.3);
    color: #6f42c1;
}

.resource-type-badge:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

/* Library Date - Exactly like announcement-date */
.library-date {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Library Title */
.library-title {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.4;
}

.library-title a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.library-title a:hover {
    color: var(--accent-color);
}

/* Library Meta - Only download count now */
.library-meta {
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Responsive Design for Library Cards */
@media (max-width: 768px) {
    .library-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .resource-type-badge {
        font-size: 0.65rem !important;
        padding: 0.2rem 0.6rem !important;
    }
    
    .library-card {
        min-height: 240px;
    }
    
    .library-content {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .library-title {
        font-size: 1rem;
    }
    
    .resource-type-badge {
        font-size: 0.6rem !important;
        padding: 0.15rem 0.5rem !important;
    }
}

.libraries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 var(--spacing-sm);
}

.library-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
}

.library-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(40, 115, 180, 0.2);
}

.library-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.library-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.library-image-placeholder {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color)) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.library-card:hover .library-image img,
.library-card:hover .library-image-placeholder i {
    transform: scale(1.05);
}

.library-content {
    padding: var(--spacing-md);
    text-align: center;
}

.resource-type-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
}

.resource-type-badge .badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.resource-type-badge .badge i {
    font-size: 0.875rem;
}

.library-title {
    margin: var(--spacing-sm) 0;
    text-align: center;
}

.library-title a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
    line-height: 1.4;
    display: block;
    padding: 0.5rem 0;
}

.library-title a:hover {
    color: var(--primary-color);
}

.library-author,
.library-specialty {
    margin: 0.75rem 0;
    font-size: 0.9rem;
    color: var(--text-light);
    text-align: center;
}

.library-excerpt {
    margin: var(--spacing-sm) 0;
    color: var(--text-color);
    line-height: 1.6;
    text-align: center;
    font-size: 0.95rem;
}

.library-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: var(--spacing-sm) 0;
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-light);
    text-align: center;
}

.library-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: var(--spacing-sm);
    padding: 0 0.5rem;
}

.library-actions .btn {
    flex: 1;
    min-width: 120px;
    text-align: center;
    font-size: 0.875rem;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-weight: 600;
}

.library-actions .btn i {
    font-size: 0.875rem;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: var(--spacing-lg);
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    background: var(--white);
    color: var(--text-color);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 140px;
    justify-content: center;
}

.filter-btn i {
    font-size: 1rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Search Section */
.search-section {
    max-width: 600px;
    margin: 0 auto var(--spacing-lg);
}

.search-section .form-control {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.search-section .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(40, 115, 180, 0.1);
}

@media (max-width: 768px) {
    .libraries-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .filter-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 200px;
        text-align: center;
    }
    
    .library-actions {
        flex-direction: column;
    }
    
    .library-actions .btn {
        width: 100%;
    }
}

/* ===== SINGLE LIBRARY RESOURCE STYLES ===== */
.single-library-resource {
    background: var(--white);
}

.resource-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e5a8a 100%);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.resource-header-content {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.resource-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: var(--spacing-sm);
}

.resource-type-badge {
    background-color: var(--accent-color) !important;
    color: var(--white) !important;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.resource-details {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 1.5rem;
    opacity: 0.9;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-item strong {
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.resource-content {
    padding: var(--spacing-xl) 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--spacing-lg);
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.resource-main {
    min-width: 0;
}

.resource-featured-image {
    margin-bottom: var(--spacing-md);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.resource-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.image-caption {
    background: var(--light-gray);
    padding: var(--spacing-sm);
    font-size: 0.875rem;
    color: var(--text-light);
    text-align: center;
}

.resource-actions-section {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: 10px;
    margin: 2rem 0;
    text-align: center;
    border: 1px solid var(--border-color);
}

.resource-actions-section h3 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.resource-action-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.resource-action-buttons .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.resource-action-buttons .btn i {
    font-size: 1.2rem;
}

.pdf-preview {
    margin-top: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.pdf-preview iframe {
    width: 100%;
    height: 600px;
    border: none;
    display: block;
}

.pdf-preview embed {
    width: 100%;
    height: 600px;
}

.resource-body {
    margin: var(--spacing-md) 0;
    line-height: var(--line-height-base);
}

.resource-body p {
    margin-bottom: var(--spacing-sm);
}

.resource-body h2,
.resource-body h3,
.resource-body h4 {
    margin: var(--spacing-md) 0 var(--spacing-sm);
    color: var(--text-color);
}

.resource-details-table {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: 10px;
    margin: 2rem 0;
    border: 1px solid var(--border-color);
}

.resource-details-table h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.resource-details-table .table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.resource-details-table .table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

.resource-details-table .table td:first-child {
    width: 200px;
    font-weight: 600;
    color: var(--text-color);
}

.resource-share {
    margin: var(--spacing-md) 0;
    padding: var(--spacing-md) 0;
    border-top: 1px solid var(--border-color);
}

.resource-share h4 {
    color: var(--text-color);
    margin-bottom: var(--spacing-sm);
}

.share-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.share-btn {
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.share-btn.facebook {
    background: #1877f2;
    color: white;
}

.share-btn.twitter {
    background: #1da1f2;
    color: white;
}

.share-btn.linkedin {
    background: #0a66c2;
    color: white;
}

.share-btn.email {
    background: var(--text-color);
    color: white;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.resource-navigation {
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-md) 0;
    border-top: 1px solid var(--border-color);
}

.nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.nav-previous,
.nav-next {
    padding: var(--spacing-md);
    background: var(--light-gray);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.nav-subtitle {
    display: block;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-title {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    line-height: 1.3;
}

.nav-title:hover {
    color: var(--secondary-color);
}

.back-to-library {
    text-align: center;
    margin: 3rem 0;
}

.back-to-library .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--light-gray);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    font-weight: 600;
}

.back-to-library .btn:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Sidebar Styles */
.resource-sidebar {
    max-width: 300px;
}

.resource-sidebar .card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow);
}

.resource-sidebar .card h3 {
    color: var(--text-color);
    margin-bottom: var(--spacing-sm);
    font-size: 1.2rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.related-resources-list,
.recent-resources-list {
    list-style: none;
}

.related-resource-item,
.recent-resource-item {
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-color);
}

.related-resource-item:last-child,
.recent-resource-item:last-child {
    border-bottom: none;
}

.related-resource-item {
    display: flex;
    gap: var(--spacing-sm);
    align-items: flex-start;
}

.related-resource-image {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
}

.related-resource-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-resource-content {
    flex: 1;
    min-width: 0;
}

.resource-type-small {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-weight: 600;
}

.badge-pdf {
    background: #dc3545;
    color: white;
}

.badge-video {
    background: #28a745;
    color: white;
}

.badge-article {
    background: #17a2b8;
    color: white;
}

.badge-research {
    background: #6f42c1;
    color: white;
}

.related-resource-content h4 {
    margin: 0 0 0.25rem;
    font-size: 0.9rem;
    line-height: 1.3;
}

.related-resource-content h4 a {
    color: var(--text-color);
    text-decoration: none;
}

.related-resource-content h4 a:hover {
    color: var(--primary-color);
}

.related-resource-content time,
.recent-resource-item time {
    font-size: 0.75rem;
    color: var(--text-light);
}

.recent-resource-item h5 {
    margin: 0 0 0.25rem;
    font-size: 0.9rem;
    line-height: 1.3;
}

.recent-resource-item h5 a {
    color: var(--text-color);
    text-decoration: none;
}

.recent-resource-item h5 a:hover {
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .resource-sidebar {
        max-width: none;
        order: -1;
    }
    
    .resource-details {
        flex-direction: column;
        gap: 1rem;
    }
    
    .detail-item {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }
    
    .resource-action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .resource-action-buttons .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .nav-links {
        grid-template-columns: 1fr;
    }
    
    .share-buttons {
        justify-content: center;
    }
    
    .pdf-preview iframe {
        height: 400px;
    }
    
    .resource-details-table .table td:first-child {
        width: auto;
        display: block;
        padding-bottom: 0.25rem;
    }
    
    .resource-details-table .table td:last-child {
        padding-top: 0.25rem;
    }
}

@media (max-width: 480px) {
    .resource-header {
        padding: 2rem 0 1rem;
    }
    
    .resource-actions-section {
        padding: 1.5rem;
    }
    
    .resource-details-table {
        padding: 1.5rem;
    }
    
    .pdf-preview iframe {
        height: 300px;
    }
}
