/* Guilds page - FULL WIDTH + Tibia.CITY gold/brown + subtle fireworks */

.section.guilds{
  padding-top: 8px;
  max-width: none !important;
  width: 100% !important;
}

/* HERO */
.guilds-hero{
  margin: 10px 0 12px 0;         /* <- bez bocznych marginesów */
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(217,180,95,.28);
  background:
    linear-gradient(180deg, rgba(0,0,0,.30), rgba(0,0,0,.18)),
    radial-gradient(circle at 15% 10%, rgba(217,180,95,.12), rgba(0,0,0,0) 55%);
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
}

.guilds-hero__title{
  font-size: 18px;
  font-weight: 900;
  color: rgba(246,240,226,.96);
  letter-spacing: .2px;
}

.guilds-hero__sub{
  margin-top: 6px;
  font-size: 12px;
  color: rgba(246,240,226,.70);
}

/* EMPTY / ERROR */
.guilds-alert{
  margin: 10px 0;                 /* <- bez bocznych marginesów */
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.26);
  color: rgba(246,240,226,.90);
  box-shadow: 0 10px 24px rgba(0,0,0,.20);
}

.guilds-alert--error{ border-color: rgba(239,68,68,.32); }

.guilds-alert__title{ font-weight: 900; font-size: 14px; }

.guilds-alert__text{
  margin-top: 8px;
  font-size: 12px;
  color: rgba(246,240,226,.78);
  line-height: 1.45;
}

.guilds-alert__actions{ margin-top: 10px; }

/* GRID: zawsze 1 kolumna, pełna szerokość */
.guilds-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 10px 0;                 /* <- pełna szerokość */
  width: 100%;
}

/* CARD: pełna szerokość */
.guild-card{
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(217,180,95,.26);
  background:
    linear-gradient(180deg, rgba(0,0,0,.28), rgba(0,0,0,.16)),
    radial-gradient(circle at 18% 18%, rgba(217,180,95,.13), rgba(0,0,0,0) 60%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 10px 22px rgba(0,0,0,.22);
  padding: 12px 12px 10px 12px;
  width: 100%;
  display: block;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}

.guild-card:hover{
  transform: translateY(-1px);
  border-color: rgba(217,180,95,.46);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 12px 26px rgba(0,0,0,.28);
}

.guild-card.is-recruiting{ border-color: rgba(34,197,94,.28); }

/* TOP ROW */
.guild-card__top{
  display: grid;
  grid-template-columns: 64px 1fr auto; /* logo | content | actions */
  gap: 12px;
  align-items: center;
  width: 100%;
}

.guild-logo{
  width: 56px;
  height: 56px;
  border-radius: 14px;
  padding: 4px;
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.guild-logo img{
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
}

.guild-main{ min-width: 0; }

.guild-name-row{
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.guild-name{
  font-weight: 900;
  font-size: 15px;
  color: rgba(246,240,226,.96);
  text-decoration: none;
  max-width: none;                 /* <- usuwa sztuczne zwężanie */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.guild-name:hover{
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* BADGES */
.g-badge{
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
  color: rgba(246,240,226,.86);
  white-space: nowrap;
}

.g-badge--green{
  border-color: rgba(34,197,94,.25);
  background: rgba(34,197,94,.12);
}

.g-badge--dark{ opacity: .95; }

/* META CHIPS */
.guild-meta{
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.g-chip{
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  color: rgba(246,240,226,.78);
}

.g-chip strong{
  color: rgba(246,240,226,.92);
  font-weight: 900;
}

.guild-actions{
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

/* DESC */
.guild-desc{
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 12px;
  line-height: 1.45;
  color: rgba(246,240,226,.78);
}

/* SHINE + SPARKLES */
.guild-card__shine{
  position: absolute;
  left: -40%;
  top: -60%;
  width: 120%;
  height: 120%;
  transform: rotate(12deg);
  background: linear-gradient(90deg,
    rgba(255,255,255,0) 0%,
    rgba(217,180,95,.10) 45%,
    rgba(255,255,255,0) 70%);
  opacity: 0;
  pointer-events: none;
}

.guild-card:hover .guild-card__shine{
  opacity: 1;
  animation: guildShine 1.2s ease forwards;
}

@keyframes guildShine{
  0%   { transform: translateX(-35%) rotate(12deg); opacity: 0; }
  20%  { opacity: .65; }
  100% { transform: translateX(35%) rotate(12deg); opacity: 0; }
}

.guild-card__spark{
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .45;
  background:
    radial-gradient(circle at 12% 30%, rgba(217,180,95,.18), rgba(0,0,0,0) 22%),
    radial-gradient(circle at 78% 24%, rgba(255,255,255,.10), rgba(0,0,0,0) 18%),
    radial-gradient(circle at 85% 70%, rgba(217,180,95,.14), rgba(0,0,0,0) 22%),
    radial-gradient(circle at 22% 78%, rgba(255,255,255,.08), rgba(0,0,0,0) 20%);
  mix-blend-mode: screen;
}

.guild-card:hover .guild-card__spark{
  animation: sparkFloat 2.2s ease-in-out infinite;
}

@keyframes sparkFloat{
  0%,100%{ transform: translateY(0); opacity: .40; }
  50%    { transform: translateY(-2px); opacity: .60; }
}

/* mobile: zbijamy przyciski pod content */
@media (max-width: 720px){
  .guild-card__top{
    grid-template-columns: 64px 1fr;
    grid-template-rows: auto auto;
  }
  .guild-actions{
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

/* reduce motion */
@media (prefers-reduced-motion: reduce){
  .guild-card,
  .guild-card:hover,
  .guild-card__shine,
  .guild-card__spark{
    animation: none !important;
    transition: none !important;
  }
}
