/* ============================================================
   KaabaLive.net – Design System & Styles
   Colors: Navy, Gold, Green | Premium Islamic Theme
   ============================================================ */

/* --- Google Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Amiri:wght@400;700&display=swap');

/* --- CSS Variables --- */
:root {
    --navy: #0a1628;
    --navy-light: #142236;
    --navy-dark: #060f1d;
    --gold: #d4a853;
    --gold-light: #e8c87a;
    --gold-hover: #c9953e;
    --green: #1a7a4c;
    --green-light: #22a566;
    --white: #ffffff;
    --gray-50: #f8f9fa;
    --gray-100: #f1f3f5;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #adb5bd;
    --gray-500: #6c757d;
    --gray-600: #495057;
    --gray-700: #343a40;
    --font-main: 'Inter', -apple-system, sans-serif;
    --font-arabic: 'Amiri', serif;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, .1);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, .15);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all .3s ease;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    font-size: 15px;
    line-height: 1.7;
    color: var(--gray-700);
    background: var(--gray-50);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--gold-hover);
}

img {
    max-width: 100%;
    height: auto;
}

h1,
h2,
h3,
h4,
h5 {
    font-weight: 700;
    color: var(--navy);
    line-height: 1.3;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
    margin: 24px 0 12px;
}

h3 {
    font-size: 1.2rem;
    margin: 18px 0 8px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Top Bar --- */
.top-bar {
    background: var(--navy-dark);
    color: var(--gray-400);
    font-size: .78rem;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar a {
    color: var(--gray-400);
}

.top-bar a:hover {
    color: var(--gold);
}

.top-bar-right {
    display: flex;
    gap: 16px;
    align-items: center;
}

.top-bar .social-links {
    display: flex;
    gap: 10px;
}

.top-bar .social-links a {
    font-size: .9rem;
}

.lang-switch {
    background: rgba(255, 255, 255, .08);
    padding: 3px 12px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 500;
    color: var(--gold);
}

.lang-switch:hover {
    background: rgba(255, 255, 255, .14);
    color: var(--gold-light);
}

/* --- Header --- */
.main-header {
    background: var(--navy);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-weight: 800;
    font-size: 1.3rem;
}

.logo .kaaba-icon {
    font-size: 1.6rem;
}

.logo span {
    color: var(--gold);
}

/* --- Navigation --- */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 0;
}

.main-nav a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 20px 14px;
    color: var(--gray-300);
    font-size: .85rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--gold);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 14px;
    right: 14px;
    height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transition: var(--transition);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    transform: scaleX(1);
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--navy-light);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    z-index: 100;
    padding: 8px 0;
}

.nav-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    padding: 10px 20px;
    display: block;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background: rgba(255, 255, 255, .05);
}

/* Mobile Menu */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, var(--navy-light) 100%);
    padding: 40px 0 50px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 120%, rgba(212, 168, 83, .08) 0%, transparent 60%);
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-content {
    text-align: center;
    margin-bottom: 30px;
}

.hero h1 {
    color: var(--white);
    font-size: 2.2rem;
    margin-bottom: 12px;
}

.hero p {
    color: var(--gray-400);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(220, 53, 69, .15);
    color: #ff4757;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 700;
    margin-bottom: 14px;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .7;
    }
}

/* --- Video Player --- */
.video-player {
    max-width: 900px;
    margin: 0 auto;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
    background: #000;
}

.video-player .video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

.video-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* --- Cards Grid --- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 30px 0;
}

.stream-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

.stream-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    height: 180px;
    background: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative;
}

.card-content {
    padding: 20px;
}

.card-content h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
}

.card-content h3 a {
    color: var(--navy);
}

.card-content h3 a:hover {
    color: var(--gold);
}

.card-content p {
    color: var(--gray-500);
    font-size: .88rem;
    margin-bottom: 14px;
}

.card-meta {
    display: flex;
    gap: 16px;
    font-size: .78rem;
    color: var(--gray-400);
}

.card-meta i {
    margin-right: 4px;
}

/* --- Features Grid --- */
.features-section {
    padding: 50px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 36px;
}

.section-title h2 {
    font-size: 1.7rem;
    margin-bottom: 8px;
}

.section-title p {
    color: var(--gray-500);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.feature-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--gold);
}

.feature-card .icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.3rem;
    color: var(--white);
}

.feature-card h3 {
    font-size: 1rem;
    margin-bottom: 6px;
}

.feature-card p {
    font-size: .85rem;
    color: var(--gray-500);
}

/* --- Blog Grid --- */
.blog-section {
    padding: 50px 0;
    background: var(--gray-100);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.blog-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gold);
    font-weight: 600;
    font-size: .85rem;
}

.read-more:hover {
    gap: 10px;
}

/* --- Prayer Widget --- */
.prayer-widget {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.prayer-widget h3 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--navy);
}

.prayer-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: .9rem;
}

.prayer-row:last-child {
    border-bottom: none;
}

.prayer-row .name {
    font-weight: 500;
    color: var(--gray-700);
}

.prayer-row .time {
    font-weight: 600;
    color: var(--navy);
}

/* --- CTA Banner --- */
.cta-banner {
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    padding: 50px 0;
    text-align: center;
}

.cta-banner h2 {
    color: var(--white);
    margin-bottom: 10px;
}

.cta-banner p {
    color: var(--gray-400);
    margin-bottom: 24px;
}

/* --- Page Header --- */
.page-header {
    background: linear-gradient(135deg, var(--navy-dark), var(--navy));
    padding: 36px 0;
    text-align: center;
}

.page-header h1 {
    color: var(--white);
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.breadcrumb {
    display: flex;
    gap: 8px;
    justify-content: center;
    list-style: none;
    font-size: .82rem;
    color: var(--gray-400);
}

.breadcrumb a {
    color: var(--gold);
}

/* --- Content Layout --- */
.content-area {
    padding: 40px 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
}

.content-main {
    min-width: 0;
}

.content-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.sidebar-widget h4 {
    font-size: .95rem;
    margin-bottom: 14px;
    color: var(--navy);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gold);
}

.sidebar-links {
    list-style: none;
}

.sidebar-links li {
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
}

.sidebar-links li:last-child {
    border-bottom: none;
}

.sidebar-links a {
    color: var(--gray-600);
    font-size: .88rem;
}

.sidebar-links a:hover {
    color: var(--gold);
}

/* --- Article Content --- */
.article-content {
    background: var(--white);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    line-height: 1.8;
}

.article-content h2 {
    color: var(--navy);
    border-bottom: 2px solid var(--gold);
    padding-bottom: 8px;
}

.article-content p {
    margin-bottom: 16px;
}

.article-content ul,
.article-content ol {
    margin: 12px 0;
    padding-left: 24px;
}

.article-content li {
    margin-bottom: 6px;
}

.article-content blockquote {
    border-left: 4px solid var(--gold);
    background: var(--gray-50);
    margin: 20px 0;
    padding: 16px 24px;
    font-style: italic;
    color: var(--gray-600);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.article-content th,
.article-content td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.article-content th {
    background: var(--navy);
    color: var(--white);
}

/* --- Comments Section --- */
.comments-section {
    margin-top: 30px;
}

.comment-box {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.comment-box .comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.comment-box .author {
    font-weight: 600;
    color: var(--navy);
}

.comment-box .date {
    font-size: .8rem;
    color: var(--gray-400);
}

.comment-box .text {
    color: var(--gray-600);
    font-size: .92rem;
}

/* --- Forms --- */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: .85rem;
    margin-bottom: 6px;
    color: var(--navy);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 16px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-family: var(--font-main);
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 168, 83, .15);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: .88rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: var(--font-main);
    text-decoration: none;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--navy);
}

.btn-gold:hover {
    background: linear-gradient(135deg, var(--gold-hover), var(--gold));
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: var(--navy);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--gold);
    color: var(--gold);
}

.btn-outline:hover {
    background: var(--gold);
    color: var(--navy);
}

.btn-navy {
    background: var(--navy);
    color: var(--white);
}

.btn-navy:hover {
    background: var(--navy-light);
}

/* --- Footer --- */
.main-footer {
    background: var(--navy);
    color: var(--gray-400);
    padding: 50px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 30px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.footer-col h4 {
    color: var(--white);
    font-size: .95rem;
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--gold);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--gray-400);
    font-size: .85rem;
}

.footer-links a:hover {
    color: var(--gold);
    padding-left: 4px;
}

.footer-about p {
    font-size: .85rem;
    margin-bottom: 16px;
    line-height: 1.7;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-links a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    font-size: .9rem;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
}

.newsletter-form {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.newsletter-form input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .05);
    color: var(--white);
    font-size: .85rem;
}

.newsletter-form button {
    padding: 10px 18px;
    background: var(--gold);
    color: var(--navy);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background: var(--gold-light);
}

.footer-bottom {
    padding: 20px 0;
    text-align: center;
    font-size: .8rem;
}

.footer-bottom a {
    color: var(--gray-400);
    margin: 0 8px;
}

.footer-bottom a:hover {
    color: var(--gold);
}

/* --- Scroll to Top --- */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: var(--gold);
    color: var(--navy);
    border: none;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    z-index: 999;
    transition: var(--transition);
}

.scroll-top.visible {
    display: flex;
}

.scroll-top:hover {
    background: var(--gold-light);
    transform: translateY(-3px);
}

/* --- Cookie Consent --- */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--navy);
    color: var(--gray-300);
    padding: 16px 20px;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 9999;
    font-size: .85rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, .2);
}

.cookie-consent.show {
    display: flex;
}

/* --- Compass (Qibla) --- */
.compass {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 3px solid var(--gold);
    position: relative;
    margin: 30px auto;
    background: var(--navy);
}

.compass-arrow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 80px;
    background: linear-gradient(var(--gold), var(--green));
    transform-origin: bottom center;
    transform: translate(-50%, -100%);
    border-radius: 2px;
}

.compass-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background: var(--gold);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.qibla-degrees {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
    margin-top: 16px;
}

/* --- Gallery --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4/3;
    transition: var(--transition);
}

.gallery-item:hover {
    transform: scale(1.02);
}

/* --- Alerts --- */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: .9rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--navy);
        flex-direction: column;
        padding: 15px 0;
        box-shadow: var(--shadow-lg);
    }

    .main-nav.active {
        display: flex;
    }

    .main-nav ul {
        flex-direction: column;
    }

    .main-nav a {
        padding: 12px 24px;
    }

    .nav-dropdown .dropdown-menu {
        position: static;
        background: var(--navy-dark);
        box-shadow: none;
    }

    .mobile-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .top-bar .container {
        flex-direction: column;
        gap: 4px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .article-content {
        padding: 20px;
    }

    .page-header h1 {
        font-size: 1.4rem;
    }
}