/* ========== FONT FACE: Bahij Zar (Pashto) ========== */
@font-face {
    font-family: 'Bahij Zar';
    src: url('../fonts/BahijZar.woff2') format('woff2'),
         url('../fonts/BahijZar.woff') format('woff'),
         url('../fonts/BahijZar.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Bahij Zar';
    src: url('../fonts/BahijZar-Bold.woff2') format('woff2'),
         url('../fonts/BahijZar-Bold.woff') format('woff'),
         url('../fonts/BahijZar-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* ========== ROOT VARIABLES & GLOBAL ========== */
:root {
    --adabi-red: #8B2C2C;
    --adabi-gold: #C6A15B;
    --adabi-cream: #F5E6D3;
    --adabi-dark: #2C1810;
    --adabi-light: #FFF8F0;
    --shadow-sm: 0 10px 30px -10px rgba(139, 44, 44, 0.15);
    --shadow-hover: 0 20px 40px -10px rgba(139, 44, 44, 0.25);
    --border-radius-card: 28px;
    --border-radius-element: 18px;
}

body {
    background: var(--adabi-cream);
    font-family: 'Bahij Zar', 'Vazir', 'Tahoma', sans-serif;
    margin: 0;
    padding: 0;
    color: var(--adabi-dark);
}

/* Smooth container scrolling (for pages with fixed bottom nav) */
.container {
    height: 100vh;
    overflow-y: auto;
    padding-bottom: 90px;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
}
.container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* ========== HERO SECTION ========== */
.hero-wrapper {
    background: linear-gradient(145deg, var(--adabi-red) 0%, #A04040 100%);
    border-radius: 0 0 50px 50px;
    padding: 30px 20px 50px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}
.hero-wrapper::before {
    content: "⚘";
    font-size: 180px;
    position: absolute;
    bottom: -30px;
    left: -30px;
    opacity: 0.08;
    color: var(--adabi-gold);
    transform: rotate(15deg);
    font-family: serif;
}
.hero-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.15) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.logo-circle {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    background: #fff;
    border-radius: 50% 50% 30% 30%;
    padding: 8px;
    box-shadow: 0 20px 30px rgba(0,0,0,0.2);
    border: 3px solid var(--adabi-gold);
}
.logo-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50% 50% 25% 25%;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 2px 4px 10px rgba(0,0,0,0.3);
    letter-spacing: 1px;
    margin-bottom: 5px;
}
.hero-subtitle {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.9);
    background: rgba(0,0,0,0.1);
    display: inline-block;
    padding: 8px 30px;
    border-radius: 50px;
    backdrop-filter: blur(5px);
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.2);
}

/* ========== SEARCH CARD ========== */
.search-elegant {
    background: #fff;
    border-radius: var(--border-radius-card);
    padding: 30px 25px;
    box-shadow: var(--shadow-sm);
    transform: translateY(-40px);
    margin-bottom: -10px;
    border: 1px solid rgba(198, 161, 91, 0.2);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.input-icon-group {
    position: relative;
    width: 100%;
}
.input-icon-group i {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--adabi-gold);
    font-size: 1.1rem;
    z-index: 4;
}
.input-icon-group select,
.input-icon-group input {
    width: 100%;
    padding: 14px 45px 14px 20px;
    border: 2px solid #EFE3D5;
    border-radius: 16px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--adabi-dark);
    background: #fff;
    transition: all 0.2s;
    appearance: none;
}
.input-icon-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='%238B2C2C' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 18px center;
    background-size: 14px;
}
.input-icon-group select:focus,
.input-icon-group input:focus {
    border-color: var(--adabi-gold);
    box-shadow: 0 0 0 4px rgba(198, 161, 91, 0.2);
    outline: none;
}

.btn-gradient {
    background: linear-gradient(135deg, var(--adabi-red), #571f1f);
    border: none;
    border-radius: 16px;
    padding: 14px 20px;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 10px 20px -5px rgba(139, 44, 44, 0.4);
    transition: all 0.2s;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1.1rem;
}
.btn-gradient:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 30px -5px rgba(139, 44, 44, 0.5);
    background: linear-gradient(135deg, #571f1f, #3d1313);
}

/* ========== SECTION HEADINGS ========== */
.section-header {
    display: flex;
    align-items: center;
    margin: 40px 0 25px;
}
.section-header h3 {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--adabi-dark);
    margin: 0;
    position: relative;
    display: inline-block;
}
.section-header h3:after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 0;
    width: 70%;
    height: 4px;
    background: linear-gradient(90deg, var(--adabi-gold), transparent);
    border-radius: 4px;
}
.section-header i {
    font-size: 2.2rem;
    color: var(--adabi-gold);
    margin-left: 15px;
    opacity: 0.7;
}

/* ========== TOP POETS HORIZONTAL SCROLL ========== */
.poets-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 15px 5px 25px;
    scrollbar-width: thin;
    scrollbar-color: var(--adabi-gold) var(--adabi-cream);
}
.poets-scroll::-webkit-scrollbar {
    height: 6px;
}
.poets-scroll::-webkit-scrollbar-thumb {
    background: var(--adabi-gold);
    border-radius: 20px;
}
.poet-scroll-item {
    flex: 0 0 auto;
    width: 100px;
    text-align: center;
}
.poet-scroll-item .avatar {
    width: 100px;
    height: 100px;
    border-radius: 50% 50% 30% 30%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 10px 20px rgba(139,44,44,0.2);
    transition: transform 0.2s;
    background: #fff;
}
.poet-scroll-item .avatar:hover {
    transform: scale(1.05);
}
.poet-scroll-item .name-badge {
    display: inline-block;
    margin-top: 10px;
    background: var(--adabi-red);
    color: #fff;
    padding: 6px 16px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: all 0.2s;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}
.poet-scroll-item .name-badge:hover {
    background: #571f1f;
    transform: translateY(-2px);
}

/* ========== CENTURY CHIPS ========== */
.century-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0 10px;
}
.chip {
    background: linear-gradient(145deg, #fff, #f9f0e6);
    border: 1px solid rgba(198, 161, 91, 0.4);
    color: var(--adabi-dark);
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 5px 10px rgba(0,0,0,0.03);
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}
.chip:hover {
    background: var(--adabi-gold);
    color: #fff;
    border-color: var(--adabi-gold);
    transform: translateY(-3px);
    box-shadow: 0 12px 20px -8px rgba(198, 161, 91, 0.5);
}

/* ========== CENTURY CARD ========== */
.century-card {
    background: #fff;
    border-radius: 30px;
    padding: 20px 20px 30px;
    margin-bottom: 35px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(198, 161, 91, 0.15);
    transition: box-shadow 0.2s;
}
.century-card:hover {
    box-shadow: var(--shadow-hover);
}
.century-title {
    background: var(--adabi-gold);
    color: #fff;
    padding: 14px 25px;
    border-radius: 50px;
    display: inline-block;
    margin-bottom: 25px;
    font-weight: 800;
    font-size: 1.5rem;
    box-shadow: 0 8px 15px rgba(198,161,91,0.3);
}
.poet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 20px;
}
.poet-card {
    text-align: center;
}
.poet-card .avatar {
    width: 110px;
    height: 110px;
    border-radius: 50% 50% 30% 30%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 8px 15px rgba(139,44,44,0.2);
    transition: transform 0.2s;
    margin-bottom: 10px;
}
.poet-card .avatar:hover {
    transform: scale(1.05);
}
.poet-card .name {
    background: var(--adabi-red);
    color: #fff;
    padding: 6px 12px;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: all 0.2s;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.poet-card .name:hover {
    background: #571f1f;
    transform: translateY(-2px);
}

/* ========== FOLK CARDS ========== */
.folk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 25px 0;
}
.folk-item {
    background: #fff;
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    border: 1px solid rgba(198, 161, 91, 0.2);
}
.folk-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--adabi-gold);
}
.folk-link {
    display: flex;
    align-items: center;
    padding: 20px 25px;
    text-decoration: none;
    color: var(--adabi-dark);
    font-weight: 700;
    font-size: 1.1rem;
    gap: 15px;
}
.folk-icon {
    font-size: 2.2rem;
    color: var(--adabi-red);
    transition: transform 0.2s;
}
.folk-item:hover .folk-icon {
    transform: scale(1.1);
}
.folk-arrow {
    margin-right: auto;
    color: var(--adabi-gold);
    font-size: 1.1rem;
    opacity: 0.5;
    transition: transform 0.2s, opacity 0.2s;
}
.folk-item:hover .folk-arrow {
    transform: translateX(-6px);
    opacity: 1;
}

/* ========== BOTTOM NAVIGATION ========== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 248, 240, 0.85);
    backdrop-filter: blur(15px);
    display: flex;
    justify-content: space-around;
    padding: 12px 0 18px;
    box-shadow: 0 -5px 30px rgba(139, 44, 44, 0.15);
    z-index: 1000;
    border-top: 2px solid rgba(198, 161, 91, 0.3);
    border-radius: 35px 35px 0 0;
}
.nav-item {
    text-align: center;
    color: var(--adabi-dark);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 40px;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0.7;
}
.nav-item i {
    display: block;
    font-size: 1.8rem;
    margin-bottom: 4px;
    color: var(--adabi-red);
    transition: transform 0.2s;
}
.nav-item:hover,
.nav-item.active {
    opacity: 1;
    background: rgba(139, 44, 44, 0.08);
    transform: translateY(-4px);
}
.nav-item.active i {
    transform: scale(1.15);
    color: var(--adabi-red);
}
.nav-item.active {
    position: relative;
}
.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 4px;
    background: var(--adabi-gold);
    border-radius: 10px;
    animation: slideUp 0.3s ease;
}
@keyframes slideUp {
    from { width: 0; opacity: 0; }
    to { width: 30px; opacity: 1; }
}

/* ========== RESPONSIVE FINE-TUNING ========== */
@media (max-width: 576px) {
    .hero-title { font-size: 2.2rem; }
    .hero-subtitle { font-size: 1rem; }
    .logo-circle { width: 100px; height: 100px; }
    .search-elegant { padding: 20px 15px; }
    .section-header h3 { font-size: 1.5rem; }
    .poet-grid { grid-template-columns: repeat(2, 1fr); }
    .folk-grid { grid-template-columns: 1fr; }
}

/* Pagination styling */
.pagination {
    justify-content: center;
    gap: 5px;
}
.page-link {
    border-radius: 50px !important;
    margin: 0 3px;
    color: var(--adabi-dark);
    border: 1px solid var(--adabi-gold);
    background: #fff;
    padding: 8px 16px;
    font-weight: 600;
}
.page-item.active .page-link {
    background: var(--adabi-red);
    border-color: var(--adabi-red);
    color: #fff;
}
.page-link:hover {
    background: var(--adabi-gold);
    color: #fff;
    border-color: var(--adabi-gold);
}
