/* =========================================
   1. BASE
   ========================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-principal: #1e3a5f;
  --color-acento: #3a86ff;
  --color-fondo: #f4f6f9;
  --color-texto: #222;
  --color-suave: #6b7785;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Rubik', 'Segoe UI', Arial, sans-serif;
  background: var(--color-fondo);
  color: var(--color-texto);
  line-height: 1.6;
}

a {
  color: var(--color-acento);
}

/* =========================================
   2. CABECERA (Flexbox)
   ========================================= */
header {
  background: var(--color-principal);
  color: white;
  padding: 2rem 1rem 0;
}

.cabecera {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.foto-perfil {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
}

.cabecera-texto h1 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.cabecera-texto > p {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  opacity: 0.9;
}

.datos {
  list-style: none;
  font-size: 0.95rem;
}

.datos a {
  color: #bcd7ff;
}

/* =========================================
   3. MENÚ DE NAVEGACIÓN (Flexbox)
   ========================================= */
nav {
  margin-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  list-style: none;
  padding: 1rem 0;
}

.menu a {
  color: white;
  text-decoration: none;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  transition: background 0.2s;
}

.menu a:hover {
  background: var(--color-acento);
}

/* =========================================
   4. CONTENIDO PRINCIPAL
   ========================================= */
main {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

section {
  background: white;
  transition: background 0.4s ease;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  border-left: 5px solid var(--color-acento);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

section:hover {
  background: #fafafa;
}

section h2 {
  color: var(--color-principal);
  margin-bottom: 1rem;
}

/* Listas normales dentro del contenido */
section ul {
  padding-left: 1.2rem;
}

/* =========================================
   5. TARJETAS (Flexbox)
   ========================================= */
.tarjetas {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.tarjeta {
  flex: 1 1 250px;
  background: var(--color-fondo);
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 1rem;
  transition: background 0.4s ease;
}

.tarjeta:hover {
  background: #e9ecf0
}

.tarjeta h3 {
  color: var(--color-principal);
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.lugar {
  font-weight: 600;
}

.fecha {
  color: var(--color-suave);
  font-style: italic;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* =========================================
   6. PIE DE PÁGINA / CONTACTO (Flexbox)
   ========================================= */
footer {
  background: var(--color-principal);
  color: white;
  text-align: center;
  padding: 2rem 1rem;
}

footer h2 {
  margin-bottom: 1rem;
}

.contacto-datos {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 2.5rem;
}

/* =========================================
   7. RESPONSIVE
   ========================================= */
@media (max-width: 600px) {
  .cabecera {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .menu {
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
  }

  .tarjetas {
    flex-direction: column;
  }

  .contacto-datos {
    flex-direction: column;
    gap: 0.25rem;
  }

  section {
    padding: 1rem;
  }
}