/* ═══════════════════════════════════════════════════
   DION PRIVATE SERVER – guilds.css
   Listagem de Facções do Reino
═══════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════
   HERO
══════════════════════════════════════════════ */
#guilds-hero {
  position: relative;
  min-height: 62vh;
  padding-top: calc(var(--header-h) + 34px + 4rem);
  padding-bottom: 6rem;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.guilds-hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(111,44,255,.2) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 30%, rgba(212,175,55,.15) 0%, transparent 50%),
    linear-gradient(180deg, rgba(9,9,9,.6) 0%, var(--obsidian) 100%);
}
.guilds-hero-bg::before {
  content: '';
  position: absolute; inset: 0;
  background: url('../images/background_dion.png') center/cover no-repeat;
  opacity: .15;
  filter: blur(1px) grayscale(0.4);
}

.guilds-hero-fog {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse at 10% 80%, rgba(111,44,255,.1) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 10%, rgba(212,175,55,.1) 0%, transparent 45%);
  animation: fog-drift 30s ease-in-out infinite alternate;
}

/* Banners Decorativos */
.hero-banner {
  position: absolute; top: 10%; width: 120px; height: 350px;
  background: linear-gradient(180deg, rgba(20,15,30,.8), rgba(10,8,18,.4));
  border: 1px solid rgba(212,175,55,.2);
  z-index: 2; opacity: .4; pointer-events: none;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 85%, 0 100%);
}
.hero-banner-left  { left: 2%; transform: rotate(-5deg); }
.hero-banner-right { right: 2%; transform: rotate(5deg); }
.hero-banner::before {
  content: ''; position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  width: 40px; height: 40px; background: rgba(212,175,55,.1); border-radius: 50%;
  border: 1px solid rgba(212,175,55,.2);
}

.guilds-hero-inner { position: relative; z-index: 5; text-align: center; }

.guilds-hero-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 900;
  background: linear-gradient(180deg, #fff 0%, var(--gold-light) 40%, var(--gold) 70%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 40px rgba(212,175,55,.4));
  line-height: 1;
  margin-bottom: 1rem;
}

.guilds-hero-sub {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-dim);
  max-width: 650px;
  margin: 0 auto 3.5rem;
  line-height: 1.8;
}

.guilds-hero-btns {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* ══════════════════════════════════════════════
   ESTATÍSTICAS DAS GUILDS
══════════════════════════════════════════════ */
#guilds-stats {
  padding: 5rem 2rem;
  background: linear-gradient(180deg, var(--obsidian), var(--stone));
  position: relative; z-index: 10;
}

.gstats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.gscard {
  background: linear-gradient(160deg, rgba(20,15,32,.98), rgba(10,8,18,.99));
  border: 1px solid var(--border);
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  transition: all .4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.gscard:hover {
  border-color: var(--border2);
  transform: translateY(-8px);
  box-shadow: 0 15px 45px rgba(0,0,0,.6), 0 0 25px rgba(111,44,255,.1);
}
.gscard::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,175,55,.3), transparent);
}

.gscard-icon {
  font-size: 2.2rem; display: block; margin-bottom: 1rem;
  filter: drop-shadow(0 0 12px rgba(212,175,55,.4));
  animation: hero-logo-float 5s ease-in-out infinite;
}
.gscard-label {
  font-family: 'Cinzel', serif; font-size: .58rem; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--text-dark); margin-bottom: 1.25rem;
}
.gscard-val {
  font-family: 'Cinzel Decorative', serif; font-size: 1.8rem;
  color: var(--gold-light); line-height: 1; margin-bottom: .5rem;
  filter: drop-shadow(0 0 15px rgba(212,175,55,.3));
}
.gscard-sub {
  font-family: 'Cinzel', serif; font-size: .56rem; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--text-dark); font-style: italic;
}

/* ══════════════════════════════════════════════
   FILTROS
══════════════════════════════════════════════ */
#guilds-main {
  padding: 6rem 2rem;
  background: var(--stone2);
  position: relative; z-index: 10;
}

.gfilters {
  display: flex;
  gap: 1.5rem;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}
.gf-group { display: flex; flex-direction: column; gap: .6rem; }
.gf-search { flex: 1; min-width: 300px; }

.gf-label {
  font-family: 'Cinzel', serif; font-size: .6rem; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--text-dark);
}
.gf-search-inner { display: flex; gap: .5rem; }
.gf-input {
  flex: 1; background: rgba(255,255,255,.03); border: 1px solid var(--border2);
  color: var(--text); font-family: 'Cinzel', serif; font-size: .8rem;
  padding: .9rem 1.4rem; outline: none; transition: all .3s;
}
.gf-input:focus {
  border-color: var(--arcane); background: rgba(111,44,255,.05);
  box-shadow: 0 0 20px rgba(111,44,255,.15);
}
.gf-btn-search {
  background: linear-gradient(135deg, var(--arcane-dark), var(--arcane));
  color: #fff; border: 1px solid rgba(111,44,255,0.4); padding: 0 1.5rem;
  cursor: pointer; transition: all .3s;
}
.gf-btn-search:hover { background: var(--arcane); box-shadow: 0 0 20px var(--arcane-glow); }

.gf-select-wrap { position: relative; }
.gf-select {
  appearance: none; background: rgba(255,255,255,.03); border: 1px solid var(--border2);
  color: var(--text); font-family: 'Cinzel', serif; font-size: .8rem;
  padding: .9rem 3rem .9rem 1.4rem; outline: none; cursor: pointer; min-width: 240px;
}
.gf-select:focus { border-color: var(--arcane); }
.gf-select option { background: #0e0915; color: var(--text); }
.gf-select-arrow {
  position: absolute; right: 1.25rem; top: 50%; transform: translateY(-50%);
  color: var(--gold); pointer-events: none; font-size: .9rem;
}

/* ══════════════════════════════════════════════
   GRID DE GUILDS (CARDS PREMIUM)
══════════════════════════════════════════════ */
.guilds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto 4rem;
}

.guild-list-card {
  background: linear-gradient(180deg, rgba(22,18,35,.98), rgba(12,10,20,.99));
  border: 1px solid var(--border);
  padding: 0;
  position: relative;
  overflow: hidden;
  transition: all .4s cubic-bezier(0.165, 0.84, 0.44, 1);
  display: flex;
  flex-direction: column;
}
.guild-list-card:hover {
  border-color: var(--border2);
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.7);
}

/* Header do Card (Banner/Brasão) */
.gcard-header {
  height: 120px;
  position: relative;
  background: linear-gradient(180deg, rgba(0,0,0,.4), transparent);
  overflow: visible;
}
.gcard-banner-bg {
  position: absolute; inset: 0;
  background: url('../images/background_dion.png') center/cover no-repeat;
  opacity: .1; filter: grayscale(1);
}
.gcard-crest-wrap {
  position: absolute; bottom: -20px; left: 25px;
  width: 80px; height: 80px;
  background: #120e1a;
  border: 2px solid var(--gold-dark);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 5px 20px rgba(0,0,0,0.8);
  z-index: 5;
}
.gcard-crest { font-size: 2.5rem; filter: drop-shadow(0 0 10px rgba(212,175,55,.4)); }

.gcard-online-badge {
  position: absolute; top: 1.25rem; right: 1.25rem;
  background: rgba(0,0,0,.6);
  border: 1px solid rgba(212,175,55,.2);
  padding: .4rem .8rem;
  border-radius: 20px;
  font-family: 'Cinzel', serif; font-size: .58rem; letter-spacing: 1px;
  color: var(--gold-light);
}
.gcard-online-badge strong { color: #fff; }

/* Corpo do Card */
.gcard-body {
  padding: 3rem 1.75rem 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.gcard-name {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: .5rem;
  display: block;
  text-decoration: none;
  transition: color .2s;
}
.gcard-name:hover { color: #fff; }

.gcard-desc {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: .9rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7rem;
}

.gcard-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,.05);
}
.gmeta-item { display: flex; flex-direction: column; gap: .2rem; }
.gmeta-label {
  font-family: 'Cinzel', serif; font-size: .5rem; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--text-dark);
}
.gmeta-val {
  font-family: 'Cinzel', serif; font-size: .75rem; font-weight: 700;
  color: var(--text);
}

.gcard-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.gcard-leader {
  display: flex; flex-direction: column; gap: .1rem;
}
.gcard-btn {
  background: rgba(212,175,55,.05);
  border: 1px solid rgba(212,175,55,.2);
  color: var(--gold-light);
  font-family: 'Cinzel', serif; font-size: .65rem; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: .75rem 1.25rem;
  cursor: pointer;
  transition: all .3s;
  text-decoration: none;
}
.gcard-btn:hover {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(212,175,55,.3);
}

/* ══════════════════════════════════════════════
   PAGINAÇÃO
══════════════════════════════════════════════ */
.gpagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.gpag-btn {
  font-family: 'Cinzel', serif;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
  background: linear-gradient(135deg, rgba(18,14,28,.97), rgba(10,8,18,.99));
  border: 1px solid var(--border);
  padding: .75rem 1.25rem;
  cursor: pointer;
  transition: all .2s;
  min-width: 45px;
  text-align: center;
}
.gpag-btn:hover:not(.disabled) {
  color: var(--gold);
  border-color: rgba(212,175,55,.4);
  box-shadow: 0 0 15px rgba(212,175,55,.2);
}
.gpag-btn.active {
  color: var(--gold-light);
  border-color: rgba(212,175,55,.6);
  background: linear-gradient(135deg, rgba(25,20,38,.98), rgba(14,10,25,.99));
  box-shadow: 0 0 25px rgba(212,175,55,.3);
}
.gpag-btn.disabled {
  opacity: .3;
  pointer-events: none;
}
.gpag-ellipsis {
  color: var(--text-dark);
  font-family: 'Cinzel', serif;
  font-size: .9rem;
  padding: 0 .75rem;
}

/* ══════════════════════════════════════════════
   RESPONSIVIDADE
══════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .guilds-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  #guilds-hero { padding-top: calc(var(--header-h) + 2rem); min-height: 50vh; }
  .guilds-hero-btns { flex-direction: column; align-items: center; }
  .btn-premium, .btn-secondary { width: 100%; max-width: 300px; }

  .gstats-grid { grid-template-columns: repeat(2, 1fr); }
  
  .gfilters { flex-direction: column; align-items: stretch; }
  .gf-search { min-width: unset; }
  .gf-select { min-width: unset; width: 100%; }

  .guilds-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .gstats-grid { grid-template-columns: 1fr; }
  .gscard { padding: 2rem 1.5rem; }
  .gcard-header { height: 100px; }
  .gcard-crest-wrap { width: 70px; height: 70px; bottom: -30px; }
  .gcard-crest { font-size: 2rem; }
}
