/* ========================================
   CPM 홈페이지 스타일시트
   작성일: 2025년
   설명: 연구실 홈페이지의 모든 스타일을 관리하는 메인 CSS 파일
   구조:
   1. 로딩 화면 스타일
   2. 기본 설정 및 전역 스타일
   3. 배경 및 레이아웃
   4. 헤더 및 네비게이션
   5. 메인 콘텐츠 영역
   6. 반응형 디자인
   7. 애니메이션 효과
   ======================================== */

/* ========================================
   1. 로딩 화면 스타일
   - 페이지 로드 시 표시되는 로딩 오버레이
   - 로고 애니메이션 및 프로그레스 바 포함
   ======================================== */

/* 로딩 오버레이 메인 컨테이너 */
.loading-overlay {
  position: fixed;                           /* 화면 전체를 덮는 고정 위치 */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(27, 27, 27, 0.98) 0%, rgba(45, 45, 45, 0.98) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;                           /* 헤더보다 훨씬 높은 z-index로 설정 */
  transition: all 1s ease-in-out;           /* 부드러운 사라짐 효과 */
  transform: scale(1);
  opacity: 1;
}

/* 로딩 완료 시 줌아웃 효과 */
.loading-overlay.zoom-out {
  transform: scale(2);                      /* 2배 확대하면서 사라짐 */
  opacity: 0;
}

/* 로딩 완료 후 헤더 표시 클래스 */
.site-header.show {
  opacity: 1 !important;
  visibility: visible !important;
}

/* 로딩 콘텐츠 중앙 정렬 */
.loading-content {
  text-align: center;
}

/* 로고 컨테이너 */
.logo-container {
  margin-bottom: 2rem;                      /* 아래 마진 줄임 3rem → 2rem */
  animation: fadeInUp 1.5s ease-out;        /* 아래에서 위로 페이드인 */
}

/* 로딩 페이지 로고 이미지 */
.loading-logo {
  width: auto;                              /* 가로 크기 자동 (비율 유지) */
  height: 320px;                            /* 세로 크기만 지정 */
  max-width: 320px;                         /* 최대 가로 크기 제한 */
  margin: 0 auto 0.1rem !important;                      /* 아래 마진 줄임 2rem → 1rem */
  display: block;
  border-radius: 5px;
  object-fit: contain;                      /* 이미지 비율 유지 */
  /* 배경과 글로우 효과 제거 */
  box-shadow: none;                         /* 그림자 효과 제거 */
  /* animation: logoGlow 2s ease-in-out infinite alternate; 글로우 애니메이션 제거 */
}

/* 로딩 페이지 메인 텍스트 */
.logo-text {
  font-size: 4rem;
  font-weight: 700;
  margin: 0.2rem 0 0.2rem 0 !important;     /* 상하 마진 강제 적용 */
  color: #ffffff;
  /* 글로우 효과 제거 */
  text-shadow: none;                        /* 텍스트 그림자 제거 */
  /* animation: glow 2s ease-in-out infinite alternate; 글로우 애니메이션 제거 */
}

/* 로딩 페이지 부제목 */
.logo-subtitle {
  font-size: 1.2rem;
  opacity: 0.8;
  font-weight: 300;
  letter-spacing: 2px;                      /* 글자 간격 조정 */
  margin: 0.2rem 0 !important;              /* 상하 마진 강제 적용 */
  animation: fadeInUp 1.5s ease-out 0.5s both; /* 0.5초 지연 후 페이드인 */
}

/* 로딩 프로그레스 바 배경 */
.loading-bar {
  width: 300px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  margin: 0 auto 2rem;
  overflow: hidden;
  position: relative;
  animation: fadeInUp 1.5s ease-out 1s both; /* 1초 지연 후 페이드인 */
}

/* 로딩 프로그레스 바 진행 표시 */
.loading-progress {
  height: 100%;
  background: linear-gradient(90deg, #ffffff, rgba(255, 255, 255, 0.6));
  border-radius: 2px;
  width: 0%;
  animation: loadingProgress 3s ease-in-out; /* 3초 동안 진행 */
  position: relative;
}

/* ========================================
   로딩 애니메이션 키프레임 정의
   ======================================== */

/* 아래에서 위로 페이드인 애니메이션 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);            /* 30px 아래에서 시작 */
  }
  to {
    opacity: 1;
    transform: translateY(0);               /* 원래 위치로 이동 */
  }
}

/* 글로우 효과 애니메이션 */
@keyframes glow {
  from {
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
  }
  to {
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.6), 0 0 60px rgba(255, 255, 255, 0.3);
  }
}

/* 로고 글로우 효과 애니메이션 */
@keyframes logoGlow {
  from {
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.3);
    transform: scale(1);
  }
  to {
    box-shadow: 0 0 60px rgba(255, 255, 255, 0.6), 0 0 80px rgba(255, 255, 255, 0.3);
    transform: scale(1.05);                 /* 약간 확대 */
  }
}

/* 펄스 효과 애니메이션 */
@keyframes pulse {
  0%, 100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

/* 프로그레스 바 진행 애니메이션 */
@keyframes loadingProgress {
  0% {
    width: 0%;
  }
  50% {
    width: 70%;                             /* 중간에 70%까지 빠르게 진행 */
  }
  100% {
    width: 100%;                            /* 마지막에 100% 완료 */
  }
}

/* 반응형 로딩 화면 - 태블릿 */
@media (max-width: 768px) {
  .loading-logo {
    width: auto;                            /* 가로 크기 자동 (비율 유지) */
    height: 150px;                          /* 세로 크기만 지정 */
    max-width: 150px;                       /* 최대 가로 크기 제한 */
  }
  
  .logo-text {
    font-size: 3rem;
  }
  
  .logo-subtitle {
    font-size: 1rem;
  }
  
  .loading-bar {
    width: 250px;
  }
}

/* 반응형 로딩 화면 - 모바일 */
@media (max-width: 480px) {
  .loading-logo {
    width: auto;                            /* 가로 크기 자동 (비율 유지) */
    height: 120px;                          /* 세로 크기만 지정 */
    max-width: 120px;                       /* 최대 가로 크기 제한 */
  }
  
  .logo-text {
    font-size: 2.5rem;
  }
  
  .logo-subtitle {
    font-size: 0.9rem;
  }
  
  .loading-bar {
    width: 200px;
  }
}

/* ========================================
   2. 기본 설정 및 전역 스타일
   - CSS 리셋 및 전체 페이지 기본 설정
   - 글꼴, 색상, 링크 스타일 등
   ======================================== */

/* CSS 리셋 - 모든 요소의 기본 마진/패딩 제거 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;                   /* 패딩과 보더를 포함한 크기 계산 */
}

/* 전체 페이지 기본 스타일 */
body {
  font-family: Helvetica, Arial, sans-serif; /* 기본 폰트 설정 */
  line-height: 1.6;                          /* 줄 간격 */
  color: #ffffff;                            /* 기본 글자색 (흰색) */
  background: #000000 !important;            /* 배경색 검은색 */
  position: relative;
}

/* 전역 링크 스타일 - 모든 링크의 기본 스타일 제거 */
a {
  text-decoration: none !important;          /* 밑줄 제거 */
  outline: none;                             /* 포커스 아웃라인 제거 */
  color: white !important;                   /* 링크 색상 흰색으로 통일 */
}

a:hover {
  text-decoration: none !important;
  color: white !important;
}

a:focus {
  text-decoration: none !important;
  outline: none;
  color: white !important;
}

/* ========================================
   3. 배경 및 레이아웃
   - 배경 GIF 설정 및 기본 레이아웃 컨테이너
   ======================================== */

/* 배경 GIF 레이어 - body::before 가상 요소 사용 */
body::before {
  content: '';
  position: fixed;                           /* 스크롤해도 고정 */
  top: 0;
  right: 0;
  width: 100vw;                              /* 전체 뷰포트 너비 */
  height: 65vh;                              /* 뷰포트 높이의 65% */
  background-image: url('images/test3gif.gif'); /* 배경 GIF 파일 */
  background-size: cover;                    /* 영역을 덮도록 크기 조정 */
  background-position: center;               /* 중앙 정렬 */
  background-repeat: no-repeat;              /* 반복하지 않음 */
  
  /* 그라데이션 마스크 - 왼쪽 아래로 갈수록 투명해짐 */
  -webkit-mask-image: radial-gradient(130% 130% at left bottom,
    rgba(0,0,0,0) 0%,                        /* 완전 투명 */
    rgba(0,0,0,0) 45%,
    rgba(0,0,0,0.4) 70%,                     /* 점진적 불투명 */
    rgba(0,0,0,0.85) 88%,
    rgba(0,0,0,1) 100%);                     /* 완전 불투명 */
  mask-image: radial-gradient(130% 130% at left bottom,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0) 45%,
    rgba(0,0,0,0.4) 70%,
    rgba(0,0,0,0.85) 88%,
    rgba(0,0,0,1) 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  
  opacity: 0.5;                             /* 전체 투명도 조정 */
  z-index: 0 !important;                    /* 콘텐츠보다 뒤에 배치 */
  pointer-events: none;                     /* 클릭 이벤트 차단 */
  border-radius: 20px;                      /* 모서리 둥글게 */
  box-shadow: 0 0 60px rgba(0,0,0,0.7);     /* 가장자리 블렌딩 효과 */
}

/* 기본 레이아웃 컨테이너 */
.container {
  max-width: 1200px;                        /* 최대 너비 제한 */
  margin: 0 auto;                           /* 중앙 정렬 */
  padding: 0 20px;                          /* 좌우 여백 */
}

/* ========================================
   4. 헤더 및 네비게이션
   - 상단 고정 헤더, 로고, 메뉴 시스템
   - 데스크톱 및 모바일 네비게이션 포함
   ======================================== */

/* 메인 헤더 컨테이너 */
.site-header {
  background: transparent !important;       /* 완전 투명 배경 */
  color: white;
  position: fixed;                          /* 상단에 고정 */
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;                           /* 다른 모든 요소보다 위에 (로딩보다는 낮음) */
  box-shadow: none !important;             /* 그림자 제거 */
  /* 로딩 중에는 숨김, 로딩 완료 후 표시 */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* 헤더 내부 컨테이너 */
.header-container {
  display: flex;
  justify-content: flex-start;             /* 좌측부터 배치 */
  align-items: center;                     /* 세로 중앙 정렬 */
  padding: 1rem 2rem;                      /* 상하 1rem, 좌우 2rem 여백 */
  width: 100%;
  margin: 0;
  position: relative;
  gap: 2rem;                              /* 로고와 메뉴 간격 */
  background: transparent !important;      /* 투명 배경 강제 적용 */
}

/* ========================================
   로고 스타일 (통합 관리)
   ======================================== */

/* 로고 메인 컨테이너 */
.site-header .logo {
  max-width: fit-content;                  /* 콘텐츠에 맞는 너비 */
  flex-shrink: 0;                          /* 축소되지 않도록 */
  display: flex !important;
  align-items: center !important;
  flex-direction: row !important;          /* 가로 배치 강제 */
  flex-wrap: nowrap !important;            /* 줄바꿈 방지 */
  gap: 12px;                              /* 이미지와 텍스트 간격 */
  margin-left: 1rem !important;           /* 왼쪽 여백 */
}

/* 로고 링크 스타일 */
.site-header .logo a {
  text-decoration: none !important;
  color: white !important;
  display: flex !important;
  align-items: center !important;
  outline: none;
  max-width: fit-content;
  gap: 12px;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  margin-left: 1rem !important;
}

/* 로고 텍스트 (h1) 스타일 */
.site-header .logo h1 {
  font-size: 2rem;                        /* 로고 텍스트 크기 */
  font-weight: 700;                       /* 굵은 글씨 */
  color: white !important;
  text-decoration: none !important;
  transition: all 0.3s ease;             /* 부드러운 전환 효과 */
  cursor: pointer;
  outline: none;
  margin: 0;
  line-height: 1;                         /* 줄 높이 조정 */
  white-space: nowrap;                    /* 줄바꿈 방지 */
  display: inline-block !important;       /* 블록 폭 차지 방지 */
  flex: 0 0 auto !important;              /* 플렉스 아이템 크기 고정 */
}

/* 로고 이미지 스타일 (모든 선택자 통합) */
.logo-image,
img.logo-image,
.site-header .logo img,
.site-header .logo a img {
  margin: 0;
  vertical-align: middle;
  border-radius: 6px;                     /* 모서리 둥글게 */
  object-fit: contain;                    /* 비율 유지하며 크기 조정 */
  display: inline-block !important;
  flex-shrink: 0;
  align-self: center;
  height: auto;
  max-height: 40px;                       /* 최대 높이 제한 */
  flex: 0 0 auto !important;
}

/* 로고 호버 효과 */
.site-header .logo a:hover h1 {
  color: #70d2d3 !important;              /* 호버 시 빨간색 */
  transform: scale(1.05);                 /* 호버 시 5% 확대 */
}

.site-header .logo a:hover,
.site-header .logo a:focus {
  text-decoration: none !important;
  outline: none;
}

/* ========================================
   메인 네비게이션 시스템
   ======================================== */

/* 메인 네비게이션 컨테이너 */
.main-nav {
  display: block;                         /* 데스크톱에서 표시 */
  margin-left: auto;                      /* 오른쪽 끝으로 이동 */
  margin-right: 1rem;                     /* 오른쪽 여백 */
}

/* 네비게이션 메뉴 리스트 */
.main-nav ul {
  list-style: none;                       /* 불릿 포인트 제거 */
  display: flex;                          /* 가로 배치 */
  gap: 1.5rem;                           /* 메뉴 항목 간격 */
  align-items: center;
  margin: 0;
  padding: 0;
}

/* 메뉴 링크 기본 스타일 */
.main-nav > ul > li > a {
  color: white !important;
  text-decoration: none !important;
  font-weight: 500;                       /* 중간 굵기 */
  padding: 0.5rem 1rem;                   /* 클릭 영역 확장 */
  border-radius: 8px;                     /* 둥근 모서리 */
  transition: all 0.3s ease;             /* 부드러운 전환 */
  position: relative;
  overflow: hidden;
  display: block;
  cursor: pointer;
}

/* ========================================
   메뉴 호버 효과 (통합 관리)
   ======================================== */

/* 모든 메뉴 링크에 공통 적용되는 기본 설정 */
.main-nav > ul > li > a,
.main-nav ul li a,
.site-header .main-nav ul li a {
  position: relative;
  overflow: hidden;
}

/* 호버 시 나타나는 밑줄 애니메이션 */
.main-nav > ul > li > a::after,
.main-nav ul li a::after,
.site-header .main-nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #70d2d3, white); /* 빨간색 그라데이션 */
  transition: all 0.3s ease;
  transform: translateX(-50%);            /* 중앙에서 시작 */
}

/* 통합된 호버 효과 */
.main-nav > ul > li > a:hover,
.main-nav ul li a:hover,
.site-header .main-nav ul li a:hover {
  color: #70d2d3 !important;              /* 호버 시 빨간색 */
  background-color: rgba(255, 255, 255, 0.1) !important; /* 반투명 배경 */
  transform: translateY(-2px) !important;  /* 위로 2px 이동 */
  box-shadow: 0 4px 12px #70d2d3(255, 107, 107, 0.3) !important; /* 그림자 효과 */
  text-decoration: none !important;
  outline: none !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
}

/* 호버 시 밑줄 확장 */
.main-nav > ul > li > a:hover::after,
.main-nav ul li a:hover::after,
.site-header .main-nav ul li a:hover::after {
  width: 80% !important;                  /* 밑줄이 80% 너비로 확장 */
}

/* 활성 메뉴 스타일 (현재 페이지) */
.main-nav > ul > li > a.active {
  color: #70d2d3 !important;
  background-color: rgba(112, 210, 211, 0.1);
  border: 1px solid rgba(112, 210, 211, 0.3);
}

/* ========================================
   햄버거 메뉴 (모바일용)
   ======================================== */

/* 햄버거 메뉴 버튼 (기본적으로 숨김) */
.hamburger-menu {
  display: none;                          /* 데스크톱에서는 숨김 */
  position: relative;
  cursor: pointer;
  z-index: 1004;                          /* 메뉴보다 위에 */
}

/* 햄버거 아이콘 (3줄) */
.hamburger-icon {
  width: 25px;
  height: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* 햄버거 아이콘의 각 줄 */
.hamburger-icon span {
  width: 100%;
  height: 3px;
  background-color: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* 호버 시 X 모양으로 변환 */
.hamburger-menu:hover .hamburger-icon span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-menu:hover .hamburger-icon span:nth-child(2) {
  opacity: 0;                             /* 가운데 줄 숨김 */
}

.hamburger-menu:hover .hamburger-icon span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* 모바일 메뉴 토글 버튼 */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 5px;
  z-index: 1006;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: white;
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

/* 모바일 드롭다운 메뉴 */
.mobile-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(20px);
  border-radius: 10px;
  min-width: 200px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.1);
  margin-top: 10px;
  z-index: 1005;
}

.mobile-dropdown.active {
  display: block;
}

.mobile-dropdown ul {
  list-style: none;
  padding: 1rem 0;
  margin: 0;
}

.mobile-dropdown li {
  padding: 0;
}

.mobile-dropdown a {
  color: white;
  padding: 0.75rem 1.5rem;
  display: block;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.mobile-dropdown a:hover {
  background-color: rgba(255,255,255,0.1);
  color: #70d2d3;
  border-left-color: #70d2d3;
  transform: translateX(5px);
}

/* ========================================
   드롭다운 메뉴 (데스크톱용)
   ======================================== */

.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #000000;
  backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border-radius: 10px;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  list-style: none;
  padding: 1rem 0;
  border: 1px solid rgba(255,255,255,0.1);
  z-index: 1003;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  padding: 0;
}

.dropdown-menu a {
  color: white;
  padding: 0.75rem 1.5rem;
  display: block;
  border-radius: 0;
  transition: all 0.3s ease;
}

.dropdown-menu a:hover {
  background-color: rgba(255,255,255,0.1);
  color: #70d2d3;
  transform: translateX(5px);
}

/* ========================================
   5. 메인 콘텐츠 영역
   - 배너, 섹션, 버튼 등 주요 콘텐츠 스타일
   ======================================== */

/* 팀 그리드 스타일 */
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-top: 40px;
}

/* About Us 섹션 전체 여백 */
.about-section {
  margin-top: 60px;
  padding: 60px 0;
}

.team-item {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 40px 30px;
  border-radius: 15px;
  text-align: center;
  color: white;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.team-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.team-item h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: white;
}

.team-item p {
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.9);
  margin: 0;
}

/* 반응형 팀 그리드 */
@media (max-width: 768px) {
  .team-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
  }
  
  .team-item {
    padding: 30px 20px;
  }
  
  .team-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
  }
  
  .team-item h3 {
    font-size: 1.3rem;
  }
  
  .team-item p {
    font-size: 0.9rem;
  }
  
  .about-section {
    margin-top: 40px;
    padding: 40px 0;
  }
}

/* 메인 배너 섹션 */
.main-banner {
  height: 85vh;                           /* 뷰포트 높이의 85% */
  background: transparent;                /* 투명 배경 */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  margin-top: 8px;                        /* 헤더와의 간격 */
  max-width: 80%;                         /* 최대 너비 80% */
  margin-left: auto;
  margin-right: auto;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  position: relative;
  z-index: 1;                             /* 배경 GIF보다 위에 */
}

/* 배너 내용 스타일 */
.banner-content h2 {
  font-size: 3.5rem;                      /* 메인 제목 크기 */
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3); /* 텍스트 그림자 */
}

.banner-content p {
  font-size: 1.3rem;                      /* 부제목 크기 */
  margin-bottom: 2rem;
  opacity: 0.9;
}

.banner-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;                        /* 줄바꿈 허용 */
}

/* ========================================
   버튼 스타일 시스템
   ======================================== */

/* 기본 버튼 스타일 */
.btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: 50px;                    /* 완전히 둥근 모서리 */
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
  cursor: pointer;
}

/* 주요 버튼 (빨간색) */
.btn-primary {
  background: #70d2d3;
  color: white;
}

.btn-primary:hover {
  background: #70d2d3;                    /* 호버 시 더 진한 빨간색 */
  transform: translateY(-3px);            /* 위로 3px 이동 */
  box-shadow: 0 5px 15px rgba(255,107,107,0.4);
}

/* 보조 버튼 (투명 배경) */
.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.btn-secondary:hover {
  background: white;
  color: #667eea;                         /* 호버 시 파란색 텍스트 */
  transform: translateY(-3px);
}

/* ========================================
   콘텐츠 섹션 레이아웃
   ======================================== */

/* News 섹션 여백 */
.news-section {
  margin-top: 60px;
  padding: 60px 0;
}

/* CPM Today 섹션 여백 */
.CPM-today-section {
  margin-top: 60px;
  padding: 60px 0;
}

/* Contact 섹션 여백 */
.contact-section {
  margin-top: 60px;
  padding: 60px 0;
}

/* 메인 콘텐츠 컨테이너 */
.content {
  margin-top: 0;
  max-width: 80%;                         /* 배너와 동일한 너비 */
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;                             /* 배경 GIF보다 위에 */
}

/* 각 섹션 기본 스타일 */
.content section {
  padding: 5rem 0;                       /* 섹션 간격 */
  border-radius: 20px;
  margin-bottom: 2rem;
}

/* 섹션 제목 스타일 */
.content h2 {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  color: #ffffff;
  position: relative;
}

/* 섹션 제목 아래 장식 선 */
.content h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, rgba(120, 120, 120, 0.8), rgba(160, 160, 160, 0.8));
  border-radius: 2px;
}

/* ========================================
   개별 섹션 스타일
   ======================================== */

/* About Us 섹션 */
.about-section {
  background: transparent;
  backdrop-filter: none;
  border: none;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;         /* 2열 그리드 */
  gap: 4rem;
  align-items: center;
}

.about-text p {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: #ffffff;
  line-height: 1.8;
}

.about-image {
  text-align: center;
}

/* Research 섹션 */
.research-section {
  background: transparent;
  backdrop-filter: none;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.research-item {
  background: rgba(255, 255, 255, 0.1);   /* 반투명 배경 */
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.research-item:hover {
  transform: translateY(-10px);           /* 호버 시 위로 이동 */
}

.research-image {
  height: 200px;
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
}

.research-item h3 {
  padding: 1.5rem 1.5rem 0.5rem;
  font-size: 1.2rem;
  color: #ffffff;
}

.research-item p {
  padding: 0 1.5rem 1rem;
  color: #ffffff;
  line-height: 1.6;
}

.research-item .date {
  display: block;
  padding: 0 1.5rem 1.5rem;
  color: #ffffff;
  font-size: 0.9rem;
}

/* News 섹션 */
.news-section {
  background: transparent;
  backdrop-filter: none;
  border: none;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
}

.news-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 3px 15px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.news-item:hover {
  transform: translateY(-5px);
}

.news-image {
  height: 200px;
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-content {
  padding: 1.5rem;
}

.news-content h3 {
  font-size: 1.1rem;
  color: #ffffff;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.news-content p {
  color: #ffffff;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.news-content .date {
  color: #ffffff;
  font-size: 0.9rem;
}



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

.today-item {
  background: rgba(255,255,255,0.1);
  border-radius: 15px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  transition: transform 0.3s ease;
}

.today-item:hover {
  transform: translateY(-5px);
  background: rgba(255,255,255,0.2);
}

.today-image {
  height: 150px;
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.today-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.today-item .date {
  color: #ffffff;
  font-size: 0.9rem;
}

/* Contact 섹션 */
.contact-section {
  background: transparent;
  backdrop-filter: none;
  border: none;
}

.contact-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-info h3 {
  font-size: 1.3rem;
  color: #ffffff;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.contact-form {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* 이메일 입력 필드 */
.email-input {
  padding: 1rem 1.5rem;
  border: 2px solid #e9ecef;
  border-radius: 50px;
  font-size: 1rem;
  min-width: 300px;
  transition: border-color 0.3s ease;
}

.email-input:focus {
  outline: none;
  border-color: rgba(160, 160, 160, 0.8);
}

/* ========================================
   푸터 스타일
   ======================================== */

.site-footer {
  background: #000000;                    /* 검정 배경 */
  color: white;
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-logo h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.footer-logo p {
  color: #ffffff;
  opacity: 0.8;
}

.footer-links h4,
.footer-contact h4 {
  margin-bottom: 1rem;
  color: rgba(180, 180, 180, 0.9);
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: white;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.footer-links a:hover {
  opacity: 1;
}

.footer-contact p {
  margin-bottom: 0.5rem;
  color: #ffffff;
  opacity: 0.8;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  opacity: 0.7;
}

/* ========================================
   이미지 스타일 시스템
   ======================================== */

/* 모든 콘텐츠 이미지 공통 스타일 */
.about-img,
.research-img,
.news-img,
.today-img {
  width: 100%;
  height: 100%;
  object-fit: cover;                      /* 비율 유지하며 영역 채우기 */
  border-radius: 8px;
  transition: transform 0.3s ease;
}

/* 이미지 호버 효과 */
.about-img:hover,
.research-img:hover,
.news-img:hover,
.today-img:hover {
  transform: scale(1.05);                 /* 호버 시 5% 확대 */
}

/* 이미지 로드 실패 시 플레이스홀더 */
.image-placeholder {
  background: #e9ecef;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 500;
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  height: 100%;
  width: 100%;
}

/* ========================================
   6. 반응형 디자인
   - 태블릿 및 모바일 기기 대응
   ======================================== */

/* 태블릿 및 중간 크기 화면 (768px 이하) */
@media (max-width: 768px) {
  /* 헤더 반응형 */
  .header-container {
    flex-direction: row;
    gap: 1rem;
    padding: 1rem 0;                      /* 모바일에서 좌우 패딩 제거 */
  }
  
  .hamburger-menu {
    z-index: 1004;
  }
  
  .mobile-menu {
    min-width: 200px;
  }
  
  /* 콘텐츠 영역 반응형 */
  .main-banner,
  .content {
    max-width: 95%;                       /* 모바일에서 더 넓게 */
  }
  
  .banner-content h2 {
    font-size: 2.5rem;
  }
  
  .banner-content p {
    font-size: 1.1rem;
  }
  
  .banner-buttons {
    flex-direction: column;               /* 버튼 세로 배치 */
    align-items: center;
  }
  
  /* 그리드 레이아웃 1열로 변경 */
  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .research-grid,
  .news-grid,
  .today-grid {
    grid-template-columns: 1fr;
  }
  
  /* 폼 반응형 */
  .contact-form {
    flex-direction: column;
    align-items: center;
  }
  
  .email-input {
    min-width: auto;
    width: 100%;
    max-width: 300px;
  }
  
  /* 푸터 반응형 */
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* 작은 모바일 화면 (480px 이하) */
@media (max-width: 480px) {
  .banner-content h2 {
    font-size: 2rem;
  }
  
  .content h2 {
    font-size: 2rem;
  }
  
  .container {
    padding: 0 15px;
  }
}

/* ========================================
   7. 애니메이션 효과 (AOS 라이브러리)
   - 스크롤 시 나타나는 애니메이션 최적화
   ======================================== */

/* AOS 성능 최적화 */
[data-aos] {
  will-change: transform, opacity;        /* GPU 가속 활성화 */
  visibility: hidden;                     /* 초기 상태에서 숨김 */
}

[data-aos].aos-animate {
  visibility: visible;                    /* 애니메이션 시작 시 표시 */
}

/* 부드러운 스크롤 */
html {
  scroll-behavior: smooth;
}

/* 커스텀 애니메이션 효과 */
[data-aos="fade-up"] {
  transform: translateY(60px);
  opacity: 0;
  transition: transform 0.8s ease, opacity 0.8s ease;
}

[data-aos="fade-up"].aos-animate {
  transform: translateY(0);
  opacity: 1;
}

[data-aos="fade-right"] {
  transform: translateX(-60px);
  opacity: 0;
  transition: transform 0.8s ease, opacity 0.8s ease;
}

[data-aos="fade-right"].aos-animate {
  transform: translateX(0);
  opacity: 1;
}

[data-aos="fade-left"] {
  transform: translateX(60px);
  opacity: 0;
  transition: transform 0.8s ease, opacity 0.8s ease;
}

[data-aos="fade-left"].aos-animate {
  transform: translateX(0);
  opacity: 1;
}

/* 모바일에서 애니메이션 최적화 */
@media (max-width: 768px) {
  [data-aos] {
    transition-duration: 0.6s !important; /* 모바일에서 더 빠른 애니메이션 */
  }
  
  [data-aos="fade-up"] {
    transform: translateY(40px);          /* 이동 거리 줄임 */
  }
  
  [data-aos="fade-right"],
  [data-aos="fade-left"] {
    transform: translateX(40px);
  }
}

/* ========================================
   8. 문제 해결 및 호환성 코드
   - 브라우저 호환성 및 특수 상황 대응
   ======================================== */

/* 헤더 투명도 강제 보장 */
.site-header::before,
.site-header::after {
  content: none !important;
  background: transparent !important;
}

.site-header *[class*="header"] {
  background: transparent !important;
  box-shadow: none !important;
}

.site-header.scrolled {
  background: transparent !important;
  box-shadow: none !important;
}

/* 로고 가로 정렬 강제 수정 */
.site-header .logo,
.site-header .logo a {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
}

.site-header .logo > *,
.site-header .logo a > * {
  flex: 0 0 auto !important;
  display: inline-block !important;
}

.site-header .logo h1,
.site-header .logo img {
  display: inline-block !important;
}

/* ========================================
   파일 끝 - 총 1273줄
   마지막 수정: 2024년
   주요 기능: 로딩 화면, 투명 헤더, 배경 GIF, 반응형 디자인
   ======================================== */

/* 메인 배너 슬라이더 스타일 */
.main-banner-slider {
  position: relative;
  height: 75vh;
  margin: 0 auto;
  max-width: calc(100% - 500px); /* 가로 길이 더 줄임 */
  margin-top: 110px; /* 배너를 더 올림 */
  display: flex;
  flex-direction: column;
}

/* 배너 제목 스타일 */
.banner-title {
  text-align: center;
  color: white;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.banner-slides {
  position: relative;
  width: 100%;
  flex: 1; /* 남은 공간을 모두 차지 */
  display: block; /* 클릭 충돌 방지 */
  pointer-events: none; /* 내부 이미지가 클릭 막지 않도록 */
  margin-bottom: 10px; /* 네비게이션과의 간격 */
}

.banner-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 3s ease-in-out;
  display: block; /* 내부 요소 클릭 충돌 방지 */
}

.banner-slide.active {
  opacity: 1;
}

.banner-bg-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 15px;
  z-index: 1;
  background: rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  pointer-events: none; /* 이미지가 도트 클릭을 가리지 않도록 */
}





/* 배너 네비게이션 */
.banner-nav {
  position: relative; /* 다시 relative로 변경 */
  text-align: center;
  z-index: 100; /* 더 높은 z-index로 설정 */
  width: 100%;
  pointer-events: auto; /* 클릭 보장 */
  padding: 15px 0; /* 상하 패딩 */
  flex-shrink: 0; /* 축소되지 않도록 */
}

.banner-dots {
  display: flex;
  gap: 16px; /* 간격 늘림 */
  justify-content: center; /* 가운데 정렬 */
  align-items: center;
}

.banner-dot {
  display: inline-block; /* 레이아웃 안정화 */
  width: 16px; /* 크기 증가 */
  height: 16px; /* 크기 증가 */
  border-radius: 50%;
  background: rgba(255,255,255,0.6); /* 더 진한 배경 */
  cursor: pointer;
  transition: all 0.3s ease;
  border: 3px solid rgba(255,255,255,0.8); /* 더 진한 테두리 */
  pointer-events: auto; /* 클릭 보장 */
  appearance: none;
  background-clip: padding-box;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3); /* 그림자 추가 */
}

.banner-dot.active {
  background: white;
  transform: scale(1.3); /* 더 크게 확대 */
  border-color: white;
  box-shadow: 0 4px 12px rgba(255,255,255,0.5); /* 활성 상태 그림자 */
}

.banner-dot:hover {
  background: rgba(255,255,255,0.9);
  transform: scale(1.2);
  box-shadow: 0 3px 10px rgba(255,255,255,0.3);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  /* 헤더 반응형 */
  .main-nav {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .mobile-dropdown {
    display: none;
  }
  
  .mobile-dropdown.active {
    display: block;
  }
  
  /* 배너 반응형 */
  .main-banner-slider {
    max-width: calc(100% - 60px);
    height: 40vh;
    margin-top: 100px;
  }
  
  .banner-title {
    font-size: 2rem;
    margin-bottom: 5px;
  }
  
  .banner-content {
    padding: 30px 20px;
    margin-bottom: 50px;
  }
  
  .banner-content h3 {
    font-size: 1.3rem;
  }
  
  .banner-content p {
    font-size: 0.9rem;
  }
  
  /* 섹션 간격 모바일 조정 */
  .news-section,
  .CPM-today-section,
  .contact-section {
    margin-top: 40px;
    padding: 40px 0;
  }
}