/*
Theme Name: Insight Daily
Theme URI: https://example.com/insight-daily
Author: Antigravity
Author URI: https://example.com
Description: A premium news financial portal theme replicating The Hustle aesthetic.
Version: 2.0
License: Gnv v2 or later
Text Domain: insight-daily
*/

/* ==========================================================================
   CSS Reset & Variables
   ========================================================================== */
:root {
    --primary-color: #ffffff;
    --accent-color: #bf202f;
    --text-main: #111111;
    --text-muted: #666666;
    --bg-body: #ffffff;
    --bg-light: #f7f9fa;
    --bg-dark: #121c2d;
    --border-color: #e2e8f0;
    --border-dark: #bf202f;
    --font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    --container-width: 1200px;
    --transition: all 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-body); background-color: var(--bg-body); color: var(--text-main); line-height: 1.6; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
a:hover { color: var(--accent-color); }
ul { list-style: none; }
img { max-width: 100%; display: block; object-fit: cover; }
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 20px; }

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.hustle-navbar { background: #ffffff; border-bottom: 1px solid var(--border-color); padding: 15px 0; position: sticky; top: 0; z-index: 100; }
.hustle-nav-container { max-width: var(--container-width); margin: 0 auto; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; }
.hustle-logo { font-family: var(--font-heading); font-size: 28px; font-weight: 900; letter-spacing: -1px; }
.hustle-logo span { font-weight: 300; }
.hustle-nav-links { display: flex; gap: 25px; font-size: 14px; font-weight: 600; }
.hustle-nav-right { display: flex; align-items: center; gap: 20px; }
.search-icon { cursor: pointer; color: var(--text-main); }
.hustle-join-btn { background-color: var(--accent-color); color: #fff; padding: 8px 18px; border-radius: 4px; font-size: 14px; font-weight: 600; }
.hustle-join-btn:hover { background-color: #a01a27; color: #fff; }

/* ==========================================================================
   Front Page Styles
   ========================================================================== */
.hustle-hero { padding: 50px 0 30px; }
.hero-inner { display: flex; flex-direction: column; gap: 20px; }
.hero-title { font-size: 56px; font-weight: 800; letter-spacing: -2px; line-height: 1.1; max-width: 800px; }
.hero-subscribe { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 10px; }
.hero-subtitle { font-size: 18px; color: var(--text-muted); }
.hero-form { display: flex; gap: 10px; }
.hero-input { padding: 12px 15px; border: 1px solid #ccc; border-radius: 4px; width: 300px; font-size: 15px; outline: none; }
.hero-input:focus { border-color: var(--accent-color); }
.hero-btn { background-color: var(--accent-color); color: #fff; border: none; padding: 12px 24px; border-radius: 4px; font-size: 15px; font-weight: 600; cursor: pointer; transition: background-color 0.2s; }
.hero-btn:hover { background-color: #a01a27; }
.hustle-red-line { border: none; border-top: 3px solid var(--accent-color); margin-top: 20px; margin-bottom: 40px; }
.hustle-featured { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; margin-bottom: 60px; }
.featured-img { 
    width: 100% !important; 
    height: auto !important; 
    aspect-ratio: 16/9 !important; 
    object-fit: cover !important; 
    border-radius: 4px; 
    margin-bottom: 15px; 
}
.featured-headline { font-size: 28px; font-weight: 800; line-height: 1.3; margin-bottom: 10px; }
.featured-excerpt { font-size: 16px; color: var(--text-muted); margin-bottom: 15px; }
.featured-meta { font-size: 14px; color: var(--text-muted); }
.top-stories-title { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.hustle-red-line-thin { border: none; border-top: 2px solid var(--accent-color); margin-bottom: 20px; }
.top-stories-list li { border-bottom: 1px solid var(--border-color); padding-bottom: 15px; margin-bottom: 15px; }
.top-stories-list li:last-child { border-bottom: none; margin-bottom: 0; }
.ts-headline { font-size: 16px; font-weight: 600; line-height: 1.4; margin-bottom: 8px; }
.ts-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-muted); }

/* Front Page Grid */
.hustle-grid-section { margin-bottom: 80px; }
.front-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.grid-img { 
    width: 100% !important; 
    height: auto !important; 
    aspect-ratio: 16/9 !important; 
    object-fit: cover !important; 
    border-radius: 4px; 
    margin-bottom: 15px; 
}

.grid-title { font-size: 17px; font-weight: 700; line-height: 1.3; margin-bottom: 10px; }
.grid-excerpt { font-size: 14px; color: var(--text-muted); margin-bottom: 15px; line-height: 1.5; }
.grid-meta { font-size: 13px; color: var(--text-muted); }

/* Banner & Sections */
.hustle-dark-banner { background-color: var(--bg-dark); color: #ffffff; padding: 80px 0; }
.banner-inner { display: flex; align-items: center; gap: 60px; }
.banner-text { flex: 1; }
.banner-badge { background-color: rgba(255,255,255,0.1); padding: 4px 10px; border-radius: 4px; font-size: 12px; font-weight: 600; display: inline-block; margin-bottom: 15px; }
.banner-headline { font-size: 36px; font-weight: 800; margin-bottom: 20px; line-height: 1.2; }
.banner-desc { font-size: 18px; color: rgba(255,255,255,0.8); margin-bottom: 15px; line-height: 1.6; }
.banner-strong { font-size: 18px; font-weight: 700; margin-bottom: 30px; }
.banner-btn { display: inline-block; background-color: #ffffff; color: var(--bg-dark); padding: 12px 24px; border-radius: 4px; font-weight: 700; }
.banner-image { flex: 1; max-width: 400px; }
.banner-image img { border-radius: 12px; box-shadow: 0 20px 40px rgba(0,0,0,0.3); }

/* Lists */
.section-header-bar { display: flex; align-items: center; margin-bottom: 30px; gap: 15px; }
.section-header-bar h3 { font-size: 20px; font-weight: 800; white-space: nowrap; }
.red-line-fill { flex: 1; height: 2px; background-color: var(--accent-color); }
.see-more { font-size: 14px; font-weight: 700; color: var(--accent-color); }
.hustle-list-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.list-item { display: flex; gap: 20px; }
.li-img { flex: 0 0 160px; }
.li-img img { width: 100%; height: 100px; border-radius: 4px; }
.li-content { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.li-title { font-size: 16px; font-weight: 700; line-height: 1.4; margin-bottom: 10px; }
.li-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-muted); }

/* ==========================================================================
   Category Page (The Hustle Style 4-Column Grid)
   ========================================================================== */
.hustle-cat-header { max-width: var(--container-width); margin: 40px auto; padding: 0 20px; }
.hustle-cat-title { font-size: 42px; font-weight: 800; letter-spacing: -1px; margin-bottom: 20px; color: var(--text-main); }
.hustle-subscribe-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 20px; }
.hustle-subscribe-text { font-size: 15px; color: var(--text-main); font-weight: 500; }
.hustle-subscribe-form { display: flex; gap: 10px; width: 100%; max-width: 500px; }
.hustle-subscribe-form input { flex: 1; padding: 12px 15px; border: 1px solid var(--border-color); border-radius: 4px; font-size: 14px; }
.hustle-subscribe-form button { background-color: var(--accent-color); color: #fff; border: none; padding: 0 20px; font-weight: 700; border-radius: 4px; cursor: pointer; white-space: nowrap; }
.hustle-filters-wrap { border-top: 2px solid var(--accent-color); padding-top: 20px; display: flex; gap: 15px; margin-bottom: 40px; }
.hustle-filter-btn { flex: 1; text-align: center; padding: 15px; border: 1px solid var(--border-color); border-radius: 4px; font-weight: 700; color: var(--text-main); font-size: 15px; }
.hustle-filter-btn.active { border-color: var(--accent-color); color: var(--accent-color); }
.hustle-filter-btn:hover { background-color: var(--bg-light); }
.hustle-grid-container { max-width: var(--container-width); margin: 0 auto 60px; padding: 0 20px; }
.hustle-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 20px; }
.hustle-item { display: flex; flex-direction: column; }
.hustle-thumbnail { width: 100% !important; height: auto !important; aspect-ratio: 16/9 !important; object-fit: cover !important; margin-bottom: 12px; border-radius: 2px; }
.hustle-item-title { font-size: 15px; font-weight: 700; line-height: 1.3; margin-bottom: 8px; color: var(--text-main); }
.hustle-item-title:hover { text-decoration: underline; }
.hustle-meta { font-size: 12px; color: var(--text-muted); display: flex; flex-direction: column; gap: 4px; }
.hustle-pagination-wrap { text-align: center; margin: 60px 0; }
.hustle-pagination-title { font-size: 16px; margin-bottom: 15px; color: var(--text-main); font-weight: 600; }
.hustle-pagination { display: flex; justify-content: center; gap: 10px; align-items: center; }
.hustle-pagination a, .hustle-pagination span { display: inline-block; padding: 5px 10px; color: var(--accent-color); font-weight: 700; font-size: 15px; }
.hustle-pagination span.current { border-bottom: 2px solid var(--accent-color); color: var(--accent-color); }
.hustle-pagination a:hover { background-color: var(--bg-light); border-radius: 4px; }

/* ==========================================================================
   Single Post (Article Page)
   ========================================================================== */
.hustle-single-wrapper { color: var(--text-main); }
.hustle-container { max-width: 800px; margin: 0 auto; padding: 40px 20px; }
.hustle-breadcrumbs { font-size: 13px; color: var(--text-muted); margin-bottom: 30px; font-weight: 500; }
.hustle-breadcrumbs a { color: var(--accent-color); }
.hustle-breadcrumbs a:hover { text-decoration: underline; }
.hustle-single-title { font-size: 42px; font-weight: 800; line-height: 1.2; letter-spacing: -1px; margin-bottom: 25px; }
.hustle-sub-box { background-color: var(--bg-light); border: 1px solid var(--border-color); padding: 15px 20px; border-radius: 4px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 15px; }
.hustle-sub-text { font-size: 14px; font-weight: 600; color: var(--text-main); }
.hustle-sub-form { display: flex; gap: 10px; flex: 1; min-width: 300px; justify-content: flex-end; }
.hustle-sub-form input { width: 100%; max-width: 300px; padding: 10px 15px; border: 1px solid #999; border-radius: 4px; font-size: 14px; }
.hustle-sub-form button { background-color: var(--accent-color); color: #fff; border: none; padding: 0 20px; font-weight: 700; border-radius: 4px; cursor: pointer; white-space: nowrap; }
.hustle-meta-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; flex-wrap: wrap; gap: 10px; }
.hustle-author-info { display: flex; align-items: center; gap: 10px; }
.hustle-author-avatar img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.hustle-author-name { font-size: 14px; font-weight: 700; color: var(--accent-color); border-bottom: 1px solid var(--accent-color); }
.hustle-publish-date { font-size: 13px; font-weight: 700; color: #555; }
.hustle-meta-divider { border: 0; border-top: 1px solid #ddd; margin-bottom: 40px; }
.hustle-content { font-size: 17px; line-height: 1.8; color: #333; margin-bottom: 50px; }
.hustle-content p { margin-bottom: 25px; }
.hustle-content h2, .hustle-content h3 { margin-top: 40px; margin-bottom: 15px; font-weight: 700; }
.hustle-content img { max-width: 100%; height: auto; margin: 20px 0; border-radius: 4px; }
.hustle-content ul { margin-bottom: 25px; padding-left: 20px; }
.hustle-content li { margin-bottom: 10px; }
.hustle-topics { display: flex; align-items: center; gap: 10px; margin-bottom: 50px; flex-wrap: wrap; }
.hustle-topics-label { font-size: 14px; font-weight: 600; color: var(--text-muted); }
.hustle-tag { display: inline-block; padding: 6px 12px; border: 1px solid #ddd; border-radius: 20px; font-size: 13px; background: #fff; font-weight: 500; }
.hustle-tag:hover { background: #f0f0f0; }
.hustle-social { text-align: center; margin-bottom: 50px; }
.hustle-social h4 { font-size: 16px; font-weight: 800; margin-bottom: 15px; }
.hustle-social-icons { display: flex; justify-content: center; gap: 15px; }
.social-circle { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; background-color: var(--text-main); color: #fff; border-radius: 50%; font-size: 14px; font-weight: bold; }
.hustle-related-wrapper { background-color: var(--bg-light); padding: 60px 20px; }
.hustle-related-inner { max-width: 1000px; margin: 0 auto; }
.hustle-related-title { text-align: center; font-size: 28px; font-weight: 800; margin-bottom: 40px; }
.hustle-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.related-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.05); transition: transform 0.2s; }
.related-card:hover { transform: translateY(-5px); }
.related-thumb { 
    width: 100% !important; 
    height: auto !important; 
    aspect-ratio: 16/9 !important; 
    object-fit: cover !important; 
}
.related-info { padding: 20px; }
.related-title { font-size: 15px; font-weight: 700; line-height: 1.4; margin-bottom: 15px; display: block; }
.related-date { font-size: 12px; color: #777; font-weight: 600; }

/* ==========================================================================
   Footer
   ========================================================================== */
.hustle-footer { background-color: var(--bg-dark); color: #ffffff; padding: 60px 0 40px; text-align: center; }
.footer-slogan { font-size: 18px; color: #a0aec0; margin-bottom: 40px; }
.footer-socials { display: flex; justify-content: center; gap: 20px; margin-bottom: 40px; font-size: 20px; }
.footer-socials a { color: #ffffff; }
.footer-copy { font-size: 14px; color: #a0aec0; margin-bottom: 20px; }
.footer-legal { display: flex; justify-content: center; gap: 20px; font-size: 13px; font-weight: 600; }
.footer-legal a { color: #ffffff; text-decoration: underline; }

/* ==========================================================================
   Morning Brew Style Top Search Dropdown
   ========================================================================== */

/* 전체 화면 덮기 -> 상단 고정 드롭다운으로 변경 */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    background-color: #ffffff;
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    
    /* 애니메이션 설정 (위에서 아래로 내려옴) */
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

/* 자바스크립트가 작동하여 열렸을 때의 상태 */
.search-overlay.visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.search-overlay.hidden {
    display: block; /* 기존 JS 충돌 방지용 (애니메이션 유지를 위해 block 유지) */
}

/* 내부 레이아웃 설정 */
.search-overlay-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px 20px 40px;
}

.search-overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.search-overlay-title {
    font-size: 22px;
    font-weight: 800;
    color: #111;
}

.search-close {
    position: static;
    background: none;
    border: none;
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    color: #111;
    padding: 0;
}

/* 검색창 인풋 박스 및 버튼 스타일 */
.search-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px;
    background: #fff;
}

.search-input-icon {
    margin: 0 15px;
    color: #666;
}

.search-field-overlay {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    outline: none;
    color: #111;
    padding: 10px 0;
}

.search-submit-btn {
    background-color: #222;
    color: #fff;
    border: none;
    padding: 12px 25px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-submit-btn:hover {
    background-color: #000;
}
/* 상단 메뉴 검색(돋보기) 아이콘 수정 */
#search-trigger, 
.search-icon-btn {
    background: transparent !important; /* 네모 배경색 투명하게 제거 */
    border: none !important;            /* 네모 테두리 제거 */
    padding: 0;                         /* 불필요한 여백 제거 */
    cursor: pointer;
    color: var(--text-main);
    display: flex;
    align-items: center;
    outline: none;                      /* 클릭 시 생기는 점선 제거 */
}

/* 돋보기 크기 키우기 */
#search-trigger svg, 
.search-icon-btn svg {
    width: 26px !important;  /* 기존 20px에서 26px로 확대 */
    height: 26px !important; /* 기존 20px에서 26px로 확대 */
    stroke-width: 2.2;       /* 아이콘 선 굵기 살짝 조정 */
}
/* ==========================================================================
   Morning Brew Style Subscribe Dropdown
   ========================================================================== */
.subscribe-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #f7f9fa; /* 모닝브루 스타일의 은은한 배경색 */
    z-index: 9998; /* 검색창 바로 아래 레이어 */
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-left: 5px solid #d32f2f; /* 브랜드 포인트 컬러 라인 */
    
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.subscribe-overlay.visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}
.subscribe-overlay.hidden { display: block; }

.subscribe-overlay-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px 20px 40px;
}

.subscribe-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.subscribe-overlay-title {
    font-size: 20px;
    font-weight: 800;
    color: #111;
    margin: 0;
}

.subscribe-overlay-desc {
    font-size: 15px;
    color: #333;
    line-height: 1.5;
    margin-bottom: 20px;
    max-width: 800px;
}

.subscribe-overlay-form {
    max-width: 500px;
}

.subscribe-input-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.subscribe-field {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    outline: none;
}

.subscribe-submit-btn {
    background-color: #222;
    color: #fff;
    border: none;
    padding: 0 25px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.subscribe-submit-btn:hover { background-color: #000; }

.subscribe-terms {
    font-size: 12px;
    color: #666;
    margin: 0;
}

.subscribe-terms a {
    color: #111;
    text-decoration: underline;
}
/* ==========================================================================
   Responsive (Mobile Layout) - 모바일 화면 최적화 복구 코드
   ========================================================================== */
@media (max-width: 992px) {
    .hustle-grid { grid-template-columns: repeat(2, 1fr); }
    .hustle-featured { grid-template-columns: 1fr; gap: 30px; }
    .front-grid { grid-template-columns: repeat(2, 1fr); }
    .hustle-list-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .hustle-nav-container { flex-wrap: wrap; }
    .hustle-nav-links-wrap { order: 3; width: 100%; margin-top: 15px; overflow-x: auto; padding-bottom: 5px; }
    .hustle-nav-links { width: max-content; margin: 0 auto; }
    .hero-title { font-size: 44px; }
    .hustle-single-title { font-size: 32px; }
    .hustle-related-grid { grid-template-columns: 1fr; }
    .hustle-sub-form { min-width: 100%; justify-content: flex-start; }
}

@media (max-width: 576px) {
    .hero-title { font-size: 34px; }
    .hero-form { flex-direction: column; width: 100%; }
    .hero-input, .hero-btn { width: 100%; }
    .front-grid { grid-template-columns: 1fr; }
    .list-item { flex-direction: column; gap: 10px; }
    .hustle-grid { grid-template-columns: 1fr; }
    .hustle-filters-wrap { flex-direction: column; }
}