/* assets/css/style.css - Sathyadhara (Royal Blue & Dark Editorial Theme) */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Malayalam:wght@300;400;500;600;700;800;900&family=Gayathri:wght@400;700&family=Noto+Serif+Malayalam:wght@400;600;700&family=Inter:wght@400;500;600;700;800&display=swap');

/* Local Offline-Ready Font-Faces for Instant Zero-Latency Malayalam Typography */
@font-face {
    font-family: 'Noto Sans Malayalam';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: local('Noto Sans Malayalam'), local('NotoSansMalayalam-Regular'), url('../fonts/NotoSansMalayalam-Regular.ttf') format('truetype');
}
@font-face {
    font-family: 'Noto Sans Malayalam';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: local('Noto Sans Malayalam Bold'), local('NotoSansMalayalam-Bold'), url('../fonts/NotoSansMalayalam-Bold.ttf') format('truetype');
}
@font-face {
    font-family: 'Gayathri';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: local('Gayathri'), local('Gayathri-Regular'), url('../fonts/Gayathri-Regular.ttf') format('truetype');
}
@font-face {
    font-family: 'Gayathri';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: local('Gayathri Bold'), local('Gayathri-Bold'), url('../fonts/Gayathri-Bold.ttf') format('truetype');
}

:root {
    --brand-primary: #181A20;
    --brand-secondary: #4865DC;
    --brand-secondary-hover: #3853C7;
    --brand-title-blue: #2554D7;
    --brand-accent: #2554D7;
    --brand-gold: #FEBD01;
    --brand-red: #DC2626;
    --text-main: #18181b;
    --text-muted: #64748B;
    --border-soft: #e2e8f0;
    --bg-page: #ffffff;
    --bg-card: #ffffff;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 28px;
    --shadow-soft: 0 4px 20px -2px rgba(72, 101, 220, 0.08);
    --shadow-float: 0 10px 30px -5px rgba(0, 0, 0, 0.12);
    --shadow-elevated: 0 20px 40px -10px rgba(72, 101, 220, 0.15);
}

.dark {
    --brand-primary: #5C79E8;
    --brand-secondary: #5C79E8;
    --brand-secondary-hover: #728DF2;
    --brand-title-blue: #688BF8;
    --brand-accent: #688BF8;
    --brand-gold: #FEBD01;
    --brand-red: #EF4444;
    --text-main: #f4f4f5;
    --text-muted: #94a3b8;
    --border-soft: #242838;
    --bg-page: #0C0E14;
    --bg-card: #151821;
    --shadow-soft: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
    --shadow-float: 0 10px 30px -5px rgba(0, 0, 0, 0.7);
    --shadow-elevated: 0 20px 40px -10px rgba(0, 0, 0, 0.8);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body, button, input, select, textarea {
    font-family: 'Noto Sans Malayalam', 'Gayathri', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.font-sans {
    font-family: 'Noto Sans Malayalam', 'Gayathri', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

h1, h2, h3, h4, h5, h6, .font-headline, .font-title {
    font-family: 'Noto Sans Malayalam', 'Gayathri', sans-serif !important;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Islamic Portal Navigation (Signature Charcoal Dark Bar) */
.iol-nav-bar {
    background-color: #181A20;
}

.nav-cat-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    transition: all 0.18s ease;
    text-decoration: none;
    white-space: nowrap;
}

.nav-cat-link:hover, .nav-cat-link.active {
    color: #ffffff;
    background-color: #282C35;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Category Pill Badges */
.pill-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background-color: #4865DC;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.25rem 0.65rem;
}

/* IslamOnLive Hero Overlap Card */
.iol-hero-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .iol-hero-grid {
        grid-template-columns: 1.75fr 1fr;
        gap: 2rem;
    }
}

.iol-lead-slider {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: linear-gradient(135deg, #181A20 0%, #2A3B75 50%, #4865DC 100%);
    aspect-ratio: 16 / 11;
    min-height: 230px;
}

@media (min-width: 640px) {
    .iol-lead-slider {
        aspect-ratio: 887 / 480;
        min-height: 380px;
    }
}

.iol-overlap-card {
    position: relative;
    z-index: 20;
    margin: -2.75rem 0.75rem 0;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.15rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

@media (min-width: 640px) {
    .iol-overlap-card {
        margin: -5.5rem auto 0;
        width: 88%;
        padding: 2rem;
    }
}

/* Side Stacked Cards */
.iol-side-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background-color: #18181b;
    aspect-ratio: 16 / 10;
    display: block;
}

@media (min-width: 1024px) {
    .iol-side-card {
        aspect-ratio: 16 / 9;
    }
}

.iol-side-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.iol-side-card:hover img {
    transform: scale(1.04);
}

.iol-side-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.88) 100%);
}

.circular-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    background: #4865DC;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
}

.circular-nav-btn:hover {
    background: #3853C7;
    transform: scale(1.05);
}

/* Section Header with Left Vertical Accent */
.iol-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 4px solid #4865DC;
    padding-left: 0.85rem;
    margin-bottom: 1.25rem;
}

.dark .iol-section-header {
    border-left-color: #4865DC;
}

/* Reels Vertical Video Strip */
.reel-portrait-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 9 / 16;
    background: #18181b;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-width: 145px;
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .reel-portrait-card {
        min-width: 0;
        flex-shrink: 1;
    }
}

.reel-portrait-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(72, 101, 220, 0.22);
}

.reel-play-bubble {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reel-play-bubble span {
    width: 48px;
    height: 48px;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.reel-portrait-card:hover .reel-play-bubble span {
    background: #4865DC;
    transform: scale(1.1);
}

/* Sathyadhara PDF Magazine 3D Card */
.pdf-magazine-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
}

.pdf-magazine-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-elevated);
    border-color: #4865DC;
}

.magazine-cover-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    overflow: hidden;
    background: #18181b;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.magazine-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.pdf-magazine-card:hover .magazine-cover-img {
    transform: scale(1.04);
}

/* 3-Tier Paywall Overlay */
.paywall-blur-box {
    position: relative;
    margin-top: 1.5rem;
    border-radius: var(--radius-2xl);
    border: 1px solid var(--border-soft);
    overflow: hidden;
    background: linear-gradient(to bottom, rgba(250, 250, 250, 0.4), rgba(250, 250, 250, 0.98));
}

.dark .paywall-blur-box {
    background: linear-gradient(to bottom, rgba(24, 24, 27, 0.5), rgba(24, 24, 27, 0.99));
}

.paywall-teaser-blur {
    filter: blur(5px);
    opacity: 0.35;
    user-select: none;
    pointer-events: none;
    padding: 2rem;
}

.paywall-modal-card {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 10;
}

.paywall-inner {
    width: min(100%, 540px);
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 24px;
    padding: 2.2rem;
    text-align: center;
    box-shadow: 0 25px 60px rgba(72, 101, 220, 0.25);
    backdrop-filter: blur(12px);
}

/* Sticky Floating Audio Player */
.sticky-audio-bar {
    position: fixed;
    bottom: 1.25rem;
    left: 1rem;
    right: 1rem;
    max-width: 600px;
    margin-left: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    padding: 0.75rem 1.2rem;
    box-shadow: 0 20px 45px rgba(72, 101, 220, 0.22);
    backdrop-filter: blur(20px);
    z-index: 100;
}

@media (max-width: 767px) {
    .sticky-audio-bar {
        bottom: 4.5rem;
        left: 0.75rem;
        right: 0.75rem;
    }
}

.audio-scrubber {
    accent-color: #4865DC;
    width: 100%;
    cursor: pointer;
}

/* Portal Modals */
.portal-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.portal-modal-backdrop.open {
    display: flex;
    animation: modalIn 0.25s ease-out;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.portal-modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 26px;
    max-width: 500px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

/* Home Lead Editorial Slider */
.home-lead-slider {
    position: relative;
    width: 100%;
}
.lead-slide {
    display: none;
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.lead-slide.active {
    display: block !important;
    opacity: 1;
    animation: fadeInSlide 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Small Rounded Borders for Editorial Images */
.editorial-img-rounded,
.lead-slide img {
    border-radius: 12px !important;
}

.img-border-box {
    border-radius: 14px !important;
    border: 1px solid rgba(228, 232, 240, 0.95) !important;
    overflow: hidden;
    box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.05);
}
.dark .img-border-box {
    border-color: rgba(39, 39, 42, 0.95) !important;
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.4);
}
.lead-slider-btn {
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #1e293b;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid #e2e8f0;
}
.dark .lead-slider-btn {
    background: #1e2230;
    color: #f1f5f9;
    border-color: #2e3446;
}
.lead-slider-btn:hover {
    background: #2554D7 !important;
    color: #ffffff !important;
    border-color: #2554D7 !important;
    transform: scale(1.08);
}
.lead-slider-dot {
    height: 7px;
    border-radius: 9999px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: #cbd5e1;
    cursor: pointer;
    border: none;
    padding: 0;
}
.dark .lead-slider-dot {
    background: #334155;
}
.lead-slider-dot.active {
    width: 28px;
    background: #2554D7;
}
.lead-slider-dot:not(.active) {
    width: 8px;
}
.lead-slider-dot:not(.active):hover {
    background: #94a3b8;
}

