/* =========================================
           1. CORE SETTINGS & RESET
           ========================================= */
:root {
  /* Color Palette */
  --primary-gold: #cfa972;
  --primary-gold-hover: #b08d55;
  --primary-black: #1a1a1a;
  --text-main: #333333;
  --text-sub: #666666;
  --bg-light: #f9f9f9;
  --bg-blue-bar: #9dccdb;
  --footer-bg: #2b2b2b;

  /* Layout & Spacing */
  --container-width: 1280px;
  --section-padding: 100px 0;

  /* Shadows & Radius */
  --shadow-sm: 0 5px 15px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 50px;
}

/* Animation Keyframes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* =========================================
           3. HERO SECTION (Main Visual)
           ========================================= */
.hero {
  position: relative;
  height: 100vh;
  width: 100%;
  /* 배경 이미지: 어두운 오버레이 + 이미지 */
  background:
    linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0)),
    url("../img/main.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  padding-top: 60px;
}

.hero-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.hero-text {
  color: white;
  max-width: 600px;
  animation: fadeInUp 1s ease-out;
}
.hero-text h1 {
  font-size: 68px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 24px;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.hero-text p {
  font-size: 20px;
  font-weight: 300;
  opacity: 0.9;
  margin-bottom: 40px;
  line-height: 1.6;
}

/* Buttons */
.btn-group {
  display: flex;
  gap: 15px;
}
.btn {
  padding: 18px 36px;
  border-radius: var(--radius-pill);
  font-size: 18px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary {
  background: var(--primary-gold);
  color: white;
  box-shadow: 0 10px 20px rgba(207, 169, 114, 0.3);
}
.btn-primary:hover {
  background: var(--primary-gold-hover);
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(207, 169, 114, 0.5);
}
.btn-light {
  background: white;
  color: var(--primary-black);
}
.btn-light:hover {
  background: #f0f0f0;
  transform: translateY(-3px);
}

/* Hero Badges */
.hero-badges {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeInUp 1s ease-out 0.3s backwards;
}
.badge {
  background: rgba(255, 255, 255, 0.95);
  padding: 20px 30px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  gap: 20px;
  width: 340px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px);
  transition: transform 0.3s;
}
.badge:hover {
  transform: translateX(-10px);
}
.badge-icon {
  width: 60px;
  height: 60px;
  background: #222;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  color: var(--primary-gold);
}
.badge-icon.cert {
  background: white;
  border: 2px solid #eee;
  color: #333;
}
.badge-info h4 {
  font-size: 14px;
  color: #666;
  margin-bottom: 4px;
}
.badge-info span {
  font-size: 18px;
  font-weight: 700;
  color: #222;
}

/* =========================================
           4. SERVICES SECTION
           ========================================= */
.section-services {
  padding: var(--section-padding);
  background-color: #fffcf5;
}
.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-header h2 {
  font-size: 40px;
  font-weight: 700;
  color: var(--primary-black);
  margin-bottom: 15px;
}
.section-header p {
  font-size: 18px;
  color: var(--text-sub);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}
.service-card {
  background: white;
  padding: 40px 30px;
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1px solid #eee;
  transition: all 0.4s ease;
}
.service-card:hover {
  transform: translateY(-15px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-gold);
}
.icon-box {
  width: 80px;
  height: 80px;
  margin: 0 auto 25px;
  background: #fffcf0;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 32px;
  color: var(--primary-gold);
  transition: 0.3s;
}
.service-card:hover .icon-box {
  background: var(--primary-gold);
  color: white;
}
.service-card h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--text-main);
}
.service-card p {
  font-size: 15px;
  color: var(--text-sub);
  line-height: 1.6;
  word-break: keep-all;
}
.btn-more {
  margin-top: 20px;
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-gold);
}

/* =========================================
           5. BEFORE & AFTER (SLIDER FUNCTIONALITY)
           ========================================= */
.section-compare {
  padding: var(--section-padding);
  background: white;
}

.compare-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 40px;
}

/* Image Comparison Slider Styles */
.img-comp-container {
  position: relative;
  height: 400px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.img-comp-img {
  position: absolute;
  width: auto;
  height: 100%;
  overflow: hidden;
}
.img-comp-img img {
  display: block;
  height: 100%;
  width: 100%;
  object-fit: cover;
}
.img-comp-overlay {
  width: 50%;
  z-index: 2;
  border-right: 3px solid white;
} /* 초기값 50% */

.comp-slider {
  position: absolute;
  z-index: 9;
  cursor: ew-resize;
  width: 40px;
  height: 40px;
  background-color: white;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}
.comp-slider::before {
  content: "\f337";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: #555;
}

.comp-label {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 5;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
}
.gallery-item {
  height: 120px;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.4s;
}
.gallery-item:hover img {
  transform: scale(1.1);
}

/* =========================================
           6. REVIEWS SECTION
           ========================================= */
.section-reviews {
  padding: var(--section-padding);
  background: #f9f9f9;
}
.review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.review-card {
  background: white;
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: 0.3s;
}
.review-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-md);
}
.stars {
  color: #ffd700;
  font-size: 16px;
  margin-bottom: 20px;
  letter-spacing: 2px;
}
.review-text {
  font-size: 16px;
  color: #555;
  line-height: 1.7;
  margin-bottom: 25px;
  font-style: italic;
}
.reviewer {
  display: flex;
  align-items: center;
  gap: 15px;
}
.reviewer-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #ddd;
  overflow: hidden;
}
.reviewer-info h4 {
  font-size: 16px;
  font-weight: 700;
  color: #333;
}
.reviewer-info span {
  font-size: 13px;
  color: #888;
}

/* slogan */
.slogan {
  background: url(../img/slogan_bg.jpg) center;
  background-size: cover;
  text-align: center;
  padding: 90px 0;
  color: #fff;
  font-size: 25px;
}

.slogan p {
  opacity: 0.8;
  padding-top: 1.5rem;
  font-size: 0.8em;
}

.slogan .btn-group {
  padding-top: 4rem;
  justify-content: center;
}

.btn-group a {
  width: 100%;
  display: inline-block;
}
/* =========================================
           7. ESTIMATE BAR (CTA)
           ========================================= */
.section-estimate {
  background: var(--bg-blue-bar);
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
/* 배경 패턴 장식 */
.section-estimate::before {
  content: "";
  position: absolute;
  top: -50px;
  left: -50px;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.section-estimate h2 {
  font-size: 32px;
  color: #205364;
  margin-bottom: 30px;
  font-weight: 800;
}

.est-form-container {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  padding: 20px;
  border-radius: 15px;
  display: inline-flex;
  gap: 10px;
  box-shadow: 0 10px 20px rgba(32, 83, 100, 0.1);
}
.est-select {
  height: 55px;
  width: 180px;
  padding: 0 20px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  color: #444;
  outline: none;
  appearance: none;
  background: white
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 4 5"><path fill="%23333" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>')
    no-repeat right 15px center;
}
.est-btn {
  height: 55px;
  padding: 0 40px;
  background: #c59755;
  color: white;
  font-size: 18px;
  font-weight: 700;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(197, 151, 85, 0.4);
  transition: 0.3s;
}
.est-btn:hover {
  background: #b08546;
  transform: translateY(-2px);
}

.contact-info {
  margin-top: 30px;
  font-size: 20px;
  font-weight: 700;
  color: #205364;
  display: flex;
  justify-content: center;
  gap: 30px;
}
.contact-info i {
  margin-right: 8px;
}

/* =========================================
           8. FOOTER
           ========================================= */
footer {
  background: var(--footer-bg);
  color: #aaa;
  padding: 80px 0 30px;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 50px;
  margin-bottom: 50px;
}

.footer-brand h2 {
  color: white;
  font-size: 24px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-brand p {
  line-height: 1.8;
  margin-bottom: 20px;
}
.footer-links h3,
.footer-cs h3 {
  color: white;
  font-size: 18px;
  margin-bottom: 20px;
  font-weight: 600;
}
.footer-links ul li {
  margin-bottom: 12px;
}
.footer-links ul li a:hover {
  color: var(--primary-gold);
  padding-left: 5px;
}

.cs-number {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-gold);
  display: block;
  margin-bottom: 10px;
}
.sns-wrap {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}
.sns-wrap a {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  color: white;
  transition: 0.3s;
}
.sns-wrap a:hover {
  background: var(--primary-gold);
  transform: rotate(360deg);
}

.copyright-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  text-align: center;
  color: #666;
  font-size: 13px;
}

/* =========================================
   MOBILE RESPONSIVE (Max-width: 768px)
   ========================================= */
@media screen and (max-width: 768px) {
    
    /* 1. Layout Reset */
    :root {
        --section-padding: 60px 0; 
    }
    .container {
        width: 100%;
        padding: 0 20px; /* 좌우 여백 확보 */
        box-sizing: border-box;
    }

    /* 2. Hero Section */
    .hero {
        height: auto;
        min-height: 100vh; 
        padding: 120px 0 60px 0;
        background-position: center top;
    }
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    .hero-text {
        width: 100%;
        margin: 0;
    }
    .hero-text h1 {
        font-size: 35px; 
        margin-bottom: 20px;
        word-break: keep-all; 
    }
    .hero-text p {
        font-size: 16px;
        margin-bottom: 30px;
        word-break: keep-all;
    }
    .hero-text p br {
        display: none; 
    }
    
    /* Buttons stacking */
    .btn-group {
      align-items: center;
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    .btn {
        width: 80%;
        justify-content: center;
        box-sizing: border-box;
        font-size: 14px;
        padding: 10px ;
    }

    /* 3. Common Headers */
    .section-header h2 {
        font-size: 26px;
        word-break: keep-all;
    }
    .section-header p {
        font-size: 15px;
        word-break: keep-all;
        padding: 0 10px;
    }

    /* 4. Grids (1 Column Stack) */
    .service-grid,
    .compare-container,
    .review-grid {
        grid-template-columns: 1fr; /* 무조건 한 줄로 */
        gap: 30px;
    }

    /* 5. Service Card */
    .service-card {
        padding: 30px 20px;
    }

    /* 6. Compare Slider */
    .img-comp-container {
        height: 250px; /* 모바일 비율에 맞춰 높이 조정 */
    }

    /* 7. Slogan */
    .slogan {
        padding: 60px 20px;
    }
    .slogan h3 {
        font-size: 25px;
        line-height: 1.4;
        margin-bottom: 15px;
    }
    .slogan p {
        font-size: 17px;
        word-break: keep-all;
    }

    /* 8. Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    .footer-brand h2 {
        justify-content: center;
    }
    .footer-links ul li a:hover {
        padding-left: 0; /* 호버 효과 제거 */
    }
    .sns-wrap {
        justify-content: center;
    }
    .copyright-bar p {
        line-height: 1.6;
        word-break: keep-all;
    }
    .footer-links {
      display: none;
    }
}