/* =====================================================
   config.appes — Hoja de estilos principal
   ===================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:          #0f1117;
  --bg-surface:  #1a1d27;
  --bg-card:     #21253a;
  --bg-card-hover: #2a2f4a;
  --accent:      #4f8ef7;
  --accent-glow: rgba(79, 142, 247, 0.18);
  --text:        #e8eaf6;
  --text-muted:  #8892b0;
  --border:      rgba(255, 255, 255, 0.07);
  --radius:      14px;
  --shadow:      0 4px 24px rgba(0, 0, 0, 0.4);
}

/* ---- Base ---- */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- Header ---- */
header {
  text-align: center;
  padding: 3rem 1rem 2rem;
  background: linear-gradient(180deg, #12162a 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #fff;
}

header .subtitle {
  margin-top: 0.4rem;
  font-size: 0.95rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  font-family: 'Courier New', monospace;
}

/* ---- Main ---- */
main {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* ---- Section ---- */
section h2 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* ---- Cards grid ---- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

/* ---- Card ---- */
.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  padding: 1.6rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
  box-shadow: var(--shadow);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow), 0 0 20px var(--accent-glow);
  transform: translateY(-3px);
}

.card:active {
  transform: translateY(-1px);
}

/* ---- Logo container ---- */
.card-logo {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  border-radius: 16px;
  overflow: hidden;
  padding: 10px;
}

.card-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-logo svg {
  width: 100%;
  height: 100%;
}

/* Fallback texto cuando la imagen falla */
.logo-fallback {
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.5px;
}

/* ---- Card info ---- */
.card-info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.card-url {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: 'Courier New', monospace;
  word-break: break-all;
}

/* ---- Footer ---- */
footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }

  .card {
    padding: 1.2rem 0.8rem;
  }

  .card-logo {
    width: 56px;
    height: 56px;
  }
}
