/* ============================================
   CSS VARIABLES & RESET
============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary:        #4A6FA5;
    --primary-dark:   #3a5a8c;
    --secondary:      #E5989B;
    --secondary-dark: #c97c7f;
    --accent:         #F4A261;
    --accent-dark:    #e08a3a;
    --bg:             #F9F9F9;
    --text:           #333333;
    --white:          #ffffff;
    --light:          #f0f4fa;
    --border:         #e4e4e4;
    --shadow:         0 2px 16px rgba(74, 111, 165, 0.10);
    --shadow-hover:   0 8px 28px rgba(74, 111, 165, 0.20);
    --radius:         12px;
    --radius-sm:      8px;
    --transition:     all 0.25s ease;
    --font-heading:   Georgia, 'Times New Roman', serif;
    --font-body:      'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --max-width:      1080px;
    --header-h:       70px;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.75;
    font-size: 16px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover { color: var(--secondary-dark); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--primary);
    line-height: 1.3;
}

p { margin-bottom: 1.1rem; }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.4rem; }

/* ============================================
   LAYOUT HELPERS
============================================ */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.main-content {
    flex: 1;
    padding: 52px 0 72px;
}

/* ============================================
   HEADER
============================================ */
.site-header {
    background: var(--white);
    border-bottom: 3px solid var(--secondary);
    position: sticky;
    top: 0;
    z-index: 200;
    height: var(--header-h);
    box-shadow: 0 2px 10px rgba(74, 111, 165, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    flex-shrink: 0;
}

.header-logo {
    height: 42px;
    width: auto;
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
    transition: var(--transition);
    white-space: nowrap;
}

.header-brand:hover .brand-name { color: var(--secondary-dark); }

/* Navigation */
.nav-list {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-list a {
    padding: 8px 20px;
    border-radius: 24px;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text);
    transition: var(--transition);
    display: inline-block;
}

.nav-list a:hover,
.nav-list a.active {
    background: var(--primary);
    color: var(--white);
}

/* Hamburger button */
.nav-toggle {
    display: none;
    background: none;
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 6px 8px;
    flex-direction: column;
    gap: 4px;
    transition: var(--transition);
    margin-left: auto;
}

.nav-toggle:hover { background: var(--light); }

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ============================================
   HERO SECTION (index page)
============================================ */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #2d4e82 100%);
    color: var(--white);
    padding: 72px 0 60px;
    text-align: center;
    margin-bottom: 56px;
}

.hero h1 {
    color: var(--white);
    font-size: clamp(1.9rem, 4.5vw, 3rem);
    margin-bottom: 14px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.hero-sub {
    font-size: 1.1rem;
    opacity: 0.88;
    max-width: 560px;
    margin: 0 auto;
}

/* ============================================
   PAGE HEADER (inner pages)
============================================ */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, #2d4e82 100%);
    color: var(--white);
    padding: 52px 0 44px;
    text-align: center;
    margin-bottom: 52px;
}

.page-header h1 {
    color: var(--white);
    font-size: clamp(1.7rem, 3.8vw, 2.5rem);
    margin-bottom: 8px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.page-header p {
    opacity: 0.85;
    font-size: 1.05rem;
    margin: 0;
}

/* ============================================
   ARTICLE BODY
============================================ */
.article-body {
    max-width: 740px;
    margin: 0 auto;
}

.article-body p {
    font-size: 1.05rem;
    line-height: 1.85;
}

.article-body img {
    border-radius: var(--radius);
    margin: 24px 0;
    box-shadow: var(--shadow);
    width: 100%;
    object-fit: cover;
    max-height: 420px;
}

.article-body h3 {
    font-size: 1.3rem;
    margin: 1.6rem 0 0.7rem;
    color: var(--primary);
}

.article-body strong { color: var(--primary-dark); }

/* Breadcrumb */
.breadcrumb {
    font-size: 0.86rem;
    color: #999;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    max-width: 740px;
    margin-left: auto;
    margin-right: auto;
}

.breadcrumb a { color: var(--primary); font-weight: 500; }
.breadcrumb a:hover { color: var(--secondary-dark); }
.breadcrumb .sep { color: #ccc; }

/* ============================================
   ADDING SECTION (index page extra block)
============================================ */
.adding-section {
    background: var(--white);
    border-left: 4px solid var(--secondary);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 28px 36px;
    margin: 48px auto;
    max-width: 740px;
    box-shadow: var(--shadow);
}

.adding-section h3 {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 16px;
}

.adding-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.adding-section ul li {
    padding: 9px 0 9px 30px;
    position: relative;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
    line-height: 1.65;
}

.adding-section ul li:last-child { border-bottom: none; }

.adding-section ul li::before {
    content: '♥';
    position: absolute;
    left: 0;
    color: var(--secondary);
    font-size: 0.85rem;
    top: 11px;
}

/* ============================================
   ARTICLES GRID
============================================ */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 4px;
}

/* Article Card */
.article-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
}

.article-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
    border-color: var(--secondary);
}

.article-card-img {
    width: 100%;
    height: 195px;
    object-fit: cover;
    transition: var(--transition);
}

.article-card:hover .article-card-img { transform: scale(1.03); }

.article-card-img-wrap {
    overflow: hidden;
    height: 195px;
    flex-shrink: 0;
}

.article-card-body {
    padding: 20px 22px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: var(--primary);
    margin-bottom: 10px;
    line-height: 1.4;
}

.article-card:hover .article-card-title { color: var(--secondary-dark); }

.article-card-excerpt {
    font-size: 0.91rem;
    color: #666;
    flex: 1;
    margin-bottom: 18px;
    line-height: 1.65;
}

/* ============================================
   BUTTONS
============================================ */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 24px;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    line-height: 1.4;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 111, 165, 0.3);
}

.btn-accent {
    background: var(--accent);
    color: var(--white);
}

.btn-accent:hover {
    background: var(--accent-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 162, 97, 0.35);
}

/* ============================================
   ABOUT PAGE
============================================ */
.about-content {
    max-width: 740px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.85;
}

.about-content p { margin-bottom: 1.3rem; }

/* ============================================
   FOOTER
============================================ */
.site-footer {
    background: var(--primary);
    color: rgba(255, 255, 255, 0.8);
    padding: 40px 0 22px;
    margin-top: auto;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 20px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.footer-logo {
    height: 34px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.85;
    transition: var(--transition);
}

.footer-brand:hover .footer-logo { opacity: 1; }

.footer-brand-name {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: var(--white);
    font-weight: 700;
    transition: var(--transition);
}

.footer-brand:hover .footer-brand-name { color: var(--secondary); }

.footer-nav {
    display: flex;
    gap: 4px;
    list-style: none;
    padding: 0;
    flex-wrap: wrap;
}

.footer-nav a {
    color: rgba(255, 255, 255, 0.75);
    padding: 6px 16px;
    border-radius: 18px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.footer-nav a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
}

.footer-copy {
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 900px) {
    .articles-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .articles-grid { grid-template-columns: 1fr; }

    .nav-list {
        display: none;
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 12px 20px 20px;
        border-bottom: 3px solid var(--secondary);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
        gap: 2px;
    }

    .nav-list.open { display: flex; }

    .nav-list a { width: 100%; text-align: center; padding: 10px 20px; }

    .nav-toggle { display: flex; }

    .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-nav { justify-content: center; }

    .hero { padding: 52px 0 44px; }

    .adding-section { padding: 20px 20px; }

    .main-content { padding: 36px 0 52px; }
}

@media (max-width: 420px) {
    .brand-name { display: none; }
}
