/* Tibmalaka — Elektron kutubxona uchun uslublar */
.library-wrap {
    padding: 60px 0 80px;
    background: #f5f7fa;
    min-height: 60vh;
}
.library-title {
    text-align: center;
    margin-bottom: 30px;
}
.library-title h2 {
    font-size: 32px;
    color: #1a8a52;
    font-weight: 700;
}
.library-title p { color: #666; }

.library-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 16px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,.04);
}
.library-toolbar .search-box {
    display: flex;
    gap: 8px;
    flex: 1;
    min-width: 260px;
}
.library-toolbar input[type=text] {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    outline: none;
}
.library-toolbar input[type=text]:focus { border-color: #1a8a52; }
.library-toolbar select {
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    background: #fff;
}
.library-toolbar button {
    padding: 10px 22px;
    background: #1a8a52;
    color: #fff;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}
.library-toolbar button:hover { background: #156e42; }

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 22px;
}
.book-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
}
.book-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,.1);
}
.book-cover {
    width: 100%;
    height: 280px;
    background: #e8eef2 url('images/book-placeholder.svg') center/60px no-repeat;
    overflow: hidden;
}
.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.book-body {
    padding: 14px 16px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.book-body h4 {
    font-size: 15px;
    font-weight: 700;
    color: #222;
    margin: 0 0 6px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.book-body .author {
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
    flex: 1;
}
.book-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}
.book-meta .downloads i { color: #1a8a52; }
.book-card a.btn-view {
    display: block;
    text-align: center;
    background: #1a8a52;
    color: #fff;
    padding: 8px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}
.book-card a.btn-view:hover { background: #156e42; color: #fff; }

.no-books {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    background: #fff;
    border-radius: 10px;
}

.pagination-bar {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 36px;
}
.pagination-bar a, .pagination-bar span {
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    background: #fff;
    color: #1a8a52;
    border: 1px solid #ddd;
}
.pagination-bar .active {
    background: #1a8a52;
    color: #fff;
    border-color: #1a8a52;
}

/* Book detail page */
.book-detail {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.book-detail .row { align-items: flex-start; }
.book-detail .cover-large {
    width: 100%;
    max-width: 280px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
}
.book-detail h1 {
    font-size: 28px;
    color: #1a8a52;
    margin-bottom: 8px;
}
.book-detail .author-big {
    color: #666;
    font-size: 17px;
    margin-bottom: 18px;
}
.book-detail .info-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}
.book-detail .info-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    color: #555;
}
.book-detail .info-list li b { color: #222; margin-right: 8px; }
.book-detail .description {
    color: #444;
    line-height: 1.7;
    margin-bottom: 24px;
}
.btn-download {
    display: inline-block;
    background: #1a8a52;
    color: #fff !important;
    padding: 14px 30px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    font-size: 16px;
}
.btn-download:hover { background: #156e42; }
.btn-download i { margin-right: 8px; }

/* Uslubiy qo'llanmalar — kartochka ikonkasi (muqovasiz) */
.book-cover .cover-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8f3ec, #d6ebe0);
}
.book-cover .cover-icon i {
    font-size: 72px;
    color: #1a8a52;
    opacity: .85;
}

/* Uslubiy qo'llanma — sayt ichidagi ko'ruvchi sahifa */
.guide-detail {
    background: #fff;
    border-radius: 12px;
    padding: 28px 30px 34px;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.guide-head h1 {
    font-size: 26px;
    color: #1a8a52;
    margin: 0 0 12px;
    line-height: 1.3;
}
.guide-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    color: #666;
    font-size: 14px;
    margin-bottom: 18px;
}
.guide-meta i { color: #1a8a52; margin-right: 6px; }
.guide-desc {
    color: #444;
    line-height: 1.7;
    margin-bottom: 22px;
    padding-bottom: 22px;
    border-bottom: 1px solid #eee;
}
.guide-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}
.btn-outline {
    display: inline-block;
    background: #fff;
    color: #1a8a52 !important;
    border: 2px solid #1a8a52;
    padding: 12px 26px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    font-size: 16px;
}
.btn-outline:hover { background: #f0f8f3; }
.btn-outline i { margin-right: 8px; }

.guide-viewer {
    width: 100%;
    border: 1px solid #e2e8ec;
    border-radius: 10px;
    overflow: hidden;
    background: #525659;
}
.guide-viewer iframe {
    display: block;
    width: 100%;
    height: 82vh;
    min-height: 520px;
    border: 0;
}
.guide-viewer-fallback {
    margin: 0;
    padding: 12px 16px;
    font-size: 13px;
    color: #fff;
    background: #3c3f41;
    text-align: center;
}
.guide-viewer-fallback a { color: #7fd1a3; text-decoration: underline; }

@media (max-width: 600px) {
    .guide-viewer iframe { height: 70vh; min-height: 420px; }
    .guide-actions .btn-download,
    .guide-actions .btn-outline { flex: 1; text-align: center; padding: 12px 14px; font-size: 15px; }
}

/* =====================================================================
   CMS bo'limlari (Tuzilma, Bo'limlar, Biz haqimizda, Bog'lanish) —
   moslashuvchan (responsive) umumiy uslublar
   ===================================================================== */
.cms-section {
    padding: 56px 0 72px;
    background: #f5f7fa;
    min-height: 60vh;
}
.cms-head { text-align: center; margin-bottom: 36px; }
.cms-head h2 {
    font-size: 30px;
    color: #1a8a52;
    font-weight: 700;
    margin: 0 0 8px;
}
.cms-head p { color: #666; max-width: 720px; margin: 0 auto; line-height: 1.6; }

/* ---- Jamoa (Tuzilma) ---- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}
.team-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    text-align: center;
    padding-bottom: 20px;
    transition: transform .2s, box-shadow .2s;
}
.team-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0,0,0,.1); }
.team-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #e8eef2;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.team-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.team-photo i { font-size: 64px; color: #b9c6cf; }
.team-card h4 { font-size: 17px; font-weight: 700; color: #1f2d3d; margin: 16px 14px 4px; }
.team-pos { color: #1a8a52; font-size: 14px; font-weight: 600; margin: 0 14px 10px; }
.team-contact { list-style: none; padding: 0 14px; margin: 0; }
.team-contact li { font-size: 13px; color: #666; padding: 3px 0; }
.team-contact li i { color: #1a8a52; width: 16px; }
.team-contact a { color: #666; text-decoration: none; }
.team-contact a:hover { color: #1a8a52; }

/* ---- Bo'limlar ---- */
.dep-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.dep-card {
    background: #fff;
    border-radius: 12px;
    padding: 28px 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    transition: transform .2s, box-shadow .2s;
    border-top: 3px solid #1a8a52;
}
.dep-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0,0,0,.1); }
.dep-icon { width: 64px; height: 64px; margin-bottom: 16px; }
.dep-icon img { width: 100%; height: 100%; object-fit: contain; }
.dep-icon i { font-size: 52px; color: #1a8a52; }
.dep-card h3 { font-size: 18px; font-weight: 700; color: #1f2d3d; margin: 0 0 10px; line-height: 1.35; }
.dep-card p { color: #666; font-size: 14px; line-height: 1.6; margin: 0; }

/* ---- Biz haqimizda ---- */
.about-text {
    background: #fff;
    border-radius: 12px;
    padding: 32px 36px;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
    color: #3a3a3a;
    line-height: 1.85;
    font-size: 16px;
}
.about-text h3 { color: #1a8a52; font-size: 22px; margin: 0 0 14px; }
.about-text p { margin: 0 0 14px; }
.about-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
    margin-top: 26px;
}
.about-gallery img { width: 100%; height: 130px; object-fit: cover; border-radius: 8px; display: block; }

/* ---- Bosh sahifa galereyasi ---- */
.home-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 10px;
}
.home-gallery-item { display: block; overflow: hidden; border-radius: 10px; }
.home-gallery-item img {
    width: 100%; height: 200px; object-fit: cover; display: block;
    transition: transform .35s;
}
.home-gallery-item:hover img { transform: scale(1.06); }

/* ---- Mijozlar fikrlari (grid) ---- */
.testi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 10px;
}
.testi-card {
    background: #fff;
    border-radius: 12px;
    padding: 26px 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    position: relative;
}
.testi-quote i { color: #cfe7da; font-size: 30px; }
.testi-card p { color: #444; line-height: 1.7; font-size: 15px; margin: 8px 0 18px; }
.testi-author { display: flex; align-items: center; gap: 12px; }
.testi-author img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.testi-author strong { display: block; color: #1f2d3d; font-size: 15px; }
.testi-author span { color: #1a8a52; font-size: 13px; }

/* ---- Bog'lanish sahifasi ---- */
.contact-wrap {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 28px;
    align-items: start;
}
.contact-info-col {
    background: #fff;
    border-radius: 12px;
    padding: 28px 26px;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.contact-info-col h3 { color: #1a8a52; font-size: 20px; margin: 0 0 18px; }
.contact-info { list-style: none; padding: 0; margin: 0 0 18px; }
.contact-info li { display: flex; gap: 12px; padding: 10px 0; color: #444; border-bottom: 1px solid #f0f0f0; }
.contact-info li i { color: #1a8a52; font-size: 18px; width: 22px; text-align: center; margin-top: 2px; }
.contact-info a { color: #444; text-decoration: none; }
.contact-info a:hover { color: #1a8a52; }
.contact-social { list-style: none; padding: 0; margin: 0; display: flex; gap: 10px; }
.contact-social a {
    width: 38px; height: 38px; border-radius: 50%; background: #1a8a52; color: #fff;
    display: flex; align-items: center; justify-content: center; text-decoration: none;
}
.contact-social a:hover { background: #156e42; }
.contact-form-col {
    background: #fff;
    border-radius: 12px;
    padding: 28px 26px;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.contact-form-col .contact_control,
.contact-form-col .textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid #dde3e8;
    border-radius: 8px;
    font-size: 15px;
    margin-bottom: 14px;
    outline: none;
    font-family: inherit;
}
.contact-form-col .contact_control:focus,
.contact-form-col .textarea:focus { border-color: #1a8a52; }
.contact-form-col .textarea { min-height: 140px; resize: vertical; }
.contact-form-col .send_btn {
    background: #1a8a52; color: #fff; border: 0; padding: 13px 34px;
    border-radius: 8px; font-weight: 600; font-size: 16px; cursor: pointer;
}
.contact-form-col .send_btn:hover { background: #156e42; }
.contact-map { margin-top: 26px; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.contact-map iframe { width: 100%; height: 380px; border: 0; display: block; }

/* =====================================================================
   Moslashuvchanlik (mobil / planshet)
   ===================================================================== */
@media (max-width: 991px) {
    .home-gallery { grid-template-columns: repeat(3, 1fr); }
    .contact-wrap { grid-template-columns: 1fr; }
    .cms-head h2 { font-size: 26px; }
    /* Uzun sarlavhali logotip kichrayadi */
    .text-logo { font-size: 18px !important; line-height: 1.35 !important; }
}
@media (max-width: 767px) {
    .cms-section { padding: 40px 0 56px; }
    .home-gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .home-gallery-item img { height: 150px; }
    .about-text { padding: 22px 20px; font-size: 15px; }
    .about-gallery img { height: 110px; }
    .team-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .dep-grid { grid-template-columns: 1fr; }
    .testi-grid { grid-template-columns: 1fr; }
    .text-logo { font-size: 15px !important; }
}
@media (max-width: 480px) {
    .team-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .team-card h4 { font-size: 15px; }
    .team-pos { font-size: 12px; }
    .cms-head h2 { font-size: 22px; }
    .home-gallery-item img { height: 120px; }
    .contact-form-col, .contact-info-col, .about-text { padding: 18px 16px; }
}
