/* =================================================================
   Stock-Fi Landing Page Main Stylesheet
   - 모든 페이지에 공통으로 적용되는 핵심 스타일 파일입니다.
   ================================================================= */

/* --- Google Fonts Import (Inter) --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* --- 1. Root Variables & Reset --- */
:root {
    --primary-color: #4A90E2;
    --primary-gradient: linear-gradient(to bottom right, #4A90E2, #50E3C2);
    --background-color: #F8F9FA;
    --surface-color: #FFFFFF;
    --text-primary: #212121;
    --text-secondary: #757575;
    --positive-color: #4CAF50;
    --negative-color: #F44336;
    
    --header-height: 80px;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- 2. Global Styles --- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

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

a:hover {
    text-decoration: underline;
}

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

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }
p { margin-bottom: 1rem; color: var(--text-secondary); }


/* --- 3. Reusable Components --- */

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.5);
}

.btn-gradient {
    background-image: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.4);
}
.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(80, 227, 194, 0.4);
}

/* Cards */
.card {
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Semantic Colors */
.text-positive { color: var(--positive-color); }
.text-negative { color: var(--negative-color); }


/* --- 4. Header & Mega Menu Navigation --- */
.main-header {
    background-color: var(--surface-color);
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}
.logo a {
    text-decoration: none;
    color: inherit;
}

.main-nav {
    display: flex;
    align-items: center;
}

.main-nav > ul {
    list-style: none;
    display: flex;
}

.main-nav > ul > li {
    position: relative;
    padding: 0 20px;
}

.main-nav > ul > li > a {
    display: block;
    line-height: var(--header-height);
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    position: relative;
}

.main-nav > ul > li > a::after {
    content: '';
    position: absolute;
    bottom: 25px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.main-nav > ul > li:hover > a::after {
    transform: scaleX(1);
}

/* Mega Menu Styles */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    background-color: var(--surface-color);
    box-shadow: var(--box-shadow);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, top 0.3s ease;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.main-nav > ul > li:hover .mega-menu {
    top: calc(100% - 10px);
    opacity: 1;
    visibility: visible;
}

.mega-menu-item h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.mega-menu-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}

.mega-menu-item a {
    display: block;
    padding: 0.5rem;
    border-radius: 4px;
    text-decoration: none;
}
.mega-menu-item a:hover {
    background-color: var(--background-color);
}

.nav-cta {
    margin-left: 20px;
}


/* --- 5. Main Content & Sections (공통 레이아웃) --- */
main {
    padding-top: var(--header-height); /* To offset fixed header */
}

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    margin-bottom: 1rem;
}

.section-title p {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- 6. Footer --- */
.main-footer {
    background-color: #333;
    color: var(--background-color);
    padding: 60px 0 30px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-col h4 {
    font-weight: 600;
    color: #fff;
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col ul li a {
    color: var(--text-secondary);
    text-decoration: none;
}

.footer-col ul li a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #444;
    font-size: 0.9rem;
    color: var(--text-secondary);
}


/* --- 7. Responsive Design (공통) --- */
@media (max-width: 992px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    
    .mega-menu {
        display: none;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    .section {
        padding: 60px 0;
    }

    .nav-container {
        padding: 0 16px;
    }

    .main-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: block; /* 나중에 JS로 제어할 모바일 메뉴 버튼 */
    }
}