/* 기본 스타일 */
:root {
    --primary-color: #1a4d7c;
    --secondary-color: #e74c3c;
    --accent-color: #3498db;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --white: #ffffff;
    --gray: #95a5a6;
    --gray-light: #bdc3c7;
    --text-color: #333;
    --border-color: #ddd;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 5px 20px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 헤더 */
#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    height: 60px;
    width: auto;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.company-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
    line-height: 1.3;
}

.main-nav ul {
    display: flex;
    gap: 25px;
    align-items: center;
}

.main-nav a {
    font-weight: 500;
    color: var(--text-color);
    padding: 8px 12px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.main-nav a:hover {
    color: var(--primary-color);
    background: var(--light-color);
}

.main-nav .admin-link {
    background: var(--primary-color);
    color: var(--white);
}

.main-nav .admin-link:hover {
    background: var(--dark-color);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* 히어로 섹션 */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(26, 77, 124, 0.85) 0%, rgba(44, 62, 80, 0.9) 100%),
                url('../images/hero/main-hero.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--white);
    text-align: center;
    padding-top: 80px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 77, 124, 0.4) 0%, rgba(44, 62, 80, 0.6) 100%);
    opacity: 0.95;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 0.95;
    font-weight: 300;
    line-height: 1.8;
    animation: fadeInUp 1s ease;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    animation: fadeInUp 1.2s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 버튼 스타일 */
.btn {
    display: inline-block;
    padding: 15px 35px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.btn-primary:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-color);
}

.btn-block {
    width: 100%;
}

/* 섹션 공통 스타일 */
section {
    padding: 80px 0;
}

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

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--gray);
}

/* 회사소개 섹션 */
.section-about {
    background: var(--white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.about-content h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-desc {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 40px;
    color: var(--text-color);
}

.about-features {
    display: grid;
    gap: 25px;
}

.feature-item {
    display: flex;
    gap: 20px;
    align-items: start;
}

.feature-item i {
    font-size: 2rem;
    color: var(--secondary-color);
    flex-shrink: 0;
}

.feature-item h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.feature-item p {
    color: var(--gray);
}

.about-info {
    position: sticky;
    top: 100px;
}

.info-box {
    background: var(--light-color);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.info-box h4 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-table {
    width: 100%;
}

.info-table tr {
    border-bottom: 1px solid var(--border-color);
}

.info-table tr:last-child {
    border-bottom: none;
}

.info-table th,
.info-table td {
    padding: 12px 0;
    text-align: left;
}

.info-table th {
    font-weight: 600;
    color: var(--dark-color);
    width: 120px;
}

.info-table td {
    color: var(--text-color);
}

/* 사업분야 섹션 */
.section-business {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.business-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.business-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.business-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.business-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

.business-icon i {
    font-size: 2.5rem;
    color: var(--white);
}

.business-card h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.business-card > p {
    color: var(--text-color);
    margin-bottom: 20px;
    line-height: 1.7;
}

.business-list {
    list-style: none;
    padding-left: 0;
}

.business-list li {
    padding: 8px 0 8px 25px;
    position: relative;
    color: var(--gray);
}

.business-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* 비전 섹션 */
.section-vision {
    background: var(--primary-color);
    color: var(--white);
}

.vision-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.vision-item {
    text-align: center;
    padding: 30px;
}

.vision-icon {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    transition: all 0.3s ease;
}

.vision-item:hover .vision-icon {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.vision-icon i {
    font-size: 3rem;
    color: var(--white);
}

.vision-item h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
}

.vision-item p {
    line-height: 1.8;
    opacity: 0.9;
}

/* 문의 섹션 */
.section-contact {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
}

.contact-info h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-item i {
    font-size: 1.8rem;
    color: var(--secondary-color);
    flex-shrink: 0;
}

.contact-item h4 {
    font-size: 1.1rem;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.contact-item p {
    color: var(--text-color);
    line-height: 1.6;
}

.contact-form-wrapper {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.contact-form {
    display: grid;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark-color);
}

.required {
    color: var(--secondary-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 77, 124, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-message {
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    display: none;
    text-align: center;
    font-weight: 500;
}

.form-message.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 푸터 */
.footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.footer-logo img {
    height: 60px;
    width: auto;
    filter:drop-shadow(0 0 2px #fff) drop-shadow(0 0 4px #fff) drop-shadow(0 0 6px #fff);
}

.footer-logo h3 {
    font-size: 1.1rem;
    line-height: 1.4;
}

.footer-desc {
    line-height: 1.8;
    opacity: 0.8;
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.footer-section ul li {
    margin-bottom: 10px;
    opacity: 0.8;
}

.footer-section a:hover {
    opacity: 1;
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
}

/* 맨 위로 버튼 */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-top:hover {
    background: var(--primary-color);
    transform: translateY(-5px);
}

.scroll-top.show {
    display: flex;
}

/* 페이지 공통(서브페이지) */
.page-hero {
    position: relative;
    padding: 140px 0 60px;
    background: linear-gradient(135deg, rgba(15, 47, 77, 0.85) 0%, rgba(26, 77, 124, 0.9) 55%, rgba(44, 62, 80, 0.95) 100%);
    background-size: cover;
    background-position: center;
    color: var(--white);
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    z-index: 0;
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

/* 각 페이지별 히어로 배경 */
body:has(#projectsPage) .page-hero,
.projects-hero {
    background-image: linear-gradient(135deg, rgba(15, 47, 77, 0.85) 0%, rgba(26, 77, 124, 0.9) 55%, rgba(44, 62, 80, 0.95) 100%),
                      url('../images/hero/projects-hero.jpg');
}

body:has(#locationsPage) .page-hero,
.locations-hero {
    background-image: linear-gradient(135deg, rgba(15, 47, 77, 0.85) 0%, rgba(26, 77, 124, 0.9) 55%, rgba(44, 62, 80, 0.95) 100%),
                      url('../images/hero/locations-hero.jpg');
}

body:has(#documentsPage) .page-hero,
.documents-hero {
    background-image: linear-gradient(135deg, rgba(15, 47, 77, 0.85) 0%, rgba(26, 77, 124, 0.9) 55%, rgba(44, 62, 80, 0.95) 100%),
                      url('../images/hero/documents-hero.jpg');
}

.page-hero-content {
    max-width: 900px;
}

.page-hero h1 {
    font-size: 2.6rem;
    font-weight: 900;
    margin-bottom: 10px;
}

.page-hero p {
    opacity: 0.9;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* 공사실적 페이지 */
.section-projects {
    background: #f8f9fa;
}

.projects-toolbar {
    display: flex;
    gap: 15px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 260px;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

.search-box input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: var(--shadow);
    background: var(--white);
}

.filter-box select {
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.project-card {
    background: var(--white);
    border-radius: 14px;
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.04);
}

.project-card-header {
    padding: 22px 22px 10px;
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
}

.project-card-header h3 {
    font-size: 1.25rem;
    color: var(--dark-color);
    line-height: 1.4;
}

.badge {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid rgba(0,0,0,0.08);
}

.badge-planned { background: rgba(243,156,18,0.12); color: #a05f00; }
.badge-ongoing { background: rgba(52,152,219,0.12); color: #1a5c86; }
.badge-completed { background: rgba(39,174,96,0.12); color: #1f7a45; }

.project-spec {
    padding: 0 22px 18px;
}

.spec-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--border-color);
}

.spec-row:first-child { border-top: 0; }
.spec-row .label { font-weight: 800; color: var(--dark-color); }
.spec-row .value { color: var(--text-color); }

.project-gallery {
    padding: 0 22px 22px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.project-photo {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.06);
    cursor: pointer;
}

.project-photo img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-photo:hover img { transform: scale(1.05); }

.empty-state {
    padding: 60px 20px;
    text-align: center;
    color: var(--gray);
    background: var(--white);
    border-radius: 14px;
    border: 1px dashed var(--border-color);
}

.empty-state i {
    font-size: 2.2rem;
    margin-bottom: 12px;
}

/* 오시는 길 페이지 */
.section-locations {
    background: #f8f9fa;
}

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

.location-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.location-header {
    padding: 26px 26px 18px;
}

.location-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.location-header p {
    color: var(--gray);
    line-height: 1.7;
}

.location-actions {
    display: flex;
    gap: 12px;
    padding: 0 26px 20px;
    flex-wrap: wrap;
}

.map-embed {
    width: 100%;
    aspect-ratio: 16/10;
    background: #e9ecef;
}

.map-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.location-info {
    padding: 18px 26px 26px;
}

.info-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--border-color);
}

.info-row .label {
    font-weight: 700;
    color: var(--dark-color);
}

.info-row .value {
    color: var(--text-color);
}

/* 자료실 페이지 */
.section-documents {
    background: #f8f9fa;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.doc-card {
    background: var(--white);
    border-radius: 14px;
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}

.doc-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.doc-thumb img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
}

.doc-body {
    padding: 18px 18px 20px;
}

.doc-body h3 {
    color: var(--dark-color);
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.doc-meta {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 14px;
}

.doc-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* 반응형 디자인 */
@media (max-width: 992px) {
    .main-nav {
        position: fixed;
        top: 90px;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: var(--shadow-lg);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, padding 0.4s ease;
        z-index: 999;
    }

    .main-nav.active {
        max-height: 500px;
        padding: 20px 0;
        border-top: 1px solid var(--border-color);
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 0 20px;
    }

    .main-nav li {
        width: 100%;
        border-bottom: 1px solid var(--light-color);
    }

    .main-nav li:last-child {
        border-bottom: none;
    }

    .main-nav a {
        display: block;
        padding: 15px 20px;
        border-radius: 0;
    }

    .main-nav .admin-link {
        margin-top: 10px;
        border-radius: 8px;
    }

    .mobile-menu-toggle {
        display: flex;
        z-index: 1001;
    }

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

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .business-grid,
    .vision-grid {
        grid-template-columns: 1fr;
    }

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

    .locations-grid { 
        grid-template-columns: 1fr; 
    }
    
    .projects-grid { 
        grid-template-columns: 1fr; 
    }
    
    .documents-grid { 
        grid-template-columns: 1fr; 
    }
}

@media (max-width: 768px) {
    .company-name {
        font-size: 0.95rem;
    }

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

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-form-wrapper {
        padding: 25px;
    }

    section {
        padding: 50px 0;
    }
}

@media (max-width: 480px) {
    .logo img {
        height: 45px;
    }

    .company-name {
        font-size: 0.85rem;
    }

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

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .scroll-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }
}