/* =======================================================
   TAREEKH E ADAB E URDU - OPTIMIZED COMPLETE CSS (2026)
   Peer-Reviewed International Urdu Research Journal
======================================================= */

/* 1. Base Setup & Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;600;700;800&family=Gulzar&family=Noto+Nastaliq+Urdu:wght@400;700&display=swap');

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f6f4ed; /* Warm cream paper background */
    color: #1a1a1a;
    overflow-x: hidden;
}

.font-serif-custom {
    font-family: 'Playfair Display', serif;
}

/* 2. Grid Background Pattern (Classic Academic Feel) */
.bg-grid-pattern {
    background-image: linear-gradient(#e8e3d5 1px, transparent 1px), 
                      linear-gradient(90deg, #e8e3d5 1px, transparent 1px);
    background-size: 40px 40px;
}

/* 3. Premium Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f6f4ed; 
}
::-webkit-scrollbar-thumb {
    background: #7a2833; /* Royal Maroon */
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #5c1e27; 
}

/* =======================================================
   4. URDU TYPOGRAPHY & NASTALEEQ STANDARDS
======================================================= */
@font-face {
    font-family: 'Jameel Noori Nastaleeq';
    src: local('Jameel Noori Nastaleeq'), local('Nafees Nastaleeq');
}

.urdu-text, .font-urdu {
    font-family: 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', 'Gulzar', 'Arial', serif !important;
    line-height: 2.4 !important; 
    word-spacing: 3px;
    text-align: justify; /* Text dono taraf se bilkul barabar dikhega */
    text-justify: inter-word;
    direction: rtl;
}

/* Mobile ke liye Urdu font size aur line-height adjustment */
@media (max-width: 768px) {
    .urdu-text, .font-urdu {
        font-size: 1.5rem !important;
        line-height: 2.2 !important;
    }
}

/* =======================================================
   5. GLASSMORPHISM & HOVER EFFECTS
======================================================= */
.glass-panel {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.img-hover-zoom {
    overflow: hidden;
}
.img-hover-zoom img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.img-hover-zoom:hover img {
    transform: scale(1.05);
}

/* 6. Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* =======================================================
   7. CUSTOM HEADER & NAVBAR DESIGN (BUG-FREE)
======================================================= */
.custom-header {
    background-color: rgba(246, 244, 237, 0.92); /* Cream color with 92% opacity */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid #e8e3d5;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

/* Container ko poori screen ki width lene den */
.header-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo Styling (Fixed Size - Kabhi Bada Nahi Hoga!) */
.logo-group {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
}

.logo-img {
    width: 3.2rem !important;
    height: 3.2rem !important;
    max-width: 52px !important;
    max-height: 52px !important;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

/* Logo ka text ek hi line mein fix rakhne ke liye */
.logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    white-space: nowrap; /* Text ko tootne nahi degi */
    letter-spacing: -0.02em;
}

/* Navigation Menu (Desktop) */
.main-nav {
    display: none; /* Mobile par hidden rahega */
    align-items: center;
    gap: 0.15rem;
}

/* Laptop aur Desktop (1024px+) ke liye menu show karna */
@media (min-width: 1024px) {
    .main-nav {
        display: flex;
        flex-wrap: nowrap;
    }
}

/* Navbar links ko single line mein rakhne ke liye */
.nav-link {
    color: #333333;
    text-decoration: none;
    padding: 0.4rem 0.65rem;
    border-radius: 6px;
    transition: all 0.25s ease;
    white-space: nowrap; /* Sabse zaroori: text ko dual line mein jaane se rokega */
    font-size: 0.84rem;
    font-weight: 500;
}

.nav-link:hover {
    color: #7a2833;
    background-color: rgba(122, 40, 51, 0.06);
}

/* Jo page abhi khula hai uski active styling */
.nav-link.active {
    background-color: #7a2833;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 4px 8px -2px rgba(122, 40, 51, 0.3);
}

/* =======================================================
   8. MOBILE NAVIGATION (RESPONSIVENESS)
======================================================= */
.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    color: #1a1a1a;
    transition: background 0.2s;
}

.mobile-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Mobile Menu Container */
.mobile-nav-menu {
    display: none;
    flex-direction: column;
    background-color: #fefdfb;
    border-top: 1px solid #e8e3d5;
    padding: 1rem 1.25rem 1.5rem;
    box-shadow: 0 15px 20px -5px rgba(0, 0, 0, 0.1);
    max-height: 85vh;
    overflow-y: auto;
}

/* Show Mobile Menu when Active */
.mobile-nav-menu.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

/* Fix Mobile Links */
.mobile-nav-menu .nav-link {
    display: block;
    padding: 0.75rem 1rem;
    margin-bottom: 0.25rem;
    border-radius: 8px;
    font-size: 0.95rem;
    border-left: 3px solid transparent;
}

.mobile-nav-menu .nav-link:hover {
    border-left-color: #7a2833;
    padding-left: 1.25rem;
}

.mobile-nav-menu .nav-link.active {
    border-left-color: #a87c3b;
}

/* Screens smaller than Laptop (1024px) */
@media (max-width: 1024px) {
    .main-nav {
        display: none !important;
    }
    .mobile-toggle {
        display: block;
    }
    .logo-text {
        font-size: 1.05rem;
    }
    .header-container {
        padding: 0.6rem 1rem;
    }
}

/* =======================================================
   9. MODIFIED FOOTER DESIGN
======================================================= */
.custom-footer {
    background-color: #d6cba1; /* Rich Cream Color */
    border-top: 1px solid #c2b589;
    padding-top: 3.5rem;
    padding-bottom: 2rem;
    margin-top: 4rem;
    color: #2b2718;
}

.footer-tagline {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #353000;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
    font-size: 0.9rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

@media (min-width: 500px) {
    .footer-links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .footer-links-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.footer-col h4 {
    font-weight: 700;
    margin-bottom: 1.2rem;
    color: #1a1a1a;
    border-bottom: 2px solid #7a2833;
    display: inline-block;
    padding-bottom: 0.3rem;
}

.footer-col a {
    display: block;
    margin-bottom: 0.65rem;
    color: #3b3724;
    text-decoration: none;
    transition: all 0.25s ease;
}

.footer-col a:hover {
    color: #7a2833; /* Maroon Hover */
    transform: translateX(5px);
}

.footer-bottom {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.8rem;
    color: #555;
    gap: 0.5rem;
    text-align: center;
}

.designer-credit a {
    color: #7a2833;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s;
}

.designer-credit a:hover {
    color: #1a1a1a;
    text-decoration: underline;
}

/* =======================================================
   10. EDITORIAL BOARD & CARD HOVER EFFECTS
======================================================= */
/* Profile Cards Image Hover Effect */
.bg-white\/80:hover img, .glass-panel:hover img {
    transform: scale(1.06);
    border-color: #c2964b;
    box-shadow: 0 10px 20px -5px rgba(194, 150, 75, 0.3);
}

/* Small Member Cards Lift Effect */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px -8px rgba(122, 40, 51, 0.15);
    border-color: #7a2833;
}

/* Document Links Hover Animation */
.group:hover svg {
    transform: translateX(4px);
    transition: transform 0.25s ease;
}