/* YY Components - Button, card, chip, form, badge, nav */

/* ============ BUTTONS ============ */
.yy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--yy-sp-2);
  padding: 0.875rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--yy-r-sm);
  font-weight: 700;
  font-size: var(--yy-fs-base);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--yy-dur-base) var(--yy-ease-out);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.yy-btn:hover { transform: translateY(-1px); }
.yy-btn:active { transform: translateY(0); }
.yy-btn svg { flex-shrink: 0; }

.yy-btn-primary {
  background: var(--yy-brand-gradient);
  color: white;
  box-shadow: var(--yy-shadow-brand);
}
.yy-btn-primary:hover {
  box-shadow: 0 20px 48px rgba(36, 107, 253, 0.5);
  color: white;
}

.yy-btn-danger {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  color: white;
  box-shadow: var(--yy-shadow-danger);
}
.yy-btn-danger:hover { color: white; box-shadow: 0 20px 48px rgba(239, 68, 68, 0.5); }

.yy-btn-whatsapp {
  background: linear-gradient(135deg, #25D366 0%, #1DA851 100%);
  color: white;
  box-shadow: var(--yy-shadow-whatsapp);
}
.yy-btn-whatsapp:hover { color: white; }

.yy-btn-outline {
  background: transparent;
  color: var(--yy-text);
  border-color: var(--yy-border-strong);
}
.yy-btn-outline:hover {
  background: var(--yy-surface-2);
  border-color: var(--yy-brand);
  color: var(--yy-text);
}

.yy-btn-ghost {
  background: var(--yy-surface);
  color: var(--yy-text);
  border-color: var(--yy-border);
}
.yy-btn-ghost:hover { background: var(--yy-surface-2); color: var(--yy-text); }

.yy-btn-lg { padding: 1.05rem 2rem; font-size: var(--yy-fs-lg); border-radius: var(--yy-r-md); }
.yy-btn-sm { padding: 0.55rem 1rem; font-size: var(--yy-fs-sm); }

.yy-btn-block { width: 100%; }

/* ============ BADGE / CHIP ============ */
.yy-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--yy-sp-2);
  padding: var(--yy-sp-2) var(--yy-sp-4);
  background: var(--yy-surface);
  border: 1px solid var(--yy-border);
  border-radius: var(--yy-r-full);
  color: var(--yy-text-mute);
  font-size: var(--yy-fs-sm);
  font-weight: 500;
}
.yy-chip--brand {
  background: var(--yy-brand-weak);
  border-color: rgba(36, 107, 253, 0.35);
  color: #a9c4ff;
}
.yy-chip--pulse::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--yy-success);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  animation: yy-pulse 2s infinite;
}
@keyframes yy-pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ============ CARD ============ */
.yy-card {
  position: relative;
  background: linear-gradient(180deg, color-mix(in srgb, var(--yy-surface) 90%, white 10%), var(--yy-surface));
  border: 1px solid var(--yy-border);
  border-radius: var(--yy-r-lg);
  padding: var(--yy-sp-5);
  transition: transform var(--yy-dur-base) var(--yy-ease-out),
              border-color var(--yy-dur-base) var(--yy-ease-out),
              box-shadow var(--yy-dur-base) var(--yy-ease-out),
              background var(--yy-dur-base) var(--yy-ease-out);
  overflow: hidden;
  isolation: isolate;
}
.yy-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(36, 107, 253, 0.05), transparent 60%);
  opacity: 0;
  transition: opacity var(--yy-dur-base) var(--yy-ease-out);
  z-index: -1;
}
.yy-card:hover {
  transform: translateY(-4px);
  border-color: var(--yy-border-strong);
  box-shadow: var(--yy-shadow-md);
}
.yy-card:hover::before { opacity: 1; }

.yy-card__icon {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--yy-brand-weak);
  color: var(--yy-brand);
  border-radius: var(--yy-r-md);
  margin-bottom: var(--yy-sp-4);
  transition: transform var(--yy-dur-base) var(--yy-ease-out);
}
.yy-card__icon svg { width: 28px; height: 28px; }
.yy-card:hover .yy-card__icon { transform: scale(1.08) rotate(-4deg); }

.yy-card__title {
  font-size: var(--yy-fs-xl);
  margin-bottom: var(--yy-sp-2);
  color: var(--yy-text);
}
.yy-card__subtitle {
  display: block;
  font-size: var(--yy-fs-sm);
  color: var(--yy-accent);
  font-weight: 600;
  margin-bottom: var(--yy-sp-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.yy-card__text {
  color: var(--yy-text-mute);
  font-size: var(--yy-fs-sm);
  margin-bottom: var(--yy-sp-4);
  line-height: var(--yy-lh-base);
}
.yy-card__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--yy-sp-2);
  color: var(--yy-brand);
  font-weight: 700;
  font-size: var(--yy-fs-sm);
}
.yy-card__cta svg {
  transition: transform var(--yy-dur-base) var(--yy-ease-out);
}
.yy-card:hover .yy-card__cta svg { transform: translateX(4px); }

/* Region card - compact */
.yy-region-card {
  padding: var(--yy-sp-5);
  display: flex;
  align-items: flex-start;
  gap: var(--yy-sp-3);
}
.yy-region-card__icon {
  width: 44px; height: 44px;
  margin: 0;
  border-radius: var(--yy-r-sm);
  background: var(--yy-brand-weak);
  color: var(--yy-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.yy-region-card__icon svg { width: 20px; height: 20px; }
.yy-region-card__name {
  font-weight: 700;
  color: var(--yy-text);
  font-size: var(--yy-fs-base);
  display: block;
  line-height: 1.2;
}
.yy-region-card__meta {
  margin-top: var(--yy-sp-1);
  font-size: var(--yy-fs-xs);
  color: var(--yy-text-mute);
  line-height: 1.5;
  max-width: 28ch;
}

/* Post card */
.yy-post-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.yy-post-card__img {
  position: relative;
  padding-bottom: 60%;
  background: var(--yy-surface-3);
  overflow: hidden;
}
.yy-post-card__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--yy-dur-slow) var(--yy-ease-out);
}
.yy-post-card:hover .yy-post-card__img img { transform: scale(1.05); }
.yy-post-card__body { padding: var(--yy-sp-5); flex: 1; display: flex; flex-direction: column; }
.yy-post-card__cat {
  display: inline-block;
  margin-bottom: var(--yy-sp-2);
  font-size: var(--yy-fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--yy-accent);
}
.yy-post-card__title {
  font-size: var(--yy-fs-lg);
  margin-bottom: var(--yy-sp-3);
  line-height: 1.35;
}
.yy-post-card__title a { color: var(--yy-text); }
.yy-post-card__title a:hover { color: var(--yy-brand); }
.yy-post-card__meta {
  margin-top: auto;
  display: flex;
  gap: var(--yy-sp-4);
  font-size: var(--yy-fs-xs);
  color: var(--yy-text-soft);
}

/* ============ MEGA MENU ============ */
.yy-menu__mega {
  position: relative;
}

.yy-menu__mega > a {
  display: inline-flex;
  align-items: center;
  gap: var(--yy-sp-2);
}

.yy-menu__mega.is-open > a,
.yy-menu__mega > a:hover {
  color: var(--yy-brand);
}

.yy-menu__mega.is-open .yy-menu__chevron {
  transform: rotate(90deg);
}

.yy-mega-wrap {
  position: absolute;
  inset-inline-start: 0;
  top: calc(100% + 18px);
  width: min(960px, 92vw);
  padding: var(--yy-sp-5);
  border: 1px solid var(--yy-border-strong);
  border-radius: var(--yy-r-lg);
  background: color-mix(in srgb, var(--yy-surface) 88%, black 12%);
  box-shadow: var(--yy-shadow-lg);
  z-index: 30;
}

.yy-menu__mega--wide .yy-mega-wrap {
  width: min(1120px, 94vw);
}

.yy-mega {
  display: grid;
  gap: var(--yy-sp-5);
}

.yy-mega__intro {
  display: grid;
  gap: var(--yy-sp-2);
  max-width: 56ch;
}

.yy-mega__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--yy-sp-2);
  font-size: var(--yy-fs-xs);
  color: var(--yy-accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.yy-mega__lead {
  margin: 0;
  color: var(--yy-text-mute);
  font-size: var(--yy-fs-sm);
  line-height: 1.6;
}

.yy-mega__grid {
  display: grid;
  gap: var(--yy-sp-4);
}

.yy-mega__grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.yy-mega__grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.yy-mega__col {
  display: grid;
  gap: var(--yy-sp-2);
  list-style: none;
  margin: 0;
  padding: 0;
}

.yy-mega__item a {
  display: flex;
  gap: var(--yy-sp-3);
  padding: var(--yy-sp-3);
  border: 1px solid transparent;
  border-radius: var(--yy-r-md);
  color: var(--yy-text);
  text-decoration: none;
  transition: border-color var(--yy-dur-base) var(--yy-ease-out), background var(--yy-dur-base) var(--yy-ease-out), transform var(--yy-dur-base) var(--yy-ease-out);
}

.yy-mega__item a:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--yy-border);
}

.yy-mega__icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--yy-r-sm);
  background: var(--yy-brand-weak);
  color: var(--yy-brand);
  flex-shrink: 0;
}

.yy-mega__text {
  display: grid;
  gap: 2px;
}

.yy-mega__text strong {
  color: var(--yy-text);
  font-size: var(--yy-fs-base);
}

.yy-mega__text small {
  color: var(--yy-text-mute);
  font-size: var(--yy-fs-xs);
  line-height: 1.5;
}

.yy-mega__footer {
  padding-top: var(--yy-sp-4);
  border-top: 1px solid var(--yy-border);
  display: flex;
  justify-content: space-between;
  gap: var(--yy-sp-3);
  align-items: center;
}

.yy-mega__all {
  display: inline-flex;
  align-items: center;
  gap: var(--yy-sp-2);
  font-weight: 700;
  color: var(--yy-text);
}

.yy-mega__meta {
  display: inline-flex;
  align-items: center;
  gap: var(--yy-sp-3);
}

.yy-mega__badge {
  color: var(--yy-text-mute);
  font-size: var(--yy-fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 1023px) {
  .yy-mega-wrap {
    position: static;
    width: 100%;
    margin-top: var(--yy-sp-3);
    box-shadow: none;
  }

  .yy-mega__grid--3,
  .yy-mega__grid--4 {
    grid-template-columns: 1fr;
  }

  .yy-mega__footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============ FORM ============ */
.yy-form { display: grid; gap: var(--yy-sp-4); }
.yy-form-row { display: grid; gap: var(--yy-sp-4); }
@media (min-width: 640px) {
  .yy-form-row--2 { grid-template-columns: 1fr 1fr; }
}

.yy-field {
  display: flex;
  flex-direction: column;
  gap: var(--yy-sp-2);
}
.yy-field label {
  font-size: var(--yy-fs-sm);
  font-weight: 600;
  color: var(--yy-text);
}
.yy-field .req { color: var(--yy-danger); }
.yy-field input,
.yy-field textarea,
.yy-field select {
  padding: 0.85rem 1rem;
  background: var(--yy-surface-2);
  border: 1px solid var(--yy-border);
  border-radius: var(--yy-r-sm);
  color: var(--yy-text);
  font-size: var(--yy-fs-base);
  transition: border-color var(--yy-dur-fast) var(--yy-ease-out),
              background var(--yy-dur-fast) var(--yy-ease-out),
              box-shadow var(--yy-dur-fast) var(--yy-ease-out);
  width: 100%;
}
.yy-field input:hover,
.yy-field textarea:hover,
.yy-field select:hover { border-color: var(--yy-border-strong); }
.yy-field input:focus,
.yy-field textarea:focus,
.yy-field select:focus {
  outline: none;
  border-color: var(--yy-brand);
  background: var(--yy-surface-3);
  box-shadow: 0 0 0 3px rgba(36, 107, 253, 0.2);
}
.yy-field ::placeholder { color: var(--yy-text-soft); }
.yy-field textarea { min-height: 130px; line-height: 1.5; }

.yy-honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

.yy-form__status {
  padding: var(--yy-sp-3) var(--yy-sp-4);
  border-radius: var(--yy-r-sm);
  font-size: var(--yy-fs-sm);
  display: none;
}
.yy-form__status--show { display: block; }
.yy-form__status--success { background: rgba(16, 185, 129, 0.15); color: #6EE7B7; border: 1px solid rgba(16, 185, 129, 0.3); }
.yy-form__status--error   { background: var(--yy-danger-weak); color: #FECACA; border: 1px solid rgba(239, 68, 68, 0.3); }

/* ============ NAV (header) ============ */
.yy-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--yy-glass-strong);
  backdrop-filter: blur(var(--yy-blur)) saturate(1.4);
  -webkit-backdrop-filter: blur(var(--yy-blur)) saturate(1.4);
  border-bottom: 1px solid var(--yy-border);
  transition: padding var(--yy-dur-base) var(--yy-ease-out);
}

.yy-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--yy-sp-4);
  min-height: var(--yy-header-h);
  padding-block: var(--yy-sp-3);
}

.yy-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--yy-sp-3);
  text-decoration: none;
}
.yy-brand__mark {
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--yy-brand-gradient);
  border-radius: var(--yy-r-sm);
  color: white;
  flex-shrink: 0;
  box-shadow: var(--yy-shadow-brand);
}
.yy-brand__mark svg { width: 26px; height: 26px; }
.yy-brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.yy-brand__name { font-weight: 700; color: var(--yy-text); font-size: var(--yy-fs-base); letter-spacing: -0.02em; }
.yy-brand__tag  { font-size: var(--yy-fs-xs); color: var(--yy-text-mute); }

.yy-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;
  gap: var(--yy-sp-5);
  align-items: center;
}
@media (min-width: 1024px) {
  .yy-menu { display: flex; }
}
.yy-menu a {
  color: var(--yy-text);
  font-size: var(--yy-fs-sm);
  font-weight: 600;
  padding: var(--yy-sp-2) 0;
  position: relative;
}
.yy-menu a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--yy-brand);
  transition: width var(--yy-dur-base) var(--yy-ease-out);
}
.yy-menu a:hover::after,
.yy-menu .current-menu-item > a::after,
.yy-menu .current_page_item > a::after { width: 100%; }

.yy-header__cta {
  display: none;
  align-items: center;
  gap: var(--yy-sp-3);
}
@media (min-width: 1024px) { .yy-header__cta { display: inline-flex; } }

.yy-header__toggle {
  background: transparent;
  border: 1px solid var(--yy-border);
  color: var(--yy-text);
  width: 44px; height: 44px;
  border-radius: var(--yy-r-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
@media (min-width: 1024px) { .yy-header__toggle { display: none; } }

/* Mobile drawer */
.yy-drawer {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 24, 0.92);
  backdrop-filter: blur(20px);
  z-index: 60;
  transform: translateX(100%);
  transition: transform var(--yy-dur-base) var(--yy-ease-out);
  display: flex;
  flex-direction: column;
  padding: var(--yy-sp-5);
  overflow-y: auto;
}
.yy-drawer[aria-hidden="false"] { transform: translateX(0); }
.yy-drawer__close {
  align-self: flex-end;
  background: var(--yy-surface);
  border: 1px solid var(--yy-border);
  color: var(--yy-text);
  width: 44px; height: 44px;
  border-radius: var(--yy-r-sm);
}
.yy-drawer ul {
  list-style: none;
  padding: 0;
  margin: var(--yy-sp-6) 0 var(--yy-sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--yy-sp-2);
}
.yy-drawer ul a {
  display: block;
  padding: var(--yy-sp-3) var(--yy-sp-4);
  background: var(--yy-surface);
  border-radius: var(--yy-r-sm);
  color: var(--yy-text);
  font-weight: 600;
  border: 1px solid var(--yy-border);
}
.yy-drawer ul a:hover { background: var(--yy-surface-2); color: var(--yy-text); }
.yy-drawer__cta { display: grid; gap: var(--yy-sp-3); }

/* Mobile sticky CTA */
.yy-mobile-sticky {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--yy-border-strong);
  border-top: 1px solid var(--yy-border-strong);
  backdrop-filter: blur(10px);
  z-index: 40;
}
@media (min-width: 1024px) { .yy-mobile-sticky { display: none; } }
.yy-mobile-sticky a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--yy-sp-2);
  padding: var(--yy-sp-4);
  font-weight: 700;
  font-size: var(--yy-fs-sm);
  color: white;
  background: var(--yy-bg);
}
.yy-mobile-sticky a:first-child { background: var(--yy-brand); }
.yy-mobile-sticky a:last-child  { background: #1DA851; color: white; }
body { padding-bottom: 0; }
@media (max-width: 1023px) {
  body { padding-bottom: 64px; }
}

/* WhatsApp float */
.yy-wa-float {
  position: fixed;
  right: var(--yy-sp-4);
  bottom: var(--yy-sp-4);
  z-index: 45;
  width: 56px; height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #25D366, #1DA851);
  color: white;
  border-radius: 50%;
  box-shadow: var(--yy-shadow-whatsapp);
  transition: transform var(--yy-dur-base) var(--yy-ease-out);
}
.yy-wa-float:hover { transform: translateY(-3px) scale(1.05); color: white; }
.yy-wa-float svg { width: 28px; height: 28px; }
@media (max-width: 1023px) {
  .yy-wa-float { bottom: calc(var(--yy-sp-4) + 64px); }
}

/* Breadcrumbs */
.yy-breadcrumbs {
  padding-block: var(--yy-sp-5);
  font-size: var(--yy-fs-sm);
  color: var(--yy-text-mute);
}
.yy-breadcrumbs ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--yy-sp-2);
}
.yy-breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: var(--yy-sp-2);
}
.yy-breadcrumbs li + li::before {
  content: '/';
  color: var(--yy-text-soft);
}
.yy-breadcrumbs a { color: var(--yy-text-mute); }
.yy-breadcrumbs a:hover { color: var(--yy-brand); }
.yy-breadcrumbs [aria-current] { color: var(--yy-text); }

/* Pagination */
.yy-pagination {
  display: flex;
  gap: var(--yy-sp-2);
  justify-content: center;
  margin-top: var(--yy-sp-7);
  flex-wrap: wrap;
}
.yy-pagination .page-numbers {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--yy-sp-3);
  background: var(--yy-surface);
  border: 1px solid var(--yy-border);
  border-radius: var(--yy-r-sm);
  color: var(--yy-text);
  font-weight: 600;
  font-size: var(--yy-fs-sm);
  text-decoration: none;
}
.yy-pagination .page-numbers:hover,
.yy-pagination .page-numbers.current {
  background: var(--yy-brand);
  color: white;
  border-color: var(--yy-brand);
}
