/* ============================================================
   Recetas.com — Nuevo diseño 2026
   Mobile-first, responsive, 1280px max-width
   ============================================================ */

/* ---- Reset & base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.65;
  color: #333;
  background: #f7f5f2;
}

img { border: 0; max-width: 100%; height: auto; display: block; }
a { color: #c0392b; text-decoration: none; }
a:hover { color: #922b21; text-decoration: underline; }
ul, ol { list-style: none; }
form { margin: 0; padding: 0; }
table { width: 100%; border-collapse: collapse; }
table td, table th { padding: 6px 8px; vertical-align: top; }
article, aside, figure, footer, header, nav, section, main { display: block; }

/* ---- Layout container ---- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Page layout (content + sidebar) ---- */
.page-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  padding-top: 24px;
  padding-bottom: 40px;
  align-items: start;
}

.page-layout-index {
  grid-template-columns: 1fr 300px;
}

/* ============================================================
   HEADER
   ============================================================ */
#site-header {
  background: #c0392b;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 10px;
  padding-bottom: 10px;
  min-height: 56px;
}

/* Logo */
.site-logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.logo-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
}
.logo-dot { font-weight: 400; color: rgba(255,255,255,0.7); }

/* Search */
.search-form { flex: 1; max-width: 540px; }
.search-inner {
  display: flex;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}
.search-inner input[type="text"] {
  flex: 1;
  border: none;
  outline: none;
  padding: 9px 14px;
  font-size: 14px;
  color: #333;
  min-width: 0;
}
.search-inner select {
  border: none;
  border-left: 1px solid #e0e0e0;
  outline: none;
  padding: 9px 8px;
  font-size: 13px;
  color: #555;
  background: #fafafa;
  cursor: pointer;
  max-width: 130px;
}
.search-btn {
  background: #922b21;
  border: none;
  color: #fff;
  padding: 9px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.search-btn:hover { background: #7b241c; }

/* User — logged in */
.user-menu { position: relative; margin-left: auto; flex-shrink: 0; }
.user-avatar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.2s;
}
.user-avatar-wrap:hover { background: rgba(255,255,255,0.15); }
.user-avatar { border-radius: 50%; border: 2px solid rgba(255,255,255,0.5); }
.user-name { color: #fff; font-size: 13px; font-weight: 500; }
.chevron { color: rgba(255,255,255,0.7); transition: transform 0.2s; }
.user-menu.open .chevron { transform: rotate(180deg); }

.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  min-width: 200px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  overflow: hidden;
}
.user-menu.open .user-dropdown { display: block; }
.user-dropdown-inner a, .user-dropdown-inner li a {
  display: block;
  padding: 9px 16px;
  font-size: 13px;
  color: #333;
  text-decoration: none;
  transition: background 0.15s;
}
.user-dropdown-inner a:hover { background: #fdf0ee; color: #c0392b; }
.dropdown-divider { height: 1px; background: #f0f0f0; margin: 4px 0; }

/* User — logged out */
.user-auth { display: flex; gap: 8px; margin-left: auto; flex-shrink: 0; }
.btn-login {
  padding: 7px 16px;
  border: 1.5px solid rgba(255,255,255,0.6);
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-login:hover { background: rgba(255,255,255,0.15); text-decoration: none; }
.btn-register {
  padding: 7px 16px;
  background: #fff;
  border: 1.5px solid #fff;
  border-radius: 6px;
  color: #c0392b;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-register:hover { background: #fdf0ee; text-decoration: none; }

/* Hamburguesa */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  border-radius: 6px;
  transition: background 0.2s;
}
.menu-toggle:hover { background: rgba(255,255,255,0.15); }
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s;
}
.menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Navegación principal ---- */
#main-nav { background: #a93226; }
.nav-list {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-list::-webkit-scrollbar { display: none; }
.nav-list li a {
  display: block;
  color: rgba(255,255,255,0.88);
  padding: 10px 15px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s;
}
.nav-list li a:hover, .nav-list li.active a {
  color: #fff;
  background: rgba(0,0,0,0.15);
}

/* ---- Submenú categorías ---- */
.sub-nav { background: #fff; border-bottom: 1px solid #e8e0d8; }
.sub-nav-inner {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 0;
}
.sub-nav-inner::-webkit-scrollbar { display: none; }
.sub-nav-inner > a {
  display: block;
  color: #555;
  padding: 7px 12px;
  font-size: 12.5px;
  white-space: nowrap;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s;
  flex-shrink: 0;
}
.sub-nav-inner > a:hover { color: #c0392b; background: #fdf0ee; text-decoration: none; }

/* Sub-nav más */
.sub-nav-more { position: relative; }
.sub-nav-more-btn {
  background: none;
  border: 1px solid #ddd;
  padding: 6px 12px;
  font-size: 12.5px;
  color: #555;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.sub-nav-more-btn:hover { background: #fdf0ee; color: #c0392b; border-color: #c0392b; }
.sub-nav-more-list {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  min-width: 180px;
  z-index: 50;
  padding: 6px 0;
}
.sub-nav-more-list.visible { display: block; }
.sub-nav-more-list a {
  display: block;
  padding: 8px 16px;
  font-size: 13px;
  color: #333;
  text-decoration: none;
  transition: background 0.15s;
}
.sub-nav-more-list a:hover { background: #fdf0ee; color: #c0392b; }

/* ============================================================
   FEATURED SLIDER (portada)
   ============================================================ */
.featured-articles { background: #1a1a1a; overflow: hidden; }
.featured-slider { position: relative; }
.featured-slide { position: relative; display: none; }
.featured-slide:first-child { display: block; }
.featured-slide a { display: block; text-decoration: none; }
.featured-slide img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  opacity: 0.7;
}
.featured-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 32px 40px;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
}
.featured-caption h3 { color: #fff; font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.featured-caption p { color: rgba(255,255,255,0.85); font-size: 14px; max-width: 600px; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.page-sidebar { display: flex; flex-direction: column; gap: 20px; }

.sidebar-widget {
  background: #fff;
  border: 1px solid #e8e0d8;
  border-radius: 12px;
  padding: 20px;
}

.widget-title {
  font-size: 15px;
  font-weight: 700;
  color: #222;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0ebe5;
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0ebe5;
}
.widget-header .widget-title { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.widget-more { font-size: 12px; color: #c0392b; text-decoration: none; }
.widget-more:hover { text-decoration: underline; }

.widget-desc { font-size: 13px; color: #666; margin-bottom: 12px; }

/* Newsletter */
.widget-newsletter { background: #c0392b; border-color: #a93226; }
.widget-newsletter .widget-title { color: #fff; border-bottom-color: rgba(255,255,255,0.2); }
.widget-newsletter .widget-desc { color: rgba(255,255,255,0.85); }
.newsletter-input { display: flex; gap: 8px; }
.newsletter-input input {
  flex: 1;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  outline: none;
  min-width: 0;
}
.newsletter-input button {
  background: #fff;
  color: #c0392b;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.newsletter-input button:hover { background: #fdf0ee; }

/* Top recetas */
.top-recipe-list { counter-reset: recipe-counter; }
.top-recipe-list li {
  counter-increment: recipe-counter;
  border-bottom: 1px solid #f5f0ea;
}
.top-recipe-list li:last-child { border-bottom: none; }
.top-recipe-list li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  text-decoration: none;
  color: #333;
  font-size: 13px;
  line-height: 1.4;
}
.top-recipe-list li a:hover { color: #c0392b; }
.top-recipe-list li a::before {
  content: counter(recipe-counter);
  font-size: 12px;
  font-weight: 700;
  color: #c0392b;
  min-width: 18px;
  flex-shrink: 0;
}
.top-recipe-list li a img {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

/* Promo */
.widget-promo p { font-size: 13px; color: #555; margin-bottom: 12px; line-height: 1.6; }
.btn-primary {
  display: inline-block;
  background: #c0392b;
  color: #fff;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}
.btn-primary:hover { background: #922b21; text-decoration: none; color: #fff; }

/* Videos sidebar */
.video-thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.video-thumb { text-decoration: none; color: #333; }
.video-thumb-img { position: relative; margin-bottom: 6px; }
.video-thumb-img img { width: 100%; height: 72px; object-fit: cover; border-radius: 6px; }
.play-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 28px; height: 28px;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.play-icon::after {
  content: '';
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent #fff;
  margin-left: 2px;
}
.video-thumb span { font-size: 12px; line-height: 1.3; display: block; }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.path, nav.path {
  padding: 10px 0;
  margin-bottom: 16px;
  font-size: 12.5px;
  color: #888;
}
.path a, nav.path a { color: #c0392b; text-decoration: none; }
.path a:hover, nav.path a:hover { text-decoration: underline; }
.path .selected { color: #555; }

/* ============================================================
   CONTENIDO PRINCIPAL — elementos comunes
   ============================================================ */
.page-content { min-width: 0; }

/* Títulos */
h1 { font-size: 26px; font-weight: 700; color: #1a1a1a; line-height: 1.25; margin-bottom: 12px; }
h2 { font-size: 20px; font-weight: 700; color: #222; margin-bottom: 10px; }
h3 { font-size: 17px; font-weight: 600; color: #333; margin-bottom: 8px; }

p { margin-bottom: 12px; }

/* Cards de listado */
.show_entries { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }

.show_entry {
  background: #fff;
  border: 1px solid #e8e0d8;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.show_entry:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); transform: translateY(-2px); }
.show_entry_image img { width: 100%; height: 160px; object-fit: cover; display: block; }
.show_entry_content { padding: 12px 14px; }
.show_entry_title a { font-size: 14px; font-weight: 600; color: #222; line-height: 1.4; text-decoration: none; }
.show_entry_title a:hover { color: #c0392b; }
.show_entry_details { font-size: 12px; color: #888; margin-top: 4px; }
.show_entry_author { font-size: 12px; color: #888; }
.show_entry_right { margin-top: 8px; }

/* Paginación */
.pagination, .page_nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 28px 0;
  flex-wrap: wrap;
}
.pagination a, .page_nav a,
.pagination span, .page_nav span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 13px;
  color: #333;
  text-decoration: none;
  transition: all 0.15s;
}
.pagination a:hover, .page_nav a:hover { border-color: #c0392b; color: #c0392b; background: #fdf0ee; }
.pagination .current, .page_nav .current { background: #c0392b; border-color: #c0392b; color: #fff; }

/* Rating estrellas */
.recipe_rating, ul.article_rating, ul.recipe_rating {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

/* Formularios */
input[type="text"], input[type="email"], input[type="password"], textarea, select {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  color: #333;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
input[type="text"]:focus, input[type="email"]:focus,
input[type="password"]:focus, textarea:focus, select:focus {
  border-color: #c0392b;
  box-shadow: 0 0 0 3px rgba(192,57,43,0.12);
}
textarea { resize: vertical; min-height: 100px; }

input[type="submit"], button[type="submit"], .green130 {
  background: #c0392b;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
}
input[type="submit"]:hover, button[type="submit"]:hover, .green130:hover {
  background: #922b21;
}

/* Errores / mensajes */
.error { color: #c0392b; font-size: 13px; margin: 8px 0; }
.success { color: #27ae60; font-size: 13px; margin: 8px 0; }

/* ============================================================
   VISTA DE RECETA
   ============================================================ */
.recipe_view header { margin-bottom: 20px; }
.recipe_view h1 { font-size: 28px; }

.recipe_image { margin-bottom: 20px; }
.recipe_image img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 12px;
}

.recipe_data {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin: 16px 0 24px;
}
.recipe_data > div {
  background: #fff;
  border: 1px solid #e8e0d8;
  border-radius: 10px;
  padding: 12px 14px;
  text-align: center;
}
.recipe_data > div span { font-size: 13px; color: #555; display: block; }
.recipe_data time { font-size: 18px; font-weight: 700; color: #c0392b; display: block; }
.recipe_data .difficulty span,
.recipe_data .servings span { font-size: 18px; font-weight: 700; color: #c0392b; }

.personal_info {
  background: #fdf0ee;
  border-left: 4px solid #c0392b;
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  margin: 16px 0;
  font-style: italic;
  color: #555;
  font-size: 14px;
}

.ingredients_info h3,
.preparation_info h3 {
  font-size: 17px;
  font-weight: 700;
  color: #222;
  margin: 20px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f0ebe5;
}

.recipe_details { margin-top: 8px; }

/* Recetas relacionadas */
.box_recipe_related { margin-top: 32px; }
.box_recipe_related h2 { font-size: 18px; margin-bottom: 16px; }
.box_recipe_related .show_entries { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

/* Secciones (Preparación / Imágenes / Videos) */
.sections ul { display: flex; gap: 0; border-bottom: 2px solid #f0ebe5; margin-bottom: 20px; }
.sections ul li, .sections ul li a {
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #666;
  text-decoration: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  display: block;
}
.sections ul li.selected { color: #c0392b; border-bottom-color: #c0392b; }
.sections ul li a:hover { color: #c0392b; }

/* Favorito */
.fav-cont { margin: 8px 0; }
#add_favorite {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1.5px solid #c0392b;
  border-radius: 20px;
  font-size: 13px;
  color: #c0392b;
  cursor: pointer;
  transition: all 0.2s;
}
#add_favorite:hover { background: #c0392b; color: #fff; }

/* Tags */
.recipe_tags, .article_tags { font-size: 13px; color: #666; margin: 8px 0; }
.recipe_tags a, .article_tags a {
  display: inline-block;
  background: #f0ebe5;
  color: #555;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  margin: 2px;
  text-decoration: none;
  transition: all 0.15s;
}
.recipe_tags a:hover, .article_tags a:hover { background: #c0392b; color: #fff; }

/* Share */
.share { margin: 12px 0; }

/* ============================================================
   VISTA DE ARTÍCULO
   ============================================================ */
.article_view { background: #fff; border-radius: 12px; padding: 28px; border: 1px solid #e8e0d8; }
.article_view header { margin-bottom: 20px; }
.article_view time { font-size: 12.5px; color: #888; display: block; margin-bottom: 6px; }
.article_view .category a { font-size: 12.5px; color: #c0392b; text-decoration: none; font-weight: 500; }
.article_view #article_content { font-size: 15px; line-height: 1.75; color: #333; }
.article_view #article_content p { margin-bottom: 16px; }
.article_view #article_content img { border-radius: 8px; margin: 12px 0; }

/* Rating artículo */
#rating { margin-bottom: 12px; }

/* ============================================================
   COMENTARIOS
   ============================================================ */
.box_comment { margin-top: 32px; }
.box_comment .title h2 { font-size: 18px; margin-bottom: 16px; }
.comment_entry {
  background: #fff;
  border: 1px solid #e8e0d8;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
}
.comment_form form {
  background: #fff;
  border: 1px solid #e8e0d8;
  border-radius: 10px;
  padding: 20px;
  margin-top: 16px;
}
.comment_form .c_name { font-size: 13px; font-weight: 600; color: #333; margin-bottom: 10px; }
.comment_form textarea { width: 100%; margin-bottom: 10px; }
.comment_form input[type="text"] { width: 180px; }

/* ============================================================
   LISTADOS (recetas, artículos, etc.)
   ============================================================ */
.recipe_list_view, .article_list_view {
  padding: 0;
}

.list_header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.list_order {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #666;
}
.list_order a {
  padding: 5px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  color: #555;
  text-decoration: none;
  font-size: 12.5px;
  transition: all 0.15s;
}
.list_order a:hover, .list_order a.selected { background: #c0392b; border-color: #c0392b; color: #fff; }

/* ============================================================
   BUSCADOR
   ============================================================ */
.search_result .show_entry { display: flex; gap: 14px; border-radius: 10px; padding: 14px; }
.search_result .show_entry_image { flex-shrink: 0; }
.search_result .show_entry_image img { width: 80px; height: 80px; border-radius: 8px; object-fit: cover; }

/* ============================================================
   PORTADA — bloques específicos
   ============================================================ */
.page-layout-index .page-content { min-width: 0; }

.box_index_recipes h2,
.box_index_articles h2,
.box_member_top h2 {
  font-size: 20px;
  font-weight: 700;
  color: #222;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0ebe5;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.box_index_recipes h2 a,
.box_index_articles h2 a,
.box_member_top h2 a { font-size: 13px; font-weight: 500; color: #c0392b; }

/* ============================================================
   MEMBER / CHEF
   ============================================================ */
.member_view .member_image img { border-radius: 50%; width: 80px; height: 80px; object-fit: cover; }
.member_list_entry {
  background: #fff;
  border: 1px solid #e8e0d8;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.member_list_entry img { border-radius: 50%; width: 50px; height: 50px; object-fit: cover; flex-shrink: 0; }

/* ============================================================
   INGREDIENTES
   ============================================================ */
.ingredient_view article { background: #fff; border-radius: 12px; padding: 24px; border: 1px solid #e8e0d8; }

/* ============================================================
   MENU HAMBURGUESA — móvil
   ============================================================ */

/* ============================================================
   FOOTER
   ============================================================ */
#site-footer { background: #1a1a1a; color: #ccc; margin-top: 48px; }

.footer-location { background: #111; padding: 16px 0; }
.footer-location img { max-height: 80px; object-fit: cover; border-radius: 6px; }

.footer-main { padding: 32px 0; }
.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: start;
}
.footer-logo .site-logo { text-decoration: none; }
.footer-logo .logo-text { color: #fff; font-size: 20px; }
.footer-logo .logo-dot { color: rgba(255,255,255,0.5); }

.footer-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.footer-links a {
  color: #aaa;
  font-size: 13px;
  text-decoration: none;
  transition: color 0.15s;
}
.footer-links a:hover { color: #fff; }

.footer-copy { text-align: right; }
.footer-copy p { font-size: 12px; color: #888; margin-bottom: 4px; line-height: 1.5; }
.footer-copy a { color: #888; text-decoration: none; }
.footer-copy a:hover { color: #fff; }

/* ============================================================
   ADMIN (live edit)
   ============================================================ */
.live_edit { display: inline; }
.live_edit a img { width: 16px; height: 16px; }

/* ============================================================
   VARIOS
   ============================================================ */
.clear { clear: both; }
.hidden { display: none; }
.right { float: right; }
.left { float: left; }
.center { text-align: center; }

.location_flag { width: 20px; height: 14px; vertical-align: middle; margin-right: 4px; }

/* Popup overlay */
.popup { padding: 20px; }

/* Captcha */
#verify_string { width: 140px !important; }

/* Newsletter confirmación */
.newsletter_confirm { text-align: center; padding: 40px 20px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet (≤ 900px) */
@media (max-width: 900px) {
  .page-layout,
  .page-layout-index {
    grid-template-columns: 1fr;
  }
  .page-sidebar { order: 2; }
  .page-content { order: 1; }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .footer-copy { text-align: left; }

  .featured-caption { padding: 20px 24px; }
  .featured-slide img { height: 240px; }
}

/* Mobile (≤ 640px) */
@media (max-width: 640px) {
  .container { padding: 0 16px; }

  /* Header móvil */
  .header-inner { flex-wrap: wrap; gap: 10px; padding-top: 10px; padding-bottom: 0; }
  .site-logo { order: 1; }
  .menu-toggle { display: flex; order: 2; margin-left: auto; }
  .search-form { order: 3; width: 100%; max-width: 100%; padding-bottom: 10px; }
  .user-auth, .user-menu { display: none; } /* Se muestra dentro del menú móvil */

  /* Menú móvil desplegable */
  #main-nav { display: none; }
  #main-nav.nav-open {
    display: block;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #a93226;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  }
  #main-nav.nav-open .nav-list {
    flex-direction: column;
    overflow: visible;
    padding: 8px 0;
  }
  #main-nav.nav-open .nav-list li a {
    padding: 13px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 15px;
  }
  #main-nav.nav-open .nav-list li:last-child a { border-bottom: none; }

  /* Contenido */
  .show_entries { grid-template-columns: 1fr 1fr; gap: 12px; }
  .show_entry_image img { height: 120px; }

  .recipe_data { grid-template-columns: repeat(3, 1fr); }

  h1 { font-size: 22px; }
  .article_view { padding: 16px; }

  .featured-slide img { height: 180px; }
  .featured-caption h3 { font-size: 16px; }
  .featured-caption { padding: 16px; }

  /* Footer */
  .footer-links { flex-direction: column; gap: 6px; }
}

/* Pantallas muy pequeñas (≤ 380px) */
@media (max-width: 380px) {
  .show_entries { grid-template-columns: 1fr; }
  .logo-text { font-size: 20px; }
}

/* ============================================================
   CONTENIDO — clases del sistema original compatibles con nuevo layout
   ============================================================ */

.page-content .main { min-width: 0; }
.clear { clear: both; }
a.readmore { color: #c0392b; font-size: 13px; }
a.more { color: #c0392b; font-size: 13px; font-weight: 500; }

/* Imagen helper — centrada con fondo si no llena el espacio */
.img-contain {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f0ea;
  overflow: hidden;
  flex-shrink: 0;
}
.img-contain img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---- box_index_articles ---- */
.box_index_articles {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 2px solid #f0ebe5;
}
.box_index_articles > .more { float: right; }
.box_index_articles > span {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: #222;
  margin-bottom: 16px;
  clear: both;
}
.box_index_articles .show_entry {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #f5f0ea;
  align-items: flex-start;
}
.box_index_articles .show_entry:last-child { border-bottom: none; }
.box_index_articles .show_entry .show_entry_image {
  flex-shrink: 0;
  width: 110px;
  height: 75px;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f0ea;
  display: flex;
  align-items: center;
  justify-content: center;
}
.box_index_articles .show_entry .show_entry_image img {
  width: 110px;
  height: 75px;
  object-fit: contain;
  display: block;
}
.box_index_articles .show_entry .show_entry_content { flex: 1; min-width: 0; }
.box_index_articles .show_entry .show_entry_title a {
  color: #222;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  display: block;
  margin-bottom: 5px;
}
.box_index_articles .show_entry .show_entry_title a:hover { color: #c0392b; }
.box_index_articles .show_entry .show_entry_brief { font-size: 13px; color: #555; line-height: 1.6; }

/* ---- box_index_recipes ---- */
.box_index_recipes {
  margin-bottom: 24px;
}
.box_index_recipes > .more { float: right; }
.box_index_recipes h1 {
  font-size: 22px;
  font-weight: 700;
  color: #222;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0ebe5;
  clear: both;
}
.box_index_recipes .show_entry {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f5f0ea;
  align-items: flex-start;
}
.box_index_recipes .show_entry:last-child { border-bottom: none; }
.box_index_recipes .show_entry .show_entry_image {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f0ea;
  display: flex;
  align-items: center;
  justify-content: center;
}
.box_index_recipes .show_entry .show_entry_image img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  display: block;
}
.box_index_recipes .show_entry .show_entry_content { flex: 1; min-width: 0; }
.box_index_recipes .show_entry .show_entry_title a {
  color: #222;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}
.box_index_recipes .show_entry .show_entry_title a:hover { color: #c0392b; }
.box_index_recipes .show_entry .show_entry_details { font-size: 13px; color: #666; line-height: 1.5; }

/* ---- Rating stars ---- */
.recipe_rating_list {
  display: inline-flex;
  list-style: none;
  position: relative;
  height: 14px;
  width: 70px;
  margin: 4px 0;
  background: #ddd;
}
.recipe_rating_list li { position: absolute; top: 0; left: 0; }
.recipe_rating_list li.current_rating {
  background: #f5a623;
  height: 14px;
  overflow: hidden;
}

/* ---- Sidebar widgets (clases originales) ---- */
.page-sidebar .box_video_recommended,
.page-sidebar .newsletter_box,
.page-sidebar .box_recipe_top,
.page-sidebar #box_user_top,
.page-sidebar .likebox-home,
.page-sidebar .box_promo {
  /* Ya cubiertos por .sidebar-widget en el CSS nuevo */
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .box_index_articles .show_entry .show_entry_image { width: 80px; height: 60px; }
  .box_index_articles .show_entry .show_entry_image img { width: 80px; height: 60px; }
  .box_index_recipes .show_entry .show_entry_image { width: 60px; height: 60px; }
  .box_index_recipes .show_entry .show_entry_image img { width: 60px; height: 60px; }
}

/* ============================================================
   LISTADO RECETAS — ajustes específicos
   ============================================================ */

/* Ordenar — alineado a la derecha, en línea */
.order {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 13px;
}
.order .order_title {
  color: #888;
  margin-right: 4px;
}
.order ul {
  display: flex;
  gap: 6px;
  list-style: none;
}
.order ul li a {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid #ddd;
  border-radius: 20px;
  color: #555;
  text-decoration: none;
  font-size: 12.5px;
  transition: all 0.15s;
}
.order ul li a:hover { border-color: #c0392b; color: #c0392b; background: #fdf0ee; }
.order ul li.selected {
  display: inline-block;
  padding: 5px 12px;
  border: 1.5px solid #c0392b;
  border-radius: 20px;
  color: #c0392b;
  font-size: 12.5px;
  font-weight: 600;
  background: #fdf0ee;
}

/* show_entry en listados de recetas — imagen grande, contenido y footer */
.recipe_list .show_entry {
  background: #fff;
  border: 1px solid #e8e0d8;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}
.recipe_list .show_entry:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); transform: translateY(-2px); }

.recipe_list .show_entry .show_entry_image {
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: #f5f0ea;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.recipe_list .show_entry .show_entry_image img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  display: block;
}

.recipe_list .show_entry .show_entry_content {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.recipe_list .show_entry .show_entry_center { flex: 1; }
.recipe_list .show_entry .show_entry_title a {
  font-size: 14px;
  font-weight: 600;
  color: #222;
  text-decoration: none;
  line-height: 1.3;
  display: block;
  margin-bottom: 4px;
}
.recipe_list .show_entry .show_entry_title a:hover { color: #c0392b; }

/* Rating + foto + video en una línea */
.recipe_list .show_entry .show_entry_right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f5f0ea;
}
.recipe_list .show_entry .show_entry_flags {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.recipe_list .show_entry .show_entry_flags img { width: 16px; height: 16px; opacity: 0.6; }
.recipe_list .show_entry .show_entry_flags a img { opacity: 0.9; }

/* ============================================================
   VISTA RECETA — imagen sin estirar
   ============================================================ */
.recipe_view .recipe_image {
  width: 100%;
  max-height: 420px;
  background: #f5f0ea;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.recipe_view .recipe_image img {
  max-width: 100%;
  max-height: 420px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* show_entries grid — asegurar que las cards tienen altura uniforme */
.show_entries { align-items: stretch; }

/* ============================================================
   FIXES VARIOS
   ============================================================ */

/* Búsqueda — centrada en el header y botón más oscuro */
.search-form { flex: 1; display: flex; justify-content: center; }
.search-inner { max-width: 560px; width: 100%; }
.search-btn { background: #7b241c !important; }
.search-btn:hover { background: #641e16 !important; }

/* País — listado con columnas y estilo */
.country_list .show_continents { }
.country_list h2 {
  font-size: 16px;
  font-weight: 700;
  color: #c0392b;
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid #f0ebe5;
}
.country_list .show_countries {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  column-count: 4;
  column-gap: 16px;
}
.country_list .show_countries a {
  display: block;
  color: #333;
  text-decoration: none;
  font-size: 13.5px;
  padding: 3px 0;
  break-inside: avoid;
  transition: color 0.15s;
}
.country_list .show_countries a:hover { color: #c0392b; }

/* Videos — el ordenar sale vertical, arreglarlo */
.video_list .order,
.recipe_list .order,
.article_list .order,
.member_list .order {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

/* Utilidades — las imágenes del listado no deben salir tan grandes */
.utils_list .show_entry_image img,
.page_list .show_entry_image img {
  max-width: 160px;
  height: auto;
  object-fit: contain;
}

/* Receta — datos de la receta mejorados */
.recipe_view .recipe_data .time,
.recipe_view .recipe_data .servings,
.recipe_view .recipe_data .difficulty,
.recipe_view .recipe_data .location {
  font-size: 12px;
  color: #888;
}
.recipe_view .recipe_data time { font-size: 16px; font-weight: 700; color: #c0392b; }
.recipe_view .recipe_data .servings span { font-size: 16px; font-weight: 700; color: #c0392b; }
.recipe_view .recipe_data .difficulty span { font-size: 16px; font-weight: 700; color: #c0392b; }

/* Tags de receta — alinear en línea */
.recipe_view ul.recipe_tags_list,
.recipe_view .recipe_tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  margin: 8px 0;
}

/* Formulario comentarios — mejorar */
#box_comment_form form { margin-top: 20px; }
#box_comment_form .c_name { font-size: 13px; margin-bottom: 10px; }
#box_comment_form textarea { width: 100%; min-height: 80px; margin-bottom: 10px; }

/* Paginación — asegurar que se ve bien */
.pages_nav, .pagination_nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 24px 0;
}

@media (max-width: 640px) {
  .country_list .show_countries { column-count: 2; }
  .search-form { max-width: 100%; }
}

/* ============================================================
   FIXES RONDA 2
   ============================================================ */

/* Bloque tiempo receta — todo en una línea */
.recipe_view .recipe_data {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr 1fr;
  gap: 10px;
  margin: 16px 0 20px;
}
.recipe_view .recipe_data .time {
  text-align: center;
}
.recipe_view .recipe_data .time span {
  font-size: 13px;
  color: #555;
  display: block;
  line-height: 1.5;
}
.recipe_view .recipe_data .time time {
  font-size: 16px;
  font-weight: 700;
  color: #c0392b;
  display: inline;
}

/* Quitar newsletter del sidebar */
.page-sidebar .widget-newsletter,
#page_content .sidebar .newsletter_box { display: none; }

/* Popup login/registro — mejorar aspecto */
.fancybox-inner iframe { background: #fff; }

/* Imágenes en cards de receta — usar object-fit cover para originales grandes */
.recipe_list .show_entry .show_entry_image img,
.show_entries .show_entry .show_entry_image img {
  object-fit: cover !important;
}
.recipe_list .show_entry .show_entry_image,
.show_entries .show_entry .show_entry_image {
  background: #f5f0ea;
}

/* Rating + foto + video — iconos más visibles */
.show_entry_flags img {
  width: 18px;
  height: 18px;
  opacity: 0.7;
  display: inline-block;
}
.show_entry_flags a img { opacity: 1; }

/* Popup fancybox — fondo oscuro correcto */
.fancybox-overlay { background: rgba(0,0,0,0.75) !important; }
.fancybox-wrap { margin-top: 80px !important; }

@media (max-width: 900px) {
  .recipe_view .recipe_data { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .recipe_view .recipe_data { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   IMAGEN QUE CUBRE EL DIV — fix universal
   ============================================================ */
.show_entry_image {
  overflow: hidden;
  background: #f5f0ea;
  display: block;
  flex-shrink: 0;
}
.show_entry_image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

/* Cards en grid — altura imagen fija */
.show_entries .show_entry .show_entry_image {
  width: 100%;
  height: 200px;
}
.recipe_list .show_entries .show_entry .show_entry_image {
  width: 100%;
  height: 200px;
}

/* ============================================================
   IMAGEN CUBRE TODO EL BOX — fix definitivo
   ============================================================ */
.show_entries .show_entry {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.show_entries .show_entry .show_entry_image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f5f0ea;
  /* sin padding, sin margen, pegado a los bordes */
  margin: 0;
  padding: 0;
}
.show_entries .show_entry .show_entry_image img {
  width: 100% !important;
  height: 200px !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  /* quitar el width="60" que viene del HTML */
  max-width: none !important;
}
.show_entries .show_entry .show_entry_content {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Imagen clicable — el <a> hereda el tamaño del div */
.show_entry_image a {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.show_entry_image a img {
  width: 100% !important;
  height: 200px !important;
  object-fit: cover !important;
  display: block !important;
}

/* Video — icono play sobre la imagen */
.video_list .show_entry .show_entry_image { position: relative; }
.video_list .show_entry .show_entry_image .play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 48px; height: 48px;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  z-index: 2;
  pointer-events: none;
}
.video_list .show_entry .show_entry_image .play::after {
  content: '';
  position: absolute;
  top: 50%; left: 55%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 8px 0 8px 14px;
  border-color: transparent transparent transparent #fff;
}

/* Article list — fecha y autor encima del título */
.article_list .show_entry_date { font-size: 12px; color: #888; margin-bottom: 4px; }
.article_list .show_entry_author { font-size: 12px; color: #888; margin-bottom: 4px; }
.article_list .show_entry_title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.article_list .show_entry_title a { color: #222; text-decoration: none; }
.article_list .show_entry_title a:hover { color: #c0392b; }
.article_list .show_entry_brief { font-size: 13px; color: #555; line-height: 1.5; }

/* Sub-nav Más — ocultar botón si more_entries está vacío */
.sub-nav-more-list:empty + * { display: none; }
.sub-nav-more-list:empty { display: none; }
.sub-nav-more:has(.sub-nav-more-list:empty) { display: none; }

/* ============================================================
   SUBMENÚ RECETAS — responsivo con wrap
   ============================================================ */
.sub-nav { background: #fff; border-bottom: 1px solid #e8e0d8; }
.sub-nav .container { padding: 0 24px; }
.sub-nav-inner {
  display: flex;
  flex-wrap: wrap;          /* ← clave: salta a siguiente línea */
  gap: 2px 0;
  padding: 4px 0;
}
.sub-nav-inner a {
  display: inline-block;
  color: #555;
  padding: 6px 12px;
  font-size: 13px;
  white-space: nowrap;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s;
  flex-shrink: 0;
}
.sub-nav-inner a:hover { color: #c0392b; background: #fdf0ee; }
.sub-nav-inner a.selected { color: #c0392b; font-weight: 600; }

/* Ocultar Más cuando está vacío */
.sub-nav-more { display: none; }

/* ============================================================
   CHEFS — cards con foto cuadrada
   ============================================================ */
.show_entries_members {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.show_entry_member .show_entry_image {
  height: 160px;
  border-radius: 12px 12px 0 0;
}
.show_entry_member .show_entry_image img {
  height: 160px !important;
  object-fit: cover !important;
}
.show_entry_member .show_entry_content {
  padding: 10px 12px;
  text-align: center;
}
.show_entry_member .show_entry_title a {
  font-size: 14px;
  font-weight: 600;
  color: #222;
  text-decoration: none;
}
.show_entry_member .show_entry_title a:hover { color: #c0392b; }
.show_entry_member .show_entry_details {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
}

@media (max-width: 640px) {
  .show_entries_members {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
  .sub-nav-inner { padding: 2px 0; }
  .sub-nav-inner a { padding: 5px 8px; font-size: 12px; }
}
