/* [초기 설정 및 변수 선언] */
:root {
    --primary-color: #003366; /* Navy Blue: 신뢰 */
    --secondary-color: #00AEEF; /* Cyan Blue: 기술, 포인트 */
    --bg-light: #F5F7FA;
    --text-dark: #333333;
    --text-gray: #666666;
    --white: #ffffff;
    --font-heading: 'Pretendard', sans-serif;
    --font-body: 'Noto Sans KR', sans-serif;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* [Header & Navigation] */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease;
    padding: 20px 0;
}

/* 스크롤 시 헤더 스타일 변경 (JS로 제어) */
header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--white); /* 초기엔 흰색 */
}

header.scrolled .logo a {
    color: var(--primary-color); /* 스크롤 되면 네이비 */
}

.navbar { display: flex; align-items: center; }
.nav-menu { display: flex; gap: 30px; }

.nav-menu li a {
    color: var(--white);
    font-weight: 500;
    transition: var(--transition);
}

header.scrolled .nav-menu li a { color: var(--text-dark); }
.nav-menu li a:hover { color: var(--secondary-color); }

/* 문의하기 버튼 스타일 */
.btn-contact {
    margin-left: 30px;
    padding: 10px 20px;
    background: var(--secondary-color);
    color: var(--white);
    border-radius: 50px;
    font-weight: 700;
    transition: var(--transition);
}
.btn-contact:hover { background: #008ecc; }

/* 모바일 메뉴 아이콘 (PC에선 숨김) */
.mobile-menu-icon { display: none; cursor: pointer; }

/* [Hero Section] */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    background-color: var(--primary-color);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 51, 102, 0.6); /* Navy 오버레이 */
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.5rem; /* 모바일 기준 */
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.btn-primary {
    display: inline-block;
    padding: 15px 40px;
    background: var(--secondary-color);
    color: var(--white);
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 174, 239, 0.4);
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 174, 239, 0.6);
}

/* [Common Section Styles] */
.section { padding: 100px 0; }
.bg-light { background-color: var(--bg-light); }

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-desc {
    color: var(--text-gray);
    font-size: 1.1rem;
}

/* [About Section] */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    text-align: center;
}

.about-card {
    padding: 30px;
    border-radius: 15px;
    transition: var(--transition);
}
.about-card:hover { transform: translateY(-10px); }

.icon-box {
    width: 80px;
    height: 80px;
    background: rgba(0, 174, 239, 0.1);
    color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.about-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

/* [Service Section] */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.service-card:hover {
    transform: scale(1.03); /* 요청하신 호버 확대 효과 */
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.service-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.service-content { padding: 25px; }

.service-content h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

/* [Space Section] */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 1/1; /* 정사각형 비율 */
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img { transform: scale(1.1); }

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: var(--white);
    font-weight: 500;
}

/* [Footer] */
.footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 60px 0;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    align-items: center;
}

.footer-info h3 { margin-bottom: 20px; font-size: 1.5rem; }
.footer-info p { margin-bottom: 10px; opacity: 0.8; }
.copyright { margin-top: 20px; font-size: 0.9rem; opacity: 0.6; }

.footer-map img {
    border-radius: 10px;
    max-width: 100%;
    height: auto;
}

/* [Animations] */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* [Media Queries] 반응형 처리 */
@media (min-width: 1024px) {
    .hero-title { font-size: 3.5rem; }
    .hero-subtitle { font-size: 1.3rem; }
}

@media (max-width: 768px) {
    /* 모바일에서 네비게이션 변경 */
    .mobile-menu-icon { display: block; }
    .mobile-menu-icon span {
        display: block;
        width: 25px;
        height: 3px;
        background-color: var(--white);
        margin: 5px 0;
    }
    header.scrolled .mobile-menu-icon span { background-color: var(--primary-color); }

    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        display: none; /* JS로 토글 */
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }

    .navbar.active { display: flex; }

    .nav-menu { flex-direction: column; gap: 15px; width: 100%; text-align: center; }
    .nav-menu li a { color: var(--text-dark); }
    .btn-contact { margin: 15px 0 0; }

    .footer-content { flex-direction: column; text-align: center; }
}