/**
 * ========================================================
 * 📋 common.css - 모든 페이지에서 공유하는 공통 스타일
 * ========================================================
 * 레이아웃: 표준 GNB + 본문 + Footer
 * ======================================================== */

:root {
  --color-point1: #2A9D5D;
  --color-cyan:   #1B7C48;
  --color-dark:   #0F4D33;
  --navbar-height: 56px;
  --border-light: #e0e0e0;
}

/* ===== 전역 리셋 ===== */
*, *::before, *::after { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

html { 
  scroll-behavior: smooth; 
  height: 100%;
}

body {
  font-family: 'Noto Sans KR', 'Malgun Gothic', 'Apple SD Gothic Neo', Dotum, sans-serif;
  font-size: 14px;
  color: #333;
  line-height: 1.6;
  background: #fff;
}

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

a:hover { 
  color: gray; 
}

.container { 
  width: 100%; 
  max-width: 1140px; 
  margin: 0 auto; 
  padding: 0 20px; 
}

@media (max-width: 1024px) {
  .container {
    padding: 0 15px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 15px;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }
}

/* ===== Navbar (GNB) ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  background-color: var(--color-dark);
  height: var(--navbar-height);
  display: flex;
  align-items: center;
  padding: 0 1rem;

}

.navbar-container {
  width: 100% !important;
  max-width: 1140px !important;
  margin: 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  padding: 0 !important;
  position: relative;
  z-index: 1031;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff !important;
  font-size: 1.1rem;
  font-weight: 500;
  text-decoration: none;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .navbar-brand {
    font-size: 0.95rem;
    gap: 6px;
  }
}

@media (max-width: 480px) {
  .navbar-brand {
    font-size: 0.85rem;
    gap: 4px;
  }
}

.navbar-brand .brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .navbar-brand .brand-logo {
    width: 35px;
    height: 35px;
  }
}

@media (max-width: 480px) {
  .navbar-brand .brand-logo {
    width: 30px;
    height: 30px;
  }
}

.navbar-brand .brand-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Desktop 네비게이션 */
.navbar-collapse {
  position: static !important;
  display: flex !important;
  flex-grow: 1;
  justify-content: flex-end;
}

.navbar-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  list-style: none;
  gap: 10px;
  margin: 0 !important;
  padding: 0 !important;
}

.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: var(--navbar-height);
  z-index: 1032;
}

.nav-link {
  color: rgba(255,255,255,0.85) !important;
  padding: 0.5rem 0.7rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active { 
  color: #ffffff !important; 
}

.nav-link .caret { 
  font-size: 0.7rem; 
  margin-left: 2px; 
}

.dropdown-menu {
  display: none !important;
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  right: auto !important;
  background-color: #2A9D5D !important;
  min-width: 180px !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0.5rem 0 !important;
  z-index: 10001 !important;
  box-shadow: 0 4px 8px rgba(0,0,0,0.25) !important;
  margin: 0 !important;
  pointer-events: auto !important;
  white-space: nowrap;
}

.nav-item:hover .dropdown-menu { 
  display: block !important; 
}

.dropdown-item {
  display: block;
  padding: 0.4rem 1rem;
  color: rgba(20, 20, 20, 0.922);
  font-size: 0.9rem;
  white-space: nowrap;
  transition: background 0.15s;
}

.dropdown-item:hover,
.dropdown-item.active { 
  background-color: rgba(255,255,255,0.1); 
  color: #fff; 
}

.navbar-toggler {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  color: #fff;
  font-size: 1.1rem;
}

/* ===== 콘텐츠 래퍼 ===== */
.content-wrapper {
  flex: 1;
  margin-top: var(--navbar-height);
  overflow-y: auto;
  width: 100%;
}

/* ===== Footer ===== */
.agency-footer {
  position: relative;
  background-color: var(--color-dark);
  margin-top: 100px;
  padding-top: 2em;
  padding-bottom: 1em;
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  width: 100%;
}

.agency-footer .go-top {
  position: absolute;
  left: 0;
  right: 0;
  margin: auto;
  top: -25px;
  width: 50px;
  height: 50px;
  font-size: 12px;
  letter-spacing: 1px;
  background: #fff;
  border-radius: 50%;
  text-align: center;
  color: #222;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.agency-footer .go-top i { 
  display: block; 
  font-size: 16px; 
}

.agency-footer .container { 
  max-width: 1140px; 
  margin: 0 auto; 
  padding: 0 15px; 
}

.agency-footer .footer-row { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 20px; 
}

.agency-footer .footer-col { 
  flex: 1; 
  min-width: 200px; 
}

.agency-footer h4 {
  color: #fff;
  text-transform: uppercase;
  font-weight: 400;
  letter-spacing: 3px;
  font-family: Lato, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  margin-bottom: 0.8rem;
}

@media (max-width: 768px) {
  .agency-footer h4 {
    font-size: 14px;
    letter-spacing: 1px;
  }
  
  .agency-footer {
    font-size: 0.8rem;
    padding-top: 1.5rem;
  }
}

@media (max-width: 480px) {
  .agency-footer h4 {
    font-size: 12px;
    letter-spacing: 1px;
  }
  
  .agency-footer {
    font-size: 0.75rem;
    margin-top: 50px;
    padding-top: 1rem;
  }
  
  .agency-footer .go-top {
    width: 40px;
    height: 40px;
  }
}

.agency-footer p { 
  margin-bottom: 0.3rem; 
  line-height: 1.6; 
}

.agency-footer a.legal { 
  text-decoration: none; 
  color: rgba(255,255,255,0.7); 
}

.agency-footer a.legal:hover { 
  color: #fff; 
}

/* ===== Scroll to Top ===== */
.scrollup {
  position: fixed;
  width: 32px;
  height: 32px;
  bottom: 0;
  right: 20px;
  border-radius: 10px 10px 0 0;
  box-shadow: 0 0 10px rgba(255,255,255,1);
  z-index: 1000;
  background: #353D4D;
  display: none;
  text-align: center;
}

.scrollup i { 
  margin-top: 8px; 
  color: #fff; 
  font-size: 14px; 
}

.scrollup:hover { 
  opacity: 0.85; 
}

/* ===== 페이지 히어로/헤더 (공통) ===== */
.page-hero {
  position: relative;
  background-color: #f0f2f5;
  padding: calc(var(--navbar-height) + 14px) 0 30px;
  overflow: hidden;
  min-height: 165px;
  display: flex;
  align-items: center;
  margin: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-hero-bg-text {
  position: absolute;
  top: var(--navbar-height);
  left: 10px;
  padding: 0 50px;
  font-size: 6rem;
  font-weight: 900;
  color: rgba(0, 0, 0, 0.05);
  letter-spacing: 2px;
  user-select: none;
  line-height: 1;
  font-style: italic;
}

.page-hero-content {
  position: relative;
  z-index: 1;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 30px;
  width: 100%;
  text-align: center;
}

.page-hero h1 {
  margin: 0;
  padding-top: 20px;
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
}

@media (max-width: 768px) {
  .page-hero {
    padding: calc(var(--navbar-height) + 24px) 0 20px;
    min-height: 140px;
  }

  .page-hero-bg-text {
    font-size: 4rem;
    padding: 0 20px;
  }

  .page-hero h1 {
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .page-hero {
    padding: calc(var(--navbar-height) + 16px) 0 15px;
    min-height: 110px;
  }

  .page-hero-bg-text {
    font-size: 2.5rem;
    padding: 0 15px;
    left: 5px;
  }

  .page-hero-content {
    padding: 0 15px;
  }

  .page-hero h1 {
    font-size: 1.1rem;
    padding-top: 10px;
  }
}

.index-video-title h3 {
  color: #333;
  font-size: 1.6rem;
  font-weight: 600;
}

.index-video-title p {
  color: #555;
  font-size: 0.9rem;
  line-height: 1.8;
  margin-top: 10px;
}

/* ===== 공통 테이블 스타일 ===== */
table thead th {
  background: var(--color-point1);
  color: #fff;
  font-weight: 500;
  font-size: 0.85rem;
  white-space: nowrap;
  padding: 8px 10px;
}

table tbody td {
  font-size: 0.85rem;
  padding: 6px 10px;
  vertical-align: middle;
}

table tbody tr:nth-child(even) { 
  background: #f8f9fa; 
}

@media (max-width: 768px) {
  table thead th {
    font-size: 0.75rem;
    padding: 6px 8px;
  }
  
  table tbody td {
    font-size: 0.75rem;
    padding: 4px 6px;
  }
}

@media (max-width: 480px) {
  table thead th {
    font-size: 0.7rem;
    padding: 4px 4px;
  }
  
  table tbody td {
    font-size: 0.7rem;
    padding: 3px 4px;
  }
  
  table {
    width: 100%;
    font-size: 0.65rem;
    overflow-x: auto;
  }
}

.img-fluid { 
  max-width: 100%; 
  height: auto; 
}

/* ===== 반응형 디자인 ===== */
@media (max-width: 1200px) {
  .navbar-toggler { 
    display: block !important; 
  }

  .navbar-collapse {
    display: none !important;
    position: absolute !important;
    top: var(--navbar-height) !important;
    left: 0 !important;
    right: 0 !important;
    background-color: var(--color-dark) !important;
    padding: 0.5rem 0 !important;
    width: 100%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  }

  .navbar-collapse.open { 
    display: block !important; 
  }

  .navbar-nav { 
    flex-direction: column !important; 
    align-items: stretch !important; 
    padding: 0 !important; 
    gap: 0 !important; 
  }

  .nav-item { 
    display: block; 
    height: auto;
  }

  .nav-link { 
    padding: 0.7rem 1rem !important; 
  }

  .dropdown-menu {
    position: static !important;
    display: none;
    background-color: rgba(255,255,255,0.05);
    padding-left: 1rem !important;
    box-shadow: none;
    min-width: auto;
  }

  .nav-item:hover .dropdown-menu { 
    display: none !important; 
  }

  .nav-item.open .dropdown-menu { 
    display: block !important; 
  }

  .agency-footer .footer-row { 
    flex-direction: column; 
  }
}

@media (max-width: 768px) {
  .navbar {
    left: 0;
    width: 100%;
  }
}

/* ===== 홈페이지 특수 스타일 ===== */
body.home-page {
  overflow: auto;
}

body.home-page .navbar {
  left: 0;
  width: 100%;
}
