:root {
  --bg: #0f1724;
  --text: #ffffff;
  --accent: #c9a24a;
  --card: #0b0b0d;
  --gray: #b5b5b5;
  --black: #000000;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { text-decoration: none; color: inherit; }

/* ================= HEADER ================= */

header { text-align: center; padding: 20px; }

header h1 {
  color: var(--accent);
  font-size: 2rem;
  margin: 0 0 10px;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 20px;
}

.social-links a {
  width: 48px;
  height: 48px;
  border: 1px solid var(--accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition: all .25s ease;
}

.icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
  color: var(--accent);
  transition: all .25s ease;
  display: block;
}

.social-links a:hover {
  background: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(201,162,74,0.25);
}

.social-links a:hover .icon { color: var(--bg); }

.icon-sprite { display: none; }

/* ================= HERO ================= */

.hero { text-align: center; padding: 4rem 1rem; }

.btn-primary {
  display: inline-block;
  padding: 0.9rem 1.8rem;
  border: 2px solid var(--accent);
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  background: var(--bg);
  color: var(--text);
  transition: background .2s ease;
}

.btn-primary:hover { background: var(--accent); }

.plan .btn-primary {
  background: var(--card);
  color: var(--text);
}

.plan .btn-primary:hover {
  background: var(--accent);
  color: var(--black);
}

/* ================= SECTIONS ================= */

section {
  padding: 3rem 2rem;
  max-width: 1100px;
  margin: auto;
}

section h2 {
  color: var(--accent);
  text-align: center;
  margin-bottom: 2rem;
}

/* ================= PRICING ================= */

.pricing-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.plan {
  background: var(--card);
  padding: 2rem;
  border-radius: 12px;
  border: 2px solid var(--accent);
  text-align: center;
}

.plan h3 { color: var(--accent); margin-bottom: 1rem; }

.price { font-size: 1.8rem; font-weight: bold; margin: 1rem 0; }

.plan ul { list-style: none; padding: 0; margin: 1.5rem 0; }

.plan ul li { margin-bottom: 0.7rem; }

.plan .btn-primary { margin-top: 1rem; }

/* ================= FOOTER & CONTACT ================= */

footer { text-align: center; padding: 2rem 1rem; }

footer p { margin: 0.5rem 0; }

footer .legal-links a,
#contact a {
  color: var(--accent);
  font-weight: 500;
}

footer .legal-links a:hover,
#contact a:hover {
  text-decoration: underline;
}

#contact { text-align: center; }

/* ================= COOKIE BANNER ================= */

#cookie-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: var(--bg);
  color: var(--text);
  border-top: 2px solid var(--accent);
  z-index: 9999;
}

#cookie-banner .cookie-text {
  margin-bottom: 12px;
  line-height: 1.5;
}

#cookie-banner .cookie-actions {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
}

#cookie-banner button,
#cookie-banner .cookie-config {
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--accent);
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease; /* Añadimos transición de color */
}

/* El botón de Aceptar en tu HTML debe llevar una clase o estilo que le dé el fondo, */
/* aquí aseguramos que si se pinta de dorado, su texto sea estrictamente negro */
#cookie-banner button.btn-primary, 
#cookie-banner button:hover,
#cookie-banner .cookie-config:hover {
  background: var(--accent);
  color: var(--black); /* Reparación: El texto cambia a negro */
}

@media (min-width: 768px) {
  #cookie-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  #cookie-banner .cookie-text {
    max-width: 60%;
    margin-bottom: 20px;
  }

  #cookie-banner .cookie-actions {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  #cookie-banner .cookie-actions > * {
    justify-self: center;
  }
}



/* ================= CHECKBOX ================= */

input[type="checkbox"] {
  width: 20px;
  height: 20px;
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid var(--accent);
  border-radius: 4px;
  background: transparent;
  display: inline-block;
  position: relative;
  flex-shrink: 0;
  margin: 0;
}

input[type="checkbox"]::before {
  content: "";
  position: absolute;
  width: 10px;
  height: 6px;
  border-left: 3px solid var(--text);
  border-bottom: 3px solid var(--text);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-45deg) scale(0);
  transition: transform .15s ease;
}

input[type="checkbox"]:checked { background: var(--accent); }

input[type="checkbox"]:checked::before {
  transform: translate(-50%, -50%) rotate(-45deg) scale(1);
}

input[type="checkbox"]:disabled {
  cursor: default;
  pointer-events: none;
}

.cookie-option input[type="checkbox"]:disabled {
  background-color: var(--gray);
  border-color: var(--gray);
  cursor: not-allowed;
}

.cookie-option input[type="checkbox"]:disabled::before {
  border-color: var(--black);
  opacity: 1;
}

/* ================= SECURE CONTACT ================= */

#secure-contact {
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 2rem;
}

.secure-contact-intro,
.secure-contact-form,
.secure-contact-status {
  max-width: 760px;
  margin: 0 auto;
}

.secure-contact-intro { text-align: center; margin-bottom: 1.5rem; }

.secure-contact-form { display: grid; gap: 0.75rem; }

.secure-contact-form label { font-weight: 600; }

.secure-contact-form input,
.secure-contact-form textarea {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 0.75rem;
  font: inherit;
}

.secure-contact-form textarea { resize: vertical; }

.secure-contact-status {
  margin-top: 1rem;
  text-align: center;
  color: var(--accent);
  min-height: 1.2rem;
}

/* --- Ajuste correcto para el botón de este formulario --- */
#secure-contact .btn-primary {
  margin-top: 1rem;
  background: var(--bg);   /* Conserva el fondo azul oscuro en reposo */
  color: var(--text);      /* Conserva el texto blanco en reposo */
  
  /* Alineación limpia que respeta tu padding original */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.6;
}

/* Aquí asignamos el color negro exclusivamente durante la animación (Hover) */
#secure-contact .btn-primary.btn-animate:hover {
  background: var(--accent); /* Se ilumina en dorado al tocarlo/pasar el cursor */
  color: var(--black);      /* El texto cambia a negro solo en este estado */
}


/* ================= SECTION DIVIDER ================= */

.section-divider {
  width: 100%;
  height: 1px;
  background: var(--accent);
  margin: 2rem 0;
}

/* ================= ARQUITECTURA WEB ================= */

#architecture {
  max-width: 600px;
  margin: 60px auto;
  padding: 40px 30px;
  border: 2px solid var(--accent);
  border-radius: 12px;
}

.architecture-list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.architecture-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  font-size: 1.05rem;
  letter-spacing: 0.3px;
}

.architecture-list label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: default;
}

@media (max-width: 768px) {
  #architecture {
    width: calc(100% - 4rem);
    margin: 40px auto;
  }
}

/* ================= COOKIE PAGE SPECIFIC ================= */

.cookie-option {
  border: 2px solid var(--accent);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
  background: var(--bg);
}

.cookie-option label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  cursor: pointer;
}

.cookie-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.cookie-option small {
  display: block;
  margin-top: 8px;
  font-size: 0.9rem;
  opacity: 0.9;
}

.actions {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.button {
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--accent);
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.button:hover { background: var(--bg); }

/* ================= SEPARADORES DE SECCIÓN ÚNICOS ================= */

.page-cookies header {
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2rem;
  margin-bottom: 3rem;
}

.page-cookies footer {
  border-top: 2px solid var(--accent);
  padding-top: 2rem;
  margin-top: 3rem;
}

/* ================= CENTRADO DE BLOQUES EN PC ================= */

@media (min-width: 768px) {
  .page-cookies main {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .page-cookies .cookie-option,
  .page-cookies .actions {
    width: 100%;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ===== 404 PAGE ===== */

.page-404 {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: grid;
  place-items: center;
  min-height: 100vh;
  text-align: center;
  padding: 20px;
}

.page-404 .container { max-width: 520px; }

.page-404 h1 {
  font-size: 96px;
  margin: 0;
  color: var(--accent);
  line-height: 1;
}

.page-404 h2 { margin: 12px 0 18px 0; font-weight: 600; }

.page-404 p { opacity: 0.85; line-height: 1.5; }

.page-404 .buttons {
  margin-top: 30px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.page-404 .btn {
  padding: 12px 22px;
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--accent);
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
  display: inline-block;
}

.page-404 .btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(201,162,74,0.30);
  background: var(--accent);
  color: var(--text);
}

.page-404 footer { margin-top: 40px; font-size: 14px; opacity: 0.7; }

/* ===== PÁGINAS DE TEXTO ===== */

.page-text main section:last-child .button {
  display: block;
  width: max-content;
  margin: 2rem auto 0 auto;
  text-align: center;
}

.page-text header {
  border-bottom: 2px solid var(--accent);
  padding-bottom: 1rem;
  margin-bottom: 1.2rem;
}

.page-text footer {
  border-top: 2px solid var(--accent);
  padding-top: 1rem;
  margin-top: 2rem;
  text-align: center;
}

.page-text main {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1.2rem;
}

.page-text section {
  width: 100%;
  padding: 1rem 0;
  line-height: 1.6;
}

.page-text section p:first-of-type,
.page-text p,
.page-text section ul,
.page-text section ul li {
  color: var(--gray);
  margin-bottom: 0.9rem;
  font-size: 0.95rem;
}

.page-text h2, .page-text h3 { color: var(--accent); }

.page-text h2 { text-align: left; margin: 1.4rem 0 0.6rem 0; font-size: 1.25rem; }

.page-text h3 { margin-top: 1rem; margin-bottom: 0.4rem; font-size: 1rem; }

.page-text a:not(.button):not(footer a) {
  color: var(--accent);
  opacity: 0.85;
  transition: all 0.2s ease;
}

.page-text a:not(.button):not(footer a):hover,
.page-text a:not(.button):not(footer a):focus {
  text-decoration: underline;
  opacity: 1;
}

.page-text a[href^="mailto:"] {
  color: var(--text);
  transition: all 0.2s ease;
}

.page-text a[href^="mailto:"]:hover { text-decoration: underline; }

.page-text a.legal-mail {
  color: var(--accent);
}

.page-text footer a {
  color: var(--accent);
  transition: all 0.2s ease;
}

.page-text footer a:hover { text-decoration: underline; }

.page-text footer p:first-child,
.page-text footer p:last-child {
  color: var(--text);
}

.button, .page-text a.button {
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--accent);
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  /* Solución al problema de alineación */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.6; 
  
  transition: all 0.25s ease;
}


.button:hover, .page-text a.button:hover {
  background: var(--accent);
  color: var(--bg);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(201,162,74,0.30);
}

.button:active, .page-text a.button:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(201,162,74,0.25);
}

.page-text .button { margin-top: 1.4rem; }

.page-text h2, .page-text h3, .page-text a:not(.button):not(footer a) {
  filter: brightness(0.95);
}

@media (min-width: 768px) {
  .page-text section { padding: 1rem 0; }
  .page-text main {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    margin: auto;
  }
  .page-text main section { width: 100%; max-width: 750px; }
}

/* ===== ANIMACIONES ESPECÍFICAS ===== */

.btn-animate {
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-animate:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(201, 162, 74, 0.30);
}

.btn-animate:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(201, 162, 74, 0.25);
}

.hero .btn-primary { margin-top: 1.5rem; }

.hero .btn-primary:hover {
  background: var(--accent);
  color: var(--black);
}

#cookie-banner button.btn-animate,
#cookie-banner .cookie-config.btn-animate {
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

#cookie-banner button.btn-animate:hover,
#cookie-banner .cookie-config.btn-animate:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(201,162,74,0.30);
}

#secure-contact .btn-primary { margin-top: 1rem; }

#secure-contact .btn-primary.btn-animate {
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

@media (min-width: 768px) {
  #secure-contact .btn-primary.btn-animate {
    transition: transform 0.35s ease, box-shadow 0.35s ease, background 0.25s ease;
  }
}
