/* ===================================================================
   Qo'shimcha uslublar.
   main.css dan KEYIN ulanadi — shablon uslublarini buzmaydi,
   faqat yetishmayotgan joylarini to'ldiradi.
   =================================================================== */

/* -------------------------------------------------------------------
   1. Admin paneldan kelgan mazmun (.page-content)

   Muammo: matnlar Word'dan nusxa qilingan — ichida qat'iy
   width='992' jadvallar, MSO uslublari va juda uzun havolalar bor.
   Kichik ekranda ular sahifani gorizontal siljitib yuboradi.
   ------------------------------------------------------------------- */

.page-content {
  color: #333;
  font-size: 15px;
  line-height: 1.7;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.page-content > *:first-child { margin-top: 0; }
.page-content > *:last-child  { margin-bottom: 0; }

/* Jadvallar: sahifani cho'zish o'rniga o'z ichida siljisin */
.page-content table {
  display: block;
  width: 100% !important;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 14px;
}

/* Word qo'ygan qat'iy o'lchamlarni bekor qilamiz */
.page-content table td,
.page-content table th {
  width: auto !important;
  min-width: 90px;
  padding: 8px 10px !important;
  border: 1px solid #dee2e6 !important;
  vertical-align: top;
}

.page-content table th,
.page-content table td b,
.page-content table td strong {
  font-weight: 600;
}

.page-content table tr:nth-child(even) td {
  background-color: #fafbfc;
}

/* Word'dan kelgan bo'sh xizmat elementlari */
.page-content o\:p,
.page-content .MsoNormal:empty {
  display: none;
}

.page-content .MsoNormal {
  margin: 0 0 .5rem;
}

/* Juda uzun havolalar (masalan Google Maps) qatorni buzmasin */
.page-content a {
  color: var(--color-primary, #ce1212);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.page-content a:hover {
  text-decoration: underline;
}

.page-content img {
  max-width: 100%;
  height: auto;
}

.page-content h1, .page-content h2, .page-content h3,
.page-content h4, .page-content h5, .page-content h6 {
  margin: 1.5rem 0 .75rem;
  font-weight: 600;
  line-height: 1.3;
}

/* Word ichki font-size'lari juda kichik bo'lib qolmasin */
.page-content span[style*="font-size"] {
  font-size: inherit !important;
}

@media (max-width: 575.98px) {
  .page-content       { font-size: 14px; }
  .page-content table { font-size: 13px; }
  .page-content table td,
  .page-content table th { min-width: 80px; padding: 6px 8px !important; }
}

/* -------------------------------------------------------------------
   2. Xabar (alert) bloklari — aloqa formasi uchun
   ------------------------------------------------------------------- */

.contact .alert {
  max-width: 760px;
  margin: 0 auto 1.5rem;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 15px;
}

.contact .alert i {
  margin-right: 6px;
}

/* -------------------------------------------------------------------
   3. Aloqa formasi maydonlari — fokus holati ko'rinsin
   ------------------------------------------------------------------- */

.php-email-form .form-control:focus {
  border-color: var(--color-primary, #ce1212);
  box-shadow: 0 0 0 3px rgba(206, 18, 18, .12);
}

.php-email-form button[type="submit"]:focus-visible {
  outline: 3px solid rgba(206, 18, 18, .4);
  outline-offset: 2px;
}

/* -------------------------------------------------------------------
   4. Yangiliklar kartochkasidagi "Batafsil" tugmasi
      (ilgari <button> ichida <a> edi — noto'g'ri HTML)
   ------------------------------------------------------------------- */

.event-item a.price {
  display: inline-block;
  padding: 6px 18px;
  color: #fff;
  background: var(--color-primary, #ce1212);
  font-size: 14px;
  font-weight: 500;
  transition: background .2s;
}

.event-item a.price:hover {
  background: rgba(206, 18, 18, .85);
  color: #fff;
}

/* -------------------------------------------------------------------
   5. Klaviatura bilan yurish uchun ko'rinadigan fokus
      (qulaylik / accessibility)
   ------------------------------------------------------------------- */

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(206, 18, 18, .45);
  outline-offset: 2px;
}

/* Ekran o'qish dasturlari uchun yashirin matn */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* -------------------------------------------------------------------
   6. Harakatni kamaytirish sozlamasini hurmat qilish
   ------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
