/* =========================================================
   BASE
========================================================= */

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body.domain-body {
    background: #f6f8fb;
    color: #1f2937;
    font-family: "Noto Sans KR", sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    opacity: .85;
}

img {
    max-width: 100%;
    height: auto;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
}


/* =========================================================
   COMMON
========================================================= */

.container,
.container-fluid {
    box-sizing: border-box;
}

.btn {
    white-space: nowrap;
}

.form-control,
.form-select {
    min-height: 44px;
}

.table {
    font-size: .95rem;
}


/* =========================================================
   HEADER
========================================================= */

.domain-header {
    background: #ffffff;
    padding: 6px 0;
    margin-bottom: 0;
    border-bottom: none;
    box-shadow: none;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 22px;
    flex-shrink: 0;
}

.brand-name {
    font-size: 25px;
    font-weight: 900;
    line-height: 1.1;
}

.brand-sub {
    font-size: 13px;
    color: #6b7280;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}


/* =========================================================
   SEARCH
========================================================= */

.domain-search,
.bodySearch {
    background: #ffffff;
    padding: 0;
    margin: 0;
    border: none;
    box-shadow: none;
}

.bodySearch .navbar {
    padding: 0 !important;
    margin: 0 !important;
    min-height: auto;
}

.bodySearch form {
    margin: 0 !important;
}

.search-form {
    display: grid;
    grid-template-columns: 170px 1fr 110px;
    gap: 10px;
}

#qInput,
#categoryDropdown .dropdown-toggle,
.bodySearch .btn-primary,
.domain-search .btn-primary {
    height: 46px;
}


/* =========================================================
   NAV
========================================================= */

.domain-nav {
    background: #111827;
}

.nav-scroll {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    white-space: nowrap;
}

.nav-link-item {
    color: #e5e7eb;
    padding: 14px 18px;
    font-weight: 700;
    font-size: 15px;
}

.nav-link-item:hover,
.nav-link-item.active {
    background: #2563eb;
    color: #ffffff;
    opacity: 1;
}


/* =========================================================
   HERO / SECTION COMMON
========================================================= */

.hero {
    padding: 70px 0;
    text-align: center;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 900;
    line-height: 1.35;
}

.hero p {
    max-width: 760px;
    margin: 20px auto 0;
    font-size: 1.1rem;
    color: #4b5563;
}

.hero-buttons {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.section {
    padding: 60px 0;
    background: #ffffff;
}

.soft-section {
    background: #f6f8fb;
}

.domain-card {
    height: 100%;
    background: #ffffff;
    border-radius: 22px;
    border: 1px solid #cbd5e1;
    padding: 28px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.04);
}

.domain-card h4 {
    font-weight: 900;
    margin-bottom: 12px;
}

.domain-card p {
    color: #4b5563;
    margin-bottom: 0;
}


/* =========================================================
   BACKGROUND THEME
========================================================= */

.hancot-bg {
    background: linear-gradient(180deg, #eff6ff, #ffffff);
}

.sectorhub-bg {
    background: linear-gradient(180deg, #ecfdf5, #ffffff);
}

.sectorai-bg {
    background: linear-gradient(180deg, #f5f3ff, #ffffff);
}

.deviceact-bg {
    background: linear-gradient(180deg, #ecfeff, #ffffff);
}


/* =========================================================
   COLOR THEME
========================================================= */

.hancot { color: #2563eb; }
.sectorhub { color: #16a34a; }
.sectorai { color: #7c3aed; }
.deviceact { color: #0f766e; }

.brand-logo.hancot { background: #2563eb; }
.brand-logo.sectorhub { background: #16a34a; }
.brand-logo.sectorai { background: #7c3aed; }
.brand-logo.deviceact { background: #0f766e; }

/* 로고 원 안 글자는 항상 흰색 */
.brand-logo,
.brand-logo.hancot,
.brand-logo.sectorhub,
.brand-logo.sectorai,
.brand-logo.deviceact {
    color: #ffffff;
}

.brand-logo span {
    color: #ffffff;
}

/* =========================================================
   FOOTER
========================================================= */

.domain-footer {
    background: #111827;
    color: #f9fafb;
    padding: 38px 0 24px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr 1.2fr;
    gap: 30px;
    align-items: start;
}

.footer-bottom {
    border-top: 1px solid #374151;
    margin-top: 28px;
    padding-top: 18px;
    text-align: center;
    color: #9ca3af;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 992px) {

    html {
        font-size: 15px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


@media (max-width: 768px) {

    html {
        font-size: 14px;
    }

    .container,
    .container-fluid {
        padding-left: 12px;
        padding-right: 12px;
    }

    .header-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .brand-box {
        justify-content: center;
    }

    .brand-logo {
        width: 40px;
        height: 40px;
        font-size: 19px;
    }

    .brand-name {
        font-size: 21px;
    }

    .brand-sub {
        font-size: 12px;
    }

    .header-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .search-form {
        grid-template-columns: 1fr;
    }

    #categoryDropdown,
    #categoryDropdown .dropdown-toggle,
    .domain-search .btn-primary,
    .bodySearch .btn-primary {
        width: 100%;
    }

    #qInput,
    #categoryDropdown .dropdown-toggle,
    .bodySearch .btn-primary,
    .domain-search .btn-primary {
        height: 50px;
    }

    .nav-link-item {
        padding: 11px 14px;
        font-size: 14px;
    }

    .hero {
        padding: 52px 0;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .section {
        padding: 42px 0;
    }

    .domain-card {
        padding: 22px;
        border-radius: 18px;
    }

    .btn {
        font-size: .85rem;
        padding: .375rem .75rem;
    }

    .btn-sm {
        font-size: .75rem;
    }

    .table {
        font-size: .82rem;
    }

    .table th,
    .table td {
        padding: .45rem;
    }
}


@media (max-width: 576px) {

    html {
        font-size: 13px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .domain-footer {
        padding: 30px 0 20px;
    }
}