@charset "utf-8";

/* =========================================
   Responsiveness - Desktop, Laptop, Tablet, Mobile
   ========================================= */

/* Laptop (max-width: 1440px) */
@media (max-width: 1440px) {
    :root {
        --container-width: 1200px;
        --header-height: 90px;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .product-grid {
        gap: 30px;
    }
}

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {

    /* ISO Page Tablet Adjustments */
    .icon-card {
        width: calc(33.333% - 20px);
    }

    .offer-card {
        width: 100%;
        border-radius: 0 16px 16px 0;
    }

    :root {
        --container-width: 100%;
        --header-height: 80px;
    }

    .container-custom {
        padding: 0 20px;
        width: 100% !important;
        max-width: 100% !important;
    }

    .section {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden;
    }

    /* GNB - Hidden on Tablet/Mobile */
    .gnb-list,
    .gnb-dropdown-wrapper,
    .lang-switch {
        display: none !important;
    }

    .mobile-menu-btn {
        display: block !important;
        font-size: 24px;
        /* Force black */
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1005;
        /* Ensure above header layer */
        position: relative;
    }

    /* Hero */
    .hero-section {
        height: 600px;
        padding: 10px;
    }

    .hero-title {
        font-size: 3rem;
    }

    /* Grid */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* Footer */
    .ft-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding-bottom: 10px;
        margin-bottom: 10px;
    }

    .ft-links {
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
    }

    .ft-links a {
        margin-right: 0;
    }
}

/* Mobile (max-width: 768px) */
/* Mobile (max-width: 768px) */
/* Mobile (max-width: 768px) */
@media (max-width: 768px) {

    /* ISO Page Mobile Adjustments */
    .iso-intro-section {
        flex-direction: column;
        text-align: center;
    }

    .iso-logo-box {
        width: 100%;
        flex: auto;
    }

    .icon-card {
        width: calc(50% - 15px);
    }

    .offer-card {
        flex-direction: column;
        border-left: none;
        border-top: 6px solid #00a8e1;
        border-radius: 0 0 16px 16px;
    }

    .offer-img {
        height: 200px;
    }

    .accreditation-certs {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    .accreditation-header {
        font-size: 18px;
    }

    /* ISO/IEC 17024 Page Mobile Adjustments */
    .cert-intro-section {
        flex-direction: column;
        text-align: center;
        margin: 30px auto;
        gap: 20px;
        padding: 0;
    }

    .cert-intro-content .main-title {
        font-size: 30px;
        margin-bottom: 15px;
    }

    .cert-intro-content .intro-text {
        font-size: 18px;
    }

    .cert-intro-logo {
        flex: auto;
        width: 100%;
    }

    .cert-banner {
        margin-bottom: 30px;
    }

    .cert-banner img.banner-img {
        width: 100%;
    }

    .cert-empower-section {
        padding: 40px 0;
        margin-bottom: 30px;
    }

    .empower-container h3 {
        font-size: 24px;
        margin-bottom: 30px;
    }

    .empower-grid {
        grid-template-columns: 1fr;
    }

    .industries-container {
        flex-direction: column;
        gap: 30px;
        align-items: center;
    }

    .recognition-col {
        flex: auto;
        width: 100%;
    }

    .iso-title-bar {
        flex-direction: column;
        text-align: center;
    }

    .industries-grid {
        grid-template-columns: 1fr;
    }

    :root {
        --header-height: 60px;
    }

    /* Global Reset for Mobile */
    body,
    html {
        overflow-x: hidden;
        width: 100%;
    }

    /* Header & GNB */
    #logo a {
        display: block;
        height: 40px;
        /* Container height */
        line-height: 40px;
    }

    #logo img {
        height: 100%;
        /* Fit to container */
        width: auto;
        /* Maintain aspect ratio */
        max-width: 150px;
        /* Absolute max width */
        object-fit: contain;
    }

    .header-util {
        gap: 10px
    }

    .member-links {
        display: flex;
        gap: 5px;
        align-items: center;
    }

    #hd.scrolled,
    #hd:hover {
        height: 60px;
    }

    .mobile-menu-btn {
        font-size: 24px;
        margin-bottom: 5px;
    }

    /* Hero */
    .hero-section {
        height: auto;
        /* Allow content to dictate height if needed */
        min-height: 600px;
        /* Minimum height */
        padding: 0;
        display: flex;
        /* Centering helper */
        align-items: center;
    }

    .hero-slider,
    .hero-slide {
        height: 100%;
        min-height: 600px;
        border-radius: 0;
    }

    .hero-bg {
        height: 100%;
        background-position: center;
    }

    .hero-content {
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 100%;
        max-width: 100%;
        padding: 0 20px;
        text-align: center;
        position: absolute;
        /* Ensure it floats over */
    }

    .hero-title {
        font-size: 1.5rem;
        /* Smaller title */
        line-height: 1.3;
        margin-bottom: 25px;
        word-break: keep-all;
        /* Prevent awkward breaks in Korean */
    }

    .hero-desc {
        font-size: 0.875rem;
        margin-bottom: 25px;
        opacity: 0.9;
        word-break: keep-all;
        line-height: 1.2;
    }

    .hero-desc br {
        display: none;
    }

    .btn-hero {
        margin: 0 auto;
        padding: 5px 20px;
        font-size: 14px;
    }

    .slider-controls {
        bottom: 50px;
        gap: 20px;
    }

    .prev-btn,
    .next-btn {
        width: 35px;
        height: 35px;
    }

    .slide-counter {
        font-size: 16px;
    }

    .current-slide {
        font-size: 18px;
    }

    .progress-bar {
        width: 120px;
    }

    .section-header {
        text-align: center;
        margin-bottom: 50px;
    }

    .qi-container {
        flex-direction: column;
    }

    .qi-left {
        width: 100%;
        padding-right: 0;
        margin-bottom: 40px;
        text-align: center;
    }

    .qi-slogan-desc br {
        display: none;
    }

    .qi-right {
        width: 100%;
        max-width: 500px;
    }

    .qi-slogan-title {
        font-size: 28px;
        word-break: auto-phrase;
    }

    .qi-slogan-desc {
        font-size: 14px;
        word-break: auto-phrase;
    }

    .section-title {
        font-size: 1.7rem;
        font-weight: 700;
        color: var(--color-dark);
        margin-bottom: 15px;
        letter-spacing: -0.5px;
    }

    .section-desc {
        font-size: 1rem;
        color: var(--color-gray);
    }

    /* Grid */
    .sub-content {
        padding-bottom: 80px;
    }

    .section {
        padding: 40px 0;
        width: 100% !important;
        max-width: 100% !important;
    }

    .page-title-in-content {
        margin-top: 30px;
        font-size: 1.5rem;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-img {
        height: 240px;
    }

    /* Philosophy */
    .philosophy-section {
        height: 300px;
    }

    .philosophy-text {
        font-size: 1.2rem;
        padding: 0 20px;
        line-height: 1.6;
    }

    /* Footer */
    .ft-info {
        font-size: 12px;
    }

    .ft-info.mb {
        display: block;
        text-align: left;
    }

    .ft-info.pc {
        display: none
    }

    /* Quick Menu - Fix Overlap */
    .quick-menu {
        bottom: 0;
        right: 0;
        top: auto;
        transform: none;
        flex-direction: row;
        width: 100%;
        z-index: 995;
    }

    .quick-btn {
        width: 100%;
        height: 50px;
        border-bottom: none;
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 10px;
        background: rgba(26, 26, 26, 0.95);
    }

    .quick-btn i {
        font-size: 16px;
        margin-bottom: 2px;
    }

    #top_btn {
        bottom: 70px;
        right: 20px;
    }

    #ft {
        padding: 20px 0 60px;
    }
}

/* Mobile Menu Drawer - Common for Tablet/Mobile */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-drawer {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: var(--color-white);
    z-index: 99999;
    transition: right 0.3s ease;
    padding: 20px;
    overflow-y: auto;
}

.mobile-menu-drawer.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}

.mobile-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--color-dark);
}

.mobile-gnb>li {
    border-bottom: 1px solid var(--color-border);
}

.mobile-gnb>li>a {
    display: block;
    padding: 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-dark);
    display: flex;
    justify-content: space-between;
}

.mobile-gnb .sub-menu {
    display: none;
    background: var(--color-light-gray);
    padding: 10px 15px;
    margin-bottom: 10px;
}

.mobile-gnb .sub-menu li a {
    display: block;
    padding: 8px 0;
    font-size: 14px;
    color: var(--color-gray);
    position: relative;
    display: flex;
    justify-content: space-between;
}

/* 3rd Level for Mobile */
.mobile-gnb .sub-menu .sub-menu {
    background: #eeeeee;
    /* Darker gray for differentiation */
    padding-left: 15px;
    margin-top: 5px;
}

.mobile-gnb .sub-menu .sub-menu li a {
    font-size: 13px;
    color: #555;
}

.mobile-gnb>li.open .sub-menu {
    display: block;
}

/* ISO/IEC 17024 Details Page Mobile Adjustments (max 991) */
@media (max-width: 991px) {
    .iqpa-top-grid {
        grid-template-columns: 1fr;
    }

    .iqpa-area-grid {
        grid-template-columns: 1fr;
    }

    .iqpa-area-grid .col-img {
        padding-top: 60%;
    }

    /* Final CTA Mobile */
    .iqpa-final-section {
        justify-content: center;
        background-position: center left;
        border-radius: 8px;
        min-height: auto;
    }

    .iqpa-final-overlay {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        background-color: rgba(255, 255, 255, 0.9);
        padding: 40px 20px;
    }

    .iqpa-final-overlay h2 {
        font-size: 20px;
    }

    .iqpa-final-overlay h2 br {
        display: none;
    }

    .iqpa-final-overlay p.highlight,
    .iqpa-final-overlay p.sub-text {
        font-size: 18px;
    }

    /* Cybersecurity Page Mobile Adjustments */
    .cyber-intro-section {
        flex-direction: column;
        padding: 30px 20px;
        gap: 30px;
    }

    .cyber-intro-text {
        text-align: center;
    }

    .cyber-main-title {
        font-size: 28px;
    }

    .cyber-intro-text p {
        font-size: 16px;
    }

    .cyber-intro-img {
        flex: auto;
        width: 100%;
    }

    .cyber-vv-section {
        flex-direction: column;
        gap: 20px;
    }

    .cyber-card {
        padding: 30px 20px;
    }

    .cyber-card-title {
        font-size: 22px;
    }

    /* Auditor Page Mobile Adjustments */
    .process-headline {
        font-size: 28px;
        padding: 20px;
    }

    .process-grid {
        grid-template-columns: 1fr;
    }

    .standards-table-wrap {
        flex-direction: column;
        gap: 20px;
    }

    .process-card .card-img {
        height: 200px;
    }

    .standards-table td {
        font-size: 13px;
        padding: 10px;
    }

    .standards-table td:nth-child(2) {
        width: 120px;
    }

    .qualification-cert p {
        font-size: 18px;
    }

    /* Inquiry Search Page Mobile */
    .search-header h2 {
        font-size: 20px;
    }

    .search-td {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .search-select {
        width: 100%;
    }

    .search-th {
        width: 30%;
        font-size: 15px;
    }
}