/* Guidelines page — KLKBAT brand surface */

.guidelines-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 6.75rem 1.25rem 4.5rem;
}

.guidelines-wrap {
  max-width: 820px;
  margin: 0 auto;
}

.gl-hero {
  position: relative;
  margin-bottom: 2.25rem;
  padding-bottom: 1.75rem;
}

.gl-hero::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(234, 59, 6, 0.55) 35%,
    rgba(255, 255, 255, 0.12) 65%,
    transparent 100%
  );
}

.gl-brand {
  display: inline-block;
  font-family: 'Cairo', sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.85rem;
  opacity: 0;
  animation: glRise 0.7s ease forwards 0.05s;
}

html[dir='ltr'] .gl-brand {
  letter-spacing: 0.28em;
}

.gl-hero-title {
  font-size: clamp(2rem, 5vw, 2.85rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 0.75rem;
  color: var(--text-primary);
  opacity: 0;
  animation: glRise 0.75s ease forwards 0.12s;
}

.gl-hero-title span {
  background: linear-gradient(120deg, #fff 10%, #ffc4a8 55%, var(--primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gl-hero-sub {
  max-width: 34rem;
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--text-secondary);
  opacity: 0;
  animation: glRise 0.75s ease forwards 0.22s;
}

.gl-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.gl-item {
  --i: 0;
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(145deg, rgba(234, 59, 6, 0.08) 0%, transparent 42%),
    rgba(18, 16, 20, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px);
  animation: glRise 0.55s ease forwards;
  animation-delay: calc(0.28s + var(--i) * 0.07s);
  transition: border-color 0.28s ease, transform 0.28s ease, background 0.28s ease;
}

.gl-item::before {
  content: '';
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--primary), transparent 85%);
  opacity: 0.35;
  transition: opacity 0.28s ease;
}

.gl-item:hover {
  border-color: rgba(234, 59, 6, 0.35);
  transform: translateY(-2px);
}

.gl-item.is-open {
  border-color: rgba(234, 59, 6, 0.55);
  background:
    linear-gradient(145deg, rgba(234, 59, 6, 0.14) 0%, transparent 50%),
    rgba(22, 18, 22, 0.88);
}

.gl-item.is-open::before {
  opacity: 1;
}

.gl-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
  background: transparent;
  border: 0;
  color: var(--text-primary);
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.gl-item-lead {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.gl-type {
  flex-shrink: 0;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: #ffd2bc;
}

.gl-type[data-type='pdf'] {
  color: #ffb089;
  border-color: rgba(234, 59, 6, 0.35);
  background: rgba(234, 59, 6, 0.12);
}

.gl-type[data-type='image'] {
  color: #d8e7ff;
  border-color: rgba(148, 180, 255, 0.28);
  background: rgba(90, 130, 220, 0.12);
}

.gl-item-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.gl-item-title {
  font-weight: 750;
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--text-primary);
}

.gl-trigger:hover .gl-item-title {
  color: #ffd0b5;
}

.gl-item-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.gl-chevron-wrap {
  flex-shrink: 0;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.gl-chevron {
  width: 1rem;
  height: 1rem;
  opacity: 0.8;
  transition: transform 0.28s ease;
}

.gl-item.is-open .gl-chevron {
  transform: rotate(180deg);
}

.gl-item.is-open .gl-chevron-wrap {
  border-color: rgba(234, 59, 6, 0.45);
  background: rgba(234, 59, 6, 0.14);
}

.gl-panel {
  display: none;
  padding: 0 1.2rem 1.25rem;
}

.gl-item.is-open .gl-panel {
  display: block;
  animation: glPanelIn 0.32s ease;
}

.gl-panel-inner {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.gl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.gl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.55rem 1.15rem;
  border-radius: 11px;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-primary);
  background: rgba(26, 23, 29, 0.72);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.gl-btn:hover {
  border-color: rgba(234, 59, 6, 0.65);
  transform: translateY(-1px);
}

.gl-btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: transparent;
  color: #fff;
}

.gl-btn--primary:hover {
  filter: brightness(1.05);
}

.gl-preview {
  margin-top: 1rem;
  border-radius: 12px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.4);
  display: none;
  max-height: min(480px, 52vh);
}

.gl-preview.is-visible {
  display: block;
  animation: glPanelIn 0.35s ease;
}

.gl-preview iframe {
  width: 100%;
  height: min(460px, 50vh);
  min-height: 260px;
  border: 0;
  display: block;
  background: #0b0b0f;
}

.gl-preview img {
  width: 100%;
  height: auto;
  max-height: min(360px, 42vh);
  object-fit: contain;
  display: block;
  margin: 0 auto;
  background: #0b0b0f;
}

.gl-preview-note {
  margin-top: 0.7rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.gl-preview-note a {
  color: #ffb48a;
  font-weight: 700;
  text-decoration: none;
}

.gl-preview-note a:hover {
  text-decoration: underline;
}

.gl-empty,
.gl-loading {
  text-align: center;
  padding: 3.25rem 1.25rem;
  color: var(--text-secondary);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.gl-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.gl-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--primary);
  animation: glSpin 0.8s linear infinite;
}

@keyframes glRise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glPanelIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 768px) {
  .guidelines-page {
    padding: 5.4rem 1rem 3.25rem;
  }

  .gl-hero {
    margin-bottom: 1.75rem;
  }

  .gl-hero-sub {
    font-size: 0.95rem;
  }

  .gl-trigger {
    padding: 0.95rem 1rem;
  }

  .gl-type {
    width: 2.7rem;
    height: 2.7rem;
    font-size: 0.62rem;
  }

  .gl-item-title {
    font-size: 0.98rem;
  }

  .gl-preview {
    max-height: min(380px, 48vh);
  }

  .gl-preview iframe {
    height: min(360px, 46vh);
    min-height: 220px;
  }

  .gl-preview img {
    max-height: min(280px, 38vh);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gl-brand,
  .gl-hero-title,
  .gl-hero-sub,
  .gl-item,
  .gl-item.is-open .gl-panel,
  .gl-preview.is-visible,
  .gl-spinner {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
