/*
Theme Name: MecánicaClara
Theme URI: https://mecanicaclara.es
Author: MecánicaClara
Description: Tema personalizado para MecánicaClara — noticias, tutoriales y comparativas de automoción.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: mecanicaclara
*/

@import url('https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Barlow+Condensed:wght@600;700&display=swap');

:root {
  --bg: #0e0e0e;
  --bg2: #181818;
  --bg3: #222222;
  --border: #2a2a2a;
  --accent: #D85A30;
  --accent-hover: #e86a40;
  --text: #f0f0f0;
  --text-muted: #888;
  --text-dim: #555;
  --noticia: #85B7EB;
  --comparativa: #FAC775;
  --tutorial: #9FE1CB;
  --radius: 10px;
  --radius-sm: 6px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Barlow', sans-serif; background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* NAV */
.nav { position: sticky; top: 0; z-index: 100; background: rgba(14,14,14,0.97); border-bottom: 0.5px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 32px; height: 56px; backdrop-filter: blur(8px); }
.logo { font-family: 'Barlow Condensed', sans-serif; font-size: 22px; font-weight: 700; color: var(--text); }
.logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 13px; font-weight: 500; color: var(--text-muted); transition: color 0.2s; }
.nav-links a:hover, .nav-links .current-menu-item a { color: var(--text); }
.nav-links .current-menu-item a { border-bottom: 2px solid var(--accent); padding-bottom: 2px; }
.nav-links .menu-tienda a { color: var(--accent); border: 0.5px solid var(--accent); padding: 5px 14px; border-radius: var(--radius-sm); transition: all 0.2s; }
.nav-links .menu-tienda a:hover { background: var(--accent); color: white; }
.nav-search { width: 32px; height: 32px; border-radius: var(--radius-sm); border: 0.5px solid var(--border); background: var(--bg2); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-muted); font-size: 15px; }

/* BREAKING */
.breaking { background: var(--bg2); border-bottom: 0.5px solid var(--border); padding: 9px 32px; display: flex; align-items: center; gap: 12px; }
.breaking-tag { background: var(--accent); color: white; font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 3px; letter-spacing: 0.8px; white-space: nowrap; }
.breaking p { font-size: 13px; color: #bbb; }

/* TAGS / CATEGORIES */
.tag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; margin-bottom: 8px; }
.tag.noticia, .cat-noticia { color: var(--noticia); }
.tag.comparativa, .cat-comparativa { color: var(--comparativa); }
.tag.tutorial, .cat-tutorial { color: var(--tutorial); }
.tag.analisis { background: var(--accent); color: white; padding: 3px 9px; border-radius: 3px; }
.entry-category { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; margin-bottom: 8px; color: var(--noticia); }

/* HERO */
.hero { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 0.5px solid var(--border); }
.hero-main { padding: 40px 36px; border-right: 0.5px solid var(--border); display: flex; flex-direction: column; justify-content: center; }
.hero-main h1 { font-family: 'Barlow Condensed', sans-serif; font-size: 36px; font-weight: 700; line-height: 1.15; margin-bottom: 12px; color: white; }
.hero-main p { font-size: 15px; color: var(--text-muted); line-height: 1.65; margin-bottom: 24px; max-width: 480px; }
.hero-meta { display: flex; align-items: center; gap: 16px; }
.hero-meta span { font-size: 12px; color: var(--text-dim); }
.btn { background: var(--accent); color: white; border: none; padding: 10px 20px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; cursor: pointer; transition: background 0.2s; font-family: 'Barlow', sans-serif; display: inline-block; }
.btn:hover { background: var(--accent-hover); color: white; }
.btn-outline { background: transparent; color: var(--accent); border: 0.5px solid var(--accent); padding: 9px 20px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; display: inline-block; }
.btn-outline:hover { background: var(--accent); color: white; }
.hero-side { display: flex; flex-direction: column; }
.hero-side-item { padding: 22px 24px; border-bottom: 0.5px solid var(--border); cursor: pointer; transition: background 0.15s; display: block; }
.hero-side-item:last-child { border-bottom: none; }
.hero-side-item:hover { background: var(--bg2); }
.hero-side-item h3 { font-size: 14px; font-weight: 600; color: #ddd; line-height: 1.4; margin-bottom: 5px; }
.hero-side-item .time { font-size: 11px; color: var(--text-dim); }

/* MAIN LAYOUT */
.main-wrap { display: grid; grid-template-columns: 1fr 280px; gap: 32px; max-width: 1200px; margin: 0 auto; padding: 32px; }

/* SECTION HEADER */
.section-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 0.5px solid var(--border); }
.section-hdr h2 { font-family: 'Barlow Condensed', sans-serif; font-size: 18px; font-weight: 700; color: white; display: flex; align-items: center; gap: 10px; }
.section-hdr h2::before { content: ''; display: inline-block; width: 4px; height: 18px; background: var(--accent); border-radius: 2px; }
.section-hdr a { font-size: 12px; color: var(--text-muted); transition: color 0.2s; }
.section-hdr a:hover { color: var(--accent); }

/* NEWS GRID */
.news-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 32px; }
.news-card { background: var(--bg2); border: 0.5px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: border-color 0.2s, transform 0.2s; display: block; }
.news-card:hover { border-color: #444; transform: translateY(-2px); }
.news-card-img { height: 90px; display: flex; align-items: center; justify-content: center; font-size: 28px; overflow: hidden; }
.news-card-img img { width: 100%; height: 100%; object-fit: cover; }
.news-card-img.no-img { background: var(--bg3); }
.news-card-body { padding: 12px 14px 14px; }
.news-card h3 { font-size: 14px; font-weight: 600; color: #ddd; line-height: 1.4; margin-bottom: 5px; }
.news-card p { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.card-date { font-size: 10px; color: var(--text-dim); }
.card-read { font-size: 11px; color: var(--accent); font-weight: 600; }

/* TUTORIALS */
.tut-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 32px; }
.tut-row { display: flex; align-items: center; gap: 14px; background: var(--bg2); border: 0.5px solid var(--border); border-radius: var(--radius); padding: 14px 16px; cursor: pointer; transition: border-color 0.2s; display: flex; }
.tut-row:hover { border-color: #444; }
.tut-num { width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--bg3); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--text-muted); flex-shrink: 0; font-family: 'Barlow Condensed', sans-serif; }
.tut-info { flex: 1; }
.tut-info strong { font-size: 14px; font-weight: 600; color: #ddd; display: block; margin-bottom: 3px; }
.tut-info span { font-size: 11px; color: var(--text-muted); }
.badge { font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 4px; }
.badge.basico { background: #152309; color: #9FE1CB; }
.badge.medio { background: #2e1e06; color: #FAC775; }
.badge.avanzado { background: #2e0606; color: #f09595; }

/* SIDEBAR */
.sidebar { display: flex; flex-direction: column; gap: 18px; }
.sb-card { background: var(--bg2); border: 0.5px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.sb-hdr { padding: 13px 16px 11px; border-bottom: 0.5px solid var(--border); font-family: 'Barlow Condensed', sans-serif; font-size: 15px; font-weight: 700; color: white; display: flex; align-items: center; gap: 8px; }
.sb-hdr::before { content: ''; display: inline-block; width: 3px; height: 14px; background: var(--accent); border-radius: 2px; }
.pop-list { padding: 6px 0; }
.pop-item { display: flex; align-items: flex-start; gap: 12px; padding: 9px 16px; cursor: pointer; transition: background 0.15s; }
.pop-item:hover { background: var(--bg3); }
.pop-num { font-family: 'Barlow Condensed', sans-serif; font-size: 18px; font-weight: 700; color: var(--border); min-width: 20px; }
.pop-text { font-size: 12px; color: #ccc; line-height: 1.4; }
.pop-views { font-size: 10px; color: var(--text-dim); margin-top: 2px; }
.newsletter-body { padding: 16px; }
.newsletter-body p { font-size: 13px; color: var(--text-muted); line-height: 1.55; margin-bottom: 12px; }
.nl-input { width: 100%; padding: 9px 12px; border: 0.5px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); font-size: 13px; font-family: 'Barlow', sans-serif; margin-bottom: 8px; outline: none; transition: border-color 0.2s; }
.nl-input:focus { border-color: var(--accent); }
.nl-btn { width: 100%; background: var(--accent); color: white; border: none; padding: 10px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 700; cursor: pointer; font-family: 'Barlow', sans-serif; transition: background 0.2s; }
.nl-btn:hover { background: var(--accent-hover); }
.nl-note { font-size: 10px; color: var(--text-dim); margin-top: 8px; text-align: center; }
.cats { padding: 12px 16px 14px; display: flex; flex-wrap: wrap; gap: 7px; }
.cat-pill { font-size: 11px; font-weight: 600; padding: 4px 12px; border-radius: 20px; border: 0.5px solid var(--border); color: var(--text-muted); cursor: pointer; background: var(--bg); transition: all 0.2s; }
.cat-pill:hover { border-color: var(--accent); color: var(--accent); }

/* ARTICLE */
.article-wrap { display: grid; grid-template-columns: 1fr 280px; gap: 40px; max-width: 1200px; margin: 0 auto; padding: 40px 32px; }
.article-header h1 { font-family: 'Barlow Condensed', sans-serif; font-size: 40px; font-weight: 700; line-height: 1.15; color: white; margin-bottom: 14px; }
.article-meta { display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--text-dim); padding-bottom: 20px; border-bottom: 0.5px solid var(--border); margin-bottom: 28px; flex-wrap: wrap; }
.article-cover { width: 100%; height: 360px; border-radius: var(--radius); margin-bottom: 32px; overflow: hidden; border: 0.5px solid var(--border); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-cover.no-img { background: var(--bg2); display: flex; align-items: center; justify-content: center; font-size: 72px; }
.entry-content { font-size: 16px; line-height: 1.85; color: #bbb; }
.entry-content h2 { font-family: 'Barlow Condensed', sans-serif; font-size: 26px; font-weight: 700; color: white; margin: 36px 0 14px; }
.entry-content p { margin-bottom: 20px; }
.entry-content blockquote { background: var(--bg2); border-left: 3px solid var(--accent); padding: 16px 20px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 24px 0; color: #ddd; font-size: 15px; font-style: italic; }
.entry-content ul, .entry-content ol { margin: 0 0 20px 24px; color: #bbb; }
.entry-content li { margin-bottom: 8px; }
.entry-content img { border-radius: var(--radius); margin: 24px 0; }

/* FOOTER */
footer { background: #0a0a0a; border-top: 0.5px solid var(--border); padding: 24px 32px; display: flex; justify-content: space-between; align-items: center; }
footer p { font-size: 12px; color: var(--text-dim); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 12px; color: var(--text-dim); transition: color 0.2s; }
.footer-links a:hover { color: var(--text-muted); }

/* WP DEFAULTS */
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 12px; color: var(--text-dim); text-align: center; margin-top: 6px; }
.aligncenter { display: block; margin: 0 auto; }
.alignleft { float: left; margin: 0 20px 10px 0; }
.alignright { float: right; margin: 0 0 10px 20px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* PAGINATION */
.pagination { display: flex; gap: 8px; justify-content: center; padding: 32px 0; }
.pagination a, .pagination span { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--radius-sm); border: 0.5px solid var(--border); font-size: 13px; color: var(--text-muted); background: var(--bg2); transition: all 0.2s; }
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current { background: var(--accent); color: white; border-color: var(--accent); }

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav { padding: 0 16px; }
  .nav-links { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-main { padding: 28px 20px; }
  .hero-side { display: none; }
  .main-wrap { grid-template-columns: 1fr; padding: 20px 16px; gap: 20px; }
  .sidebar { display: none; }
  .news-grid { grid-template-columns: 1fr; }
  .article-wrap { grid-template-columns: 1fr; padding: 24px 16px; }
  footer { flex-direction: column; gap: 12px; text-align: center; }
  .breaking { padding: 8px 16px; }
}
