:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    
    /* 라이트 모드 색상 */
    --background-color: #f8f9fa;
    --text-color: #333;
    --card-bg-color: #fff;
    --highlight-bg-color: #eaf5ff;
    --subtle-text-color: #555;
    --border-color: #ccc;

    --white-color: #fff;
    --light-gray-color: #ecf0f1;
}

body.dark-mode {
    /* 다크 모드 색상 */
    --background-color: #1a1a1a;
    --text-color: #f1f1f1;
    --card-bg-color: #2a2a2a;
    --highlight-bg-color: #3a3a3a;
    --subtle-text-color: #aaa;
    --border-color: #555;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--background-color);
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: var(--card-bg-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
    transition: background-color 0.3s;
}

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

.logo {
    font-size: 1.5em;
    font-weight: 900;
    color: var(--secondary-color);
}

body.dark-mode .logo {
    color: var(--primary-color);
}

nav {
    display: flex;
    align-items: center;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 20px;
    font-weight: 700;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

.contact-btn {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 8px 16px;
    border-radius: 5px;
}

.contact-btn:hover {
    background-color: #2980b9;
    color: var(--white-color);
}

/* Hero Section */
.hero {
    position: relative;
    color: var(--white-color);
    text-align: center;
    padding: 100px 0;
    overflow: hidden;
    
    /* ▼▼▼ [수정됨] 테마별 기본 배경색 설정 ▼▼▼ */
    background-color: #fff; 
    transition: background-color 0.3s;
}

body.dark-mode .hero {
    background-color: #000;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(44, 62, 80, 0.85), rgba(44, 62, 80, 0.85)), url('https://images.unsplash.com/photo-1493135637657-c24113320677?q=80&w=2070&auto-format&fit=crop') no-repeat center center;
    background-size: cover;
    z-index: 1;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}


.hero .container {
    position: relative;
    z-index: 3;
}

.hero h1 {
    font-size: 3em;
    font-weight: 900;
    margin-bottom: 20px;
}

.hero .subtitle {
    font-size: 1.2em;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-button {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 15px 30px;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 700;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-block;
}

.cta-button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

/* Sections */
section {
    padding: 80px 0;
}

section h2 {
    text-align: center;
    font-size: 2.5em;
    font-weight: 900;
    margin-bottom: 20px;
    color: var(--secondary-color);
}
body.dark-mode section h2 {
    color: var(--text-color);
}

.section-subtitle {
    text-align: center;
    font-size: 1.1em;
    color: var(--subtle-text-color);
    margin-bottom: 60px;
}

/* Intro Section */
.intro {
    background: var(--card-bg-color);
    text-align: center;
    transition: background-color 0.3s;
}

.intro p {
    max-width: 800px;
    margin: 0 auto 20px auto;
    font-size: 1.1em;
}

.intro .highlight {
    font-weight: 700;
    font-size: 1.2em;
    color: var(--primary-color);
    background: var(--highlight-bg-color);
    padding: 20px;
    border-radius: 8px;
    margin-top: 40px;
    transition: background-color 0.3s;
}

/* Services Section */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--card-bg-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s;
}
body.dark-mode .service-card {
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}
body.dark-mode .service-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.card-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.service-card h3 {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--secondary-color);
    transition: color 0.3s;
}
body.dark-mode .service-card h3 {
    color: var(--text-color);
}

.service-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-card ul li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 10px;
}

.service-card ul li::before {
    content: '✔';
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: 700;
}

/* CTA Section */
.cta {
    background-color: var(--secondary-color);
    color: var(--white-color);
    text-align: center;
}

.cta h2 {
    color: var(--white-color);
}

.cta p {
    margin-bottom: 30px;
    font-size: 1.1em;
}

/* Footer */
footer {
    background: #1d2b38;
    color: var(--light-gray-color);
    text-align: center;
    padding: 50px 0;
}

footer h3 {
    font-size: 1.5em;
    margin-top: 30px;
    margin-bottom: 10px;
}

footer p {
    margin: 5px 0;
}

.copyright {
    margin-top: 30px;
    font-size: 0.9em;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2em;
    }
    section h2 {
        font-size: 2em;
    }
    header .container {
        flex-direction: column;
    }
    .logo {
        margin-bottom: 10px;
    }
    nav {
        margin-top: 10px;
    }
}

/* ==== Modal Styles (팝업 창 스타일) ==== */
.modal {
    display: none; /* 기본적으로 숨김 */
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--card-bg-color);
    margin: auto;
    padding: 40px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    animation: slideUp 0.4s ease-out;
    transition: background-color 0.3s;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-btn {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: var(--text-color);
}

.modal-content h2 {
    text-align: left;
    margin-top: 0;
    font-size: 2em;
}

.modal-content p {
    text-align: left;
    color: var(--subtle-text-color);
    margin-bottom: 30px;
}

/* ==== 새로운 Formspree 폼 스타일 (fs-form) ==== */
.fs-form {
    margin-top: 30px;
}

.fs-field {
    margin-bottom: 20px;
}

.fs-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--text-color);
}

.fs-input,
.fs-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1em;
    font-family: 'Noto Sans KR', sans-serif;
    box-sizing: border-box;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.fs-textarea {
    resize: vertical;
    min-height: 100px;
}

.fs-button-group {
    margin-top: 30px;
}

.fs-button {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s;
    box-sizing: border-box; /* 버튼 크기 통일을 위한 속성 */
}

.fs-button:hover {
    background-color: #2980b9;
}

/* ==== 폼 제출 상태 메시지 스타일 ==== */
#form-status {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    display: none; /* 평소에는 숨겨둠 */
}

#form-status.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
body.dark-mode #form-status.success {
    background-color: #1c4a2a;
    color: #a3e9b8;
    border: 1px solid #2a6f3f;
}

#form-status.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
body.dark-mode #form-status.error {
    background-color: #5c2a30;
    color: #f7baba;
    border: 1px solid #8c3f47;
}


/* ==== 카카오톡 버튼 및 구분선 스타일 추가 ==== */
.divider {
    text-align: center;
    margin: 25px 0;
    color: #aaa;
    font-size: 0.9em;
    display: flex;
    align-items: center;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ddd;
}
body.dark-mode .divider::before, body.dark-mode .divider::after {
    border-bottom: 1px solid #555;
}
.divider::before { margin-right: 10px; }
.divider::after { margin-left: 10px; }

.kakao-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 15px;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s;
    box-sizing: border-box; /* Submit 버튼과 크기 통일 */
    background-color: #FEE500;
    color: #3A1D1D;
    border: none;
}

.kakao-btn:hover {
    background-color: #f7d800;
}

.kakao-btn svg {
    margin-right: 10px;
}

/* ==== 다크모드 스위치 스타일 (아이콘 포함) ==== */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    margin-right: 20px; /* '핵심 서비스' 링크와 간격 */
}

.theme-switch {
    display: inline-block;
    height: 24px;
    position: relative;
    width: 50px;
}

.theme-switch input {
    display:none;
}

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
}

.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 16px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 16px;
    
    /* ▼▼▼ 해 아이콘 스타일 ▼▼▼ */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%23f39c12" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line></svg>');
    background-repeat: no-repeat;
    background-position: center;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
    /* ▼▼▼ 달 아이콘 스타일 ▼▼▼ */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="%23f1c40f" stroke="%23f1c40f" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg>');
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* ==== 서비스 카드 링크 관련 스타일 ==== */
.service-card {
    text-decoration: none; /* 링크의 밑줄 제거 */
    color: var(--text-color); /* 링크의 기본 색상 지정 */
    position: relative; /* '자세한 설명 보기' 텍스트 위치 기준 */
    display: block; /* a 태그를 div처럼 보이게 함 */
}

.view-details {
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 0.8em;
    color: var(--subtle-text-color);
    opacity: 0; /* 평소에는 숨김 */
    transition: opacity 0.3s ease;
}

.service-card:hover .view-details {
    opacity: 1; /* 마우스를 올렸을 때 나타남 */
}

/* ==== 상세 페이지(shoppingmall.html 등) 공통 스타일 ==== */
.page-title {
    background-color: var(--card-bg-color);
    padding: 60px 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.page-title h1 {
    font-size: 2.8em;
    margin: 0 0 10px 0;
    color: var(--secondary-color);
}
body.dark-mode .page-title h1 {
    color: var(--text-color);
}

.page-title p {
    font-size: 1.1em;
    color: var(--subtle-text-color);
    margin: 0;
}

/* 로고를 링크로 만들기 위한 스타일 */
.logo-link {
    text-decoration: none;
}

/* ==== 포트폴리오 목록 스타일 ==== */
.portfolio-list {
    padding: 80px 0;
}

.portfolio-item {
    display: flex;
    background-color: var(--card-bg-color);
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: var(--text-color);
    overflow: hidden; /* 이미지 모서리를 둥글게 */
    height: 384px;
}
body.dark-mode .portfolio-item {
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}
body.dark-mode .portfolio-item:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.portfolio-image {
    flex-shrink: 0; /* 이미지가 찌그러지지 않도록 */
}

.portfolio-image img {
    width: 384px;
    height: 384px;
    object-fit: contain;
    display: block !important;
    visibility: visible !important;
}

.portfolio-content {
    padding: 40px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-height: 384px;
}

.portfolio-content h3 {
    font-size: 1.8em;
    margin: 0 0 15px 0;
    color: var(--secondary-color);
    text-align: left;
}
body.dark-mode .portfolio-content h3 {
    color: var(--text-color);
}

.portfolio-content p {
    margin: 0;
    line-height: 1.8;
    text-align: left;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .portfolio-item {
        flex-direction: column;
    }
    .portfolio-image img {
        width: 100%;
        height: auto;
    }
}

/* ==== 전후 비교 슬라이더 스타일 ==== */
.comparison-slider {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 40px auto 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.slider-container {
    position: relative;
    width: 100%;
    height: auto;
}

.slider-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
}

.slider-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block !important;
    visibility: visible !important;
}

.after-image {
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
}

.slider-label {
    position: absolute;
    top: 20px;
    padding: 10px 15px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 5px;
    font-weight: bold;
}

.before-image .slider-label {
    left: 20px;
}

.after-image .slider-label {
    right: 20px;
}

.slider-range {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    -webkit-appearance: none;
    background: transparent;
    cursor: ew-resize;
}

.slider-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 100%;
    width: 4px;
    background: var(--primary-color);
}

.slider-range::-moz-range-thumb {
    height: 100%;
    width: 4px;
    background: var(--primary-color);
    border: none;
    border-radius: 0;
}

/* ==== 리포트 테이블 스타일 ==== */
.report-section {
    padding-top: 80px;
    text-align: center;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 40px;
    background-color: var(--card-bg-color);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
}

.report-table th, .report-table td {
    padding: 20px;
    border: 1px solid var(--border-color);
}

.report-table thead {
    background-color: var(--secondary-color);
    color: var(--white-color);
    font-weight: 700;
}

.report-table tbody tr:nth-child(even) {
    background-color: var(--highlight-bg-color);
}

.report-table td.check {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2em;
}

.report-table td.cross {
    color: #ccc;
    font-weight: bold;
    font-size: 1.2em;
}

/* ==== 카카오톡 알림 스타일 ==== */
.notification-section {
    padding-top: 80px;
    text-align: center;
}

.kakaotalk-mockup {
    max-width: 400px;
    margin: 40px auto 0 auto;
    background-color: #A9C4DA;
    border-radius: 15px;
    padding: 20px;
}

.chat-header {
    font-weight: bold;
    margin-bottom: 15px;
    color: #555;
}

.chat-bubble {
    background-color: #FEE500;
    color: #3A1D1D;
    padding: 15px;
    border-radius: 10px;
    text-align: left;
    display: inline-block;
    max-width: 90%;
    position: relative;
}

.chat-bubble::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 10px;
    border-width: 10px;
    border-style: solid;
    border-color: transparent #FEE500 transparent transparent;
}

.chat-bubble p {
    margin: 0;
}

/* ==== SNS 그리드 스타일 ==== */
.sns-grid-section {
    padding-top: 80px;
    text-align: center;
}

.sns-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.sns-grid-item {
    background-color: var(--card-bg-color);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sns-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.sns-grid-item img {
    width: 100%;
    display: block;
}

.grid-item-caption {
    padding: 15px;
    font-weight: bold;
    color: var(--text-color);
}

@media (max-width: 768px) {
    .sns-grid {
        grid-template-columns: 1fr;
    }
}

/* ==== 작업 프로세스 섹션 스타일 ==== */
.process {
    background-color: var(--highlight-bg-color);
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.step {
    text-align: center;
}

.step-number {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 20px;
}

.step h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
}

/* ==== 추천 후기 섹션 스타일 ==== */
.testimonials {
    background-color: var(--card-bg-color);
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background-color: var(--background-color);
    padding: 30px;
    border-radius: 8px;
    border-left: 5px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 20px;
}

.testimonial-author {
    font-weight: bold;
    text-align: right;
}

/* ==== 맨 위로 가기 버튼 ==== */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--primary-color);
    color: var(--white-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none; /* 기본적으로 숨김 */
    align-items: center;
    justify-content: center;
    font-size: 24px;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1000;
}

.back-to-top-btn.show {
    display: flex;
    opacity: 1;
    visibility: visible;
}

/* ==== 메인 페이지에 통합된 서비스 상세 스타일 ==== */
main > .page-title {
    padding-top: 80px;
    padding-bottom: 40px;
    background-color: transparent;
    border-bottom: none;
}

main > .page-title h1 {
    font-size: 2.5em;
}

main > section.service-detail {
    padding-top: 0;
}

main > section:not(:first-child) {
    border-top: 1px solid var(--border-color);
}
