/* 기본 설정 및 리셋 */
:root {
    --primary-color: #29A8A0;
    /* HomeLog 브랜드 컬러 (Mint/Teal) */
    --primary-hover: #228f88;
    --text-main: #191F28;
    --text-sub: #8B95A1;
    --bg-light: #F9FAFB;
    --bg-white: #FFFFFF;
    --border-color: #E5E8EB;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--bg-white);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* 줄바꿈 유틸리티 */
.mobile-br {
    display: none;
}

/* 컨테이너 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 공통 버튼 스타일 */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.2s ease;
    border: none;
    cursor: pointer;
    text-align: center;
    display: inline-block;
}

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

.btn-primary.full-width {
    width: 100%;
    padding: 16px;
    font-size: 1.15rem;
    font-weight: 700;
    border-radius: 12px;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    border: 1px solid var(--primary-color);
    transition: all 0.2s ease;
    text-align: center;
    display: inline-block;
}

.btn-outline:hover {
    background-color: rgba(41, 168, 160, 0.05);
}

.btn-outline-white {
    background-color: transparent;
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    border: 1px solid white;
    transition: all 0.2s ease;
    text-align: center;
    display: inline-block;
}

.btn-outline-white:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.full-width {
    width: 100%;
}

/* 헤더 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a:not(.btn-primary) {
    font-weight: 500;
    color: var(--text-main);
    transition: color 0.2s;
}

.nav-links a:not(.btn-primary):hover {
    color: var(--primary-color);
}

/* 메인 히어로 섹션 */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 0;
    overflow: hidden;
    color: white;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-img {
    display: none;
}

@media (max-width: 768px) {
    .desktop-video {
        display: none;
    }

    .mobile-img {
        display: block;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* 텍스트 가독성을 위한 어두운 오버레이 */
}

.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 40px;
    position: relative;
    z-index: 1;
}

.hero-text {
    max-width: 800px;
}

.hero-text h1 {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 20px;
    letter-spacing: -1px;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.highlight {
    color: var(--primary-color);
}

.hero-text p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.mockup-box {
    width: 300px;
    height: 600px;
    background-color: #f8f9fa;
    border-radius: 44px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    border: 12px solid #191F28;
    /* 폰 프레임 느낌 */
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mockup-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 폰 상단 노치 느낌 추가 */
.mockup-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 25px;
    background-color: #191F28;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    z-index: 10;
}

/* 서비스 카테고리 섹션 (미소 스타일) */
.services-section {
    padding: 100px 0 20px 0;
    background-color: var(--bg-white);
    text-align: center;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-width: 1000px;
    margin: 0 auto;
}

.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 5px;
    background-color: transparent;
    transition: transform 0.2s;
    cursor: pointer;
}

.service-item:hover {
    transform: translateY(-3px);
}

.service-icon {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* [PC] 서비스 아이콘 크기 조절 - 숫자를 변경하여 크기를 맞추세요 */
.service-icon img {
    width: 260px;
    height: 260px;
    object-fit: contain;
}

.service-item span {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--text-main);
    word-break: keep-all;
}

/* 특징/소개 섹션 */
.features {
    padding: 100px 0;
    background-color: var(--bg-white);
    text-align: center;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 60px;
}

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

.feature-card {
    /* 기존 카드 배경 및 패딩 제거 (미소 스타일) */
    background-color: transparent;
    border-radius: 0;
    transition: transform 0.3s ease;
    text-align: center;
    /* 텍스트 가운데 정렬 */
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    /* 아이콘 영역 배경색 (미소 스타일) */
    background-color: #f7f8fa;
    border-radius: 16px;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 160px; /* 고정 높이로 모든 박스 크기 통일 */
}

.feature-icon img {
    height: 155px; /* 박스 높이 160px에 거의 가득 차게 확대 */
    width: 155px;
    object-fit: contain;
    transform: scale(1.3); /* 이미지 내부 여백을 고려하여 더 확대 */
}

.feature-icon img.icon-homelog {
    height: 120px;
    width: 120px;
    border-radius: 50%;
    object-fit: cover;
    transform: none; /* 홈로그 아이콘은 확대하지 않음 */
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 5px;
    letter-spacing: -0.5px;
}

.feature-card p {
    color: #555;
    font-size: 1.05rem;
    line-height: 1.6;
    word-break: keep-all;
}

/* 무료견적 섹션 */
.quote-section {
    padding: 100px 0;
    background-color: #f0fdfc;
}

.quote-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.quote-text {
    flex: 1;
}

.quote-text h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.quote-text p {
    font-size: 1.1rem;
    color: var(--text-sub);
}

.quote-form-card {
    flex: 1;
    background-color: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.form-group input[type="date"] {
    min-height: 50px;
    background-color: white;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(41, 168, 160, 0.1);
}

/* 앱 다운로드 섹션 */
.download-section {
    padding: 100px 0;
    text-align: center;
    background-color: var(--primary-color);
    color: white;
}

.download-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.download-section p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.store-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.store-badge {
    transition: transform 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.store-badge:hover {
    transform: scale(1.05);
}

.store-badge img {
    height: 54px;
    /* 앱스토어/구글플레이 배지의 표준적인 높이 */
    width: auto;
    max-width: 100%;
    display: block;
}

/* 푸터 */
.footer {
    background-color: #191F28;
    color: #8B95A1;
    padding: 60px 0 40px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 40px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 20px;
}

.footer-info p {
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a:hover {
    color: white;
}

/* 반응형 모바일 */
@media (max-width: 768px) {
    .header-container {
        padding: 0 15px;
    }

    .nav-links a:not(.btn-primary) {
        display: none;
    }

    .desktop-br {
        display: none;
    }

    .mobile-br {
        display: block;
    }

    .features {
        text-align: center;
        padding: 60px 20px;
    }

    .services-section {
        padding: 60px 20px 0 20px;
        text-align: center;
    }

    .service-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
        justify-items: center;
        max-width: 100%;
    }

    /* [모바일] 서비스 아이콘 크기 조절 - 숫자를 변경하여 크기를 맞추세요 */
    .service-icon img {
        width: 120px;
        height: 120px;
        max-width: 100%;
    }

    .service-item span {
        font-size: 0.85rem;
    }

    .section-title {
        text-align: center;
        font-size: 1.8rem;
        margin-bottom: 40px;
    }

    .feature-card {
        text-align: center;
    }

    .hero-container,
    .quote-container {
        flex-direction: column;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

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

    .hero-buttons a {
        width: 100%;
        max-width: 300px;
    }

    .mockup-box {
        display: none;
        /* 모바일에서는 목업 숨김 처리 (가독성 위해) */
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .quote-form-card {
        width: 100%;
        padding: 30px 20px;
    }

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

    .store-badge {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }

    .store-badge img {
        height: auto;
        width: 100%;
    }

    .footer-content,
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .footer-links {
        justify-content: center;
    }
}

/* 정책 모달 스타일 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background-color: #fff;
    width: 100%;
    max-width: 800px;
    max-height: 80vh;
    border-radius: 20px;
    padding: 40px;
    position: relative;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalFadeUp 0.3s ease-out;
}

@keyframes modalFadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #888;
    line-height: 1;
}

.modal-body {
    line-height: 1.6;
    color: #444;
}

.modal-body h2 {
    margin-bottom: 20px;
    color: #222;
}

.modal-body h3 {
    margin-top: 30px;
    margin-bottom: 10px;
    color: #333;
}

.modal-body p {
    margin-bottom: 15px;
    white-space: pre-wrap;
}

.modal-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.9rem;
}

.modal-body th,
.modal-body td {
    border: 1px solid #eee;
    padding: 12px;
    text-align: left;
}

.modal-body th {
    background-color: #f9f9f9;
}

@media (max-width: 768px) {
    .modal-content {
        padding: 30px 20px;
    }

    .modal-body table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        font-size: 0.8rem;
    }
}

/* FAQ 섹션 */
.faq-section {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.faq-section .section-title {
    margin-bottom: 40px;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.faq-item[open] {
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(41, 168, 160, 0.1);
}

.faq-item summary {
    padding: 20px 24px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-main);
    transition: color 0.2s;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--text-sub);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 16px;
}

.faq-item[open] summary::after {
    content: '−';
    color: var(--primary-color);
}

.faq-item[open] summary {
    color: var(--primary-color);
}

.faq-item p {
    padding: 0 24px 20px;
    color: var(--text-sub);
    font-size: 0.95rem;
    line-height: 1.7;
}

@media (max-width: 768px) {
    .faq-section {
        padding: 60px 0;
    }

    .faq-item summary {
        padding: 16px 20px;
        font-size: 0.95rem;
    }

    .faq-item p {
        padding: 0 20px 16px;
        font-size: 0.9rem;
    }
}