/* =====================================================
   LAYOUT GENERAL
   ===================================================== */

/* ---------- HEADER / NAV ---------- */
header {
  position: fixed;
  top: 0;
  width: 100%;
  height: 64px;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 8px;
}

header .brand {
  color: var(--color-primary, #00ff99);
  font-weight: bold;
  font-size: 1.15rem;
  text-decoration: none;
  letter-spacing: 1px;
  white-space: nowrap;
  margin-right: 12px;
  flex-shrink: 0;
}

header nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
}

header nav .link {
  color: #d0d0d0;
  font-size: 0.88rem;
  font-family: 'Segoe UI', system-ui, sans-serif;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

header nav .link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

#auth-zone {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
}

/* ---------- SECCIONES ---------- */
section {
  padding: 100px 20px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-title {
  color: var(--color-primary, #00ff99);
  font-size: 1.8rem;
  letter-spacing: 1px;
  margin-bottom: 8px;
  text-align: center;
}

.section-sub {
  color: #888;
  font-size: 1rem;
  margin-bottom: 36px;
  text-align: center;
}

/* ---------- 1. HERO / INICIO ---------- */
#inicio {
  min-height: 100vh;
  justify-content: center;
  text-align: center;
  gap: 8px;
}

#inicio h1 {
  font-size: 3.2rem;
  color: var(--color-primary, #00ff99);
  letter-spacing: 2px;
  text-shadow: 0 0 30px rgba(0, 255, 153, 0.3);
}

#inicio h2 {
  font-size: 1.4rem;
  color: #ccc;
  font-weight: 400;
  letter-spacing: 1px;
}

#inicio p { color: #aaa; font-size: 1rem; }
#inicio p b { color: #fff; font-size: 1.05rem; }

#server-box {
  margin-top: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px 32px;
  text-align: center;
}

#server-box #estado {
  color: #ccc;
  margin-bottom: 12px;
  font-size: 1.05rem;
}

/* ---------- 2. NOTICIAS HOME ---------- */
#noticias-home {
  padding-top: 60px;
  min-height: auto;
}

#noticias-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 1000px;
}

.news-card {
  background: rgba(20, 20, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 22px;
  transition: transform 0.2s, border-color 0.2s;
}

.news-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-primary, #00ff99);
}

.news-card h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.news-card .news-meta {
  color: #666;
  font-size: 0.82rem;
  margin-bottom: 12px;
}

.news-card .news-excerpt {
  color: #bbb;
  font-size: 0.92rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 14px;
}

.news-placeholder {
  grid-column: 1 / -1;
  text-align: center;
  color: #666;
  padding: 40px;
}

.news-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #555;
  padding: 40px 20px;
  background: rgba(20, 20, 20, 0.6);
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
}

.ver-todas-btn {
  display: inline-block;
  margin-top: 28px;
  color: var(--color-primary, #00ff99);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 20px;
  border: 1px solid var(--color-primary, #00ff99);
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.ver-todas-btn:hover {
  background: var(--color-primary, #00ff99);
  color: #000;
}

/* ---------- 3. FEATURES ---------- */
#features {
  padding-top: 60px;
  min-height: auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 1000px;
}

.feature-card {
  background: rgba(15, 15, 15, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 28px 24px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  position: relative;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--color-accent, #59058a);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), 0 0 15px var(--color-accent-glow, rgba(89, 5, 138, 0.25));
}

.feature-card .feature-icon {
  font-size: 2.6rem;
  margin-bottom: 14px;
}

.feature-card h3 {
  color: #fff;
  font-size: 1.15rem;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.feature-card p {
  color: #999;
  font-size: 0.88rem;
  line-height: 1.55;
  margin-bottom: 16px;
}

.feature-action {
  display: inline-block;
  color: var(--color-primary, #00ff99);
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 0.2s;
}

.feature-card:hover .feature-action {
  color: #fff;
}

/* Feature card activa (la de enchants cuando se expanda) */
.feature-card[data-feature="enchants"] {
  border-color: var(--color-accent, #59058a);
}

/* ---------- ENCHANTS DETAIL (oculto por defecto) ---------- */
#enchants-detail {
  padding-top: 40px;
  min-height: auto;
}

.enchants-back {
  width: 100%;
  max-width: 900px;
  margin-bottom: 20px;
}

.enchants-back a {
  color: var(--color-primary, #00ff99);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: opacity 0.2s;
}

.enchants-back a:hover { opacity: 0.7; }

/* Grid de cartas enchants */
.cards-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  width: 90%;
  max-width: 900px;
}

.cards-container .card {
  width: 220px;
  flex-shrink: 0;
}

/* ---------- 4. FAQ ---------- */
#faq-section {
  padding-top: 60px;
  min-height: auto;
}

.faq-container {
  width: 100%;
  max-width: 800px;
}

.faq-item {
  background: rgba(15, 15, 15, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item:hover {
  border-color: var(--color-accent, #59058a);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  cursor: pointer;
  user-select: none;
  gap: 14px;
}

.faq-question h3 {
  color: #e8e8e8;
  font-size: 1rem;
  font-weight: 600;
  flex: 1;
}

.faq-question .faq-toggle {
  color: var(--color-primary, #00ff99);
  font-size: 1.3rem;
  flex-shrink: 0;
  transition: transform 0.25s;
}

.faq-item.open .faq-toggle {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 400px;
}

.faq-answer-inner {
  padding: 0 22px 18px;
  color: #aaa;
  font-size: 0.92rem;
  line-height: 1.65;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 16px;
}

/* ---------- FOOTER ---------- */
#site-footer {
  background: rgba(8, 8, 8, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 40px 20px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.footer-links a {
  color: #ccc;
  text-decoration: none;
  padding: 10px 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 0.92rem;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.footer-links a:hover {
  border-color: var(--color-primary, #00ff99);
  color: #fff;
  background: rgba(0, 255, 153, 0.05);
}

.footer-info {
  color: #888;
  font-size: 0.88rem;
  line-height: 1.7;
}

.footer-info b {
  color: var(--color-primary, #00ff99);
}

.footer-copy {
  color: #555;
  font-size: 0.78rem;
  margin-top: 6px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  header {
    height: auto;
    min-height: 56px;
    padding: 10px 16px;
    flex-wrap: wrap;
    gap: 6px;
  }

  header nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 2px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  header nav .link { font-size: 0.8rem; padding: 5px 8px; }
  #auth-zone { order: 2; }

  section { padding: 80px 16px 40px; }
  #inicio h1 { font-size: 2.2rem; }
  .section-title { font-size: 1.4rem; }

  .cards-container .card { width: 160px; }

  .features-grid { grid-template-columns: 1fr; }
  #noticias-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .cards-container .card { width: 140px; }
  #inicio h1 { font-size: 1.8rem; }
}
