@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700;800&display=swap');

:root {
    --primary: #e23744;
    --primary-dark: #b3232c;
    --accent: #f5a623;
    --teal: #0e9488;
    --ink: #181b22;
    --ink-soft: #5a6472;
    --paper: #faf7f2;
    --card: #ffffff;
    --line: #ece6dd;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow-sm: 0 2px 8px rgba(20,20,30,0.06);
    --shadow: 0 10px 30px rgba(20,20,30,0.10);
    --shadow-lg: 0 18px 50px rgba(20,20,30,0.16);
    --tap: 48px;
    --bar-h: 60px;
    --content: 820px;
    --font-head: 'Poppins', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink);
    background-color: var(--paper);
    background-image:
        radial-gradient(1200px 400px at 100% -5%, rgba(245,166,35,0.10), transparent 60%),
        radial-gradient(900px 380px at -10% 0%, rgba(14,148,136,0.08), transparent 55%);
    background-repeat: no-repeat;
    -webkit-font-smoothing: antialiased;
}

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

::selection { background: var(--accent); color: #2a1a00; }

#bar {
    position: sticky;
    top: 0;
    width: 100%;
    background: linear-gradient(120deg, #e23744 0%, #c01f2c 55%, #a81526 100%);
    z-index: 9999;
    box-shadow: 0 6px 22px rgba(178,35,44,0.28);
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.bar-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    row-gap: 8px;
    min-height: var(--bar-h);
    padding: 9px 14px;
    max-width: 1140px;
    margin: 0 auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #fff;
    text-decoration: none;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 0.3px;
    margin-right: auto;
    min-height: var(--tap);
}

.brand img {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.brand span { display: none; }

#bar button,
#bar .btn {
    background-color: #fff;
    color: var(--ink);
    border: none;
    border-radius: 999px;
    min-height: var(--tap);
    padding: 9px 18px;
    cursor: pointer;
    font-size: 15px;
    font-family: var(--font-head);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.14);
    transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

#bar button:hover,
#bar .btn:hover {
    background-color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.20);
}

#bar button:active,
#bar .btn:active { transform: scale(0.97); }

#more-btn { background-color: var(--accent); color: #2a1a00; }
#more-btn:hover { background-color: #ffba38; }

#more-btn .chevron { display: inline-block; transition: transform 0.3s ease; }
#bar.expanded #more-btn .chevron { transform: rotate(180deg); }

#bar-nav {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

#bar.expanded #bar-nav {
    max-height: 70vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#bar-nav ul {
    list-style: none;
    margin: 0 auto;
    padding: 4px 14px 16px;
    max-width: 1140px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#bar-nav a {
    display: flex;
    align-items: center;
    min-height: var(--tap);
    background-color: rgba(255,255,255,0.12);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.30);
    border-radius: 12px;
    padding: 8px 16px;
    font-family: var(--font-head);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

#bar-nav a:hover { background-color: rgba(255,255,255,0.22); transform: translateX(2px); }
#bar-nav a.current { background-color: #fff; color: var(--primary-dark); }

.lang-switcher { position: relative; }

.lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background-color: #fff;
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    padding: 7px;
    z-index: 10000;
    min-width: 184px;
    max-height: 70vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line);
}

.lang-dropdown.show { display: block; animation: pop 0.16s ease; }

@keyframes pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

#bar .lang-dropdown button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 11px;
    width: 100%;
    min-height: var(--tap);
    white-space: nowrap;
    margin: 0;
    padding: 8px 14px;
    border-radius: 10px;
    background: transparent;
    box-shadow: none;
    color: var(--ink);
    font-weight: 600;
}

#bar .lang-dropdown button:hover { background-color: var(--paper); transform: none; box-shadow: none; }

#bar .lang-dropdown button img {
    flex: 0 0 26px;
    width: 26px;
    height: 18px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}

#textbox {
    width: 100%;
    max-width: var(--content);
    margin: 0 auto;
    padding: 26px 18px 64px;
}

h1 {
    font-family: var(--font-head);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -0.5px;
    color: var(--ink);
    margin: 0 0 12px;
}

h2 {
    position: relative;
    font-family: var(--font-head);
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--ink);
    margin: 38px 0 14px;
    padding-bottom: 12px;
}

h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 52px;
    height: 4px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

h3 {
    font-family: var(--font-head);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--teal);
    margin: 26px 0 8px;
}

h2, h3 { scroll-margin-top: 84px; }

p { margin: 0 0 18px; }

a { color: var(--teal); text-decoration: none; }
article a, .info-box a { text-decoration: underline; text-decoration-color: rgba(14,148,136,0.35); text-underline-offset: 3px; }
article a:hover, .info-box a:hover { text-decoration-color: var(--teal); }

.subtitle {
    color: var(--ink-soft);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 26px;
}

figure { position: relative; margin: 24px 0; }

figure img,
.article-card img {
    width: 100%;
    display: block;
    border-radius: var(--radius);
    background-color: var(--line);
    box-shadow: var(--shadow);
}

figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 28px 16px 12px;
    color: #fff;
    font-size: 0.85rem;
    line-height: 1.4;
    background: linear-gradient(transparent, rgba(0,0,0,0.72));
    border-radius: 0 0 var(--radius) var(--radius);
}

#textbox > section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
    margin-top: 30px;
}

.article-card {
    display: flex;
    flex-direction: column;
    background-color: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 16px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.article-card img {
    aspect-ratio: 16 / 10;
    object-fit: cover;
    margin-bottom: 14px;
    box-shadow: none;
    transition: filter 0.3s ease;
}

.article-card:hover img { filter: saturate(1.08) brightness(1.03); }

.article-card h2 {
    margin: 4px 0 10px;
    padding: 0;
    font-size: 1.28rem;
    line-height: 1.3;
}

.article-card h2::after { display: none; }

.article-card h2 a { color: var(--ink); text-decoration: none; transition: color 0.2s ease; }
.article-card h2 a:hover { color: var(--primary); }

.article-card p { color: var(--ink-soft); font-size: 0.98rem; }

.read-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    margin-top: auto;
    min-height: var(--tap);
    background: linear-gradient(120deg, var(--primary), var(--primary-dark));
    color: #fff;
    border-radius: 999px;
    padding: 11px 26px;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(226,55,68,0.28);
    transition: transform 0.18s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.read-more:hover { transform: translateY(-2px); filter: brightness(1.05); box-shadow: 0 12px 24px rgba(226,55,68,0.36); }
.read-more:active { transform: scale(0.97); }

.info-box {
    background: linear-gradient(180deg, #fffaf0, #fff6e6);
    border: 1px solid #f3e2c2;
    border-left: 5px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 18px 20px;
    margin: 26px 0;
    font-size: 0.98rem;
    box-shadow: var(--shadow-sm);
}

.info-box strong { color: var(--primary-dark); }

footer {
    margin-top: 40px;
    background: linear-gradient(180deg, #1d212a, #14171e);
    color: #b9c0cb;
    text-align: center;
    padding: 30px 18px;
    font-size: 0.9rem;
}

footer a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

@media (min-width: 700px) {
    body { font-size: 17px; }
    .bar-top { flex-wrap: nowrap; gap: 12px; padding: 0 18px; }
    .brand { font-size: 1.28rem; }
    .brand span { display: inline; }
    #bar-nav ul { flex-direction: row; flex-wrap: wrap; gap: 10px; padding: 6px 18px 16px; }
    #bar-nav a { font-size: 14px; min-height: 42px; }
    #textbox { padding: 40px 22px 72px; }
    h1 { font-size: 2.7rem; }
    h2 { font-size: 1.75rem; }
    .subtitle { font-size: 1.2rem; }
    #textbox > section { grid-template-columns: 1fr 1fr; gap: 26px; }
    .article-card { padding: 18px; }
}

@media (min-width: 700px) and (prefers-reduced-motion: no-preference) {
    .article-card img { transition: transform 0.4s ease, filter 0.3s ease; }
}
