/*
Theme Name: Volca.cat
Author: volca.cat
Description: Tema personalitzat per a volca.cat
Version: 1.0
*/

body {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --color-text-primary: #1a1a1a;
  --color-text-secondary: #555;
  --color-text-tertiary: #999;
  --color-background-primary: #fff;
  --color-background-secondary: #f7f7f7;
  --color-border-tertiary: #e0e0e0;
  --border-radius-lg: 10px;
  --border-radius-md: 6px;
}

body, body * { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-sans); background: var(--color-background-secondary); color: var(--color-text-primary); line-height: 1.5; }

body .site { max-width: 860px; margin: 0 auto; padding: 1.5rem 1rem; }

body .header { display: flex; align-items: center; gap: 14px; padding: 0 0 1.25rem; border-bottom: 0.5px solid var(--color-border-tertiary); margin-bottom: 1.5rem; }
body .logo-wrap { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
body .logo-icon { width: 42px; height: 42px; border-radius: 50%; background: #1a1a1a; display: flex; align-items: center; justify-content: center; font-size: 20px; }
body .site-title { font-size: 18px; font-weight: 500; color: var(--color-text-primary); }
body .site-desc { font-size: 12px; color: var(--color-text-secondary); margin-top: 1px; }
body .nav { margin-left: auto; }
body .nav ul { display: flex; gap: 18px; list-style: none; padding: 0; margin: 0; }
body .nav li { margin: 0; padding: 0; position: relative; }
body .nav a { font-size: 13px; color: var(--color-text-secondary); text-decoration: none; padding: 0; }
body .nav a:hover { color: var(--color-text-primary); }
body .nav ul.sub-menu { display: none; position: absolute; top: 100%; left: 0; background: #fff; border: 0.5px solid var(--color-border-tertiary); border-radius: var(--border-radius-md); padding: 6px 0; min-width: 160px; z-index: 100; flex-direction: column; gap: 0; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
body .nav li:hover > ul.sub-menu { display: flex; }
body .nav ul.sub-menu li { white-space: nowrap; }
body .nav ul.sub-menu a { display: block; padding: 6px 14px; font-size: 12.5px; }
body .nav ul.sub-menu a:hover { background: var(--color-background-secondary); }

body .breadcrumb { font-size: 12px; color: var(--color-text-secondary); margin-bottom: 1rem; }
body .breadcrumb span { color: var(--color-text-tertiary); margin: 0 5px; }
body .breadcrumb a { color: var(--color-text-secondary); text-decoration: none; }
body .breadcrumb a:hover { color: var(--color-text-primary); }

body .hero-article { background: var(--color-background-primary); border: 0.5px solid var(--color-border-tertiary); border-radius: var(--border-radius-lg); overflow: hidden; margin-bottom: 1.5rem; }
body .hero-img { width: 100%; height: 240px; background: linear-gradient(180deg, #4a7c59 0%, #2d5a3d 60%, #1a3d28 100%); display: flex; align-items: flex-end; padding: 1rem; position: relative; }
body .hero-img img { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; }
body .hero-img-label { position: absolute; top: 12px; left: 12px; background: rgba(0,0,0,0.55); color: #fff; font-size: 11px; padding: 3px 8px; border-radius: 4px; }
body .hero-img-credit { position: absolute; bottom: 8px; right: 10px; font-size: 10px; color: rgba(255,255,255,0.6); }
body .reading-time { font-size: 11px; background: rgba(0,0,0,0.5); color: #fff; padding: 3px 8px; border-radius: 4px; }
body .hero-body { padding: 1.25rem; }
body .hero-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
body .cat-tag { font-size: 11px; font-weight: 500; background: #E1F5EE; color: #0F6E56; padding: 3px 10px; border-radius: 4px; letter-spacing: 0.04em; text-transform: uppercase; }
body .date-tag { font-size: 12px; color: var(--color-text-secondary); }
body .hero-h1 { font-size: 24px; font-weight: 500; line-height: 1.35; color: var(--color-text-primary); margin-bottom: 10px; }
body .hero-h1 a { color: inherit; text-decoration: none; }
body .hero-h1 a:hover { color: #0F6E56; }
body .hero-excerpt { font-size: 14px; color: var(--color-text-secondary); line-height: 1.65; margin-bottom: 1rem; }
body .hero-footer { display: flex; align-items: center; justify-content: space-between; border-top: 0.5px solid var(--color-border-tertiary); padding-top: 12px; }
body .read-more { font-size: 13px; font-weight: 500; color: #0F6E56; text-decoration: none; display: flex; align-items: center; gap: 5px; }
body .read-more:hover { text-decoration: underline; }

body .grid-section { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
body .grid-section .card { background: var(--color-background-primary); border: 0.5px solid var(--color-border-tertiary); border-radius: var(--border-radius-lg); overflow: hidden; }
body .card-img { height: 100px; display: flex; align-items: center; justify-content: center; font-size: 32px; }
body .card-body { padding: 0.75rem 1rem; }
body .card-cat { font-size: 10px; font-weight: 500; color: #0F6E56; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 5px; }
body .card-title { font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--color-text-primary); margin-bottom: 4px; }
body .card-title a { color: inherit; text-decoration: none; }
body .card-title a:hover { color: #0F6E56; }
body .card-meta { font-size: 11px; color: var(--color-text-tertiary); }

body .sidebar-section { display: grid; grid-template-columns: 1fr 260px; gap: 1.25rem; }
body .main-col { display: flex; flex-direction: column; gap: 1rem; }
body .list-card { background: var(--color-background-primary); border: 0.5px solid var(--color-border-tertiary); border-radius: var(--border-radius-lg); display: flex; gap: 0; overflow: hidden; }
body .list-card-img { width: 100px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 24px; }
body .list-card-body { padding: 0.85rem 1rem; flex: 1; }
body .list-card-title { font-size: 14px; font-weight: 500; color: var(--color-text-primary); margin-bottom: 5px; line-height: 1.35; }
body .list-card-title a { color: inherit; text-decoration: none; }
body .list-card-title a:hover { color: #0F6E56; }
body .list-card-meta { font-size: 12px; color: var(--color-text-secondary); line-height: 1.5; }

body .sidebar { display: flex; flex-direction: column; gap: 1rem; }
body .widget-box { background: var(--color-background-secondary); border: 0.5px solid var(--color-border-tertiary); border-radius: var(--border-radius-lg); padding: 1rem; }
body .widget-title { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-secondary); margin-bottom: 10px; }
body .widget-item { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; border-bottom: 0.5px solid var(--color-border-tertiary); }
body .widget-item:last-child { border-bottom: none; }
body .widget-item-num { font-size: 11px; font-weight: 500; color: #0F6E56; min-width: 16px; }
body .widget-item-text { font-size: 13px; color: var(--color-text-primary); line-height: 1.4; }
body .widget-item-text a { color: inherit; text-decoration: none; }
body .widget-item-text a:hover { color: #0F6E56; }

body .nl-box { background: #0F6E56; border-radius: var(--border-radius-lg); padding: 1rem; color: #fff; }
body .nl-title { font-size: 14px; font-weight: 500; margin-bottom: 5px; }
body .nl-desc { font-size: 12px; opacity: 0.85; margin-bottom: 10px; line-height: 1.5; }
body .nl-input { width: 100%; padding: 7px 10px; border-radius: 6px; border: none; font-size: 13px; margin-bottom: 8px; }
body .nl-btn { width: 100%; padding: 8px; background: #fff; color: #0F6E56; font-weight: 500; font-size: 13px; border-radius: 6px; border: none; cursor: pointer; }
body .nl-btn:hover { background: #e8f5f0; }

body .footer { text-align: center; padding: 2rem 0 0.5rem; border-top: 0.5px solid var(--color-border-tertiary); margin-top: 2rem; font-size: 12px; color: var(--color-text-tertiary); }

@media (max-width: 768px) {
  body .grid-section { grid-template-columns: 1fr; }
  body .sidebar-section { grid-template-columns: 1fr; }
  body .nav { display: none; }
}
body .entry-content p, body .entry-content h1, body .entry-content h2, body .entry-content h3, body .entry-content h4, body .entry-content ul, body .entry-content ol { margin: 0 0 1rem; }
body .entry-content { font-size: 16px; line-height: 1.75; color: var(--color-text-primary); }
body .entry-content p { margin: 0 0 1.25rem; font-size: 16px; line-height: 1.75; text-align: justify; }
body .entry-content h1, body .entry-content h2, body .entry-content h3, body .entry-content h4 { margin: 1.5rem 0 0.75rem; font-weight: 500; color: var(--color-text-primary); line-height: 1.3; }
body .entry-content h1 { font-size: 1.6rem; }
body .entry-content h2 { font-size: 1.35rem; }
body .entry-content h3 { font-size: 1.15rem; }
body .entry-content ul, body .entry-content ol { margin: 0 0 1.25rem 1.5rem; }
body .entry-content li { margin-bottom: 0.4rem; font-size: 16px; line-height: 1.75; }
body .entry-content blockquote { margin: 1.25rem 0; padding: 0.75rem 1rem 0.75rem 1.25rem; border-left: 3px solid #0F6E56; background: var(--color-background-secondary); border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0; font-style: italic; color: var(--color-text-secondary); }
body .entry-content figure { margin: 1.25rem 0; }
body .entry-content figcaption { font-size: 13px; color: var(--color-text-tertiary); text-align: center; margin-top: 0.5rem; }
body .entry-content img { max-width: 100%; height: auto; border-radius: var(--border-radius-md); }
body .entry-content a { color: #0F6E56; }
body .entry-content a:hover { text-decoration: underline; }
body .entry-content pre, body .entry-content code { font-family: 'Courier New', monospace; background: var(--color-background-secondary); padding: 0.2rem 0.4rem; border-radius: 3px; font-size: 14px; }
body .entry-content pre { padding: 1rem; overflow-x: auto; }
body .entry-content table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; }
body .entry-content th, body .entry-content td { border: 0.5px solid var(--color-border-tertiary); padding: 0.5rem; text-align: left; }
body .entry-content th { background: var(--color-background-secondary); font-weight: 500; }
body .entry-content hr { border: none; border-top: 0.5px solid var(--color-border-tertiary); margin: 1.5rem 0; }
body .entry-content .wp-block-quote, body .entry-content blockquote { margin: 1.25rem 0; padding: 0.75rem 1rem 0.75rem 1.25rem; border-left: 3px solid #0F6E56; background: var(--color-background-secondary); border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0; font-style: italic; color: var(--color-text-secondary); }
body .entry-content .wp-block-image { margin: 1.25rem 0; }
body .entry-content .wp-block-image img { max-width: 100%; height: auto; border-radius: var(--border-radius-md); }
