:root {
  --dra-primary: #961438;
  --dra-primary-dark: #5a0424;
  --dra-text: #2d2330;
  --dra-muted: #6f6473;
  --dra-surface: #ffffff;
  --dra-soft: #f8f3f5;
  --dra-line: rgba(150, 20, 56, 0.12);
  --dra-shadow: 0 20px 60px rgba(46, 22, 39, 0.12);
  --dra-shadow-strong: 0 28px 80px rgba(46, 22, 39, 0.22);
  --dra-radius: 28px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  color: var(--dra-text);
}

body.site-modal-open {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

img,
svg,
iframe {
  max-width: 100%;
}

.header-wrapper {
  width: min(1320px, calc(100% - 24px));
  margin: 0 auto;
}

.menu-area {
  position: relative;
}

.banner,
.about-hero,
.specialties-elegant,
.methodology-premium,
.lectures-modern,
.blog-home-section,
.faq-premium,
.cta-premium {
  scroll-margin-top: 110px;
}

.hero-banner .banner__content h1 {
  font-size: clamp(2.7rem, 5.2vw, 5.4rem);
  line-height: 0.98;
  max-width: 11ch;
}

.hero-banner .banner__content p {
  max-width: 640px;
}

.blog-home-section {
  background: linear-gradient(180deg, #fffafc 0%, #f7f1f5 100%);
}

.blog-home__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.blog-home__heading {
  max-width: 760px;
}

.blog-home__eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--dra-primary);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
}

.blog-home__heading h2 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--dra-primary-dark);
}

.blog-home__heading p {
  margin: 0;
  color: var(--dra-muted);
  font-size: 1.05rem;
}

.blog-home__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.blog-filter {
  border: 1px solid var(--dra-line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--dra-primary-dark);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  transition: 0.2s ease;
}

.blog-filter:hover,
.blog-filter.is-active {
  background: var(--dra-primary);
  color: #fff;
  border-color: var(--dra-primary);
}

.blog-home__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.blog-card,
.blog-home__empty,
.admin-list-card,
.admin-editor-card,
.article-modal__dialog,
.cta-form-card {
  border-radius: var(--dra-radius);
}

.blog-card {
  overflow: hidden;
  background: var(--dra-surface);
  box-shadow: var(--dra-shadow);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.blog-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card__body {
  padding: 24px;
  display: grid;
  gap: 14px;
}

.blog-card__body h3,
.admin-block-head h4,
.article-modal__content h3 {
  margin: 0;
  color: var(--dra-primary-dark);
}

.blog-card__meta,
.article-modal__meta,
.admin-post-card__meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--dra-muted);
  font-size: 0.95rem;
}

.blog-card__button,
.footer-admin-button,
.admin-mini-button {
  border: 0;
  background: transparent;
  color: var(--dra-primary);
  font-weight: 700;
  padding: 0;
}

.blog-card__button:hover,
.footer-admin-button:hover,
.admin-mini-button:hover {
  color: var(--dra-primary-dark);
}

.blog-home__empty {
  grid-column: 1 / -1;
  padding: 38px;
  text-align: center;
  background: rgba(255, 255, 255, 0.85);
  color: var(--dra-muted);
  border: 1px solid var(--dra-line);
}

.article-modal,
.admin-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 20px;
}

.article-modal__backdrop,
.admin-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 10, 18, 0.65);
}

.article-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(1000px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: #fff;
  box-shadow: var(--dra-shadow-strong);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.article-modal__media {
  min-height: 320px;
  background: linear-gradient(135deg, #f2e9ee, #f9f6f8);
}

.article-modal__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-modal__content {
  padding: 34px;
}

.article-modal__body {
  color: var(--dra-text);
}

.article-modal__body p:last-child {
  margin-bottom: 0;
}

.article-modal__category {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--dra-primary);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.article-modal__close,
.admin-panel__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--dra-primary-dark);
  font-size: 1.5rem;
  z-index: 2;
}

.admin-panel {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: linear-gradient(180deg, #fff9fb 0%, #f7f1f5 100%);
  border-radius: 32px;
  box-shadow: var(--dra-shadow-strong);
  padding: 34px;
}

.admin-panel__intro {
  max-width: 760px;
  margin-bottom: 28px;
}

.admin-panel__intro h3 {
  margin: 0 0 10px;
  color: var(--dra-primary-dark);
}

.admin-panel__intro p,
.admin-block-head p,
.cover-preview,
.form-feedback,
#contactFeedback {
  color: var(--dra-muted);
}

.admin-login-form,
.post-form {
  display: grid;
  gap: 16px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
}

.admin-list-card,
.admin-editor-card {
  background: rgba(255, 255, 255, 0.88);
  padding: 24px;
  box-shadow: var(--dra-shadow);
}

.admin-block-head {
  margin-bottom: 18px;
}

.admin-post-list {
  display: grid;
  gap: 14px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.admin-post-card {
  border: 1px solid var(--dra-line);
  background: #fff;
  border-radius: 20px;
  padding: 18px;
  display: grid;
  gap: 12px;
}

.admin-post-card__actions,
.admin-toolbar,
.admin-toolbar__actions,
.admin-form__row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-toolbar {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.admin-form__row {
  align-items: end;
}

.admin-form__row > .admin-field {
  flex: 1 1 240px;
}

.admin-field {
  display: grid;
  gap: 8px;
  font-weight: 600;
  color: var(--dra-primary-dark);
}

.admin-field input,
.admin-field textarea,
.admin-field select {
  width: 100%;
  border: 1px solid var(--dra-line);
  border-radius: 16px;
  padding: 12px 14px;
  background: #fff;
}

.admin-field--checkbox {
  grid-auto-flow: column;
  justify-content: start;
  align-items: center;
  gap: 12px;
}

.admin-field--checkbox input {
  width: auto;
}

.form-feedback,
#contactFeedback {
  min-height: 24px;
  margin: 0;
  font-weight: 600;
}

.form-feedback.is-success,
#contactFeedback.is-success {
  color: #1f7a37;
}

.form-feedback.is-error,
#contactFeedback.is-error {
  color: #ab213e;
}

.footer-admin-button {
  font: inherit;
}

@media (max-width: 991px) {
  .header-wrapper {
    position: relative;
  }

  .menu-area {
    position: static;
  }

  .menu {
    left: 0;
    right: 0;
    width: 100% !important;
    display: block !important;
    border-radius: 0 0 18px 18px;
    overflow-x: hidden;
    box-shadow: 0 18px 40px rgba(46, 22, 39, 0.16);
    z-index: 50;
  }

  .hero-banner .banner__content h1 {
    max-width: none;
  }

  .about-hero__info-box {
    position: static;
    width: 100%;
    max-width: none;
    margin-top: 24px;
  }

  .blog-home__grid,
  .admin-grid,
  .article-modal__dialog {
    grid-template-columns: 1fr;
  }

  .article-modal__media {
    min-height: 240px;
  }
}

@media (max-width: 767px) {
  .blog-home__header,
  .admin-toolbar {
    align-items: start;
  }

  .grp__btn .custom-btn,
  .admin-toolbar__actions .custom-btn,
  .blog-admin-trigger {
    width: 100%;
    justify-content: center;
  }

  .blog-home__grid {
    grid-template-columns: 1fr;
  }

  .header-wrapper {
    width: min(100% - 18px, 1320px);
  }
}

@media (max-width: 575px) {
  html {
    scroll-padding-top: 92px;
  }

  .header-wrapper .logo a img {
    max-width: 190px;
  }

  .hero-banner .banner__content h1 {
    font-size: clamp(1.95rem, 8.8vw, 2.85rem) !important;
    line-height: 1.02;
    word-break: break-word;
  }

  .hero-banner .banner__content p,
  .section-subtitle,
  .lectures-header p,
  .blog-home__heading p,
  .faq-intro p,
  .cta-content p {
    font-size: 0.98rem;
  }

  .section-header h2,
  .about-hero h2,
  .lectures-header h2,
  .faq-intro h2,
  .cta-content h2,
  .blog-home__heading h2 {
    font-size: clamp(1.95rem, 8vw, 2.5rem) !important;
    line-height: 1.08;
  }

  .banner__thumb {
    max-width: 310px;
    margin: 0 auto;
  }

  .article-modal,
  .admin-overlay {
    padding: 12px;
  }

  .admin-panel,
  .article-modal__content,
  .blog-card__body,
  .admin-list-card,
  .admin-editor-card {
    padding: 20px;
  }

  .whatsapp-button {
    left: 0;
    bottom: 0;
    width: 58px;
    height: 58px;
  }

  .whatsapp-float {
    right: 14px;
    bottom: 14px;
  }
}
