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

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
}

header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10; /* 헤더를 배너 위로 표시 */
    background: transparent; /* 배경을 투명하게 설정 */
    padding: 0 20px; /* 배너 안에 헤더가 포함되도록 패딩 추가 */
    box-shadow: none; /* 헤더의 경계선이나 그림자 제거 */
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px; /* 헤더 높이 */
    width: 100%;
}
.logo img {
    height: 90%;
    max-height: 72px;
    width: auto;
    padding: 0;
    display: block;
}

/* 🔹 PC 기본값에서는 "부산 컨테이너" 숨김 */
.mobile-title {
    display: none;
}

header .menu {
    display: flex;
    justify-content: center;
    position:relative;
}

nav {
    display:flex;
    justify-content: center;  /* 가운데 정렬 */
    flex: 1;
    margin-left: 0;           /* 기존 강제 이동 제거 */
}

nav ul {
    display:flex;
    list-style: none;
    justify-content: center;
    margin:0px;
    padding:0px;
}

nav ul li {
    margin-left: 40px;
    position:relative;
}

/* === 메뉴 hover 밑줄 애니메이션 === */
nav ul li a {
    position: relative;
    text-decoration: none;
    color: #dfd8d8;
    font-weight: 600;
    font-size: 1.3rem;
    padding: 0 15px;
    line-height: 80px;
    transition: color 0.3s ease, transform 0.3s ease;
}

nav ul li a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 5px;
    width: 0px;
    height: 2px;
    background: #e53935;
    transition: width 0.3s ease;
}

nav ul li a:hover {
    color: #e53935;
    transform: translateY(-4px);
    z-index:1000;
}

nav ul li a:hover::after {
    width: 90%;
}
/* === 서브메뉴 (애니메이션 개선) === */
.submenu {
    display: grid;
    grid-template-columns: repeat(1, auto);
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    list-style: none;
    padding: 10px 0;
    margin: 0;
    border-radius: 5px;
    min-width: 180px;
    z-index: 9999;
    text-align: center;

    opacity: 0;
    visibility:hidden;
    transform: translateX(-50%) translateY(10px);
    position: absolute;
    top: 100%;
    left: 50%;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

nav ul li:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    transition-delay: 0.05s;
}

/* 제품안내 전용 3|3 정렬 */
.submenu-product {
    grid-template-columns: repeat(2, auto);
    min-width: 360px;
    justify-content: center;
}

.submenu li {
    margin: 0;
    padding: 0;
}

.submenu li a {
    display: block;
    padding: 0 15px;
    line-height: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
    text-decoration: none;
    transition: background 0.3s ease;
}

.submenu li a:hover {
    background-color: #f1f1f1;
}

.submenu li a::before {
    content: "> ";
    color: #e53935;
    margin-right: 5px;
}

.call-btn {
    background: #d32f2f;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: background 0.3s ease;
}

.call-btn:hover {
    background: #b71c1c;
}

/* === 배너 === */
.banner {
    background: url("banner.jpg") no-repeat center center;
    background-size: cover;
    height: 100vh; /* 배너 높이를 화면 전체로 확장 */
    position: relative; /* 배너의 상대적인 위치 */
    color: white;
    text-align: center;
    z-index: 0; /* 배너가 헤더 아래로 오게 설정 */
    height:650px;
}

.banner::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: -1;
}

.banner-content {
    position: relative;
    width: 100%;
    height: 100%;
}

/* === 배너 요소 중앙 정렬 보정 === */
.banner .subtitle,
.banner h1,
.banner .tagline,
.banner .highlights,
.banner .btn-estimate {
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: max-content;
}

/* === 각 요소 위치 === */
.banner .subtitle {
    position: absolute;
    top: 80px;
    font-size: 1.2rem;
}

.banner h1 {
    position: absolute;
    top: 140px;
    font-family: 'Arial Black', sans-serif;
    font-size: 3.5rem;
}

.banner h1 .space {
    display: inline-block;
    width: 15px;
}

.banner .tagline {
    position: absolute;
    top: 250px;
    font-size: 1.3rem;
}

.highlights {
    position: absolute;
    bottom: 130px;
    display: flex;
    gap: 30px;
}
/* === 빨간 버튼 === */
.btn-estimate {
    position: absolute;
    bottom: 270px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
    border-radius: 5px;
    background: #e53935;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 8px 23px;
    line-height: 1.2;
    transition: background 0.3s ease;

    left: 50%;
    transform: translateX(-50%);
    transform-origin: center;
}

.btn-estimate .main-text {
    font-size: 1.3rem;
    margin-bottom: 2px;
    display: block;
    transition: transform 0.3s ease;
}

.btn-estimate .sub-text {
    font-size: 0.65rem;
    color: #ccc;
    display: block;
    text-align: center;
    margin-bottom:-3px;
    transition: transform 0.3s ease;
}

.btn-estimate:hover {
    background: #c62828;
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

.btn-estimate:hover .main-text {
    transform: scale(1.08);
}

.btn-estimate:hover .sub-text {
    transform: scale(1.05);
}

.btn-estimate:active {
    background: #a11f1f;
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 3px 8px rgba(0,0,0,0.25);
    text-decoration: none;
}

.btn-estimate,
.btn-estimate:hover,
.btn-estimate:active,
.btn-estimate .main-text,
.btn-estimate .main-text:hover,
.btn-estimate .main-text:active,
.btn-estimate .sub-text,
.btn-estimate .sub-text:hover,
.btn-estimate .sub-text:active {
    text-decoration: none !important;
}

/* === 공통 버튼 === */
.btn {
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn.primary {
    background: #e53935;
    color: white;
    font-size: 1.2rem;
    padding: 14px 28px;
}

.btn.secondary {
    background: white;
    color: #333;
    border: 3px solid #ccc;
    font-size: 1.2rem;
    padding: 14px 28px;
}

.btn.secondary:hover {
    background: #f1f1f1;
}

/* === 하이라이트 === */
.highlight {
    background: rgba(255,255,255,0.1);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1.3rem;
    font-weight: bold;
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
}

.highlight:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.6);
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* === 서비스 카드 === */
.services {
    display: flex;
    justify-content: space-around;
    margin: 50px auto;
    max-width: 1100px;
}

.service {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    flex: 1;
    margin: 10px;
    text-align: center;
    transition: all 0.3s ease;
}

.service:hover {
    transform: translateY(-8px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.service h2 {
    color: #d32f2f;
    margin-bottom: 10px;
    font-size: 1.4rem;
}

footer {
    background: #222;
    color: #ccc;
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
    font-size: 0.9rem;
    line-height: 1.6;
}

header .logo img {
    position: relative;
    right: -30px;
}

header .call-btn {
    position: relative;
    left: -30px;
}

/* === 배너 fadeUp 애니메이션 === */
@keyframes fadeUp {
  from { opacity: 0; transform: translateX(-50%) translateY(30px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.banner .subtitle,
.banner h1,
.banner .tagline,
.banner .highlights,
.btn-estimate {
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
}

.banner .subtitle   { animation-delay: 0.2s; }
.banner h1          { animation-delay: 0.4s; }
.banner .tagline    { animation-delay: 0.6s; }
.btn-estimate       { animation-delay: 0.8s; }
.banner .highlights { animation-delay: 1.0s; }

/* === 모바일 전용 보강 === */
@media (max-width: 768px) {
    .logo img {
        max-height: 54px;
        margin-left: -40px;
        width:auto;
        height:auto;
    }

    .site-title {
        display: block;
        position: absolute;
        left: 51%;
        top: 13.8px;  /* 로고 높이에 맞게 조정 */
        transform: translateX(-50%);
        font-weight: 800;
        font-size: 2.3rem;
        color: #ffffff;
        
    /* === 모바일에서 배너 문구 위치 조정 === */
    .banner .subtitle {
    top: 1000px !important;  /* 원하는 높이로 수정 (예시: 기존 40px → 100px) */
    font-size: 1.2rem; /* 필요하면 글자 크기도 조정 가능 */

    }

}

   /* === 모바일 메뉴 기본 상태 === */
nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 55%;
    height: 100%;
    background: #ffffff;
    box-shadow: -2px 0 8px rgba(0,0,0,0.2);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding-top: 60px;
    z-index: 1000;
    opacity: 0;
    transform: translateX(100%);
    pointer-events: none;
    transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.35s ease;
}

/* === 열릴 때 (오른쪽 → 왼쪽 자연스러운 슬라이드) === */
nav.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

/* === 닫힐 때 (왼쪽 → 오른쪽으로 자연스럽게 사라짐) === */
nav.closing {
    opacity: 0;
    transform: translateX(100%);
    pointer-events: none;
}

    nav ul {
        flex-direction: column;
        width: 100%;
        padding-left: 20px;
    }

    nav ul li { margin: 15px 0; }
    nav ul li a { font-size: 1.1rem; line-height: 1.5; }

    .submenu,
    .submenu-product {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        background: none;
        grid-template-columns: 1fr;
        min-width: unset;
        text-align: left;
        margin-left: 15px;
    }

    .submenu li a { line-height: 1.8; padding: 5px 0; }

    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 28px;
        height: 20px;
        margin-right: 20px;
        cursor: pointer;
        z-index: 1100;
        position: absolute;
        right: 20px;
        top: 30px;
    }

    .hamburger span {
        display: block;
        height: 3px;
        width: 100%;
        background: #ffffff;
        border-radius: 2px;
    }

    .banner { height: 300px; }
    .banner .subtitle { font-size: 1.3rem; top: 40px; }
    .banner h1 { font-size: 2.4rem; top: 75px; }
    .banner .tagline { font-size: 1rem; top: 140px; }
    .btn-estimate { bottom: 82.5px; padding: 4px 14px; }
    .btn-estimate .main-text { font-size: 1.1rem; }
    .btn-estimate .sub-text { font-size: 0.7rem; }
    .highlights { gap: 10px; bottom: 25px; flex-wrap: wrap; justify-content: center; }
    .highlight { font-size: 0.9rem; padding: 8px 12px; }
    .services { flex-direction: column; align-items: center; }
    .service { width: 90%; margin: 10px 0; }
}

/* === 햄버거 버튼 PC 숨김 === */
@media (min-width: 769px) {
    .hamburger { display: none !important; }
    .site-title { display: none; }
}

/* === PC 전용 메뉴 절대 가운데 정렬 === */
@media (min-width: 769px) {
  header {
    position: relative;
    z-index:2000;
  }

  header nav {
    position: absolute;
    left:48%;
    top: 0;
    transform: translateX(-50%);
    height: 100%;
    display: flex;
    align-items: center;
  }
}

/* === 모바일에서 서브메뉴 hover 이동 애니메이션 제거 === */
@media (max-width: 768px) {
  nav ul li:hover .submenu {
    transform: none !important;
  }
}

/* === 모바일에서 배너 h1 숨기기 === */
@media (max-width: 768px) {
  .banner h1 {
    display: none !important;
  }
}
