/* ═══════════════════════════════════════════════
   Атырау кітапхана — style.css
   ═══════════════════════════════════════════════ */

@font-face {
  font-family: 'KZBookman';
  src: url('../fonts/KZ-Bookman-Old-Style-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --green-dark:   #1b4d35;
  --green-mid:    #1e6640;
  --gold:         #c9a434;
  --gold-light:   #e2c05a;
  --white:        #ffffff;
  --gray-bg:      #f5f5f5;
  --text-dark:    #1a1a1a;
  --text-gray:    #555;
  --border-light: #ddd;
  --shadow-sm:    0 2px 12px rgba(0,0,0,0.07);
  --shadow-md:    0 8px 28px rgba(0,0,0,0.13);
  --radius:       6px;
  --tr:           0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; }
body { font-family: 'Montserrat', sans-serif; color: var(--text-dark); margin: 0; font-size: 14px; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ════════════════════════════════════════════
   TOPBAR
════════════════════════════════════════════ */
#topbar { background: var(--green-dark); padding: 8px 0; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; }
.topbar-logo { display: flex; align-items: center; }
.topbar-logo .logo-main { height: 54px; width: auto; object-fit: contain; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.lang-switch { display: flex; align-items: center; gap: 3px; }
.lang-switch a { color: rgba(255,255,255,0.55); font-size: 13px; font-weight: 700; }
.lang-switch a.active, .lang-switch a:hover { color: var(--white); }
.lang-switch span { color: rgba(255,255,255,0.3); }
.aaa-btn { color: rgba(255,255,255,0.65); font-size: 12px; font-weight: 700; border: 1px solid rgba(255,255,255,0.28); padding: 3px 9px; border-radius: 3px; cursor: pointer; transition: all var(--tr); user-select: none; }
.aaa-btn:hover { color: var(--white); border-color: rgba(255,255,255,0.65); }
.search-icon { color: rgba(255,255,255,0.65); font-size: 18px; cursor: pointer; transition: color var(--tr); }
.search-icon:hover { color: var(--white); }

/* ════════════════════════════════════════════
   HERO
════════════════════════════════════════════ */
#hero {
  position: relative;
  min-height: 500px;
  background: url('../img/hero.jpg') center center / cover no-repeat;
  display: flex;
  align-items: center;
}
.hero-content { position: relative; z-index: 2; padding: 60px 0; }
.hero-title { font-family: 'KZBookman', serif; font-size: clamp(2rem, 4vw, 3.1rem); font-weight: normal; color: var(--white); line-height: 1.2; margin-bottom: 40px; text-shadow: 0 2px 16px rgba(0,0,0,0.55); }

.btn-gold {
  background: var(--gold); color: var(--white);
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 13px;
  padding: 13px 36px; border: none; border-radius: var(--radius);
  cursor: pointer; transition: background var(--tr), transform var(--tr);
  box-shadow: 0 4px 14px rgba(201,164,52,0.4);
  display: inline-flex; align-items: center; text-decoration: none;
}
.btn-gold:hover { background: var(--gold-light); transform: translateY(-2px); color: var(--white); }

.btn-outline-white {
  background: transparent; color: var(--white);
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 13px;
  padding: 11px 36px; border: 2px solid rgba(255,255,255,0.6);
  border-radius: var(--radius); cursor: pointer; transition: all var(--tr);
  display: inline-flex; align-items: center; text-decoration: none;
}
.btn-outline-white:hover { background: rgba(255,255,255,0.14); border-color: var(--white); color: var(--white); }

/* ════════════════════════════════════════════
   MAIN NAV
════════════════════════════════════════════ */
#main-nav { background: var(--white); box-shadow: 0 2px 14px rgba(0,0,0,0.09); position: sticky; top: 0; z-index: 500; }
.main-nav-inner { display: flex; align-items: stretch; justify-content: center; }
.nav-item-custom { position: relative; }
.nav-link-custom { display: flex; align-items: center; gap: 7px; padding: 18px 32px; font-size: 14px; font-weight: 600; color: var(--text-dark); cursor: pointer; white-space: nowrap; border-bottom: 3px solid transparent; transition: color var(--tr), border-color var(--tr); user-select: none; }
.nav-link-custom .bi { font-size: 11px; transition: transform var(--tr); }
.nav-item-custom:hover .nav-link-custom { color: var(--green-mid); border-bottom-color: var(--green-mid); }
.nav-item-custom:hover .nav-link-custom .bi { transform: rotate(180deg); }
.dropdown-menu-custom { display: none; position: absolute; top: 100%; left: 0; background: var(--white); min-width: 230px; box-shadow: 0 8px 28px rgba(0,0,0,0.13); border-top: 3px solid var(--green-mid); border-radius: 0 0 var(--radius) var(--radius); z-index: 600; list-style: none; padding: 8px 0; margin: 0; animation: dropFade 0.18s ease; }
@keyframes dropFade { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
.nav-item-custom:hover .dropdown-menu-custom { display: block; }
.dropdown-menu-custom li a { display: block; padding: 9px 20px; font-size: 13px; font-weight: 500; color: var(--text-dark); transition: background var(--tr), color var(--tr), padding-left var(--tr); }
.dropdown-menu-custom li a:hover { background: #f0f7f3; color: var(--green-mid); padding-left: 26px; }

/* ════════════════════════════════════════════
   SECTION TITLES
════════════════════════════════════════════ */
.section-title { font-family: 'KZBookman', serif; font-size: 28px; font-weight: normal; color: var(--green-dark); }
.section-title-line { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; }
.section-title-line::after { content: ''; flex: 1; height: 2px; background: linear-gradient(90deg, var(--green-mid) 0%, transparent 100%); border-radius: 2px; }

/* ════════════════════════════════════════════
   SWIPER СТРЕЛКИ
════════════════════════════════════════════ */
.swiper-outer { position: relative; }
.swiper-button-prev, .swiper-button-next {
  width: 52px; height: 52px; margin-top: 0;
  top: 50%; transform: translateY(-50%);
  background: none; border: none;
  position: absolute; z-index: 20;
  cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: transform var(--tr), filter var(--tr);
}
.swiper-button-prev::after, .swiper-button-next::after { display: none; }
.swiper-button-prev { left: -64px; }
.swiper-button-next { right: -64px; }
.swiper-button-prev img, .swiper-button-next img { width: 52px; height: 52px; object-fit: contain; display: block; }
.swiper-button-prev:hover, .swiper-button-next:hover { filter: brightness(1.15); transform: translateY(-50%) scale(1.1); }
.swiper-button-disabled { opacity: 0.4; }

/* ════════════════════════════════════════════
   NEWS
════════════════════════════════════════════ */
#news { background: var(--gray-bg); padding: 52px 0 44px; }
.news-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow var(--tr); height: 100%; display: flex; flex-direction: column; }
.news-card:hover { box-shadow: var(--shadow-md); }
.news-card-img-wrap { overflow: hidden; height: 190px; flex-shrink: 0; }
.news-card > img, .news-card-img-wrap img { width: 100%; height: 190px; object-fit: cover; flex-shrink: 0; transition: transform 0.4s ease; display: block; }
.news-card:hover > img, .news-card:hover .news-card-img-wrap img { transform: scale(1.06); }
.news-card-no-img { width: 100%; height: 190px; background: #e4ede8; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.news-card-no-img i { font-size: 36px; color: rgba(27,77,53,0.15); }
.news-card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.news-date { font-size: 11px; color: var(--text-gray); font-weight: 600; margin-bottom: 8px; flex-shrink: 0; }
.news-text { font-size: 13px; line-height: 1.5; margin-bottom: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; }
.btn-green-outline { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 2px solid var(--green-mid); color: var(--green-mid); font-size: 11px; font-weight: 700; padding: 7px 16px; border-radius: var(--radius); transition: all var(--tr); cursor: pointer; align-self: flex-start; margin-top: auto; }
.btn-green-outline:hover { background: var(--green-mid); color: var(--white); }

/* ════════════════════════════════════════════
   PROGRAMS
════════════════════════════════════════════ */
#programs { background: var(--white); border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); padding: 0; }
.program-link { font-weight: 700; font-size: 14px; color: var(--green-dark); padding: 18px 28px; border-bottom: 3px solid transparent; cursor: pointer; transition: color var(--tr), border-color var(--tr); display: block; text-align: center; white-space: nowrap; }
.program-link:hover { color: var(--green-mid); border-bottom-color: var(--gold); }

/* ════════════════════════════════════════════
   BANNERS
════════════════════════════════════════════ */
#banners { padding: 32px 0; background: var(--white); }
.banner-card { position: relative; height: 220px; overflow: hidden; display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 10px; box-shadow: 0 4px 20px rgba(0,0,0,0.18); }
.banner-card .banner-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center left; transition: transform 0.45s ease; }
.banner-card:hover .banner-bg { transform: scale(1.04); }
.banner-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,40,20,0.18) 0%, rgba(10,40,20,0.65) 60%, rgba(10,40,20,0.72) 100%); transition: opacity var(--tr); border-radius: 10px; }
.banner-card:hover::after { opacity: 0.88; }
.banner-label { position: relative; z-index: 2; color: var(--white); font-family: 'KZBookman', serif; font-size: clamp(1.1rem, 2vw, 1.6rem); font-weight: normal; text-align: center; text-shadow: 0 2px 10px rgba(0,0,0,0.6); padding: 0 24px; line-height: 1.35; margin-left: auto; width: 44%; }

/* ════════════════════════════════════════════
   NEW ARRIVALS
════════════════════════════════════════════ */
#new-arrivals { background: var(--gray-bg); padding: 52px 0 48px; }
.swiper-books { height: 300px; }
.swiper-books .swiper-slide { height: 100%; }
@media (max-width: 575px) { .swiper-books { height: 220px; } }
.book-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow var(--tr), transform var(--tr); cursor: pointer; display: flex; flex-direction: column; text-decoration: none; color: inherit; height: 100%; }
.book-card:hover { box-shadow: var(--shadow-md); transform: translateY(-5px); }
.book-card > img { width: 100%; flex: 1; min-height: 0; object-fit: cover; background: var(--white); display: block; transition: transform 0.4s ease; }
.book-card:hover > img { transform: scale(1.04); }
.book-card-no-img { width: 100%; flex: 1; min-height: 0; background: #eef4f0; display: flex; align-items: center; justify-content: center; }
.book-card-no-img i { font-size: 48px; color: rgba(27,77,53,0.15); }
.book-card-title { font-size: 12px; font-family: 'KZBookman', serif; color: var(--green-dark); line-height: 1.4; padding: 12px 12px 14px; text-align: center; flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ════════════════════════════════════════════
   PARTNERS
════════════════════════════════════════════ */
#partners { background: var(--white); padding: 30px 0; border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); }
.partner-slide { display: flex; align-items: center; justify-content: center; }
.partner-slide a { display: flex; align-items: center; justify-content: center; padding: 10px 16px; transition: transform var(--tr); }
.partner-slide a:hover { transform: scale(1.06); }
.partner-slide img { width: auto; max-width: 100%; height: 80px; object-fit: contain; }
.partner-no-img { font-size: 13px; font-weight: 600; color: var(--text-gray); text-align: center; padding: 10px; }
.swiper-partners-outer { position: relative; height: 80px; }
.swiper-partners-outer .swiper-button-prev,
.swiper-partners-outer .swiper-button-next { --swiper-navigation-top-offset: 50%; margin-top: 0; transform: translateY(-50%); }
.swiper-partners { height: 80px; }
.swiper-partners .swiper-slide { height: 100%; display: flex; align-items: center; justify-content: center; }

/* ════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════ */
#footer { background: var(--green-dark); color: rgba(255,255,255,0.82); padding: 52px 0 24px; }
.footer-logo-wrap { display: flex; align-items: center; margin-bottom: 20px; }
.footer-logo-wrap .logo-main { height: 46px; }
.footer-heading { font-size: 11px; font-weight: 700; color: var(--white); letter-spacing: 0.6px; text-transform: uppercase; margin-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,0.14); padding-bottom: 8px; }
.footer-stat { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-bottom: 9px; color: rgba(255,255,255,0.78); }
.footer-stat .bi { color: var(--gold); font-size: 14px; flex-shrink: 0; }
.footer-stat strong { color: var(--white); }
.social-icons { display: flex; gap: 8px; margin-bottom: 16px; }
.social-icons a { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.8); font-size: 14px; transition: background var(--tr), transform var(--tr); }
.social-icons a:hover { background: var(--gold); transform: translateY(-2px); }
.footer-small-text { font-size: 11px; color: rgba(255,255,255,0.45); line-height: 1.6; }
.footer-contact { display: flex; align-items: flex-start; gap: 9px; font-size: 12px; color: rgba(255,255,255,0.78); margin-bottom: 11px; line-height: 1.5; }
.footer-contact .bi { color: var(--gold); font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.footer-contact a { color: rgba(255,255,255,0.78); }
.footer-contact a:hover { color: var(--white); }
.footer-map { width: 100%; height: 185px; border-radius: var(--radius); overflow: hidden; border: 2px solid rgba(255,255,255,0.14); }
.footer-map iframe { width: 100%; height: 100%; border: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 36px; padding-top: 18px; font-size: 11px; color: rgba(255,255,255,0.38); text-align: center; }

/* ════════════════════════════════════════════
   SEARCH OVERLAY
════════════════════════════════════════════ */
#search-overlay { display: none; position: fixed; inset: 0; background: rgba(10,30,18,0.94); z-index: 9999; align-items: center; justify-content: center; }
#search-overlay.active { display: flex; }
.search-box { width: 100%; max-width: 620px; padding: 0 24px; }
.search-box input { width: 100%; background: transparent; border: none; border-bottom: 2px solid var(--gold); color: var(--white); font-size: 26px; font-family: 'KZBookman', serif; padding: 14px 4px; outline: none; }
.search-box input::placeholder { color: rgba(255,255,255,0.3); }
.search-close { position: absolute; top: 28px; right: 36px; color: rgba(255,255,255,0.7); font-size: 30px; cursor: pointer; transition: color var(--tr), transform var(--tr); }
.search-close:hover { color: var(--white); transform: rotate(90deg); }

/* ════════════════════════════════════════════
   FANCYBOX
════════════════════════════════════════════ */
.fancybox__content { padding: 0 !important; }

/* ════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════ */
@media (max-width: 1300px) {
  .swiper-button-prev { left: -44px; }
  .swiper-button-next { right: -44px; }
  .swiper-button-prev img, .swiper-button-next img { width: 40px; height: 40px; }
}
@media (max-width: 1100px) {
  .swiper-button-prev { left: -36px; }
  .swiper-button-next { right: -36px; }
}
@media (max-width: 991px) {
  .nav-link-custom { padding: 14px 18px; font-size: 13px; }
  .main-nav-inner { overflow-x: auto; }
  .main-nav-inner::-webkit-scrollbar { height: 0; }
  .swiper-button-prev { left: -32px; }
  .swiper-button-next { right: -32px; }
  .swiper-button-prev img, .swiper-button-next img { width: 32px; height: 32px; }
}
@media (max-width: 767px) {
  .hero-content { padding: 36px 16px; }
  #hero { min-height: 420px; }
  .banner-card { height: 180px; }
  .banner-label { margin-left: 0; width: auto; padding: 0 20px; font-size: 1.1rem; }
  .swiper-button-prev, .swiper-button-next { display: none; }
}
@media (max-width: 480px) {
  .hero-content { padding: 28px 12px; }
  #hero { min-height: 380px; }
  .banner-card { height: 160px; }
}

/* ════════════════════════════════════════════
   VBA FORM — сетка и состояния (Bootstrap не подключён)
════════════════════════════════════════════ */

/* Сетка формы: 2 колонки на desktop, 1 на mobile */
.vba-grid-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.vba-grid-col--full {
  grid-column: 1 / -1;
}
@media (max-width: 767px) {
  .vba-grid-row { grid-template-columns: 1fr; }
}

/* Base input reset (без Bootstrap) */
.vba-form .form-control {
  display: block;
  width: 100%;
}

/* Сообщение об успехе */
.vba-form-success {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: var(--radius);
  padding: 20px 24px;
  color: #2e7d32;
  font-size: 14px;
  font-family: 'Montserrat', sans-serif;
  line-height: 1.6;
}
.vba-form-success p { margin: 0; }

/* Сообщение об ошибке */
.vba-form-error {
  background: #fdecea;
  border: 1px solid #f5c6c3;
  border-radius: var(--radius);
  padding: 10px 14px;
  color: #c0392b;
  font-size: 13px;
  font-family: 'Montserrat', sans-serif;
  margin-bottom: 12px;
}
