/* Basic Clean Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f0f5fa;
}

/* Typography */
h1,
h2,
h3 {
    margin-bottom: 1rem;
    color: #003366;
    /* Deep Corporate Blue */
}

a {
    text-decoration: none;
    color: #444;
    transition: color 0.3s ease;
}

a:hover {
    color: #00509E;
    /* Accent Blue */
}

/* Utilities */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.text-white {
    color: #fff;
}

.bg-light {
    background-color: #fff;
}

.bg-dark {
    background-color: #003366;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #00509E;
    color: #fff;
}

.btn-primary:hover {
    background-color: #003366;
    color: #fff;
}

/* Sections */
.section {
    padding: 80px 0;
    scroll-margin-top: 120px;
    /* Offset for fixed header (100px + 20px padding) */
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #00509E;
    margin: 15px auto 0;
}

/* Header */
header {
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    /* Softer shadow */
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 70px;
    /* Fixed height for menu bar */
    border-bottom: 4px solid #003366;
    /* Added Blue Frame Border */
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    /* Reduced side margins effectively by widening container */
    height: 100%;
    position: relative;
    width: 100%;
    /* Override default container width */
    max-width: 100%;
    /* Override default container max-width */
}

.logo {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 15px;
    height: 100%;
}

.logo img.logo-main {
    height: 45px;
    width: auto;
    display: block;
}

.logo img.logo-addon {
    height: 45px;
    width: auto;
    display: block;
}

/* Navigation */
nav ul {
    list-style: none;
    display: flex;
    gap: 5px;
    margin: 0;
    padding: 0;
    align-items: center;
}

nav ul li {
    display: block;
}

nav ul li a {
    display: block;
    white-space: nowrap;
    text-decoration: none;
    color: #003366;
    /* Dark Blue Text */
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    padding: 8px 10px;
    border-radius: 4px;
    background-color: #f0f5fa;
    /* Light Blue/Grey Button Background */
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

nav ul li a:hover {
    color: #ffffff;
    /* White Text on Hover */
    background-color: #003366;
    /* Dark Blue Background on Hover */
}

/* Hamburger Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle .bar {
    height: 3px;
    width: 100%;
    background-color: #000000;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Contact Section Styles */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-main-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 30px;
    color: #003366;
}

.info-block {
    margin-bottom: 30px;
}

.info-block h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #003366;
}

.info-block p {
    color: #555;
    line-height: 1.6;
}

.form-instruction {
    margin-bottom: 20px;
    color: #666;
}

.contact-form-clean .form-group {
    margin-bottom: 20px;
}

.contact-form-clean label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-weight: 400;
}

.contact-form-clean input,
.contact-form-clean textarea {
    width: 100%;
    padding: 15px;
    border: none;
    background-color: #eef3f8;
    /* Very light blue input bg */
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.contact-form-clean input:focus,
.contact-form-clean textarea:focus {
    outline: 2px solid #003366;
    background-color: #fff;
}



@media (max-width: 768px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    nav ul {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Hero Section */
.hero {
    height: 80vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

/* 슬라이드쇼 구조 */
.hero-slideshow {
    background: none; /* inline style 대신 레이어 사용 */
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0; /* top/left/right/bottom: 0 */
    background-size: cover;
    background-position: center;
    transition: opacity 1.5s ease-in-out;
    z-index: 0;
}

/* 어두운 오버레이 (텍스트 가독성) */
.hero-overlay-dark {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

/* 텍스트 콘텐츠는 오버레이 위에 */
.hero-slideshow .hero-content {
    position: relative;
    z-index: 2;
}

.hero-overlay {
    background: rgba(0, 0, 0, 0.5);
    /* Reverted to Neutral Dark Overlay for natural photo color */
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero h1 {
    color: #fff;
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 500;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 4px rgba(0, 0, 0, 0.6);
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s;
    border-top: 4px solid #00509E;
    cursor: pointer;
    /* Indicates clickable */
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.admin-selected {
    outline: 2px solid #00509E !important;
}

/* Modal Styles */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 2000;
    /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 0.6);
    /* Black w/ opacity */
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    /* 10% from top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 700px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation-name: animatetop;
    animation-duration: 0.4s
}

@keyframes animatetop {
    from {
        top: -300px;
        opacity: 0
    }

    to {
        top: 0;
        opacity: 1
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.modal-body {
    text-align: left;
}

.modal-body h2 {
    color: #003366;
    border-bottom: 2px solid #00509E;
    padding-bottom: 10px;
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.project-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    height: 250px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    /* Indicates clickable */
}

.project-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.project-item:hover img {
    transform: scale(1.1);
}

.project-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: #fff;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.project-item:hover .project-info {
    transform: translateY(0);
}

/* Contact */
.contact-content {
    text-align: center;
}

.contact-details {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

/* Clients Section */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 30px;
    align-items: center;
    padding: 40px 0;
}

.client-item {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
    /* Fixed container height */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.client-item:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-color: #00509E;
}

.client-logo {
    max-width: 90%;
    max-height: 80px;
    object-fit: contain;
    /* Removed grayscale/opacity filters for full color visibility */
}

/* Special scaling for certain logos */
.client-item[title="Dongwon Autoparts"] .client-logo {
    transform: scale(1.3);
}

/* Footer */
footer {
    background-color: #002244;
    color: #889bb0;
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: row;
        justify-content: space-between;
        padding: 15px 5px;
    }

    .logo img.logo-main,
    .logo img.logo-addon {
        height: 32px;
    }

    .menu-toggle {
        display: flex;
    }
    
    #adminControls {
        margin-left: 0 !important;
    }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        display: none;
        padding: 10px 0;
        border-top: 1px solid #eee;
        z-index: 999;
    }

    nav.active {
        display: block;
    }

    nav ul {
        display: flex;
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    nav ul li {
        width: 100%;
        border-bottom: 1px solid #f0f5fa;
    }

    nav ul li a {
        display: block;
        text-align: left;
        padding: 15px 25px;
        font-size: 1.1rem;
        background-color: transparent;
        color: #003366;
        border-radius: 0;
    }
    
    nav ul li a:hover {
        background-color: #f0f5fa;
        color: #00509E;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
}

/* Job Board Styles */
.job-board-container {
    max-width: 100%;
    margin: 0 auto;
    font-family: 'Inter', sans-serif;
}

.job-board-header {
    margin-bottom: 10px;
}

.total-count {
    display: inline-block;
    background-color: #dcdcdc;
    padding: 5px 15px;
    font-size: 0.9rem;
    color: #666;
    border-radius: 4px;
}

.job-table {
    width: 100%;
    border-collapse: collapse;
    border-top: 1px solid #e0e0e0;
}

.job-table th,
.job-table td {
    padding: 15px 10px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
    color: #333;
}

.job-table th {
    font-weight: 600;
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    color: #000;
}

/* Specific Column Widths */
.col-no {
    width: 5%;
    color: #888;
}

.col-subject {
    width: 65%;
    text-align: left;
    padding-left: 20px;
}

.col-name {
    width: 10%;
}

.col-hit {
    width: 10%;
    color: #888;
}

.col-date {
    width: 10%;
    color: #888;
}

.job-table .col-subject a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 1rem;
}

.job-table .col-subject a:hover {
    text-decoration: underline;
    color: #00509E;
}

.icon-heart {
    color: #ff4d4d;
    margin-left: 5px;
}

.job-table tbody tr:hover {
    background-color: #f9f9f9;
}

/* Responsive Table */
@media (max-width: 768px) {

    .job-table th,
    .job-table td {
        font-size: 0.85rem;
        padding: 10px 5px;
    }

    .col-hit,
    .col-date,
    .col-no {
        display: none;
        /* Hide less important info on mobile if needed, or adjust width */
    }

    .col-subject {
        width: auto;
    }
}

/* ===== Company History Timeline ===== */
.history-timeline {
    max-width: 860px;
    margin: 0 auto;
    border: 1px solid #dde6f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 51, 153, 0.07);
}

.history-item {
    display: flex;
    align-items: baseline;
    padding: 13px 28px;
    border-bottom: 1px solid #e8eef6;
    transition: background 0.2s;
    gap: 0;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item:nth-child(odd) {
    background-color: #ffffff;
}

.history-item:nth-child(even) {
    background-color: #f4f8fd;
}

.history-item:hover {
    background-color: #e8f0fb;
}

.history-date {
    min-width: 100px;
    font-weight: 700;
    font-size: 0.95rem;
    color: #003399;
    flex-shrink: 0;
    letter-spacing: 0.3px;
}

.history-desc {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.55;
    padding-left: 20px;
    border-left: 2px solid #c5d8f0;
}

.history-desc strong {
    color: #003399;
    font-weight: 700;
}

/* 설립 항목 하이라이트 */
.history-item--highlight {
    background-color: #eef3ff !important;
    border-left: 4px solid #003399;
}

.history-item--highlight .history-date {
    color: #002080;
}

.history-item--highlight .history-desc {
    border-left-color: #003399;
}

/* 모바일 대응 */
@media (max-width: 600px) {
    .history-item {
        flex-direction: column;
        gap: 4px;
        padding: 12px 18px;
    }

    .history-date {
        min-width: unset;
        font-size: 0.88rem;
    }

    .history-desc {
        padding-left: 0;
        border-left: none;
        border-top: 1px solid #d0e0f0;
        padding-top: 5px;
        font-size: 0.9rem;
    }
}