/* ==========================================================================
   Components — BEM
   Sources: Button, Badge, Card, Accordion, Input, Modal, Header, Footer,
            Breadcrumbs, Section, Container
   ========================================================================== */

/* ==========================================================================
   Button
   Source: src/components/ui/Button.module.css
   ========================================================================== */

.btn {
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn--primary { background: var(--accent); color: #FFFFFF; }
.btn--primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4); }

.btn--secondary { background: var(--btn-secondary-bg); color: var(--btn-secondary-text); border: 1px solid var(--btn-secondary-border); font-weight: 500; }
.btn--secondary:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: translateY(-2px); }

.btn--outline { background: transparent; color: var(--text-primary); border: 1px solid var(--border-tag); font-weight: 500; }
.btn--outline:hover { border-color: var(--accent); color: var(--accent); }

.btn--ghost { background: transparent; color: var(--text-primary); border: none; font-weight: 500; }
.btn--ghost:hover { color: var(--accent); }

.btn--sm { padding: 8px 16px; font-size: 13px; }
.btn--md { padding: 10px 24px; font-size: 14px; }
.btn--lg { padding: 14px 28px; font-size: 15px; }

.btn--circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border-tag);
  background: transparent;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
}
.btn--circle:hover { border-color: var(--accent); color: var(--accent); }

/* ==========================================================================
   Badge
   Source: src/components/ui/Badge.module.css
   ========================================================================== */

.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--accent-bg-strong);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--accent);
}

.badge--with-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: var(--accent-bg-strong);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
}

.badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ==========================================================================
   Card
   Source: src/components/ui/Card.module.css
   ========================================================================== */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: var(--shadow-card);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.card__label { font-size: 13px; color: var(--text-muted); }
.card__title { font-size: 24px; font-weight: 700; color: var(--text-primary); }
.card__description { font-size: 15px; color: var(--text-card-body); line-height: 1.7; }

.card__tags { display: flex; gap: 8px; flex-wrap: wrap; }
.card__tag {
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--border-tag);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-faq-body);
  transition: all 0.3s ease;
}
.card__tag:hover { border-color: var(--accent); color: var(--accent); }

/* ==========================================================================
   Accordion
   Source: src/components/ui/Accordion.module.css
   ========================================================================== */

.accordion__item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px 32px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.accordion__item:hover { border-color: var(--accent); }

.accordion__item--open { /* active state handled via JS */ }

.accordion__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordion__question {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.accordion__chevron {
  color: var(--text-faq-body);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}
.accordion__item--open .accordion__chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.accordion__answer-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.accordion__item--open .accordion__answer-wrap {
  grid-template-rows: 1fr;
}

.accordion__answer-inner {
  overflow: hidden;
}

.accordion__answer {
  padding-top: 16px;
  font-size: 15px;
  color: var(--text-faq-body);
  line-height: 1.6;
}

/* ==========================================================================
   Form Input
   Source: src/components/ui/Input.module.css
   ========================================================================== */

.form-input {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-input__label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-input__field {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color 0.3s ease;
}
.form-input__field:focus { border-color: var(--accent); }

.form-input__textarea {
  resize: vertical;
  min-height: 120px;
}

/* ==========================================================================
   Modal
   Source: src/components/ui/Modal.module.css
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: modalFadeIn 0.2s ease;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.modal-overlay--open {
  visibility: visible;
  opacity: 1;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal__close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-tag);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.modal__close:hover { border-color: var(--accent); color: var(--accent); }

@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ==========================================================================
   Site Header
   Source: src/components/layout/Header.module.css
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 16px 48px;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-header--scrolled {
  background: color-mix(in srgb, var(--bg-primary) 85%, transparent);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 12px 48px;
}

.site-header__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-header__logo-img { height: 24px; width: auto; }

.site-header__logo-text {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text-primary);
}

.site-header__nav { display: flex; gap: 32px; }

.site-header__nav-link {
  font-size: 14px;
  color: var(--text-primary);
  opacity: 0.7;
  transition: opacity 0.2s;
}
.site-header__nav-link:hover { opacity: 1; }
.site-header__nav-link--disabled { opacity: 0.35; cursor: default; pointer-events: none; }
.site-header__mobile-link--disabled { opacity: 0.35; cursor: default; pointer-events: none; }

.site-header__cta { font-size: 14px; padding: 10px 24px; }

.site-header__actions { display: flex; gap: 12px; align-items: center; }

.site-header__burger {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-tag);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* Mobile menu - hidden by default */
.site-header__mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: color-mix(in srgb, var(--bg-primary) 95%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 24px;
  flex-direction: column;
  gap: 16px;
}
.site-header__mobile-menu--open {
  display: flex;
}
.site-header__mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.site-header__mobile-link {
  font-size: 15px;
  color: var(--text-primary);
  opacity: 0.8;
  padding: 8px 0;
  transition: opacity 0.2s;
}
.site-header__mobile-link:hover {
  opacity: 1;
}

/* WP Admin Bar offset */
.admin-bar .site-header { top: 32px; }
.admin-bar main { padding-top: 112px !important; }
@media screen and (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
  .admin-bar main { padding-top: 126px !important; }
}

/* Dropdown */
.site-header__dropdown-wrap { position: relative; }

.site-header__nav-link--dropdown {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
  z-index: 2;
  cursor: pointer;
}

.site-header__chevron {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.site-header__chevron--open { transform: rotate(180deg); }

.site-header__dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 320px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
}
.site-header__dropdown::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}
.site-header__dropdown--open,
.site-header__dropdown-wrap--open .site-header__dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.site-header__dropdown-inner {
  background: color-mix(in srgb, var(--bg-primary) 90%, transparent);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 8px;
  box-shadow: var(--shadow-card), 0 16px 48px rgba(0, 0, 0, 0.15);
}

.site-header__dropdown-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.2s;
}
.site-header__dropdown-item:hover { background: var(--accent-bg); }

.site-header__dropdown-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.2px;
}

.site-header__dropdown-item-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.site-header__dropdown-all {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  margin-top: 4px;
  border-top: 1px solid var(--border-color);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
.site-header__dropdown-all:hover { color: var(--accent-hover); }

.site-header__dropdown-loading {
  display: flex;
  justify-content: center;
  padding: 20px;
}
.site-header__dropdown-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-card);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Site Footer
   Source: src/components/layout/Footer.module.css
   ========================================================================== */

.site-footer {
  padding: 48px 48px 24px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: var(--container-max);
  margin: 0 auto;
}

.site-footer__top { display: flex; gap: 64px; }

.site-footer__brand {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-footer__brand-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.site-footer__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.site-footer__col-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.site-footer__col a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.3s ease;
}
.site-footer__col a:hover { color: var(--text-primary); }

.site-footer__line { height: 1px; background: var(--footer-line); }

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-footer__copyright {
  font-size: 12px;
  color: var(--copyright-color);
}

.site-footer__legal { display: flex; gap: 24px; }

.site-footer__legal a {
  font-size: 12px;
  color: var(--copyright-color);
  transition: color 0.3s ease;
}
.site-footer__legal a:hover { color: var(--text-primary); }

/* ==========================================================================
   Breadcrumbs
   Source: src/components/layout/Breadcrumbs.module.css
   ========================================================================== */

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
  padding: 16px 0;
}

.breadcrumbs__link {
  color: var(--text-muted);
  transition: color 0.2s;
}
.breadcrumbs__link:hover { color: var(--accent); }

.breadcrumbs__separator { color: var(--border-tag); }

.breadcrumbs__current { color: var(--text-primary); }

/* ==========================================================================
   Section
   Source: src/components/layout/Section.module.css
   ========================================================================== */

.section { padding: 80px 0; scroll-margin-top: 80px; }

/* ==========================================================================
   Container
   Source: src/components/layout/Container.module.css
   ========================================================================== */

.container-main {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 48px;
}

/* ==========================================================================
   Theme-aware Logo & Icons
   ========================================================================== */

/* Logo visibility by theme */
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: inline-block; }
[data-theme="light"] .logo-dark { display: none; }
[data-theme="light"] .logo-light { display: inline-block; }

/* Theme toggle icons */
[data-theme="dark"] .theme-icon-moon { display: none; }
[data-theme="dark"] .theme-icon-sun { display: inline-block; }
[data-theme="light"] .theme-icon-sun { display: none; }
[data-theme="light"] .theme-icon-moon { display: inline-block; }

/* Main content
   ========================================================================== */
.site-main {
  padding-top: 80px;
}

.admin-bar .site-main {
  padding-top: 80px;
}

.site-main > .section:first-child {
  padding-top: 0;
}

/* Hero Media Background
   ========================================================================== */
.hero-section {
  position: relative;
  overflow: hidden;
}

.site-main > .hero-section:first-child,
.site-main > .hero.hero-section:first-child {
  margin-top: -80px;
}

.hero.hero-section {
  min-height: 100vh;
  max-height: 100vh;
  padding-top: 120px;
}

.site-main > .bz:first-child {
  margin-top: -80px;
}

.site-main > .bz:first-child .bz__hero {
  padding-top: 80px;
}

.hero-media__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-media__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.4) 0%,
    rgba(0, 0, 0, 0.6) 40%,
    rgba(0, 0, 0, 0.85) 100%
  );
}

[data-theme="light"] .hero-media__overlay {
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0.6) 40%,
    rgba(255, 255, 255, 0.9) 100%
  );
}

[data-theme="light"] .hero-media__bg {
  opacity: 0.5;
}

.hero.hero-section {
  position: relative;
  overflow: hidden;
}

.hero.hero-section .hero__bg {
  display: none;
}

.hero.hero-section .hero__content {
  position: relative;
  z-index: 1;
}

/* Form
   ========================================================================== */
.itb-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.itb-form__label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.itb-form__input {
  padding: 12px 16px;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.itb-form__input:focus {
  border-color: var(--accent);
}

.itb-form__input::placeholder {
  color: var(--text-muted);
}

.itb-form__textarea {
  resize: vertical;
  min-height: 120px;
}

.itb-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.itb-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.itb-form__checkboxes {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.itb-form__check-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.itb-form__check-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.itb-form__check-box {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid var(--border-card);
  background: var(--bg-card);
  flex-shrink: 0;
  position: relative;
  transition: all 0.2s ease;
  margin-top: 1px;
}

.itb-form__check-input:checked + .itb-form__check-box {
  background: var(--accent);
  border-color: var(--accent);
}

.itb-form__check-input:checked + .itb-form__check-box::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 3px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.itb-form__check-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.itb-form__success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 64px 32px;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: var(--radius-xl, 16px);
  text-align: center;
}

.itb-form__success-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
}

.itb-form__success-text {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0;
}

@media (max-width: 640px) {
  .itb-form__row {
    grid-template-columns: 1fr;
  }
}
