/* Web Match Platform - Tech Pro Theme (Restored & Fixed) */
:root {
    --primary-blue: #3B82F6;
    /* Tech Blue */
    --primary-dark: #1E40AF;
    --navy-bg: #0F172A;
    /* Deep Header */
    --border-color: #E2E8F0;
    --text-main: #111827;
    /* Dark Gray for better readability */
    --text-sub: #64748B;
    --bg-light: #F8FAFC;
    --accent-green: #10B981;
    /* Success/Safe */
}

/* Base Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    font-size: 0.95rem;
    /* 15.2px */
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: -0.02em;
}

h1,
h2,
h3,
h4,
h5 {
    color: var(--text-main);
    line-height: 1.4;
    letter-spacing: -0.02em;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 2.25rem;
    font-weight: 700;
}

/* 36px */
h2 {
    font-size: 1.75rem;
    font-weight: 700;
}

/* 28px */
h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

/* 24px */
h4 {
    font-size: 1.25rem;
    font-weight: 600;
}

/* 20px */
h5 {
    font-size: 1.0rem;
    font-weight: 600;
}

/* 16px */

small {
    font-size: 0.8rem;
    /* 13px */
    font-weight: 400;
}

/* Ensure main content expands if needed (optional, but footer auto margin handles it) */
/* a, ul links removed from here to keep diff clean, assuming they exist below */

/* Global Link Reset */
a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

ul {
    list-style: none;
}

/* 1. Header (Deep Blue Tech Style) */
.wm-header {
    background-color: var(--navy-bg);
    color: white;
    height: 70px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 999;
}

.header-inner {
    max-width: 98%;
    margin: 0 auto;
    width: 100%;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    /* For Absolute Centering */
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: -0.5px;
    z-index: 10;
}

.logo span {
    color: white;
}

/* Centered Navigation */
.gnb {
    display: flex;
    gap: 40px;
    font-weight: 500;
    font-size: 1rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.gnb a {
    opacity: 0.8;
    transition: 0.3s;
    white-space: nowrap;
}

.gnb a:hover {
    opacity: 1;
    color: var(--primary-blue);
}

/* Right Aligned Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    /* Spacing between Login and Request Button */
    z-index: 10;
}

.auth-btn {
    background: var(--primary-blue);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Mobile Menu Elements */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--navy-bg);
    padding: 20px;
    z-index: 1000;
}

.mobile-menu.active {
    display: block;
}

.mobile-gnb {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;
    margin-top: 20px;
}

.mobile-gnb a {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 10px;
}

.mobile-cta {
    background: var(--primary-blue);
    border-radius: 8px;
}

/* Hero Section */
.wm-hero {
    background: linear-gradient(180deg, var(--navy-bg) 0%, #1E293B 100%);
    padding: 60px 20px;
    text-align: center;
    position: relative;
    /* Container for stars */
    overflow: hidden;
    /* Clip stars */
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 500px;
}

/* Star Effect */
.bg-star {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0;
    animation: twinkle ease-in-out infinite;
    pointer-events: none;
    /* Let clicks pass through */
    z-index: 1;
}

@keyframes twinkle {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.2);
    }

    100% {
        opacity: 0;
        transform: scale(0.5);
    }
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
    position: relative;
    z-index: 2;
    color: #FFFFFF;
    /* Force white for dark background */
    /* Content above stars */
}

.hero-sub {
    font-size: 1.2rem;
    color: #CBD5E1;
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
}

.search-box {
    position: relative;
    z-index: 10;
    /* Ensure interaction */
}

.search-input {
    flex: 1;
    border: none;
    padding: 16px;
    font-size: 1.1rem;
    outline: none;
}

.search-submit {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 0 32px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
}

/* 3. Ticker (Live Status) */
.live-ticker {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    font-size: 0.9rem;
    color: var(--text-sub);
}

.ticker-inner {
    max-width: 98%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.badge-live {
    background: #fee2e2;
    color: #ef4444;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.75rem;
}

/* 4. Grid System */
.container {
    max-width: 98%;
    margin: 0 auto;
    padding: 60px 20px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-main);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.project-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    transition: 0.2s;
    /* Ensure cards don't overflow */
    max-width: 100%;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-color: var(--primary-blue);
}

.cat-badge {
    font-size: 0.8rem;
    background: #EFF6FF;
    color: var(--primary-blue);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 12px 0 8px;
}

.card-budget {
    font-weight: 700;
    color: var(--text-main);
}

.card-meta {
    font-size: 0.9rem;
    color: #94A3B8;
    margin-top: 16px;
    border-top: 1px solid #F1F5F9;
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
}

/* Footer */
.wm-footer {
    background-color: var(--navy-bg);
    color: #94A3B8;
    padding: 60px 0 40px;
    /* Added bottom padding */
    font-size: 0.95rem;
    width: 100vw;
    margin-top: 100px;
    /* Default space between content and footer */
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.footer-inner {
    max-width: 98%;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 15px;
}

.footer-logo span {
    color: white;
}

.footer-desc {
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 20px;
    font-weight: 700;
    font-size: 1.1rem;
}

.footer-col ul li {
    margin-bottom: 10px;
}

/* Footer Links */
.footer-col ul li a {
    color: #CBD5E1;
    /* Light Grey (User asked for white-ish) */
    text-decoration: none;
    transition: 0.2s;
}

.footer-col ul li a:hover {
    color: white;
    text-decoration: underline;
}

.footer-social {
    display: flex;
    gap: 15px;
    font-size: 1.2rem;
}

.footer-social a {
    color: #CBD5E1;
}

.footer-social a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    padding-top: 20px;
    font-size: 0.85rem;
}

.footer-bottom p {
    margin: 0;
    /* Prevent extra space */
}


/* Slider System */
.slider-wrapper {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 10px 0 20px;
    /* Space for shadow */
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slide-item {
    flex: 0 0 100%;
    padding: 0 10px;
}

@media (min-width: 768px) {
    .slide-item {
        flex: 0 0 50%;
    }
}

@media (min-width: 1024px) {
    .slide-item {
        flex: 0 0 33.333%;
    }
}

/* 1920px -> 4 Columns */
@media (min-width: 1600px) {
    .slide-item {
        flex: 0 0 25%;
    }
}

.slider-controls button {
    background: white;
    border: 1px solid var(--border-color);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-main);
    transition: 0.2s;
}

.slider-controls button:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

/* Scroll Top Button */
#scrollTopBtn {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #111;
    color: white;
    border: none;
    cursor: pointer;
    z-index: 1000;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    transition: 0.3s;
}

#scrollTopBtn:hover {
    background-color: var(--primary-blue);
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .wm-header {
        height: auto;
        padding: 0;
        min-height: 70px;
    }

    .header-inner {
        padding: 0 20px;
    }

    /* Hide Desktop Nav */
    .gnb.desktop-only,
    .header-actions.desktop-only {
        display: none !important;
    }

    /* Show Mobile Menu Button */
    .mobile-menu-btn {
        display: block;
    }

    /* Hero */
    .wm-hero {
        padding: 30px 20px 40px !important;
        /* Reduced padding */
        min-height: auto;
    }

    .hero-title {
        font-size: 1.6rem !important;
        word-break: keep-all;
        margin-bottom: 10px !important;
    }

    .hero-sub {
        font-size: 0.95rem;
        margin-bottom: 20px !important;
    }

    /* Hero Text Switching (Global) */
    .desktop-msg {
        display: none !important;
    }

    .mobile-msg {
        display: inline-block !important;
        font-size: 0.95rem;
        color: #CBD5E1;
    }

    /* Force Search Box Single Line on Mobile */
    .search-box {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        padding: 5px !important;
        height: 60px !important;
        /* Increased height */
        align-items: center !important;
        margin: 30px auto !important;
        /* Vertical spacing */
    }

    .search-input {
        flex: 1 !important;
        width: auto !important;
        min-width: 0 !important;
        /* Allow shrinking */
        margin-bottom: 0 !important;
        font-size: 14px !important;
        /* Fix font size to prevent iOS zoom while fitting */
        height: 100% !important;
        /* Match container */
        padding-left: 15px !important;
    }

    .search-submit {
        width: auto !important;
        padding: 0 15px !important;
        height: 100% !important;
        /* Match container */
        font-size: 0.95rem !important;
        white-space: nowrap !important;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px !important;
    }

    /* Typography adjustments for mobile */
    h1 {
        font-size: 1.75rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    /* Trust Data Mobile */
    .hero-trust-data {
        gap: 6px !important;
        margin-bottom: 20px !important;
        flex-wrap: nowrap !important;
        justify-content: center;
    }

    .trust-item {
        font-size: 0.75rem !important;
        padding: 5px 10px !important;
        white-space: nowrap;
        border-radius: 15px !important;
    }

    /* Request Form */
    .container {
        padding: 30px 20px;
    }

    form {
        padding: 20px !important;
    }

    /* Request Page Hero Slider */
    .request-hero-slider .hero-slider-track {
        display: flex;
        width: 100%;
        height: 100%;
        transition: transform 0.8s ease-in-out;
    }

    .request-hero-slider .hero-slide {
        flex: 0 0 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .request-hero-slider .dot {
        width: 10px;
        height: 10px;
        background: white;
        border-radius: 50%;
        opacity: 0.3;
        transition: 0.3s;
    }

    /* Prevents iOS zoom on focus */
    input,
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* 
=============================================
   5. Dashboard Styles (Unified)
============================================= 
*/

.dashboard-header {
    background: #0F172A;
    /* Dark Navy default */
    color: white;
    height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0;
    margin-bottom: 0;
    text-align: center;
}

.dashboard-header h2 {
    color: white !important;
}

/* Client Dashboard Header Specifics (Optional Override) */
.dashboard-client-header {
    background: #1E293B;
    /* Slate */
}

.stats-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    text-align: center;
    height: 100%;
    border: 1px solid #E2E8F0;
    transition: transform 0.2s;
}

.stats-card:hover {
    transform: translateY(-5px);
}

.stats-val {
    font-size: 2rem;
    font-weight: 800;
    color: #0F172A;
}

.stats-label {
    color: #64748B;
    font-size: 0.9rem;
    font-weight: 600;
}

.content-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #E2E8F0;
    overflow: hidden;
    margin-bottom: 30px;
    height: 100%;
    /* For full height columns */
}

.card-header-custom {
    padding: 20px 25px;
    border-bottom: 1px solid #F1F5F9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.table-hover tbody tr:hover {
    background-color: #F8FAFC;
}

.rec-list .rec-item {
    padding: 20px;
    border-bottom: 1px solid #F1F5F9;
    transition: background 0.2s;
}

.rec-list .rec-item:hover {
    background: #F8FAFC;
}

.rec-list .rec-item:last-child {
    border-bottom: none;
}