/*
Theme Name: 김포누수탐지 테마
Theme URI: https://gimpo.forcing.co.kr
Author: Forcing
Author URI: https://forcing.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: gimpo-nusu
Tags: responsive-layout, one-column, custom-menu, featured-images
*/

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary-color: #3f5efb;
    --primary-dark: #2a4adb;
    --primary-light: #6b85fc;
    --secondary-color: #fc466b;
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #fff;
    --bg-light: #f8f9fa;
    --border-color: #e9ecef;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 8px 30px rgba(63,94,251,0.3);
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-main: "Open Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-main);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-color);
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-color);
}
h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
h3 { font-size: clamp(1.25rem, 3vw, 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); }

img { max-width: 100%; height: auto; display: block; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.site-header {
    background: var(--bg-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-inner { display: flex; justify-content: space-between; align-items: center; }

.site-branding h1 { font-size: 1.5rem; margin: 0; }
.site-branding a { color: var(--primary-color); font-weight: 700; }

.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1002;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }

.off-canvas-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.off-canvas-overlay.active { opacity: 1; visibility: visible; }

.off-canvas-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background: var(--bg-color);
    padding: 80px 30px 30px;
    transition: var(--transition);
    z-index: 1001;
    overflow-y: auto;
}

.off-canvas-menu.active { right: 0; }
.off-canvas-menu ul { list-style: none; }
.off-canvas-menu li { margin-bottom: 15px; }

.off-canvas-menu a {
    display: block;
    padding: 12px 0;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.off-canvas-menu a:hover { padding-left: 10px; color: var(--primary-color); }

@media (min-width: 992px) {
    .menu-toggle, .off-canvas-overlay { display: none; }

    .off-canvas-menu {
        position: static;
        width: auto;
        height: auto;
        background: none;
        padding: 0;
        overflow: visible;
    }

    .off-canvas-menu ul { display: flex; gap: 30px; }
    .off-canvas-menu li { margin: 0; }

    .off-canvas-menu a {
        padding: 8px 0;
        border: none;
        position: relative;
    }

    .off-canvas-menu a::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        width: 0;
        height: 2px;
        background: var(--primary-color);
        transition: var(--transition);
    }

    .off-canvas-menu a:hover::after { width: 100%; }
}

main { min-height: 60vh; padding: 40px 0; }

.card {
    background: var(--bg-color);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    transform-style: preserve-3d;
}

.card:hover { transform: translateY(-10px); box-shadow: var(--shadow-hover); }

.tilt-card { transform-style: preserve-3d; perspective: 1000px; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(63,94,251,0.4);
    color: #fff;
}

.btn-split { position: relative; overflow: hidden; }

.btn-split::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 100%;
    background: rgba(255,255,255,0.2);
    border-left: 1px solid rgba(255,255,255,0.3);
}

.hero {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: #fff;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero h1 { color: #fff; margin-bottom: 1rem; position: relative; }

.hero p {
    color: rgba(255,255,255,0.9);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    position: relative;
}

.icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.feature-item { text-align: center; padding: 40px 30px; }

.content-section {
    background: var(--bg-color);
    border-radius: var(--radius);
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.content-section h2 {
    color: var(--primary-color);
    padding-bottom: 15px;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-color);
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 15px;
    overflow: hidden;
}

.faq-question {
    padding: 20px;
    background: var(--bg-light);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    transition: var(--transition);
}

.faq-question:hover { background: var(--primary-color); color: #fff; }

.faq-answer { padding: 0 20px; max-height: 0; overflow: hidden; transition: all 0.3s ease; }
.faq-answer.active { padding: 20px; max-height: 500px; }

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.post-card {
    background: var(--bg-color);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }

.post-card-image {
    height: 200px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    position: relative;
}

.post-card-content { padding: 25px; }
.post-card h3 { margin-bottom: 10px; }
.post-card h3 a { color: var(--text-color); }
.post-card h3 a:hover { color: var(--primary-color); }
.post-meta { font-size: 0.85rem; color: var(--text-light); margin-bottom: 15px; }

.pagination { display: flex; justify-content: center; gap: 10px; margin-top: 40px; }

.pagination a, .pagination span {
    padding: 10px 16px;
    background: var(--bg-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.pagination a:hover, .pagination .current { background: var(--primary-color); color: #fff; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; }

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(63,94,251,0.1);
}

.site-footer {
    background: #1a1a2e;
    color: #fff;
    padding: 60px 0 30px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 { color: #fff; margin-bottom: 20px; font-size: 1.1rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: rgba(255,255,255,0.7); }
.footer-col a:hover { color: var(--primary-light); }

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
}

.error-404 { text-align: center; padding: 100px 20px; }
.error-404 h1 { font-size: 8rem; color: var(--primary-color); margin-bottom: 0; }

.search-form { display: flex; max-width: 500px; margin: 0 auto; }
.search-form input[type="search"] { flex: 1; border-radius: var(--radius) 0 0 var(--radius); border-right: none; }

.search-form button {
    padding: 14px 24px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    cursor: pointer;
    transition: var(--transition);
}

.search-form button:hover { background: var(--primary-dark); }

.sidebar { position: sticky; top: 100px; }

.widget {
    background: var(--bg-color);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

.widget h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

img[width][height] { aspect-ratio: attr(width) / attr(height); }

@media (max-width: 768px) {
    html { font-size: 14px; }
    .hero { padding: 60px 0; }
    .content-section { padding: 25px; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
}

@media print {
    .site-header, .site-footer, .off-canvas-menu { display: none; }
    body { background: #fff; }
    .content-section { box-shadow: none; }
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: #fff;
    padding: 8px 16px;
    z-index: 9999;
    transition: top 0.3s;
}

.skip-link:focus { top: 0; }

*:focus-visible { outline: 3px solid var(--primary-color); outline-offset: 2px; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in { animation: fadeInUp 0.6s ease forwards; }
