/*
Theme Name: Horology Library v3
Theme URI: https://horologylibrary.com
Description: Encyclopedic watch education for all levels
Version: 1.0
Author: Marathon Watch
Text Domain: horologylibrary
*/

:root {
  --charcoal: #2D3748;
  --cream: #FAF5E6;
  --burgundy: #722F37;
  --gold: #B8860B;
  --text-muted: #718096;
  --border: #e2d9c8;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Open Sans', system-ui, sans-serif; background: var(--cream); color: var(--charcoal); line-height: 1.7; }
a { color: var(--burgundy); text-decoration: none; transition: color 0.2s; }
a:hover { color: #8a3a44; }

header { background: var(--charcoal); position: sticky; top: 0; z-index: 1000; }
.header-top { background: var(--burgundy); padding: 0.5rem; text-align: center; color: var(--cream); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; }
.header-main { max-width: 1200px; margin: 0 auto; padding: 1rem 2rem; display: flex; align-items: center; justify-content: space-between; }
.logo img { height: 50px; width: auto; }
nav ul { display: flex; list-style: none; gap: 2rem; }
nav a { color: var(--cream); font-size: 0.9rem; font-weight: 500; padding: 0.5rem 0; position: relative; }
nav a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--gold); transition: width 0.3s; }
nav a:hover::after { width: 100%; }

.hero { background: linear-gradient(135deg, var(--charcoal), #1a202c); padding: 5rem 2rem; text-align: center; }
.hero h1 { font-family: 'Merriweather', Georgia, serif; font-size: 3rem; color: var(--cream); margin-bottom: 1rem; }
.hero p { font-size: 1.2rem; color: var(--cream); opacity: 0.9; max-width: 600px; margin: 0 auto; }

.section { padding: 5rem 2rem; max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-family: 'Merriweather', serif; font-size: 2.5rem; color: var(--charcoal); margin-bottom: 0.5rem; }
.section-header p { color: var(--text-muted); font-size: 1.1rem; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.card { background: #fff; border: 1px solid var(--border); padding: 2.5rem 2rem; text-align: center; transition: all 0.3s; position: relative; }
.card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--burgundy); transform: scaleX(0); transition: transform 0.3s; }
.card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(45,55,72,0.1); }
.card:hover::before { transform: scaleX(1); }
.card-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.card-level { display: inline-block; background: var(--cream); color: var(--burgundy); padding: 0.25rem 0.75rem; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; }
.card h3 { font-family: 'Merriweather', serif; font-size: 1.4rem; margin-bottom: 0.5rem; }
.card p { color: var(--text-muted); font-size: 0.95rem; }

a.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

a.card-link:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(45,55,72,0.1);
  border-color: var(--burgundy);
}

a.card-link:hover h3 { color: var(--burgundy); }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; }
.blog-card { background: #fff; border: 1px solid var(--border); overflow: hidden; transition: all 0.3s; }
.blog-card:hover { transform: translateY(-6px); box-shadow: 0 16px 32px rgba(45,55,72,0.1); border-color: var(--burgundy); }
.blog-card-image { height: 180px; background: linear-gradient(135deg, var(--burgundy), var(--charcoal)); overflow: hidden; }
.blog-card-image img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-content { padding: 1.5rem; }
.blog-category { display: inline-block; background: var(--cream); color: var(--burgundy); padding: 0.25rem 0.75rem; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem; }
.blog-card h3 { font-family: 'Merriweather', serif; font-size: 1.2rem; margin-bottom: 0.5rem; line-height: 1.4; }
.blog-card h3 a { color: var(--charcoal); text-decoration: none; }
.blog-card h3 a:hover { color: var(--burgundy); text-decoration: underline; }
.blog-card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1rem; }
.blog-meta { font-size: 0.8rem; color: var(--text-muted); }

footer { background: var(--charcoal); color: var(--cream); padding: 3rem 2rem 2rem; }
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-simple { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 2rem; flex-wrap: wrap; gap: 2rem; }
.footer-brand { max-width: 400px; }
.footer-brand p { margin-top: 0.75rem; font-size: 0.9rem; opacity: 0.7; }
.footer-links { display: flex; align-items: center; gap: 1.5rem; flex-shrink: 0; }
.footer-links a { color: var(--cream); font-size: 0.9rem; opacity: 0.7; }
.footer-links a:hover { opacity: 1; color: var(--gold); }
ul.footer-links { list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.footer-bottom { border-top: 1px solid rgba(250,245,230,0.1); padding-top: 2rem; text-align: center; }
.footer-bottom p { font-size: 0.85rem; opacity: 0.5; }

/* Single Post */
.post-hero { background: linear-gradient(135deg, var(--charcoal), #1a202c); padding: 4rem 2rem 3rem; text-align: center; }
.post-hero-inner { max-width: 800px; margin: 0 auto; }
.post-hero h1 { font-family: 'Merriweather', serif; font-size: 2.5rem; color: var(--cream); margin: 1rem 0; line-height: 1.3; }
.post-meta-line { color: var(--cream); font-size: 0.9rem; opacity: 0.7; }
.post-featured-image { max-width: 800px; margin: 0 auto; padding: 0 2rem; transform: translateY(-2rem); }
.post-featured-image img { width: 100%; height: auto; display: block; box-shadow: 0 10px 40px rgba(0,0,0,0.15); }
.post-body { max-width: 800px; margin: 0 auto; padding: 2rem 2rem 5rem; }
.post-content { font-size: 1.1rem; line-height: 1.9; }
.post-content h2, .post-content h3 { font-family: 'Merriweather', serif; margin: 2rem 0 1rem; color: var(--charcoal); }
.post-content h2 { font-size: 1.75rem; }
.post-content h3 { font-size: 1.4rem; }
.post-content p { margin-bottom: 1.25rem; }
.post-content a { color: var(--burgundy); text-decoration: underline; }
.post-content ul, .post-content ol { margin: 1rem 0 1.5rem 1.5rem; }
.post-content li { margin-bottom: 0.5rem; }
.post-content img { max-width: 100%; height: auto; margin: 1.5rem 0; }
.post-content blockquote { border-left: 4px solid var(--gold); padding: 1rem 1.5rem; margin: 1.5rem 0; background: #fff; font-style: italic; }

/* Author box */
.author-box { display: flex; gap: 1.25rem; align-items: flex-start; margin-top: 3rem; padding: 1.5rem; background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--burgundy); }
.author-box-avatar { width: 80px; height: 80px; border-radius: 50%; flex-shrink: 0; }
.author-box-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.author-box-name { font-family: 'Merriweather', serif; font-size: 1.2rem; font-weight: 700; color: var(--charcoal); margin-bottom: 0.5rem; }
.author-box-bio { font-size: 0.95rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 0.75rem; }
.author-box-link { font-size: 0.9rem; font-weight: 600; }

@media (max-width: 768px) {
  .header-main { flex-direction: column; gap: 1rem; }
  nav ul { flex-wrap: wrap; justify-content: center; gap: 1rem; }
  .hero h1 { font-size: 2rem; }
  .footer-simple { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
  .author-box { flex-direction: column; align-items: center; text-align: center; }
}
