/* =========================
   Reset + Variables
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root{
  --bg: #f9f9f9;
  --text: #333;
  --muted: #666;
  --primary: #007bff;
  --primary-hover: #0056b3;
  --dark: #343a40;

  --radius: 12px;
  --radius-sm: 10px;

  --shadow: 0 8px 20px rgba(0, 0, 0, 0.10);
  --shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.14);
}

/* =========================
   Base
========================= */
html{
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* =========================
   Header
========================= */
header {
  background-color: var(--primary);
  color: #fff;
  padding: 22px 0;
  text-align: center;
}

header h1 {
  margin-bottom: 10px;
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  letter-spacing: .2px;
}

/* =========================
   Navegación
========================= */
nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 14px;
}

nav li a {
  display: inline-block;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 10px;
  transition: background 0.2s ease, transform 0.2s ease;
}

nav li a:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

/* Accesibilidad */
nav li a:focus-visible,
.btn:focus-visible,
.social-icons a:focus-visible {
  outline: 3px solid rgba(255,255,255,.75);
  outline-offset: 3px;
}

/* =========================
   Main / Layout
========================= */
.mainInicio {
  width: 100%;
  padding: 60px 0;
  text-align: center;
  max-width: none;
  margin: 0 auto;
  --s: 84px;
  --c1: #ffffffE6;
  --c2: #e6e6e6E6;
  --c3: #c8c8c8E6;

  --_g: 0 120deg, #0000 0;
  background: conic-gradient(from 0deg at calc(500% / 6) calc(100% / 3), var(--c3) var(--_g)),
              conic-gradient(from -120deg at calc(100% / 6) calc(100% / 3), var(--c2) var(--_g)),
              conic-gradient(from 120deg at calc(100% / 3) calc(500% / 6), var(--c1) var(--_g)),
              conic-gradient(from 120deg at calc(200% / 3) calc(500% / 6), var(--c1) var(--_g)),
              conic-gradient(from -180deg at calc(100% / 3) 50%, var(--c2) 60deg, var(--c1) var(--_g)),
              conic-gradient(from 60deg at calc(200% / 3) 50%, var(--c1) 60deg, var(--c3) var(--_g)),
              conic-gradient(from -60deg at 50% calc(100% / 3), var(--c1) 120deg, var(--c2) 0 240deg, var(--c3) 0);
  background-size: calc(var(--s) * 1.732) var(--s);
}

/* Título/intro */
.bienvenido-card, .section-title {
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  color: var(--primary-hover);
  margin-bottom: 26px;
}

/* =========================
   Cards
========================= */
.card {
  background-color: #17a2b8;
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 22px;
  box-shadow: var(--shadow);
  text-align: left;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.card p {
  margin: 0;
  font-size: 1rem;
}

/* Helpers */
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.justify-content-center { justify-content: center; }
.gap-4 { gap: 20px; }
.w-100 { width: 100%; }
.mt-4 { margin-top: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

/* =========================
   Social
========================= */
.social-icons {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 18px;
}

.social-icons a {
  display: inline-flex;
  padding: 6px;
  border-radius: 12px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.social-icons a:hover {
  transform: translateY(-2px);
  background: rgba(0,0,0,.06);
}

.social-icons a img {
  transition: transform 0.2s ease;
}

.social-icons a:hover img {
  transform: scale(1.12);
}
/* =========================
   Footer
========================= */
footer{
  position: relative;
  background: var(--dark);
  color: rgba(255,255,255,.92);
  text-align: center;
  padding: 5px 12px;
  margin-top: 30px;
  font-size: 0.95rem;
  border-top: 1px solid rgba(255,255,255,.10);
}

footer p{
  margin: 0 0 10px;
  line-height: 1.6;
}

footer em{
  font-style: italic;
  color: rgba(255,255,255,.85);
}

/* Enlaces del footer (evita morado/visitado) */
footer a,
footer a:visited{
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 10px;
  display: inline-block;
  transition: background .2s ease, transform .2s ease, color .2s ease;
}

footer a:hover{
  background: rgba(255,255,255,.10);
  color: #fff;
  transform: translateY(-1px);
}

footer a:focus-visible{
  outline: 3px solid rgba(255,255,255,.65);
  outline-offset: 3px;
}

/* Separador más bonito (si sigues usando | ) */
footer .sep{
  margin: 0 6px;
  opacity: .4;
}

/* Botón subir arriba en el extremo derecho del footer */
#btnArriba{
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.95);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .2s ease, transform .2s ease;
}

#btnArriba:hover{
  background: rgba(255,255,255,.22);
  transform: translateY(-50%) translateY(-1px);
}

#btnArriba:focus-visible{
  outline: 3px solid rgba(255,255,255,.65);
  outline-offset: 3px;
}


/* Responsive */
@media (max-width: 480px){
  nav li a{
    padding: 10px 12px;
  }
  .mainInicio{
    padding: 45px 16px;
  }

  footer{
    padding: 22px 12px;
  }
  footer a{
    margin: 4px 2px;
  }
}
