/* ==========================================================================
   AnimaPro - Stylesheet
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #19b5fe;
    --primary-dark: #0a8fd4;
    --accent: #669c9b;
    --text: #333;
    --text-light: #666;
    --bg: #EEEEF5;
    --bg-white: #fff;
    --border: #ddd;
    --footer-bg: #1a1a2e;
    --font-primary: 'Inter', -apple-system, sans-serif;
    --font-heading: 'Merriweather', Georgia, serif;
    --max-width: 1200px;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-primary); font-size: 16px; line-height: 1.7; color: var(--text); background: var(--bg); }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.3; margin-bottom: .5em; color: var(--text); }
h1 { font-size: 1.8em; } h2 { font-size: 1.4em; } h3 { font-size: 1.15em; }
p { margin-bottom: 1em; }
ul, ol { margin: 0 0 1em 1.5em; }
li { margin-bottom: .3em; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* --- Header --- */
.site-header { background: var(--bg-white); box-shadow: 0 2px 8px rgba(0,0,0,.08); position: sticky; top: 0; z-index: 100; }
.header-top { padding: 15px 0; border-bottom: 1px solid var(--border); }
.header-top .container { display: flex; align-items: center; justify-content: space-between; }
.site-branding { display: flex; align-items: center; gap: 12px; }
.site-logo img { height: 50px; width: auto; }
.site-title { font-family: var(--font-primary); font-size: 26px; font-weight: 700; margin: 0; }
.site-title a { color: var(--text); }
.site-title a span { color: var(--primary); }
.site-tagline { font-size: 13px; color: var(--text-light); margin: 0; }

.header-nav { background: var(--bg-white); border-bottom: 3px solid var(--primary); }
.header-nav .container { display: flex; align-items: center; overflow-x: auto; }
.main-nav { display: flex; list-style: none; margin: 0; padding: 0; white-space: nowrap; }
.main-nav li a { display: block; padding: 10px 16px; color: var(--text); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; transition: all .2s; }
.main-nav li a:hover, .main-nav li.active a { color: var(--primary); }

.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 10px; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; }

/* --- Breadcrumb --- */
.breadcrumb { padding: 12px 0; font-size: 13px; color: var(--text-light); margin-bottom: 20px; }
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { margin: 0 6px; }
.breadcrumb .current { color: var(--text); }

/* --- Layout --- */
.site-content { padding: 30px 0; }
.site-content > .container { display: flex; gap: 30px; align-items: flex-start; }
.content-area { flex: 1; min-width: 0; }

/* --- Article --- */
.entry-header { margin-bottom: 20px; }
.entry-category { display: inline-block; background: var(--primary); color: #fff; font-size: 11px; font-weight: 600; text-transform: uppercase; padding: 3px 10px; border-radius: 3px; margin-bottom: 10px; }
.entry-category a { color: #fff; }
.entry-title { font-size: 1.8em; margin-bottom: 10px; }
.post-thumbnail { margin-bottom: 25px; border-radius: 8px; overflow: hidden; }
.post-thumbnail img { width: 100%; }
.entry-content { background: var(--bg-white); padding: 30px; border-radius: 8px; }
.entry-content h2 { margin-top: 1.5em; padding-bottom: 6px; border-bottom: 2px solid var(--primary); }
.entry-content h3 { margin-top: 1.2em; }
.entry-content ul, .entry-content ol { margin: 1em 0 1em 2em; }
.entry-content li { margin-bottom: .5em; }
.entry-content a { color: var(--primary); text-decoration: underline; }
.entry-content a:hover { color: var(--primary-dark); }

/* --- Post Cards --- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-grid-small { grid-template-columns: repeat(3, 1fr); }
.post-card { background: var(--bg-white); border-radius: 8px; overflow: hidden; box-shadow: 0 2px 6px rgba(0,0,0,.06); transition: transform .2s, box-shadow .2s; }
.post-card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,.1); }
.post-card .card-thumbnail img { width: 100%; height: 180px; object-fit: cover; }
.post-card .card-content { padding: 15px; }
.post-card .card-category { display: inline-block; font-size: 11px; color: var(--primary); font-weight: 600; text-transform: uppercase; margin-bottom: 6px; }
.post-card .card-title { font-size: 1em; margin-bottom: 6px; font-family: var(--font-primary); font-weight: 600; }
.post-card .card-title a { color: var(--text); }
.post-card .card-title a:hover { color: var(--primary); }
.post-card .card-excerpt { font-size: .85em; color: var(--text-light); line-height: 1.5; }

.post-list { display: grid; gap: 20px; }
.post-card-horizontal { display: flex; gap: 20px; }
.post-card-horizontal .card-thumbnail { flex-shrink: 0; width: 280px; }
.post-card-horizontal .card-thumbnail img { height: 100%; min-height: 180px; object-fit: cover; }
.post-card-horizontal .card-content { flex: 1; padding: 20px; }
.post-card-horizontal .card-title { font-size: 1.15em; }

.read-more { display: inline-block; margin-top: 8px; color: var(--primary); font-weight: 600; font-size: .85em; }

/* --- Home sections --- */
.home-section { margin-bottom: 40px; }
.section-title { font-size: 1.3em; padding-bottom: 10px; border-bottom: 3px solid var(--primary); margin-bottom: 20px; font-family: var(--font-primary); font-weight: 700; }
.section-title a { color: var(--text); }
.section-title a:hover { color: var(--primary); }
.section-more { text-align: right; margin-top: 10px; font-size: .9em; }

/* --- Related --- */
.related-posts { margin-top: 30px; padding-top: 30px; border-top: 1px solid var(--border); }
.related-posts h3 { margin-bottom: 15px; }

/* --- Pagination --- */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 25px; }
.pagination a, .pagination .current-page { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 4px; font-size: 14px; color: var(--text); background: var(--bg-white); }
.pagination a:hover, .pagination .current-page { background: var(--primary); color: #fff; border-color: var(--primary); }

/* --- Category --- */
.category-header { margin-bottom: 25px; }
.category-header h1 { font-size: 1.6em; margin-bottom: 5px; }
.category-header p { color: var(--text-light); font-size: .9em; margin: 0; }

/* --- Sidebar --- */
.sidebar { width: 300px; flex-shrink: 0; }
.widget { margin-bottom: 20px; padding: 20px; background: var(--bg-white); border-radius: 8px; box-shadow: 0 2px 6px rgba(0,0,0,.06); }
.widget-title { font-size: .95em; font-family: var(--font-primary); font-weight: 700; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 3px solid var(--primary); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li { padding: 6px 0; border-bottom: 1px solid #eee; }
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--text); font-size: .9em; }
.widget ul li a:hover { color: var(--primary); }

/* --- Footer --- */
.site-footer { background: var(--footer-bg); color: rgba(255,255,255,.7); padding: 40px 0 20px; margin-top: 40px; font-size: 14px; }
.footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.footer-brand h3 { color: #fff; font-family: var(--font-primary); font-size: 22px; margin-bottom: 10px; }
.footer-brand h3 span { color: var(--primary); }
.footer-links h4, .footer-contact h4 { color: #fff; font-family: var(--font-primary); font-size: 14px; margin-bottom: 12px; }
.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links ul li { margin-bottom: 6px; }
.footer-links ul li a { color: rgba(255,255,255,.7); }
.footer-links ul li a:hover { color: var(--primary); }
.footer-contact a { color: var(--primary); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 15px; text-align: center; }
.footer-bottom a { color: var(--primary); }

.back-to-top { position: fixed; bottom: 25px; right: 25px; width: 42px; height: 42px; background: var(--primary); color: #fff; border: none; border-radius: 50%; cursor: pointer; display: none; align-items: center; justify-content: center; font-size: 18px; box-shadow: 0 2px 8px rgba(0,0,0,.2); z-index: 100; }
.back-to-top:hover { background: var(--primary-dark); }
.back-to-top.visible { display: flex; }

/* --- Responsive --- */
@media (max-width: 1024px) {
    .post-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-content { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
    .site-content > .container { flex-direction: column; }
    .sidebar { width: 100%; }
    .post-card-horizontal { flex-direction: column; }
    .post-card-horizontal .card-thumbnail { width: 100%; }
}
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .main-nav { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-white); z-index: 1000; box-shadow: 0 4px 8px rgba(0,0,0,.1); }
    .main-nav.open { display: flex; }
    .main-nav li a { padding: 12px 20px; border-bottom: 1px solid #eee; }
    .header-nav .container { position: relative; justify-content: flex-end; }
    .post-grid { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    body { font-size: 15px; }
    .container { padding: 0 15px; }
    .entry-content { padding: 20px; }
}
