/*
Theme Name: 인천누수탐지 테마
Theme URI: https://incheon.goksan.co.kr
Author: Goksan
Author URI: https://goksan.co.kr
Description: 인천누수탐지 전문 웹사이트 테마 - 글래스 효과, 리퀴드/웨이브 애니메이션, 모바일 최적화
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: incheon-nusu
Tags: responsive-layout, custom-menu, featured-images, translation-ready
*/

/* ========================================
   CSS 변수 및 기본 설정
======================================== */
:root {
    --primary-color: #ff6b6b;
    --primary-dark: #e85555;
    --primary-light: #ff8a8a;
    --secondary-color: #4ecdc4;
    --text-color: #2d3436;
    --text-light: #636e72;
    --bg-color: #ffffff;
    --bg-secondary: #f8f9fa;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.15);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-family: 'Spoqa Han Sans Neo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ========================================
   리셋 및 기본 스타일
======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    font-weight: 400;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   타이포그래피
======================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-color);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* ========================================
   레이아웃
======================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* ========================================
   헤더 - 다국어 지원 스타일
======================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}

.site-header.scrolled {
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 2rem;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.site-logo img {
    height: 40px;
    width: auto;
}

.site-logo .logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
}

/* 네비게이션 */
.main-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.nav-menu li a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-color);
    font-weight: 500;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-menu li a:hover,
.nav-menu li.current-menu-item a {
    color: var(--primary-color);
    background: rgba(255, 107, 107, 0.1);
}

/* 다국어 선택 */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.lang-switcher a {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
    border-radius: 4px;
}

.lang-switcher a.active,
.lang-switcher a:hover {
    color: var(--primary-color);
    background: var(--bg-color);
}

/* 모바일 메뉴 토글 */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-color);
    transition: var(--transition);
}

/* ========================================
   버튼 - 보더 애니메이션
======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

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

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    position: relative;
}

.btn-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
    z-index: -1;
}

.btn-outline:hover {
    color: #fff;
}

.btn-outline:hover::before {
    width: 100%;
}

/* ========================================
   카드 - 호버시 확대 & 글래스 효과
======================================== */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

.card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 12px;
    margin-bottom: 1.5rem;
    color: #fff;
    font-size: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.card-text {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ========================================
   히어로 섹션 - 리퀴드/웨이브 효과
======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: #fff;
    max-width: 800px;
    padding: 2rem;
}

.hero-content h1 {
    color: #fff;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero-content p {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* 웨이브 애니메이션 */
.wave-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave {
    position: relative;
    width: 200%;
    height: 150px;
}

.wave-path {
    fill: var(--bg-color);
}

.wave-1 {
    animation: wave 8s linear infinite;
    opacity: 0.7;
}

.wave-2 {
    animation: wave 6s linear infinite reverse;
    opacity: 0.5;
    position: absolute;
    top: 0;
}

.wave-3 {
    animation: wave 4s linear infinite;
    opacity: 0.3;
    position: absolute;
    top: 0;
}

@keyframes wave {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* 리퀴드 배경 효과 */
.liquid-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.liquid-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.6;
    animation: blob 10s ease-in-out infinite;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-color);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.blob-2 {
    width: 350px;
    height: 350px;
    background: var(--secondary-color);
    bottom: -50px;
    left: -100px;
    animation-delay: -3s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: #a29bfe;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -6s;
}

@keyframes blob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -50px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.9); }
    75% { transform: translate(20px, 50px) scale(1.05); }
}

/* ========================================
   서비스 그리드
======================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* ========================================
   콘텐츠 섹션
======================================== */
.content-section {
    background: var(--bg-secondary);
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.content-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.content-image img {
    width: 100%;
    height: auto;
    display: block;
}

.content-text h2 {
    margin-bottom: 1.5rem;
}

.content-list {
    list-style: none;
    margin: 1.5rem 0;
}

.content-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.content-list li::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: bold;
}

/* ========================================
   FAQ 아코디언
======================================== */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    text-align: left;
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    color: var(--primary-color);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    transition: var(--transition);
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer-inner {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-light);
}

/* ========================================
   CTA 섹션
======================================== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    text-align: center;
}

.cta-section h2 {
    color: #fff;
}

.cta-section p {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.cta-section .btn-outline {
    border-color: #fff;
    color: #fff;
}

.cta-section .btn-outline::before {
    background: #fff;
}

.cta-section .btn-outline:hover {
    color: var(--primary-color);
}

/* ========================================
   푸터
======================================== */
.site-footer {
    background: var(--text-color);
    color: #fff;
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-section p,
.footer-section a {
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-menu {
    list-style: none;
}

.footer-menu li {
    margin-bottom: 0.75rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 0.875rem;
}

/* ========================================
   폼 스타일
======================================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    font-family: var(--font-family);
    font-size: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: var(--bg-color);
    transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.1);
}

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

/* ========================================
   페이지 템플릿
======================================== */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    padding: 8rem 0 4rem;
    text-align: center;
    margin-top: 80px;
}

.page-header h1 {
    color: #fff;
    margin-bottom: 1rem;
}

.page-header p {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
}

.page-content {
    padding: 4rem 0;
}

/* 브레드크럼 */
.breadcrumb {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: rgba(255,255,255,0.8);
    font-size: 0.875rem;
}

.breadcrumb a {
    color: rgba(255,255,255,0.8);
}

.breadcrumb a:hover {
    color: #fff;
}

/* ========================================
   블로그/게시판
======================================== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.post-card {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.post-thumbnail {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-content {
    padding: 1.5rem;
}

.post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.post-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.post-title a {
    color: var(--text-color);
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-excerpt {
    color: var(--text-light);
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
}

.pagination a {
    background: var(--bg-secondary);
    color: var(--text-color);
}

.pagination a:hover {
    background: var(--primary-color);
    color: #fff;
}

.pagination .current {
    background: var(--primary-color);
    color: #fff;
}

/* ========================================
   검색 결과
======================================== */
.search-form {
    display: flex;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.search-form input {
    flex: 1;
}

/* ========================================
   404 페이지
======================================== */
.error-404 {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.error-404 h1 {
    font-size: 8rem;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 1rem;
}

/* ========================================
   모바일 반응형
======================================== */
@media (max-width: 992px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .content-wrapper.reverse {
        direction: ltr;
    }

    .content-image {
        order: -1;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: var(--bg-color);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        transition: right 0.3s ease;
        box-shadow: -5px 0 30px rgba(0,0,0,0.1);
    }

    .main-nav.active {
        right: 0;
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
    }

    .nav-menu li a {
        padding: 1rem;
        border-bottom: 1px solid var(--bg-secondary);
    }

    .hero {
        min-height: auto;
        padding: 8rem 0 6rem;
    }

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

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

    .hero-buttons .btn {
        width: 100%;
    }

    .section {
        padding: 3rem 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   접근성
======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================================
   프린트 스타일
======================================== */
@media print {
    .site-header,
    .site-footer,
    .wave-container,
    .liquid-bg {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}
