/* ===================================================
   خاتم النبیین ﷺ ڈیجیٹل پورٹل - ماسٹر اسٹائل شیٹ (style.css)
   =================================================== */

/* --- 1. فونٹس (Font Declarations) --- */
@font-face {
    font-family: 'Mehr_Nastaliq_Web';
    src: url('../fonts/Mehr_Nastaliq_Web%20v.2.0.woff') format('woff'),
         url('../fonts/Mehr_Nastaliq_Web%20v.%202.0.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Jameel Noori Nastaleeq';
    src: url('../fonts/JameelNooriNastaleeq.woff') format('woff'),
         url('../fonts/JameelNooriNastaleeq.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* --- 2. بنیادی متغیرات (Root Variables) --- */
:root {
    --primary-islamic: #073B31;
    --primary-dark: #052a23;
    --primary-light: #0a5244;
    --accent-gold: #ffc107;
    --accent-gold-dark: #d97706;
    --bg-light: #f4f7f6;
    --text-dark: #212529;
}

/* --- 3. عمومی اسٹائلز (Global Styles) --- */
body {
    font-family: 'Mehr_Nastaliq_Web', 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', 'Amiri', serif;
    line-height: 1.9;
    background-color: var(--bg-light);
    color: var(--text-dark);
    direction: rtl;
    text-align: right;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .navbar-brand, .urdu-heading {
    font-family: 'Mehr_Nastaliq_Web', 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', serif;
    line-height: 1.6;
}

a {
    text-decoration: none;
    transition: all 0.25s ease;
}

/* --- 4. نیویگیشن بار (Navbar) --- */
.navbar-islamic {
    background: linear-gradient(135deg, #073B31 0%, #052a23 100%) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
}

.navbar-brand-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.navbar-brand-title {
    font-size: 1.35rem;
    font-weight: bold;
    color: #ffffff;
    margin-right: 8px;
}

.navbar-nav .nav-link {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 8px 12px !important;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s ease;
}

.navbar-nav .nav-link:hover, 
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link.active {
    color: var(--accent-gold) !important;
    background: rgba(255, 255, 255, 0.08);
}

.navbar-nav .nav-link img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* Dropdowns in RTL */
.navbar-nav .dropdown-menu {
    border: none;
    border-top: 3px solid var(--accent-gold);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    right: 0 !important;
    left: auto !important;
    text-align: right;
    margin-top: 8px;
}

.dropdown-item {
    font-size: 0.95rem;
    padding: 8px 16px;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--primary-islamic);
    color: #ffffff;
    padding-right: 20px;
}

/* --- 5. ہیرو بینر (Hero Banner) --- */
.hero-banner {
    position: relative;
    min-height: 420px;
    background: url('../images/main-banner.webp') no-repeat center center;
    background-size: cover;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(7, 59, 49, 0.85) 0%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
}

.z-index-2 {
    z-index: 2;
    position: relative;
}

.hero-banner h1 {
    font-family: 'Mehr_Nastaliq_Web', serif;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
}

/* --- 6. سرچ بار (Search Bar) --- */
.custom-search-group {
    border-radius: 50px;
    overflow: hidden;
    border: 2px solid var(--primary-islamic);
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    display: flex;
}

.custom-search-input {
    border: none;
    padding: 12px 22px;
    font-size: 1.05rem;
    flex-grow: 1;
}

.custom-search-input:focus {
    outline: none;
    box-shadow: none;
}

.custom-search-btn {
    background-color: var(--primary-islamic);
    color: #ffffff;
    border: none;
    font-weight: 600;
    padding: 10px 24px;
    transition: all 0.3s ease;
}

.custom-search-btn:hover {
    background-color: var(--primary-light);
    color: #ffffff;
}

/* --- 7. داخلہ بینر (Admission Banner) --- */
.admission-banner {
    background: linear-gradient(135deg, #073B31 0%, #0a5244 100%);
    border-radius: 14px;
    color: white;
    padding: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.admission-banner:hover {
    transform: translateY(-2px);
    transition: transform 0.3s ease;
}

/* --- 8. ویڈیو پوسٹ / اسٹوڈیو کارڈز (Video Cards) --- */
.lecture-post-container {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lecture-post-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.lecture-thumbnail {
    position: relative;
    overflow: hidden;
    display: block;
}

.lecture-thumbnail img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.lecture-thumbnail:hover img {
    transform: scale(1.05);
}

.play-icon-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.play-icon-overlay i {
    font-size: 3rem;
    color: #ffffff;
    opacity: 0.9;
    transition: transform 0.3s ease;
}

.lecture-thumbnail:hover .play-icon-overlay i {
    transform: scale(1.15);
    color: var(--accent-gold);
}

/* --- 9. کتب کی پٹی (Book Marquee) --- */
.marquee-wrapper {
    background-color: #ffffff;
    border-top: 3px solid var(--primary-islamic);
    border-bottom: 1px solid #e9ecef;
    overflow: hidden;
    position: relative;
    width: 100%;
    padding: 15px 0;
}

.marquee-content {
    display: flex;
    width: max-content;
    animation: marqueeScroll 25s linear infinite;
}

.marquee-content:hover {
    animation-play-state: paused;
}

.book-card-mini {
    width: 130px;
    margin: 0 20px;
    text-align: center;
    flex-shrink: 0;
}

.book-card-mini img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease;
}

.book-card-mini:hover img {
    transform: translateY(-8px);
    border-color: var(--primary-islamic);
}

.book-card-mini span {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--primary-islamic);
}

@keyframes marqueeScroll {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0%); }
}

/* --- 10. سیمینار گیلری اینیمیشن (Seminar Marquee) --- */
.seminar-marquee {
    display: flex;
    width: 100%;
    overflow: hidden;
    padding: 15px 0;
}

.seminar-track {
    display: flex;
    animation: scrollGalleryRight 35s linear infinite;
}

.seminar-track:hover {
    animation-play-state: paused;
}

.seminar-card {
    position: relative;
    flex: 0 0 280px;
    margin: 0 10px;
    height: 180px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

.seminar-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.seminar-overlay {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(7, 59, 49, 0.88);
    color: white;
    text-align: center;
    padding: 8px;
    font-size: 0.85rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.seminar-card:hover .seminar-overlay {
    transform: translateY(0);
}

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

@keyframes scrollGalleryRight {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0%); }
}

/* --- 11. نیوز ٹکر (News Ticker) --- */
.news-ticker-container {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    height: 190px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.news-ticker-track {
    animation: ticker-scroll 22s linear infinite;
}

.news-ticker-track:hover {
    animation-play-state: paused;
}

@keyframes ticker-scroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

.news-item {
    padding: 8px 12px;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transition: background 0.3s;
}

.news-item:hover {
    background: rgba(255, 193, 7, 0.15);
}

/* --- 12. سبسکرپشن باکس (Newsletter) --- */
.subscription-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid rgba(7, 59, 49, 0.1);
    padding: 25px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}

.subscription-input {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 10px 14px;
}

.subscription-input:focus {
    border-color: var(--primary-islamic);
    box-shadow: 0 0 0 0.2rem rgba(7, 59, 49, 0.12);
}

.btn-subscription {
    background-color: var(--primary-islamic);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.btn-subscription:hover {
    background-color: var(--primary-dark);
    color: #ffffff;
}

/* --- 13. فوٹر (Footer) --- */
.main-footer {
    background: linear-gradient(180deg, #073B31 0%, #041f1a 100%);
    color: #ffffff;
    padding: 50px 0 20px;
    margin-top: 60px;
    border-top: 4px solid var(--accent-gold);
}

.footer-heading {
    color: var(--accent-gold);
    font-weight: bold;
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(255, 193, 7, 0.4);
    display: inline-block;
}

.footer-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    display: inline-block;
    padding: 4px 0;
    transition: all 0.25s ease;
}

.footer-link:hover {
    color: var(--accent-gold);
    padding-right: 6px;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    margin-left: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-btn:hover {
    transform: translateY(-3px);
    color: #ffffff;
}

.social-btn.facebook:hover { background: #1877f2 !important; }
.social-btn.youtube:hover { background: #ff0000 !important; }
.social-btn.twitter:hover { background: #1da1f2 !important; }
.social-btn.instagram:hover { background: #e1306c !important; }
.social-btn.linkedin:hover { background: #0077b5 !important; }
.social-btn.whatsapp:hover { background: #25d366 !important; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* --- 14. ہیلپر و یوٹیلیٹی کلاسز (Helpers) --- */
.view-all-link {
    color: var(--primary-islamic);
    font-weight: bold;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.view-all-link:hover {
    color: var(--primary-light);
    transform: translateX(-4px);
}

.bg-dark-green { background-color: var(--primary-islamic) !important; color: white !important; }
.text-dark-green { color: var(--primary-islamic) !important; }
.border-dark-green { border-color: var(--primary-islamic) !important; }

/* Responsive Tweaks */
@media (max-width: 991px) {
    .navbar-nav .nav-link {
        font-size: 1.15rem;
        padding: 10px 14px !important;
    }
    .main-footer {
        text-align: center;
    }
    .footer-heading {
        margin-top: 20px;
    }
}