/* 🔹 Reset y estilos base */
* {
    margin: 5;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f4f4f9;
    color: #333;
    line-height: 1.6;
}

/* 🔹 Header */
header {
    background: #fff;
    padding: 1rem 2rem;
    text-align: center;
}

header h1 {
    color: #000;
    font-size: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* 🔹 Menú */
nav {
    background: #fff;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

nav ul li {
    position: relative;
}

nav ul li a {
    display: block;
    color: #000;
    text-decoration: none;
    padding: 1rem;
    transition: background 0.3s;
}

nav ul li a:hover {
    background: #f4f4f4;
}

/* Submenú */
nav ul li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    list-style: none;
    min-width: 100px;
}

nav ul li:hover ul {
    display: block;
}

nav ul li ul li a {
    padding: 0.8rem;
}

/* 🔹 Cabecera */
.cabecera {
    background-color: rgba(119, 118, 118, 0.397);
}

/* 🔹 Card principal */
.card {
    background: #fff;
    display: flex;
    align-items: flex-start;
    width: 800px;
    height: 400px;
    margin: 2rem 0 2rem 60px;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.card img {
    width: 250px;
    height: 250px;
    border-radius: 10px;
}

.card h2 {
    margin-bottom: 1rem;
    color: #222;
}

.card p {
    color: #555;
}

/* 🔹 Card secundaria (entradas recientes) */
.card21 {
    background: #fff;
    width: 350px;
    height: 1000px;
    margin: 3rem 0 1rem -35px;
    padding: 1rem;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Título de entradas recientes */
.entradareciente h2 {
    font-size: 16px;
    margin: 0 0 10px 0;
    text-align: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

/* Contenido con imagen + texto */
.contenido21 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contenido21 img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 4px;
}
.subcontenido {
}
.texto21 h2 {
    font-size: 20px;
    margin: 0 0 5px 0;
    text-align: left;
}

.texto21 p {
    font-size: 14px;
    margin: 0;
    line-height: 1.3;
    color: #555;
    text-align: left;
}

/* 🔹 Card con imagen izquierda + texto derecha */
.contenido-flex {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-width: 900px;
    height: 450px;
     position: relative;
    top: 0;   /* bien arriba */
    left: 0;  /* bien a la izquierda */
    margin: 20px;
}

.imagenizquierda img {
    width: 400px;
    height: 400px;
    object-fit: cover;
    border-radius: 6px;
}

/* ====== FORZAR VERTICAL ====== */
.contenido-flex {
  display: flex !important;        /* activa flex */
  flex-direction: column !important; /* apila en columna */
  align-items: flex-start;
  gap: 15px;
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  max-width: 800px;
  height: auto;                    /* no fuerces altura fija */
  margin: 20px 0 0 20px;
}

/* asegúrate de que los hijos ocupen todo el ancho y no floten */
.contenido-flex > * {
  width: 100%;
  float: none !important;
  display: block;
}

/* imagen responsive arriba */
.imagenizquierda img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

/* texto debajo de la imagen */
.contenido {
  display: flex;          /* te faltaba esto */
  flex-direction: column;
  width: 100%;
}

.btn-enlace {
  display: inline-block;
  margin-top: 100px;       /* separación con el párrafo */
  padding: 10px 10px;
  background-color: #33ff00;  /* azul */
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.3s ease;
}

.btn-enlace:hover {
  background-color: #0056b3;  /* azul más oscuro al pasar el mouse */
}

/* 🔹 Sidebar */
.sidebar {
    width: 320px;
    height: 100px;
    margin-left: 990px;
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    position: absolute;
    top: 240px;
    right: 20;
}

/* Buscador dentro del sidebar */
.sidebar .buscador {
    display: flex;
    gap: 5px;
    margin-bottom: 1rem;
}

.sidebar .buscador input {
    flex: 1;
    padding: 6px;
    font-size: 0.9rem;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.sidebar .buscador button {
    padding: 6px 20px;
    border: none;
    background: #000;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
}

.sidebar .buscador button:hover {
    background: #333;
}

/* Widgets */
.sidebar .widget {
    text-align: center;
}

.sidebar .widget h3 {
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.sidebar .widget img {
    width: 100%;
    max-width: 350px;
    border-radius: 6px;
}

/* 🔹 Footer */
footer {
    text-align: center;
    padding: 1rem;
    background: #222;
    color: #fff;
    margin-top: 2rem;
}
