/* 
  SAVEZON Design System
  Version: 1.0
*/

/* Import Fonts: Pretendard (OFL) */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css");

:root {
    /* 0.1 Typography */
    --font-main: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;

    /* 1. Color Palette */
    --color-primary-bg: #FFFFFF;
    /* Pure White - Main Background */
    --color-secondary-bg: #F8F9FA;
    /* Light Gray - Section Background */
    --color-accent: #0056b3;
    /* Corporate Blue - Buttons/Links */
    --color-accent-hover: #004494;
    /* Darker Blue - Hover State */
    --color-text-main: #333333;
    /* Dark Charcoal - Main Text */
    --color-text-muted: #666666;
    /* Light Gray - Sub Text */
    --color-border: #dee2e6;
    /* Border Color */

    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 100px;
    /* Increased height */
    --border-radius: 8px;
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-primary-bg);
    color: var(--color-text-main);
    font-size: 16px;
    line-height: 1.6;
    word-break: keep-all;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul,
li {
    list-style: none;
}

/* Utility Classes */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.text-accent {
    color: var(--color-accent);
}

.text-center {
    text-align: center;
}

.d-flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--color-accent);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
}

.btn-outline:hover {
    background-color: var(--color-accent);
    color: white;
}

/* --- Admin UI Elements --- */
/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

.status-pending {
    background: #fff3bf;
    color: #f08c00;
}

.status-completed {
    background: #d3f9d8;
    color: #2b8a3e;
}

/* Button Badges */
.btn-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-badge:hover {
    opacity: 0.8;
}

.btn-delete {
    background: #ffe3e3;
    color: #e03131;
}

.btn-header {
    background: #ffffff;
    color: #333;
    margin-left: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.data-table th,
.data-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.data-table tbody tr:hover {
    background-color: #e9ecef;
    transition: background-color 0.2s;
}

/* --- Global Header Styles --- */
.main-header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    height: var(--header-height);
    display: flex;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    /* Added shadow for better separation */
}

/* Larger Layout for Logo */
.logo {
    display: block;
    line-height: 0;
}

.logo img {
    height: 70px !important;
    /* Force larger size */
    width: auto;
    transition: transform 0.3s;
}

.logo:hover img {
    transform: scale(1.05);
}

/* Header Actions (Quote Button) - Converted to Text Link Style */
.header-actions .btn {
    background-color: transparent;
    border: none;
    color: #444;
    /* Match GNB color */
    padding: 10px 0;
    /* Match GNB spacing */
    font-size: 18px;
    /* Match GNB size */
    font-weight: 700;
    /* Match GNB weight */
}

.header-actions .btn:hover {
    background-color: transparent;
    color: var(--color-accent);
    transform: none;
    /* Remove button visual effect */
}

/* Enhanced Navigation */
.gnb ul {
    gap: 50px;
    /* More spacing */
}

.gnb a {
    font-weight: 700;
    /* Bolder text */
    font-size: 18px;
    /* Larger font */
    color: #444;
    padding: 10px 0;
    position: relative;
}

.gnb a:hover,
.gnb a.active {
    color: var(--color-accent);
}

.gnb a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--color-accent);
    border-radius: 2px;
}

/* --- Hero Banner --- */
.hero-banner {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: white;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.3;
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
    line-height: 1.6;
}

/* Hero Section Buttons (High Contrast) */
.hero-btns .btn-primary {
    background-color: white;
    color: var(--color-accent);
    font-weight: 800;
    /* Extra bold */
}

.hero-btns .btn-primary:hover {
    background-color: #f1f3f5;
    color: var(--color-accent-hover);
    transform: translateY(-2px);
}

.hero-btns .btn-outline {
    border: 2px solid white;
    /* Thicker border */
    color: white;
    font-weight: 700;
}

.hero-btns .btn-outline:hover {
    background-color: white;
    color: var(--color-accent);
}

/* --- Trust Signals --- */
.trust-signals {
    background-color: #f8f9fa;
    padding: 30px 0;
    border-bottom: 1px solid #eee;
}

.trust-logo {
    font-weight: 700;
    color: #bbb;
    font-size: 20px;
    text-transform: uppercase;
}

/* --- Components --- */
.section-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 60px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--color-accent);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    border: 1px solid #eee;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--color-accent);
}

.card-icon {
    font-size: 50px;
    margin-bottom: 20px;
}

.card-title {
    font-size: 22px;
    margin-bottom: 15px;
    font-weight: 700;
}

.card-desc {
    color: #666;
    line-height: 1.6;
}

/* --- Footer --- */
.main-footer {
    background-color: #222;
    color: #999;
    padding: 60px 0 40px;
    font-size: 14px;
}

.footer-top {
    border-bottom: 1px solid #333;
    padding-bottom: 30px;
    margin-bottom: 30px;
}

.footer-links a {
    color: #ddd;
    margin-right: 20px;
}

/* --- Responsive Design (Mobile) --- */
@media (max-width: 768px) {

    /* Layout & Typography */
    :root {
        --header-height: 70px;
        /* Smaller header */
    }

    .container {
        padding: 0 20px;
        width: 100%;
        max-width: 100%;
    }

    /* Typography Scaling */
    h1,
    .hero-title {
        font-size: 28px !important;
    }

    h2,
    .section-title {
        font-size: 24px !important;
        margin-bottom: 30px !important;
    }

    h3,
    .card-title {
        font-size: 20px !important;
    }

    p,
    .card-desc {
        font-size: 15px !important;
    }

    /* Header & Navigation */
    .main-header {
        height: var(--header-height);
        padding: 0;
    }

    .main-header .container {
        display: flex !important;
        /* Force flex */
        flex-direction: row;
        /* Keep logo and menu button in row */
        justify-content: space-between;
        align-items: center;
        height: 100%;
    }

    .logo img {
        height: 55px !important;
        /* Larger logo for mobile */
    }

    /* Hide Desktop GNB */
    .gnb {
        display: none;
    }

    /* Show Mobile Menu Button */
    .mobile-menu-btn {
        display: block !important;
        font-size: 30px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
        color: #333;
        position: relative;
        z-index: 3000;
        /* Ensure it stays on top of everything */
    }

    /* Mobile Drawer Menu */
    .mobile-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: white;
        transform: translateX(100%);
        /* Hidden by default */
        transition: transform 0.3s ease-in-out;
        z-index: 2000;
        /* High z-index to ensure visibility */
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        display: flex;
        /* Flex to center items if needed */
        flex-direction: column;
    }

    .mobile-nav.active {
        transform: translateX(0) !important;
        /* Force visible */
    }

    .mobile-nav li {
        margin-bottom: 20px;
        border-bottom: 1px solid #eee;
        padding-bottom: 10px;
    }

    .mobile-nav a {
        font-size: 20px;
        font-weight: 700;
        display: block;
        color: #333;
    }

    /* Hero Banner */
    .hero-banner {
        height: auto !important;
        /* Dynamic height */
        min-height: 500px;
        /* Minimum height */
        padding: 80px 0 40px;
        /* Spacing */
        text-align: center;
    }

    .hero-bg {
        height: 100%;
        /* Cover full area */
    }

    .hero-btns {
        display: flex;
        flex-direction: column;
        gap: 15px;
        padding: 0 10%;
    }

    /* Grids & Cards */
    .grid-3,
    .d-flex.justify-between {
        display: flex !important;
        flex-direction: column;
        gap: 20px !important;
    }

    /* Fix flex direction for specific areas to keep order if needed, or just stack */

    .card {
        padding: 25px !important;
        /* Reduce padding */
        margin-bottom: 0;
    }

    .main-footer {
        padding: 40px 0;
        text-align: center;
    }

    .footer-top {
        flex-direction: column;
        gap: 20px;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    /* Tables (Horizontal Scroll) */
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        /* Smooth scroll on iOS */
        margin-bottom: 20px;
    }

    .data-table {
        min-width: 600px;
        /* Ensure table doesn't squash too much */
    }

    /* Chat Widget (Mobile) */
    /* Chat Widget (Mobile) */
    #chat-window {
        position: fixed !important;
        /* Break out of the widget container */
        width: 90vw !important;
        /* 90% of Viewport Width */
        height: 60vh !important;
        /* 60% of Viewport Height */
        bottom: 100px !important;
        /* Above toggle button */
        left: 50% !important;
        /* Center horizontally */
        transform: translateX(-50%) !important;
        /* Center alignment */
        right: auto !important;
        /* Reset right positioning */
    }

    #chat-widget {
        bottom: 20px !important;
        right: 20px !important;
    }
}

/* Base Styles for Mobile Elements (Hidden on Desktop) */
/* --- Desktop Specific Tweaks --- */
@media (min-width: 769px) {
    .main-header .container {
        justify-content: flex-start !important;
        /* Left align Logo and Nav */
        gap: 60px;
        /* Space between Logo and First Menu Item */
    }

    /* Hide Mobile Elements on Desktop */
    .mobile-menu-btn,
    .mobile-nav {
        display: none !important;
    }
}