/* ==========================================
   PROYECTO DNS - ESTILO INDEPENDIENTE
   Clara Montaño Rodríguez
   Compatible con style.css global
========================================== */

/* ======= Reset local para evitar conflicto con el style.css principal ======= */
body.dns-page section,
body.dns-page h1,
body.dns-page h2,
body.dns-page h3,
body.dns-page h4,
body.dns-page p,
body.dns-page button,
body.dns-page a,
body.dns-page details,
body.dns-page summary,
body.dns-page ol,
body.dns-page ul,
body.dns-page li,
body.dns-page pre,
body.dns-page code {
  all: unset;
  display: revert;
  box-sizing: border-box;
}

/* ======= Variables ======= */
:root {
  --bg: #0f172a;
  --panel: #1e293b;
  --panel-2: #273449;
  --border: rgba(255, 255, 255, 0.1);
  --text: #e2e8f0;
  --text-dim: #94a3b8;
  --accent: #2dd4bf;
  --accent-hover: #14b8a6;
  --code-bg: #0b1120;
  --shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  --radius: 16px;
  --radius-sm: 12px;
  --maxw: 1100px;
}

/* ======= Estructura general ======= */
body.dns-page {
  font-family: 'Inter', sans-serif;
  background: var(--bg) url('images/fondo.png') no-repeat center center fixed;
  background-size: cover;
  background-blend-mode: darken;
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wrap {
  max-width: var(--maxw);
  margin: 40px auto 80px;
  padding: 0 20px;
}

/* ======= Hero ======= */

.hero {
  display: flex !important;        /* 🔹 fuerza a usar flex */
  flex-direction: column !important; /* 🔹 en columna */
  align-items: center !important;    /* 🔹 centrado horizontal */
  justify-content: center !important;/* 🔹 centrado vertical */
  text-align: center !important;     /* 🔹 texto centrado */
  max-width: 900px;
  margin: 4rem auto 3rem;
  padding: 0 1rem;
  gap: 1rem; /* espacio entre elementos */
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 1.2rem;
  line-height: 1.3;
}

.hero p {
  color: #94a3b8;
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto 2rem;
}

.hero code {
  color: #2dd4bf;
  font-weight: 600;
  font-family: Consolas, monospace;
}

.btn {
  display: inline-block;
  background: #2dd4bf;
  color: #0f172a;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.9rem 1.8rem;
  border-radius: 0.75rem;
  text-decoration: none;
  box-shadow: 0 8px 25px rgba(45, 212, 191, 0.3);
  transition: all 0.25s ease;
}

.btn:hover {
  background: #14b8a6;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(20, 184, 166, 0.4);
}


/* ======= Acordeones ======= */
.accordion {
  margin-top: 30px;
  display: grid;
  gap: 16px;
}

details {
  border: 1px solid var(--border);
  background: rgba(30, 41, 59, 0.95);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
  background: linear-gradient(180deg, #1e293b, #182133);
  transition: all 0.25s ease;
}

summary::-webkit-details-marker {
  display: none;
}

summary:hover {
  background: rgba(45, 212, 191, 0.1);
}

.caret {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
  transition: transform 0.25s ease;
}

details[open] .caret {
  transform: rotate(45deg);
}

.panel {
  padding: 16px 20px 20px;
  background: var(--panel-2);
  border-top: 1px solid var(--border);
  color: var(--text-dim);
}

/* ======= Tipografía dentro de panel ======= */
h2 {
  color: var(--accent);
  font-size: 1.6rem;
  margin: 10px 0 14px;
}

h3 {
  color: var(--accent);
  margin: 16px 0 10px;
}

h4 {
  color: var(--accent);
  margin: 14px 0 8px;
}

p {
  margin-bottom: 1rem;
}

/* ======= Código ======= */
pre {
  margin: 14px 0;
  padding: 12px;
  background: var(--code-bg);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  border: 1px solid var(--border);
}

code {
  font-family: Consolas, Menlo, Monaco, ui-monospace, monospace;
  color: var(--accent);
  font-size: 0.95rem;
}

/* ======= Imágenes ======= */
img {
  display: block;
  margin: 12px auto;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  max-width: 100%;
  height: auto;
}

/* ======= Botón volver ======= */
.volver {
  display: inline-block;
  padding: 12px 20px;
  margin-top: 50px;
  background: var(--accent);
  color: #0f172a;
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 1px solid var(--accent);
  box-shadow: var(--shadow);
  transition: all 0.25s ease;
}

.volver:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

/* ======= Listas ======= */
ol, ul {
  margin: 10px 0 14px 25px;
}

li {
  margin-bottom: 6px;
}

/* ======= Footer ======= */
footer {
  text-align: center;
  color: var(--text-dim);
  margin-top: 50px;
  font-size: 0.9rem;
  opacity: 0.85;
}

/* ======= Responsive ======= */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  summary {
    font-size: 0.95rem;
  }

  .btn, .volver {
    width: 100%;
    text-align: center;
  }
}
