/* ===================================
   COMMON STYLES - Shared across pages
   =================================== */

@import url("https://use.typekit.net/zzh4cty.css");

/* Font Face */
@font-face {
    font-family: 'Hamdullah';
    src: url('/font/KuranKerimFontHamdullah.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Hamdullah2';
    src: url('/font/KuranKerimFontHamdullahv2.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Base Body Styles */
body {
    font-family: 'Hamdullah2', 'Hamdullah', 'Traditional Arabic', 'Arabic Typesetting', 'Geeza Pro', Arial, sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 20px;
    line-height: 2;
}

/* Container Base */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Headings */
h1 {
    text-align: center;
    color: #2c5f2d;
    font-size: 2.8em;
    margin-bottom: -10px;
    font-weight: normal;
}

/* Header Slogan */
.header-slogan {
    text-align: center;
    color: #666;
    font-size: 0.9em;
    margin-bottom: 20px;
    direction: ltr;
}

/* Tahsin Title */
.tahsin {
    font-family: 'aldhabi', 'Hamdullah', 'Traditional Arabic', serif;
}

/* Beta Tag */
.beta-tag {
    display: inline-block;
    background-color: #e74c3c;
    color: white;
    font-size: 0.4em;
    padding: 2px 6px;
    border-radius: 3px;
    vertical-align: super;
    font-weight: bold;
    margin-right: 5px;
    line-height: 1;
}

/* Section Header */
.section-header {
    margin: 30px 0;
    text-align: center;
}

.section-header h2 {
    color: #2c5f2d;
    font-size: 1.8em;
    margin-bottom: 10px;
}

.section-header p {
    margin-bottom: 15px;
}

.section-header a {
    color: #4a8f4d;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: bold;
}

.section-header a:hover {
    text-decoration: underline;
}

.section-header a.active-nav {
    color: #1a3a1b;
    font-weight: 900;
    border-bottom: 3px solid #2c5f2d;
    padding-bottom: 2px;
}

/* Button: Danger */
.btn-danger {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    text-decoration: none;
    display: inline-block;
}

.btn-danger:hover {
    background: #c0392b;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 10px 20px;
    background: #2c5f2d;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-weight: bold;
}

.pagination-btn:hover {
    background: #4a8f4d;
}

.pagination-btn.disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.pagination-info {
    padding: 10px 20px;
    color: #666;
    font-weight: bold;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    background: white;
    border-radius: 8px;
    margin: 20px;
}

.empty-state h2 {
    margin-bottom: 10px;
    color: #2c5f2d;
}

/* Sticky Bar (used in page views) */
.sticky-bar {
    position: fixed;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2c5f2d 0%, #4a8f4d 100%);
    color: white;
    padding: 8px 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.sticky-bar.bottom {
    bottom: 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}

.sticky-bar h2 {
    margin: 0;
    font-size: 1.3em;
    flex: 1;
    min-width: 150px;
}

/* Sticky Navigation */
.sticky-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.sticky-nav a, .sticky-nav span {
    background-color: rgba(255,255,255,0.2);
    color: white;
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9em;
    transition: background-color 0.3s;
}

.sticky-nav a:hover {
    background-color: rgba(255,255,255,0.3);
}

.sticky-nav span.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #2c5f2d;
}

.page-header h1 {
    color: #2c5f2d;
    font-size: 2em;
    margin: 0 0 10px 0;
}

/* Page Number Display */
.page-number {
    color: #666;
    font-size: 1.2em;
    margin-bottom: 10px;
}

/* View Toggle */
.view-toggle {
    margin-top: 15px;
}

.view-toggle a {
    color: #2c5f2d;
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid #2c5f2d;
    border-radius: 5px;
    font-size: 0.9em;
    transition: all 0.3s;
}

.view-toggle a:hover {
    background-color: #2c5f2d;
    color: white;
}

/* Surah Header */
.surah-header {
    font-size: 1.8em;
    font-weight: normal;
    text-align: center;
    color: #2c5f2d;
    margin: 30px 0 20px 0;
    padding: 15px;
    background-color: #e8f5e9;
    border-radius: 5px;
    direction: rtl;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 15px;
    }

    h1 {
        font-size: 2.6em;
    }

    /* Header Slogan */
    .header-slogan {
        font-size: 0.7em;
    }

    .sticky-bar {
        padding: 6px 8px;
        gap: 4px;
    }

    .page-header {
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
}

/* Landscape Mobile - Keep navigation text size consistent */
@media (max-width: 950px) and (orientation: landscape) {
    .section-header a {
        font-size: 0.95em;
    }

    .section-header {
        margin: 20px 0;
    }

    .section-header p {
        margin-bottom: 10px;
    }
}
