/*
Theme Name: DSO Legal
Theme URI: https://dsolegal.es
Author: DSO Legal
Author URI: https://dsolegal.es
Description: Tema personalizado para el blog de DSO Legal - Abogados Ley de Segunda Oportunidad
Version: 1.0
License: Proprietary
Text Domain: dsolegal
*/

/* ===== VARIABLES ===== */
:root {
  --color-dark: #1a2e2a;
  --color-green: #2d4a3e;
  --color-gold: #c9a84c;
  --color-light: #f8f6f0;
  --color-white: #ffffff;
  --color-text: #2c2c2c;
  --color-muted: #6b7280;
  --color-border: #e5e7eb;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Georgia', 'Times New Roman', serif;
  --max-width: 1200px;
  --radius: 8px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.6;
}
a { color: var(--color-green); text-decoration: none; }
a:hover { color: var(--color-gold); }
img { max-width: 100%; height: auto; }

/* ===== HEADER ===== */
.site-header {
  background: var(--color-dark);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.site-logo img {
  height: 48px;
  width: auto;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.site-nav a {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.site-nav a:hover { color: var(--color-gold); }
.nav-cta {
  background: var(--color-gold) !important;
  color: var(--color-dark) !important;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600 !important;
  transition: opacity 0.2s !important;
}
.nav-cta:hover { opacity: 0.9; color: var(--color-dark) !important; }

/* ===== HERO BLOG ===== */
.blog-hero {
  background: var(--color-green);
  color: var(--color-white);
  padding: 64px 24px;
  text-align: center;
}
.blog-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.blog-hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.8);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  font-size: 0.85rem;
  color: var(--color-muted);
}
.breadcrumb a { color: var(--color-muted); }
.breadcrumb a:hover { color: var(--color-green); }
.breadcrumb span { margin: 0 6px; }

/* ===== MAIN LAYOUT ===== */
.site-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}
@media (max-width: 900px) {
  .site-main { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
}

/* ===== POSTS GRID ===== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}
.post-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}
.post-card-body { padding: 24px; }
.post-category {
  display: inline-block;
  background: var(--color-light);
  color: var(--color-green);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
}
.post-card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
  color: var(--color-dark);
}
.post-card h2 a { color: inherit; }
.post-card h2 a:hover { color: var(--color-gold); }
.post-excerpt {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}
.post-meta {
  font-size: 0.8rem;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.read-more {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-green);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.read-more:hover { color: var(--color-gold); }

/* ===== SINGLE POST ===== */
.single-post-header {
  background: var(--color-dark);
  color: var(--color-white);
  padding: 64px 24px 48px;
}
.single-post-header .post-category {
  background: rgba(255,255,255,0.15);
  color: var(--color-gold);
  margin-bottom: 20px;
}
.single-post-header h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  max-width: 800px;
}
.single-post-header .post-meta {
  margin-top: 20px;
  color: rgba(255,255,255,0.6);
}

.post-content-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
}
@media (max-width: 900px) {
  .post-content-wrap { grid-template-columns: 1fr; }
}

.post-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-text);
}
.post-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-dark);
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-gold);
}
.post-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-dark);
  margin: 28px 0 12px;
}
.post-content p { margin-bottom: 20px; }
.post-content ul, .post-content ol {
  margin: 0 0 20px 24px;
}
.post-content li { margin-bottom: 8px; }
.post-content strong { color: var(--color-dark); font-weight: 600; }
.post-content blockquote {
  border-left: 4px solid var(--color-gold);
  padding: 16px 24px;
  background: var(--color-light);
  margin: 24px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--color-green);
}
.post-content a { color: var(--color-green); text-decoration: underline; }
.post-content a:hover { color: var(--color-gold); }

/* ===== SIDEBAR ===== */
.sidebar { position: sticky; top: 90px; }
.sidebar-widget {
  background: var(--color-light);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}
.sidebar-widget h3 {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}
.sidebar-cta {
  background: var(--color-green);
  color: var(--color-white);
  text-align: center;
  padding: 28px 24px;
}
.sidebar-cta h3 {
  color: rgba(255,255,255,0.7) !important;
  border-bottom-color: rgba(255,255,255,0.2) !important;
}
.sidebar-cta p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 20px;
  line-height: 1.6;
}
.sidebar-cta .btn {
  display: block;
  background: var(--color-gold);
  color: var(--color-dark);
  font-weight: 700;
  padding: 14px 20px;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: opacity 0.2s;
}
.sidebar-cta .btn:hover { opacity: 0.9; color: var(--color-dark); }
.sidebar-cta .btn-wa {
  display: block;
  background: #25d366;
  color: white !important;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-top: 10px;
  transition: opacity 0.2s;
}
.sidebar-cta .btn-wa:hover { opacity: 0.9; }

.recent-posts-list { list-style: none; }
.recent-posts-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
}
.recent-posts-list li:last-child { border-bottom: none; }
.recent-posts-list a { color: var(--color-dark); font-weight: 500; line-height: 1.4; }
.recent-posts-list a:hover { color: var(--color-gold); }

/* ===== POST NAVIGATION ===== */
.post-nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px 48px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--color-border);
}
.post-nav a {
  background: var(--color-light);
  padding: 16px 20px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-dark);
  flex: 1;
  max-width: 45%;
}
.post-nav a:hover { background: var(--color-green); color: white; }
.post-nav .nav-next { text-align: right; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--color-dark);
  color: rgba(255,255,255,0.7);
  padding: 48px 24px 24px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; }
}
.footer-logo img { height: 40px; margin-bottom: 12px; }
.footer-desc { font-size: 0.9rem; line-height: 1.6; }
.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.footer-col ul a:hover { color: var(--color-gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .site-nav { display: none; }
  .posts-grid { grid-template-columns: 1fr; }
  .blog-hero { padding: 40px 20px; }
  .single-post-header { padding: 40px 20px 32px; }
}
