/* =============================================
   MAKATION - Global Medical Marketing
   Main Stylesheet
   ============================================= */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;600;700;900&family=Montserrat:wght@300;400;500;600;700;800;900&display=swap');

/* =============================================
   CSS Variables
   ============================================= */
:root {
  --color-red: #E51C23;
  --color-red-dark: #C0181E;
  --color-red-light: #FF3B42;
  --color-black: #0D0D0D;
  --color-dark: #1A1A1A;
  --color-dark2: #2C2C2C;
  --color-gray: #6B6B6B;
  --color-gray-light: #B0B0B0;
  --color-border: #E8E8E8;
  --color-bg: #FAFAFA;
  --color-white: #FFFFFF;
  --font-ko: 'Noto Sans KR', sans-serif;
  --font-en: 'Montserrat', sans-serif;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.12);
  --shadow-lg: 0 16px 64px rgba(0,0,0,0.16);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --radius: 4px;
  --radius-lg: 12px;
}

/* =============================================
   Reset & Base
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-ko);
  color: var(--color-black);
  background-color: var(--color-white);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  min-width: 0;
}

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

ul, ol {
  list-style: none;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* =============================================
   Typography
   ============================================= */
.font-en {
  font-family: var(--font-en);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-red);
  margin-bottom: 16px;
}

.section-tag::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--color-red);
}

.section-title {
  font-family: var(--font-en);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-black);
  margin-bottom: 16px;
}

.section-title span {
  color: var(--color-red);
}

.section-subtitle {
  font-size: 16px;
  color: var(--color-gray);
  line-height: 1.8;
  max-width: 560px;
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* =============================================
   Layout
   ============================================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

.section-dark {
  background: var(--color-dark);
  color: var(--color-white);
}

.section-gray {
  background: var(--color-bg);
}

/* =============================================
   Buttons
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-red);
  color: var(--color-white);
  border: 2px solid var(--color-red);
}

.btn-primary:hover {
  background: var(--color-red-dark);
  border-color: var(--color-red-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(229, 28, 35, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--color-white);
  border: 2px solid rgba(255,255,255,0.6);
}

.btn-outline:hover {
  background: var(--color-white);
  color: var(--color-black);
  border-color: var(--color-white);
}

.btn-outline-dark {
  background: transparent;
  color: var(--color-black);
  border: 2px solid var(--color-black);
}

.btn-outline-dark:hover {
  background: var(--color-black);
  color: var(--color-white);
}

.btn-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.btn:hover .btn-icon {
  transform: translateX(4px);
}

/* =============================================
   Navigation
   ============================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(13, 13, 13, 0.96);
  backdrop-filter: blur(20px);
  padding: 14px 0;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

/* 스크롤 시 회사명(logo-sub) 숨김 */
.navbar.scrolled .logo-sub {
  display: none;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
}

/* Logo Image */
.logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1); /* 기본: 흰색 출력 */
  transition: var(--transition);
}

/* 네비바가 투명할 때도 로고 흰색 유지 */
.navbar .logo-img {
  filter: brightness(0) invert(1);
}

/* Footer 로고 */
.footer-logo {
  height: 32px;
  width: auto;
  margin-bottom: 16px;
  display: block;
  filter: brightness(0) invert(1);
}

/* 기존 텍스트 로고 (폴백용, 숨김) */
.logo-main {
  font-family: var(--font-en);
  font-size: 22px;
  font-weight: 900;
  color: var(--color-white);
  letter-spacing: 2px;
  text-transform: uppercase;
  display: none; /* 이미지 로고 사용 시 숨김 */
}

.logo-main span {
  color: var(--color-red);
}

.logo-sub {
  font-size: 9px;
  font-weight: 400;
  color: rgba(255,255,255,0.5);
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: opacity 0.3s ease, max-height 0.3s ease;
  max-height: 20px;
  overflow: hidden;
  opacity: 1;
}

.navbar.scrolled .logo-sub {
  max-height: 0;
  opacity: 0;
  margin: 0;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 36px;
}

.navbar-menu a {
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  position: relative;
  padding: 4px 0;
}

.navbar-menu a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-red);
  transition: width 0.3s ease;
}

.navbar-menu a:hover,
.navbar-menu a.active {
  color: var(--color-white);
}

.navbar-menu a:hover::after,
.navbar-menu a.active::after {
  width: 100%;
}

.navbar-cta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.navbar-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.navbar-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  transition: var(--transition);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-dark);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-family: var(--font-en);
  font-size: 24px;
  font-weight: 700;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 3px;
}

.mobile-menu a:hover {
  color: var(--color-red);
}

.mobile-menu-close {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 32px;
  color: var(--color-white);
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
}

/* =============================================
   Page Hero (inner pages)
   ============================================= */
.page-hero {
  padding: 160px 0 80px;
  background: var(--color-dark);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(229,28,35,0.15) 0%, transparent 60%);
}

.page-hero-content {
  position: relative;
  z-index: 1;
}

.page-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-red);
  margin-bottom: 20px;
}

.page-hero-tag::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--color-red);
}

.page-hero h1 {
  font-family: var(--font-en);
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 900;
  color: var(--color-white);
  line-height: 1.1;
  margin-bottom: 20px;
}

.page-hero h1 span {
  color: var(--color-red);
}

.page-hero p {
  font-size: 17px;
  color: rgba(255,255,255,0.65);
  max-width: 540px;
  line-height: 1.8;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin-top: 32px;
}

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

.breadcrumb a:hover {
  color: var(--color-red);
}

.breadcrumb-sep {
  color: rgba(255,255,255,0.2);
}

/* =============================================
   Cards
   ============================================= */
.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

/* =============================================
   Red Accent Line
   ============================================= */
.red-line {
  display: block;
  width: 48px;
  height: 3px;
  background: var(--color-red);
  margin-bottom: 20px;
}

/* =============================================
   Grid Divider
   ============================================= */
.grid-divider {
  display: grid;
  gap: 1px;
  background: var(--color-border);
}

.grid-divider > * {
  background: var(--color-white);
}

/* =============================================
   Counter Animation
   ============================================= */
.counter-value {
  display: inline-block;
  font-family: var(--font-en);
  font-weight: 900;
}

/* =============================================
   Scroll Animations
   ============================================= */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.fade-in {
  opacity: 0;
  transition: opacity 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
}

.slide-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.slide-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.slide-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Delay classes */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* =============================================
   Footer
   ============================================= */
.footer {
  background: var(--color-black);
  color: var(--color-white);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand .logo-main {
  font-size: 20px;
  margin-bottom: 16px;
  display: none; /* 이미지 로고 사용으로 숨김 */
}

.footer-brand p {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  line-height: 1.9;
}

.footer-col h4 {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 20px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul a {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  transition: var(--transition);
}

.footer-col ul a:hover {
  color: var(--color-red);
  padding-left: 4px;
}

.footer-bottom {
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
}

.footer-bottom-info {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom-info span {
  font-size: 11px;
  color: rgba(255,255,255,0.25);
}

/* =============================================
   Scroll Top Button
   ============================================= */
.scroll-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  background: var(--color-red);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
  z-index: 100;
  border: none;
  box-shadow: 0 4px 16px rgba(229,28,35,0.4);
}

.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-top:hover {
  background: var(--color-red-dark);
  transform: translateY(-4px);
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 1024px) {
  .section {
    padding: 80px 0;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .navbar-menu,
  .navbar-cta {
    display: none;
  }

  .navbar-hamburger {
    display: flex;
  }

  /* 모바일: 스크롤 여부와 관계없이 항상 배경 고정 */
  .navbar {
    background: rgba(13, 13, 13, 0.96);
    backdrop-filter: blur(20px);
    padding: 14px 0;
  }

  /* 모바일: 항상 회사명 숨김 */
  .logo-sub {
    display: none;
  }

  .logo-img {
    height: 28px;
  }
  
  .section {
    padding: 60px 0;
  }

  .container {
    padding: 0 16px;
    width: 100%;
    max-width: 100%;
  }

  .page-hero {
    padding: 120px 0 60px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  /* 텍스트 오버플로우 방지 */
  .section-title {
    font-size: clamp(24px, 7vw, 40px);
    word-break: keep-all;
  }

  .page-hero h1 {
    font-size: clamp(28px, 8vw, 56px);
  }
}

@media (max-width: 480px) {
  .btn {
    padding: 12px 20px;
    font-size: 11px;
  }

  .container {
    padding: 0 14px;
  }

  .section {
    padding: 48px 0;
  }

  .section-title {
    font-size: clamp(22px, 6.5vw, 36px);
  }
}
