:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --text-color: #333;
    --background-color: #f4f4f4;
}

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

/* 전체 화면을 사용하도록 설정 */
html {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    padding-top: 76px;
    overflow-x: hidden;
    overflow-y: auto; /* 세로 스크롤 문제 해결 */
    viewport-fit: cover; /* 전체 화면을 사용할 수 있도록 설정 */
}

header {
    background-color: #f8f9fa;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: fixed;
    max-width: 100%;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo img {
    height: 50px;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 1rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
}

.buttons {
    display: flex;
    margin-top: 1rem;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    margin-left: 1rem;
}

.btn-call {
    background-color: var(--primary-color);
}

.btn-lang {
    background-color: var(--secondary-color);
}

.btn-whatsapp {
    background-color: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-whatsapp i {
    margin-right: 5px;
}

.btn-whatsapp:hover {
    background-color: #128C7E;
}

section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hero {
    background-image: url('hero-image.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
    text-align: center;
    padding: 8rem 2rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

h2 {
    margin-bottom: 1rem;
}

.services ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.services li {
    background-color: #fff;
    padding: 1rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 1rem;
    z-index: 1100;
    position: relative;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 50vh;
    overflow: hidden;
    margin-top: 10px;
}

.slider {
    display: flex;
    height: 100%;
}

.slide {
    min-width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    position: absolute;
    top: 0;
    left: 0;
}

.slide.active {
    opacity: 1;
}

.slider-nav button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.5);
    color: #333;
    border: none;
    padding: 10px 20px;
    font-size: 24px;
    cursor: pointer;
    transition: background 0.3s;
}

.slider-nav button:hover {
    background: rgba(255, 255, 255, 0.8);
}

.prev {
    left: 20px;
}

.next {
    right: 20px;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
}

.dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: white;
}

/* 1. 400px 이하 화면에서 로고 크기 조정 */
@media (max-width: 400px) {
    .logo-container {
        padding: 0.5rem;
    }

    .navbar-brand {
        max-height: 100px; /* 로고의 최대 높이 조정 */
        width: 80%; /* 비율을 유지하며 크기 조정 */
    }
}

/* 하단 플로팅 탭 버튼 한 줄로 정렬 */
.mobile-floating-buttons {
    display: flex;
    justify-content: space-around; /* 버튼 간 간격을 균등하게 분배 */
    align-items: center;
    padding: 10px;
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow-x: hidden; /* 가로 스크롤 방지 */
    overflow-y: hidden; /* 세로 스크롤 방지 */
    flex-wrap: nowrap; /* 버튼이 한 줄에 고정되도록 설정 */
}

.mobile-floating-buttons .btn {
    flex: 1; /* 각 버튼의 크기를 동일하게 설정 */
    margin: 0 5px; /* 버튼 간의 간격 설정 */
    text-align: center; /* 버튼 텍스트를 가운데 정렬 */
    font-size: 0.75rem;
    padding: 0.5rem 0; /* 버튼 높이 조정 */
}

@media (max-width: 991px) {
    body {
        padding-top: 66px;
    }

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

    nav {
        flex-direction: column;
    }

    .nav-links {
        margin-top: 1rem;
    }

    .buttons {
        margin-top: 1rem;
    }

    .mobile-floating-buttons {
        display: flex;
        justify-content: space-around;
        align-items: center;
        flex-wrap: wrap;
    }

    header .buttons {
        display: none;
    }
}

@media (max-width: 750px) {
    .hero h1 {
        font-size: 2rem;
    }

    .slider-container {
        height: 250px;
    }

    .slide {
        object-fit: contain;
    }

    .slider-nav button {
        padding: 5px 10px;
        font-size: 18px;
    }

    .prev {
        left: 10px;
    }

    .next {
        right: 10px;
    }

    .dot {
        width: 8px;
        height: 8px;
    }

    .buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .hero-logo {
        max-height: 200px;
    }

    .mobile-floating-buttons {
        display: flex;
    }
}

/*mobile */
@media (max-width: 750px) {
    body {
        font-size: 14px; /* 모바일에 맞는 기본 폰트 크기 */
    }

    h1 {
        font-size: 1.5rem; /* 모바일에 적합한 제목 크기 */
    }

    h2 {
        font-size: 1.3rem;
    }

    .hero {
        padding: 4rem 1rem; /* 모바일에 적합한 패딩 조정 */
    }

    .logo img {
        height: 30px; /* 모바일에서 로고 크기 조정 */
    }

    .nav-links li {
        margin-left: 0.5rem;
    }

    .nav-links a {
        font-size: 0.9rem;
    }

    .buttons .btn {
        font-size: 0.8rem; /* 모바일 버튼 폰트 크기 조정 */
        padding: 0.5rem 1rem;
    }

    .slider-container {
        height: 30vh; /* 모바일에서 슬라이더 높이 조정 */
    }

    .slide {
        object-fit: cover;
    }

    .mobile-floating-buttons {
        display: flex;
        justify-content: space-around;
        align-items: center;
        padding: 10px;
        position: fixed;
        bottom: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.9);
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    .mobile-floating-buttons .btn {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }
    .logo-container {
        padding: 1rem;
    }

    .hero-logo {
        max-height: 150px;
    }
}

.navbar {
    max-width: 100%; /* 전체 화면 너비에 맞춤 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    overflow: hidden;
    flex-wrap: nowrap;
}

/* 토글 메뉴 숨기기 */
.navbar-toggler {
    display: none; /* 토글 버튼을 완전히 숨깁니다 */
}
.navbar-collapse {
    max-width: 100%; /* 화면에 맞게 조정 */
}

/* 화면 너비가 작은 모바일에 대한 추가 스타일 */
@media (max-width: 400px) {
    .navbar {
        padding: 0.5rem; /* 좁은 화면에서 여백 줄이기 */
    }

    .navbar-brand img {
        max-height: 40px; /* 로고 크기 조정 */
    }

    .nav-links a {
        font-size: 0.8rem; /* 메뉴 글자 크기 조정 */
    }
}

/* 구글 맵 스타일 */
#google-map {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
}

/* 로고 크기 조절 */
.logo-container {
    width: 100%;
    max-width: 1200px;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.hero-logo {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

@media (max-width: 1200px) {
    .logo-container {
        padding: 1rem;
    }

    .hero-logo {
        width: 100%;
        max-height: 200px;
    }
}

@media (max-width: 750px) {
    .logo-container {
        padding: 1rem;
    }

    .hero-logo {
        max-height: 150px;
    }
}

/* 유튜브 버튼 스타일 */
.btn-youtube {
    background-color: #FF0000; /* YouTube의 브랜드 색상 */
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    margin-left: 1rem;
}

.btn-youtube:hover {
    background-color: #cc0000; /* Hover 시 약간 어두운 색상 */
}

/* BPH 섹션 스타일 */
#bph-info .card {
    transition: transform 0.3s ease;
}

#bph-info .card:hover {
    transform: translateY(-5px);
}

#bph-info .card-img-top {
    height: 250px;
    object-fit: cover;
}

#bph-info ul li {
    margin-bottom: 0.5rem;
}

#bph-info .bg-white {
    border-radius: 10px;
}
