@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root {
  /* Color Palette - Premium Clinic Theme */
  --primary-color: #D4AF37; /* Champagne Gold / Point color */
  --primary-dark: #B5952F;
  --secondary-color: #2b2b2b; /* Dark Charcoal for contrast */
  --text-main: #333333;
  --text-light: #666666;
  --text-white: #ffffff;
  --bg-main: #ffffff;
  --bg-light: #fdfbf7; /* Very subtle warm beige */
  --bg-dark: #1a1a1a;
  
  /* Typography */
  --font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  
  /* Spacing & Layout */
  --nav-height: 80px;
  --max-width: 1200px;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Layout Utilities */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 100px 0;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--secondary-color);
}

.section-subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 60px;
  font-weight: 400;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  transition: all 0.3s ease;
  background-color: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

header.scrolled {
  background-color: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-white);
  transition: color 0.3s ease;
  letter-spacing: -0.5px;
}



.nav-links {
  display: flex;
  gap: 40px;
}

.nav-links li a {
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.3s ease;
}



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

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  font-size: 28px;
  color: var(--text-white);
  cursor: pointer;
  z-index: 1001;
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  min-height: 800px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--bg-dark);
}

.hero-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background-color: var(--bg-dark);
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
}

.hero-slide:nth-child(1) {
  background-image: url('./images/all_tight.png');
  animation: dynamicZoomInRight 24s infinite;
  animation-delay: 0s;
}
.hero-slide:nth-child(2) {
  background-image: url('./images/titanium.png');
  animation: dynamicZoomOutLeft 24s infinite;
  animation-delay: 6s;
}
.hero-slide:nth-child(3) {
  background-image: url('./images/repot.png');
  animation: dynamicZoomInUp 24s infinite;
  animation-delay: 12s;
}
.hero-slide:nth-child(4) {
  background-image: url('./images/ellanse.png');
  animation: dynamicZoomOutDown 24s infinite;
  animation-delay: 18s;
}

/* Dynamic Ken Burns Animations */
@keyframes dynamicZoomInRight {
  0% { opacity: 0; transform: scale(1) translate(0, 0); }
  5% { opacity: 0.8; transform: scale(1.03) translate(0, 0); }
  25% { opacity: 0.8; transform: scale(1.12) translate(-2%, 1%); }
  30% { opacity: 0; transform: scale(1.15) translate(-2.5%, 1.5%); }
  100% { opacity: 0; transform: scale(1.15) translate(-2.5%, 1.5%); }
}

@keyframes dynamicZoomOutLeft {
  0% { opacity: 0; transform: scale(1.15) translate(0, 0); }
  5% { opacity: 0.8; transform: scale(1.12) translate(0, 0); }
  25% { opacity: 0.8; transform: scale(1.03) translate(2%, -1%); }
  30% { opacity: 0; transform: scale(1) translate(2.5%, -1.5%); }
  100% { opacity: 0; transform: scale(1) translate(2.5%, -1.5%); }
}

@keyframes dynamicZoomInUp {
  0% { opacity: 0; transform: scale(1) translate(0, 0); }
  5% { opacity: 0.8; transform: scale(1.03) translate(0, 0); }
  25% { opacity: 0.8; transform: scale(1.12) translate(1%, -2%); }
  30% { opacity: 0; transform: scale(1.15) translate(1.5%, -2.5%); }
  100% { opacity: 0; transform: scale(1.15) translate(1.5%, -2.5%); }
}

@keyframes dynamicZoomOutDown {
  0% { opacity: 0; transform: scale(1.15) translate(0, 0); }
  5% { opacity: 0.8; transform: scale(1.12) translate(0, 0); }
  25% { opacity: 0.8; transform: scale(1.03) translate(-1%, 2%); }
  30% { opacity: 0; transform: scale(1) translate(-1.5%, 2.5%); }
  100% { opacity: 0; transform: scale(1) translate(-1.5%, 2.5%); }
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

.hero-label {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-color);
  letter-spacing: 2px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.hero-title {
  font-size: 4rem;
  font-weight: 800;
  color: var(--text-white);
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.hero-desc {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 40px;
  max-width: 500px;
  font-weight: 300;
}

.btn-primary {
  display: inline-block;
  padding: 18px 40px;
  background-color: var(--primary-color);
  color: var(--text-white);
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 4px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3);
}

/* Features Hook Section */
.features {
  background-color: var(--text-white);
  padding: 120px 0;
}

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

.feature-item {
  position: relative;
  text-align: left;
  padding: 50px 40px;
  background: var(--bg-light);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 0;
  box-shadow: none;
  transition: all 0.4s ease;
  overflow: hidden;
}

.feature-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.feature-item:hover {
  transform: translateY(-10px);
  background: var(--text-white);
  box-shadow: 0 30px 60px rgba(0,0,0,0.06);
  border-color: rgba(212, 175, 55, 0.4);
}

.feature-item:hover::before {
  transform: scaleX(1);
}

.feature-number {
  position: absolute;
  top: 30px;
  right: 30px;
  font-size: 4rem;
  font-weight: 800;
  color: rgba(212, 175, 55, 0.08);
  line-height: 1;
  transition: color 0.4s ease;
}

.feature-item:hover .feature-number {
  color: rgba(212, 175, 55, 0.15);
}

.feature-icon {
  width: auto;
  height: auto;
  margin: 0 0 30px 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: var(--primary-color);
  font-size: 36px;
}

.feature-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--secondary-color);
  letter-spacing: -0.5px;
}

.feature-desc {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.6;
  font-weight: 300;
}

/* Treatments Section */
.treatments {
  background-color: var(--bg-light);
}

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

.treatment-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  height: 400px;
  box-shadow: 0 15px 30px rgba(0,0,0,0.05);
  group: hover;
}

.treatment-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.treatment-card:hover .treatment-bg {
  transform: scale(1.05);
}

.treatment-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px;
  transition: background 0.3s ease;
}

.treatment-card:hover .treatment-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 60%, rgba(0,0,0,0) 100%);
}

.treatment-tag {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--text-white);
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 3px;
  margin-bottom: 12px;
  align-self: flex-start;
}

.treatment-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 10px;
}

.treatment-desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 20px;
  opacity: 0.9;
  transform: translateY(0);
  transition: all 0.3s ease;
}

.treatment-action {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
}

.treatment-card:hover .treatment-action {
  opacity: 1;
  transform: translateY(0);
}

/* CPA Form Section Wrapper (Desktop) */
.cpa-section-wrapper {
  background-color: var(--bg-light);
  padding: 100px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cpa-desktop-title {
  text-align: center;
  margin-bottom: 30px;
}

/* Floating CPA Form becomes static on desktop */
.floating-cpa-form {
  position: static;
  transform: none;
  width: 100%;
  max-width: 600px;
  background-color: #c297ea;
  box-shadow: 0 15px 40px rgba(194, 151, 234, 0.3);
  z-index: 10;
  border: none;
  border-radius: 16px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.form-toggle-btn {
  display: none;
}

.floating-cpa-form .phone-row span,
.floating-cpa-form .agree-row,
.floating-cpa-form .agree-row a {
  color: var(--text-white);
}

.floating-cpa-form .agree-row a:hover {
  text-decoration: underline;
  color: #f0f0f0;
}

#consultForm {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row {
  display: flex;
  width: 100%;
}

.form-row input[type="text"],
.form-row input[type="tel"],
.form-row select {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  font-size: 1rem;
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--text-white);
  transition: all 0.3s ease;
}

.form-row select option {
  color: var(--text-main);
  background: var(--text-white);
}

.form-row input::placeholder {
  color: rgba(255, 255, 255, 0.75);
}

.form-row input:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--text-white);
  background-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.phone-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.phone-row select {
  flex: 1.2;
}

.phone-row span {
  color: #666;
}

.phone-row input {
  flex: 2;
  text-align: center;
}

.agree-row {
  font-size: 0.85rem;
  color: #666;
  margin-top: 2px;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
}

.agree-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.agree-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--primary-color);
}

.agree-row a {
  color: #888;
  text-decoration: none;
}

.agree-row a:hover {
  text-decoration: underline;
}

.submit-btn {
  width: 100%;
  background-color: var(--primary-color);
  color: var(--text-white);
  border: none;
  border-radius: 4px;
  padding: 16px;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.submit-btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.4);
}

/* Footer */
footer {
  background-color: var(--secondary-color);
  color: rgba(255, 255, 255, 0.6);
  padding: 80px 0;
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

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

.footer-info p {
  margin-bottom: 8px;
}

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

.footer-links a {
  transition: color 0.3s ease;
}

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

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: #fefefe;
  margin: 10% auto;
  padding: 30px;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-content h3 {
  margin-bottom: 20px;
  color: var(--secondary-color);
  font-size: 1.2rem;
  padding-bottom: 15px;
  border-bottom: 1px solid #eaeaea;
}

.modal-body p {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 15px;
  line-height: 1.6;
}

.modal-body strong {
  color: var(--text-main);
}

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

.close-btn:hover,
.close-btn:focus {
  color: #333;
  text-decoration: none;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-title { font-size: 3.5rem; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .mobile-menu-btn { display: block; }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background-color: rgba(26, 26, 26, 0.98);
    display: flex;
    flex-direction: column;
    padding-top: 100px;
    padding-left: 30px;
    gap: 30px;
    transition: right 0.3s ease;
    z-index: 1000;
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .nav-links li a {
    font-size: 1.2rem;
  }

  .hero-title { font-size: 2.5rem; }
  .hero-overlay { width: 100%; background: rgba(0,0,0,0.5); }
  .feature-grid { grid-template-columns: 1fr; }
  .treatment-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 40px; }
  
  .cpa-section-wrapper {
    padding: 0;
    background-color: transparent;
  }
  .cpa-desktop-title {
    display: none;
  }
  .form-row input[type="text"],
  .form-row input[type="tel"],
  .form-row select {
    padding: 10px 12px;
    font-size: 0.9rem;
  }
  
  .submit-btn {
    padding: 12px;
    font-size: 1.05rem;
  }
  
  #consultForm {
    gap: 6px;
  }

  .form-toggle-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 24px;
    color: var(--text-white);
    font-size: 24px;
    cursor: pointer;
    margin-top: 0;
    margin-bottom: 6px;
  }

  .floating-cpa-form {
    position: fixed;
    bottom: 0;
    left: 0;
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    border: none;
    background-color: #c297ea;
    box-shadow: 0 -5px 25px rgba(194, 151, 234, 0.5);
    z-index: 999;
    padding: 8px 15px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .floating-cpa-form.collapsed {
    transform: translateY(calc(100% - 36px));
  }
  footer {
    padding-bottom: 250px;
  }
}

/* Animations using an intersection observer format but initialized in CSS */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Treatment Slider Animation */
.treatment-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.t-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: transform 0.7s ease;
}

.clinic-slider-card:hover .t-slide {
  transform: scale(1.05);
}

.t-slide-1 {
  background-image: url('./images/c1.jpg');
  animation: treatmentFade 12s infinite;
  animation-delay: 0s;
}

.t-slide-2 {
  background-image: url('./images/c2.jpg');
  animation: treatmentFade 12s infinite;
  animation-delay: 4s;
}

.t-slide-3 {
  background-image: url('./images/c3.jpg');
  animation: treatmentFade 12s infinite;
  animation-delay: 8s;
}

@keyframes treatmentFade {
  0% { opacity: 0; }
  5% { opacity: 1; }
  33% { opacity: 1; }
  38% { opacity: 0; }
  100% { opacity: 0; }
}
