/* ============================================================
   resources/css/app.css
   koremi.com — Base styles, CSS variables, typography
   Import order:
     @import 'components/nav.css';
     @import 'components/cards.css';
     @import 'components/sidebar.css';
     @import 'components/footer.css';
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&family=IBM+Plex+Mono:wght@400;600&display=swap');

/* ── Tailwind directives (if using Tailwind) ── */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* ============================================================
   DESIGN TOKENS — edit these, everything updates
   ============================================================ */
:root {
    /* Brand colours */
    --color-navy:        #0F2D5E;
    --color-navy-dark:   #091E42;
    --color-navy-light:  #1A4A8A;
    --color-navy-dim:    #E8EFF8;

    --color-green:       #145A2C;
    --color-green-light: #E6F0EA;

    --color-warm:        #7A3A00;
    --color-warm-light:  #FFF3E8;

    --color-gold:        #B8860B;
    --color-gold-bright: #F59E0B;

    --color-red:         #B5290E;
    --color-red-light:   #FBF0EE;

    /* Neutrals */
    --color-bg:          #F4F6FA;
    --color-bg-white:    #FFFFFF;
    --color-border:      #E2E8F0;
    --color-border-dark: #C0CAD8;
    --color-text:        #1A2535;
    --color-text-muted:  #5A6880;
    --color-text-faint:  #9AAABB;

    /* Typography */
    --font-sans:  'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
    --font-mono:  'IBM Plex Mono', 'Courier New', monospace;

    /* Spacing scale */
    --space-xs:   4px;
    --space-sm:   8px;
    --space-md:   16px;
    --space-lg:   24px;
    --space-xl:   40px;
    --space-2xl:  64px;

    /* Layout */
    --content-max:  1200px;
    --content-pad:  clamp(16px, 4vw, 40px);
    --sidebar-w:    280px;

    /* Radius */
    --radius-sm:  4px;
    --radius-md:  8px;
    --radius-lg:  12px;

    /* Shadows */
    --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
    --shadow-md:  0 4px 16px rgba(0,0,0,.10);
    --shadow-lg:  0 8px 32px rgba(0,0,0,.14);

    /* Transitions */
    --transition: all 0.18s ease;
}

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

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

body {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

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

button {
    cursor: pointer;
    font-family: var(--font-sans);
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
    max-width: var(--content-max);
    margin-inline: auto;
    padding-inline: var(--content-pad);
}

/* Two-column: main content + sidebar */
.layout-main-sidebar {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-w);
    gap: var(--space-lg);
    align-items: start;
}

@media (max-width: 900px) {
    .layout-main-sidebar {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   SECTION DIVIDER (shared across pages)
   ============================================================ */
.section-label {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-block: var(--space-lg) var(--space-md);
}

.section-label__line {
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

.section-label__text {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-text-muted);
    white-space: nowrap;
}

/* ============================================================
   BADGE & TAG CHIPS (used in news cards, guides, etc.)
   ============================================================ */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .3px;
    white-space: nowrap;
}

.tag--politics      { background: #E8EFF8; color: var(--color-navy); }
.tag--economy       { background: #E8F4E8; color: var(--color-green); }
.tag--life          { background: #FFF3E8; color: var(--color-warm); }
.tag--education     { background: #EEF4FF; color: #2563EB; }
.tag--entertainment { background: #F5E8FF; color: #7C3AED; }
.tag--senior        { background: var(--color-warm-light); color: var(--color-warm); }
.tag--general       { background: var(--color-bg); color: var(--color-text-muted); }

/* ============================================================
   ALERT BOX (Medicare deadline banner, FAFSA alert, etc.)
   ============================================================ */
.alert {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}

.alert--info   { background: var(--color-navy-dim);  border-left: 4px solid var(--color-navy); }
.alert--urgent { background: #FEF3E8;                border-left: 4px solid var(--color-warm); }
.alert--green  { background: var(--color-green-light); border-left: 4px solid var(--color-green); }

.alert__icon { font-size: 18px; flex-shrink: 0; margin-top: 2px; }
.alert__body { font-size: 13px; line-height: 1.6; }
.alert__body strong { font-weight: 700; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 9px 20px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    border: none;
    transition: var(--transition);
    white-space: nowrap;
}

.btn--primary {
    background: var(--color-navy);
    color: #fff;
}
.btn--primary:hover { background: var(--color-navy-light); }

.btn--gold {
    background: var(--color-gold-bright);
    color: var(--color-navy);
}
.btn--gold:hover { background: #FBBF24; }

.btn--outline {
    background: transparent;
    color: var(--color-navy);
    border: 1.5px solid var(--color-navy);
}
.btn--outline:hover { background: var(--color-navy-dim); }

.btn--sm { padding: 6px 14px; font-size: 12px; }
.btn--full { width: 100%; }

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.input {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--color-text);
    background: var(--color-bg-white);
    transition: var(--transition);
    outline: none;
}

.input:focus {
    border-color: var(--color-navy-light);
    box-shadow: 0 0 0 3px rgba(26, 74, 138, 0.12);
}

.input::placeholder { color: var(--color-text-faint); }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-xl);
}

.pagination__btn {
    padding: 7px 13px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--color-text-muted);
    background: var(--color-bg-white);
    transition: var(--transition);
}

.pagination__btn:hover,
.pagination__btn--active {
    background: var(--color-navy);
    border-color: var(--color-navy);
    color: #fff;
}

/* ============================================================
   SENIOR LAYOUT OVERRIDES
   (applied via <body class="senior-layout"> on /senior/* pages)
   ============================================================ */
.senior-layout {
    font-size: 18px;
}

.senior-layout .news-card__title,
.senior-layout .guide-card__title {
    font-size: 17px;
}

.senior-layout .btn {
    padding: 12px 24px;
    font-size: 15px;
}

/* Font size toggle classes — toggled by FontSizeToggle.vue */
body.font-size--large  { font-size: 20px; }
body.font-size--small  { font-size: 14px; }

/* ?? Home Hero ??????????????????????????????????????????????? */
.home-hero {
    background: linear-gradient(135deg, #0d2137 0%, #1a3a5c 100%);
    padding: 36px 0;
    color: #fff;
}
.home-hero__link {
    text-decoration: none;
    color: inherit;
    display: block;
}
.home-hero__inner {
    display: flex;
    gap: 32px;
    align-items: center;
}
.home-hero__body {
    flex: 1;
    min-width: 0;
}
.home-hero__title {
    font-size: clamp(1.35rem, 3vw, 2rem);
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 12px;
    color: #fff;
}
.home-hero__summary {
    font-size: .97rem;
    line-height: 1.7;
    opacity: .85;
    margin-bottom: 14px;
}
.home-hero__meta {
    font-size: .84rem;
    opacity: .65;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.home-hero__thumb {
    width: 280px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 16/10;
    background: rgba(255,255,255,.08);
}
.home-hero__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.home-hero__thumb--emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}
@media (max-width: 640px) {
    .home-hero__inner { flex-direction: column; }
    .home-hero__thumb { width: 100%; }
}

/* ?? Guide cards (Education/Senior index) ??????????????????? */
.guide-card {
    display: block;
    padding: 24px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    text-decoration: none;
    color: var(--color-text);
    transition: box-shadow .15s, border-color .15s, transform .15s;
}
.guide-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
    border-color: var(--color-primary);
    transform: translateY(-2px);
}
.guide-card__icon { font-size: 2rem; margin-bottom: 10px; }
.guide-card__title { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.guide-card__desc { font-size: .88rem; color: var(--color-text-muted); line-height: 1.55; margin: 0; }

/* ?? Guide body typography ?????????????????????????????????? */
.guide-body h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 28px 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--color-primary);
    color: var(--color-primary);
}
.guide-body p { line-height: 1.8; margin-bottom: 12px; }
.guide-body ul, .guide-body ol { padding-left: 22px; line-height: 1.8; }
.guide-body li { margin-bottom: 6px; }

/* ?? Auth pages ????????????????????????????????????????????? */
.auth-page { background: #f4f6f8; }

.auth-wrap {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}
.auth-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(0,0,0,.09);
    padding: 40px;
    width: 100%;
    max-width: 440px;
}
.auth-card__header { text-align: center; margin-bottom: 28px; }
.auth-logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-primary);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 14px;
}
.auth-logo span { color: var(--color-gold-bright, #f0a500); }
.auth-card__title { font-size: 1.4rem; font-weight: 700; margin-bottom: 4px; }
.auth-card__sub   { font-size: .88rem; color: var(--color-text-muted); }

.auth-social { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.auth-social__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 11px 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.auth-social__btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}
.auth-social__btn--kakao { background: #FEE500; border-color: #FEE500; color: #3C1E1E; }
.auth-social__btn--google { background: #fff; color: #444; }
.auth-social__icon { font-size: 1.1rem; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--color-text-muted);
    font-size: .82rem;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

.form-group    { margin-bottom: 18px; }
.form-label    { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.form-label__link { font-size: .82rem; color: var(--color-primary); text-decoration: none; }
.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: .95rem;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
}
.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(26,58,92,.1);
}
.form-input--error { border-color: #e53e3e; }
.form-error { font-size: .82rem; color: #e53e3e; margin-top: 4px; display: block; }

.auth-submit {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 8px;
}
.auth-card__footer {
    text-align: center;
    margin-top: 20px;
    font-size: .88rem;
    color: var(--color-text-muted);
}
.auth-card__footer-link { color: var(--color-primary); font-weight: 600; text-decoration: none; }

/* ===== HOME PAGE: HERO (simplified) ===== */
.home-hero__sub {
    font-size: 1.05rem;
    line-height: 1.7;
    opacity: .85;
    margin-bottom: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.home-hero__cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 8px;
}
.btn--hero-primary {
    background: var(--color-primary, #1a6bc4);
    color: #fff;
    padding: 10px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: .97rem;
    transition: background .2s;
}
.btn--hero-primary:hover { background: #1558a8; }
.btn--hero-secondary {
    background: rgba(255,255,255,.15);
    color: #fff;
    padding: 10px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: .97rem;
    border: 1px solid rgba(255,255,255,.4);
    transition: background .2s;
}
.btn--hero-secondary:hover { background: rgba(255,255,255,.25); }
.home-hero { text-align: center; padding: 48px 0; }
.home-hero .home-hero__inner { flex-direction: column; align-items: center; gap: 0; }

/* ===== HOME PAGE: 9-SECTION CARDS ===== */
.home-sections {
    padding: 40px 0 48px;
    background: #f4f6f9;
}
.home-sections__title {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-navy, #0f2d5e);
    margin-bottom: 28px;
}
.home-sections__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
@media (max-width: 860px) { .home-sections__grid { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
@media (max-width: 580px) { .home-sections__grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
@media (max-width: 360px) { .home-sections__grid { grid-template-columns: 1fr; } }

.sec-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 14px;
    background: #fff;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e2e8f0;
    transition: box-shadow .2s, transform .15s;
    gap: 8px;
}
.sec-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    transform: translateY(-2px);
    text-decoration: none;
}
.sec-card__icon { font-size: 2rem; line-height: 1; }
.sec-card__name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-navy, #0f2d5e);
}
.sec-card__desc {
    font-size: .82rem;
    color: #6b7280;
    line-height: 1.5;
}

/* ===== HOME PAGE: LATEST NEWS GRID ===== */
.home-news {
    padding: 40px 0 48px;
}
.home-news__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
}
.home-news__title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--color-navy, #0f2d5e);
}
.home-news__more {
    font-size: .9rem;
    color: var(--color-primary, #1a6bc4);
    text-decoration: none;
    font-weight: 600;
}
.home-news__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
@media (max-width: 760px) { .home-news__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .home-news__grid { grid-template-columns: 1fr; } }

.news-card {
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s;
}
.news-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); text-decoration: none; }
.news-card__img img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.news-card__body { padding: 12px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.news-card__cat {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-primary, #1a6bc4);
    letter-spacing: .04em;
}
.news-card__title {
    font-size: .93rem;
    font-weight: 700;
    line-height: 1.45;
    color: #1a202c;
    flex: 1;
}
.news-card__time { font-size: .78rem; color: #9ca3af; }
/* Home featured article */
.home-featured-article { padding: 1.5rem 0; background: #fff; border-bottom: 1px solid #e5e7eb; }
.home-feat-card { display: flex; gap: 1.5rem; text-decoration: none; color: inherit; align-items: flex-start; }
.home-feat-card__img { flex-shrink: 0; width: 280px; height: 180px; border-radius: 10px; overflow: hidden; }
.home-feat-card__img img { width: 100%; height: 100%; object-fit: cover; }
.home-feat-card__body { flex: 1; }
.home-feat-card__label { display: inline-block; background: #fee2e2; color: #991b1b; font-size: .75rem; font-weight: 700; padding: .15rem .5rem; border-radius: 4px; margin-bottom: .5rem; }
.home-feat-card__title { font-size: 1.35rem; font-weight: 700; line-height: 1.4; margin-bottom: .6rem; color: #111827; }
.home-feat-card:hover .home-feat-card__title { color: var(--color-navy, #1e3a5f); }
.home-feat-card__summary { font-size: .9rem; color: #4b5563; line-height: 1.6; margin-bottom: .6rem; }
.home-feat-card__meta { font-size: .78rem; color: #9ca3af; }
@media (max-width: 640px) {
  .home-feat-card { flex-direction: column; }
  .home-feat-card__img { width: 100%; height: 200px; }
}

/* Home promotions */
.home-promotions { padding: 2rem 0; background: #f8fafc; }
.home-promo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.home-promo-block { background: #fff; border-radius: 10px; padding: 1.25rem; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.home-promo-block__title { font-size: 1rem; font-weight: 700; color: #111827; margin-bottom: 1rem; padding-bottom: .5rem; border-bottom: 2px solid #e5e7eb; }
.home-promo-list { display: flex; flex-direction: column; gap: .1rem; }
.home-promo-item { display: flex; gap: .75rem; align-items: flex-start; padding: .6rem 0; border-bottom: 1px solid #f3f4f6; text-decoration: none; color: inherit; }
.home-promo-item:last-child { border-bottom: none; }
.home-promo-item__num { flex-shrink: 0; width: 22px; height: 22px; background: var(--color-navy, #1e3a5f); color: #fff; border-radius: 50%; font-size: .72rem; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-top: .1rem; }
.home-promo-item__thumb { flex-shrink: 0; width: 52px; height: 38px; border-radius: 4px; object-fit: cover; }
.home-promo-item__icon { flex-shrink: 0; font-size: 1.3rem; margin-top: .1rem; }
.home-promo-item__text { flex: 1; }
.home-promo-item__title { display: block; font-size: .84rem; line-height: 1.4; font-weight: 500; color: #374151; }
.home-promo-item:hover .home-promo-item__title { color: var(--color-navy, #1e3a5f); }
.home-promo-item small { display: block; font-size: .74rem; color: #9ca3af; margin-top: .15rem; }

/* Section cards - add events card color */
.sec-card--events { --card-color: #6366f1; }
