/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700;900&family=Inter:wght@300;400;600;700;800&display=swap');

/* Reset & Variables */
:root {
    /* Core Colors */
    --primary-navy: #151515;
    --brand-navy: #041E42;
    --primary-blue: #0066FF;
    --brand-black: #111111;

    /* Semantics */
    --primary-dark: var(--brand-black);
    --secondary-teal: #00Bfa5;
    --primary-emerald: #34d399;

    --gray-50: #F7F8F9;
    --gray-100: #F0F4F8;
    --gray-200: #DEE2E6;
    --gray-400: #ADB5BD;
    --gray-600: #6C757D;
    --gray-700: #495057;
    --gray-800: #343A40;

    --text-dark: var(--brand-black);
    --text-light: var(--gray-600);
    --text-white: #FFFFFF;

    --header-height: 80px;
    --container-width: 1240px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    max-width: 100%;
    scroll-padding-top: var(--header-height);
    /* Fix anchor scroll position */
    scroll-behavior: smooth;
    /* Smooth scrolling for anchors */
}

body {
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    color: var(--text-dark);
    background: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100%;
    padding-top: var(--header-height);
    letter-spacing: -0.02em;
    word-break: keep-all;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

.container {
    max-width: var(--container-width);
    width: 100%;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

/* Overflow Protection */
section {
    max-width: 100%;
    overflow-x: hidden;
}

/* Utilities */
.bg-navy {
    background-color: var(--brand-navy);
    color: white;
}

.bg-navy .main-title,
.bg-navy .description,
.bg-navy .sub-title {
    color: white !important;
}

.bg-light {
    background-color: var(--gray-50);
}

.bg-white {
    background-color: #fff;
}

/* Common Section Layouts */
section {
    padding: 8rem 0;
}



.description {
    font-size: 1.25rem;
    color: var(--gray-600);
    line-height: 1.7;
}

/* Section Header Typography */
.sub-title {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.main-title {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.2rem;
    color: var(--brand-black);
    letter-spacing: -0.01em;
}

.section-header {
    margin-bottom: 4rem;
}

/* Hero Button Styles */
.hero-actions {
    display: flex;
    gap: 1.5rem;
    /* 버튼 간격 증가 */
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        /* 모바일에서 세로 배치 시 간격 */
    }

    .hero-actions a {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
}

/* =========================================
   Header Styles
   ========================================= */

/* 1. Base Layout */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary-blue);
    letter-spacing: -0.5px;
}

/* 2. Main Navigation */
.main-links {
    display: flex;
    gap: 3.5rem;
}

.main-links>li {
    position: relative;
    padding: 1rem 0;
}

.main-links>li>a {
    font-weight: 500;
    font-size: 1rem;
    color: var(--gray-700);
    position: relative;
    padding: 0.5rem 0;
}

.main-links>li>a:hover,
.main-links>li>a.active {
    color: var(--primary-blue);
}

.main-links>li>a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-blue);
    transition: width 0.3s;
}

.main-links>li:hover>a::after,
.main-links>li>a.active::after {
    width: 100%;
}

/* 3. Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: white;
    min-width: 180px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1001;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu li {
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 0.8rem 1.5rem;
    font-size: 0.95rem;
    color: var(--gray-600);
    transition: all 0.2s;
    white-space: nowrap;
}

.dropdown-menu li a:hover {
    color: var(--primary-blue);
    background: var(--gray-50);
}

/* 4. Utilities (Language, Search, etc) */
.nav-utilities {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Added class to replace inline style */
.lang-wrapper {
    position: relative;
}

.lang-btn,
.search-btn {
    font-weight: 600;
    color: var(--gray-600);
    padding: 0.5rem;
    transition: color 0.2s;
}

.lang-btn:hover,
.search-btn:hover {
    color: var(--primary-blue);
}

.inquiry-btn {
    background: var(--brand-navy);
    color: white;
    padding: 0.6rem 1.8rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    box-shadow: none;
    border: 1px solid var(--brand-navy);
}

.inquiry-btn:hover {
    background: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 82, 204, 0.3);
}

/* 5. Mobile Toggle */
.mobile-menu-btn {
    display: none;
    /* Hidden on desktop */
}

/* =========================================
   Footer Styles
   ========================================= */
footer {
    background: #151515;
    color: #e0e0e0;
    font-size: 0.85rem;
    padding: 0;
    margin-top: auto;
    border-top: none;
}

/* 1. Sitemap Area */
.footer-sitemap-area {
    padding: 3rem 0;
    border-bottom: 1px solid #2a2a2a;
}

.footer-links-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 3rem;
    align-items: start;
    margin-bottom: 3rem;
    justify-content: flex-start;
}

.link-col {
    width: auto !important;
}

.link-col h4 {
    color: white;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
}

.link-col a {
    display: block;
    color: #999;
    margin-bottom: 0.6rem;
    transition: color 0.2s;
    font-size: 0.85rem;
    text-decoration: none;
}

.link-col a:hover {
    color: var(--primary-blue);
    text-decoration: underline;
}

/* 2. Bottom Area */
.footer-bottom-area {
    padding: 2rem 0;
    background: #151515;
}

.bottom-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

/* Left Content: Legal & Info */
.bottom-left {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
    text-align: left;
}

.legal-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
}

.legal-line a {
    color: #b0b0b0;
    margin-right: 10px;
    font-size: 0.8rem;
}

.legal-line a:hover {
    color: white;
}

.legal-line .bold-text {
    font-weight: 700;
    color: #d1d5db;
}

.legal-line .divider {
    color: #444;
    margin-right: 10px;
    font-size: 0.7rem;
}

.wa-mark {
    margin-left: 10px;
    cursor: default;
    opacity: 0.7;
}

/* WA Certification Badge Style (Previously Inline) */
.wa-badge {
    border: 1px solid #666;
    padding: 0 4px;
    font-size: 10px;
    border-radius: 2px;
    vertical-align: middle;
    display: inline-block;
    color: #ccc;
}

.address-line p {
    color: #666;
    margin-bottom: 0.3rem;
    font-size: 0.8rem;
    line-height: 1.5;
    text-align: left;
}

.address-line .copyright {
    color: #555;
    margin-top: 0.5rem;
    font-family: 'Inter', sans-serif;
}

/* Right Content: Language Selector */
.bottom-right {
    display: flex;
    align-items: center;
}

.lang-selector {
    position: relative;
}

.lang-btn-footer {
    background: transparent;
    border: 1px solid #444;
    color: #ccc;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    min-width: 140px;
    justify-content: space-between;
}

.lang-btn-footer:hover {
    border-color: #888;
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

/* =========================================
   Shared Components
   ========================================= */

/* Unified Language Dropdown */
.lang-dropdown {
    position: absolute;
    right: 0;
    min-width: 120px;
    padding: 0.5rem 0;
    list-style: none;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    display: none;
    animation: fadeIn 0.2s ease;
}

/* Pseudo-element Bridge for Hover Stability */
.lang-dropdown::before {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 20px;
    /* Bridge height */
    background: transparent;
    /* border: 1px solid red; /* Debugging: Uncomment to see the bridge */
}

/* Light Mode (Header) */
.lang-dropdown.light {
    top: 120%;
    background: white;
    border: 1px solid var(--gray-200);
}

/* Header Bridge Position */
.lang-dropdown.light::before {
    bottom: 100%;
    /* Placed above the dropdown */
}

.lang-dropdown.light li a {
    color: var(--text-dark);
}

.lang-dropdown.light li a:hover {
    background: var(--gray-50);
    color: var(--primary-blue);
}

/* Dark Mode (Footer) */
.lang-dropdown.dark {
    bottom: 100%;
    margin-bottom: 5px;
    background: #222;
    border: 1px solid #444;
    border-radius: 4px;
}

/* Footer Bridge Position */
.lang-dropdown.dark::before {
    top: 100%;
    /* Placed below the dropdown */
}

.lang-dropdown.dark li a {
    color: #aaa;
}

.lang-dropdown.dark li a:hover {
    background: #333;
    color: white;
}

/* Common Link Styles */
.lang-dropdown li a {
    display: block;
    padding: 0.8rem 1.2rem;
    text-decoration: none !important;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

/* Selected State */
.lang-dropdown li a.selected-lang {
    font-weight: bold;
}

.lang-dropdown.dark li a.selected-lang {
    color: white;
}

/* Wrapper Hover Behavior */
@media (pointer: fine) {

    .lang-wrapper:hover .lang-dropdown,
    .lang-selector:hover .lang-dropdown {
        display: block;
    }
}

/* Mobile/JS: Active class works */
.lang-dropdown.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   Index / Hero Page Styles
   ========================================= */

.hero-title {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 2rem;
    color: white;
    letter-spacing: -0.02em;
}

.hero-title .highlight {
    color: var(--primary-emerald);
    background: linear-gradient(120deg, #60a5fa, #34d399);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 3rem;
    line-height: 1.7;
    max-width: 650px;
    font-weight: 500;
}

.section-hero {
    position: relative;
    height: 100vh;
    min-height: 100dvh;
    /* Mobile address bar fix */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.3));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-top: 0;
    /* Removed excessive top space */
}

/* Scroll Indication */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.scroll-indicator .mouse {
    width: 20px;
    height: 32px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    position: relative;
}

.scroll-indicator .mouse::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    margin-left: -2px;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    animation: scrollMouse 2s infinite;
}

@keyframes scrollMouse {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(10px);
        opacity: 0;
    }
}

/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 1.2rem 3rem;
    background: var(--primary-blue);
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(0, 102, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 102, 255, 0.6);
    background: #0052CC;
}

.btn-secondary {
    display: inline-block;
    padding: 1.2rem 2.5rem;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 1rem;
    border-radius: 50px;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.7);
    color: white;
}

/* Mobile Responsive */

@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

    .main-links {
        display: none;
    }

    .nav-utilities {
        display: flex;
        /* Show icons on mobile */
        margin-left: auto;
        /* Push to right */
        margin-right: 1.5rem;
        /* Gap before hamburger */
    }

    .mobile-menu-btn {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .mobile-menu-btn span {
        width: 24px;
        height: 2px;
        background: var(--text-dark);
    }

    /* Footer Mobile */
    .footer-links-grid {
        gap: 2rem;
        flex-wrap: wrap;
        /* Allow wrapping */
        grid-template-columns: 1fr 1fr !important;
        /* Force 2 cols on mobile */
    }

    .link-col {
        width: 45%;
        /* Two cols per row on mobile */
    }

    .bottom-flex {
        flex-direction: column;
        gap: 2rem;
    }

    .bottom-right {
        width: 100%;
        justify-content: flex-start;
    }

    .legal-line {
        margin-bottom: 0.5rem;
    }

    /* Hero Section Mobile */
    .hero-title {
        font-size: 3rem;
    }

    .hero-desc {
        font-size: 1.2rem;
    }

    .btn-secondary {
        padding: 1rem 2rem;
        font-size: 0.95rem;
    }
}

/* Mobile Menu Active States */
@media (max-width: 1024px) {

    /* Menu Container when Active */
    .nav-menu.active {
        position: absolute;
        top: 60px;
        /* Below header */
        left: 0;
        width: 100%;
        background: white;
        padding: 1rem 0;
        z-index: 1000;
        border-bottom: 1px solid var(--gray-200);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        display: block !important;
    }

    .nav-menu.active .main-links {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .nav-menu.active .main-links li {
        width: 100%;
    }

    .nav-menu.active .main-links li a {
        display: block;
        padding: 1rem 2rem;
        border-bottom: 1px solid var(--gray-100);
        color: var(--text-dark);
        font-size: 1.1rem;
    }

    /* Hamburger Animation to X */
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

}

/* ====================================================
   UNIFIED MOBILE RESPONSIVE STYLES
   ==================================================== */

/* Tablets and Below */
@media (max-width: 768px) {

    /* Global spacing */
    section {
        padding: 4rem 0 !important;
    }

    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    /* Typography */
    h1,
    .hero-title {
        font-size: 2rem;
    }

    h2,
    .main-title {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    p,
    .description {
        font-size: 1rem;
    }

    /* Gateway specific */
    .gateway-diagram {
        flex-direction: column;
    }

    .gateway-arrow {
        transform: rotate(90deg);
        font-size: 2rem;
    }

    /* Cards */
    /* Cards */
    .esg-card,
    .gateway-step,
    .market-card {
        padding: 2rem 1.5rem;
    }
}

/* Small Smartphones */
@media (max-width: 576px) {

    /* Global spacing */
    section {
        padding: 3rem 0 !important;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Typography */
    h1,
    .hero-title {
        font-size: 1.75rem;
    }

    h2,
    .main-title {
        font-size: 1.5rem;
    }

    /* Grids */


    /* Buttons */
    .btn-primary,
    .btn-secondary,
    .cta-buttons a {
        width: 100%;
        max-width: 280px;
        padding: 1rem 2rem;
        font-size: 0.95rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
}

/* Very Small Smartphones */
@media (max-width: 375px) {

    /* Global spacing */
    section {
        padding: 2.5rem 0 !important;
    }

    /* Typography */
    h1,
    .hero-title {
        font-size: 1.5rem;
    }

    h2,
    .main-title {
        font-size: 1.3rem;
    }

    /* Cards - extra compact */
    /* Cards - extra compact */
    .esg-card,
    .gateway-step,
    .market-card {
        padding: 1.5rem 1rem;
    }
}

/* Common Grid Patterns */

.grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.grid-4col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* Common Card Styles */

.card-base {
    background: white;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.card-base:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* Common Form Styles */

.form-group-common {
    margin-bottom: 1.5rem;
}

.form-group-common label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--brand-black);
    font-size: 0.9rem;
}

.form-group-common input,
.form-group-common textarea,
.form-group-common select {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group-common input:focus,
.form-group-common textarea:focus,
.form-group-common select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.form-group-common textarea {
    resize: vertical;
    min-height: 120px;
}

/* Tablet Responsive (768px) */

@media (max-width: 768px) {

    /* Grid adjustments - 3col and 4col become 2col */
    .grid-3col,
    .grid-4col {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .grid-2col {
        gap: 1.5rem;
    }

    /* Cards - slightly more compact */
    .card-base {
        padding: 2rem 1.5rem;
    }

    /* Forms - adjust input sizes */
    .form-group-common input,
    .form-group-common textarea,
    .form-group-common select {
        font-size: 0.95rem;
        padding: 0.875rem 1rem;
    }
}

/* Mobile Responsive (480px) */

@media (max-width: 480px) {

    /* All grids to single column */
    .grid-2col,
    .grid-3col,
    .grid-4col {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Cards - more compact for mobile */
    .card-base {
        padding: 1.5rem;
    }
}