/**
 * 온툴(OnTool) 공통 CSS
 *
 * 반응형 그리드, 버튼, 헤더/푸터, 카드 레이아웃 및 라이트 테마 디자인 시스템
 */

/* ==========================================================================
   1. Design System Tokens & Base Reset
   ========================================================================== */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --accent-color: #3b82f6;
    
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans KR", sans-serif;
    --font-mono: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    
    --transition: all 0.2s ease-in-out;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ==========================================================================
   2. Header & Navigation Layout
   ========================================================================== */
.site-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: 1.5rem;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--text-main);
    transition: var(--transition);
}

.site-logo .logo-icon {
    font-size: 1.5rem;
}

.site-logo .logo-sub {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 1.1rem;
}

.site-logo:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Search Box */
.header-search {
    flex: 1;
    max-width: 380px;
}

.header-search input {
    width: 100%;
    padding: 0.55rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-color);
    color: var(--text-main);
    font-size: 0.9rem;
    transition: var(--transition);
}

.header-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Navigation Links */
.site-nav ul {
    display: flex;
    list-style: none;
    gap: 1.25rem;
}

.site-nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

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

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--text-main);
    transition: var(--transition);
}

/* ==========================================================================
   3. Main Content & Layout
   ========================================================================== */
.site-main {
    flex: 1;
    padding-top: 2rem;
    padding-bottom: 3rem;
}

/* Page Headers / Intro Section */
.page-hero {
    text-align: center;
    margin-bottom: 2.5rem;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.page-hero h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.page-hero p {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 680px;
    margin: 0 auto;
}

/* ==========================================================================
   4. Landing Page Tool Cards Grid
   ========================================================================== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.tool-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.tool-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.tool-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background-color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.tool-card-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.tool-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
}

.tool-card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    flex: 1;
}

.tool-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* ==========================================================================
   5. Ad Block Placeholders (Google AdSense)
   ========================================================================== */
.ad-block {
    background-color: #f1f5f9;
    border: 1px dashed var(--border-hover);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
    margin: 2rem 0;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-block .ad-label {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ==========================================================================
   6. Buttons & Forms
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    gap: 0.5rem;
}

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

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

.btn-secondary {
    background-color: #ffffff;
    border-color: var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: var(--bg-color);
    border-color: var(--border-hover);
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
}

/* Static Content Pages Styling */
.page-content {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
}

.page-content h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-main);
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 0.3rem;
}

.page-content p {
    margin-bottom: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ==========================================================================
   7. Footer Styling
   ========================================================================== */
.site-footer {
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 0 2rem 0;
    margin-top: auto;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.footer-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

.footer-logo span {
    color: var(--primary-color);
}

.footer-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.footer-links ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    gap: 1.5rem;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-copyright {
    font-size: 0.85rem;
    color: var(--text-light);
    border-top: 1px solid var(--border-color);
    width: 100%;
    padding-top: 1.25rem;
    margin-top: 0.5rem;
}

/* ==========================================================================
   8. Responsive Mobile Breakpoints
   ========================================================================== */
@media (max-width: 768px) {
    .header-container {
        position: relative;
    }
    
    .header-search {
        max-width: 180px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background-color: #ffffff;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-md);
        padding: 1rem;
    }

    .site-nav.open {
        display: block;
    }

    .site-nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }

    .site-nav a {
        display: block;
        padding: 0.6rem 1rem;
    }
    
    .page-hero {
        padding: 1.5rem 0.75rem;
    }

    .page-hero h1 {
        font-size: 1.5rem;
    }
    
    .page-content {
        padding: 1.5rem;
    }
}
