/* base.css - Navigation bar and footer styles for base template */
/* This file contains all navbar and footer CSS extracted from style.css */

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

/* CSS Variables */
:root {
  --font-primary: 'Lato', 'Noto Sans KR', sans-serif; /* Lato for headings, Noto Sans KR for body */
  --font-korean: 'Noto Sans KR', sans-serif;

  --color-primary-dark: #0A2342; /* Dark Navy Blue */
  --color-primary-medium: #1F4E79; /* Medium Blue for accents, borders */
  --color-accent-gold: #B08D57;   /* Gold/Bronze */
  --color-accent-light-gold: #D4AC6E; /* Lighter Gold for hover */
  
  --color-text-light: #F8F9FA;    /* Light Gray / Off-White for dark backgrounds */
  --color-text-dark: #212529;     /* Dark Gray for light backgrounds */
  --color-text-muted: #6c757d;    /* Muted Gray */

  --color-background-light: #FFFFFF;
  --color-background-medium: #F8F9FA; /* Light Gray for sections */
  --color-background-dark: var(--color-primary-dark);

  --navbar-height: 70px; /* Adjust as needed */
  --border-radius-sm: 0.25rem;
  --border-radius-md: 0.5rem;
  --box-shadow-sm: 0 .125rem .25rem rgba(0,0,0,.075);
  --box-shadow-md: 0 .5rem 1rem rgba(0,0,0,.15);
}

/* Reset and Global Styles */
html {
  height: 100%;
  overscroll-behavior: none;
  overscroll-behavior-y: none;
  -webkit-overflow-scrolling: touch;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-korean); /* Noto Sans KR for body */
  background-color: var(--color-background-light);
  color: var(--color-text-dark);
  line-height: 1.7; /* Increased for readability */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; /* Prevent horizontal scrollbars from minor overflows */
  overscroll-behavior: none;
  overscroll-behavior-y: none;
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* Use 100vh for full viewport height */
  margin: 0;
  padding: 0;
}

.main-page-content {
  flex: 1 0 auto;
  padding-top: var(--navbar-height); /* Offset for fixed navbar */
  width: 100%; /* Ensure main content also tries to be full width */
}

/* Main content wrapper for base template */
.main-content {
  flex: 1 0 auto;
  padding-top: var(--navbar-height); /* Offset for fixed navbar */
  width: 100%;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary); /* Lato for headings */
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 1rem;
  line-height: 1.3;
}

p {
  margin-bottom: 1rem;
  font-family: var(--font-korean); /* Ensure paragraphs use Noto Sans KR */
}

a {
  color: var(--color-accent-gold);
  text-decoration: none;
  transition: color 0.2s ease-in-out, text-decoration 0.2s ease-in-out;
}

a:hover {
  color: var(--color-accent-light-gold);
  text-decoration: underline;
}

.container, .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 2rem;
    padding-bottom: 9rem;
}

/* ===== NAVIGATION BAR STYLES ===== */
.navbar { /* Bootstrap class .navbar-dark .bg-dark is on the HTML element */
  background-color: var(--color-primary-dark) !important; /* Override Bootstrap's bg-dark */
  height: var(--navbar-height) !important;
  display: flex !important;
  align-items: center !important;
  padding-bottom: 0 !important; /* 패딩 제거 */
  padding-top: 0 !important;
  margin: 0 !important;
}

.navbar .container-fluid {
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
  padding: 0 1rem !important;
  justify-content: space-between !important; /* 로고 왼쪽, 프로필 오른쪽 */
}

.navbar .navbar-brand {
  display: flex !important;
  align-items: center !important;
  height: var(--navbar-height) !important; /* Consistent height */
  padding-top: 0 !important; /* 패딩 제거 */
  padding-bottom: 0 !important;
  transition: all 0.3s ease !important;
  flex-shrink: 0 !important; /* 로고가 줄어들지 않도록 */
  /* Horizontal padding will use Bootstrap default or can be set if needed */
}

.navbar .navbar-brand:hover {
  transform: scale(1.05) !important;
}

.navbar .navbar-brand img.logo-img {
  height: 3rem !important; /* 로고 크기 줄임 */
  filter: brightness(0) invert(1) !important; /* Make logo white for dark background */
  margin-right: 0.75rem !important; /* Space between logo and text */
  padding-bottom: 0 !important; /* 패딩 제거 */
  transition: all 0.3s ease !important;
}

.navbar .navbar-brand .brand-text {
  font-family: var(--font-primary) !important;
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  color: var(--color-text-light) !important;
  text-decoration: none !important;
  letter-spacing: -0.5px !important;
  background: linear-gradient(135deg, #ffffff, var(--color-accent-gold)) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

/* Ensure no lines/underlines on the logo link */
.navbar .navbar-brand,
.navbar .navbar-brand:hover,
.navbar .navbar-brand:focus {
    text-decoration: none !important;
    border: none !important;
    border-bottom: none !important; /* Explicitly remove bottom border */
    box-shadow: none !important;
    /* display: inline-block; was conflicting with flex display, removed */
}

/* 프로필 드롭다운 오른쪽 정렬 */
.navbar .d-flex {
  flex-shrink: 0 !important; /* 프로필 영역이 줄어들지 않도록 */
}

.navbar .d-flex .dropdown > a.dropdown-toggle,
.navbar .d-flex .dropdown > a.dropdown-toggle:hover,
.navbar .d-flex .dropdown > a.dropdown-toggle:focus {
    text-decoration: none !important;
    border: none !important;
    border-bottom: none !important; /* Explicitly remove bottom border */
    box-shadow: none !important;
    outline: none !important; /* Remove outline too, just in case */
}

.navbar .d-flex .dropdown > a.dropdown-toggle::after {
    border: none !important; /* Remove any borders from the caret itself */
    border-top: 0.3em solid transparent !important; /* Re-style caret if borders are removed, or adjust as needed */
    border-right: 0.3em solid transparent !important;
    border-bottom: 0 !important;
    border-left: 0.3em solid transparent !important;
    box-shadow: none !important; /* Just in case */
    /* If the default Bootstrap caret is made of borders, this might make it disappear or look odd. */
    /* We might need to reconstruct it if this is the case, or target the line more specifically. */
    /* For now, the priority is to remove the unwanted line. */
}

.navbar-nav {
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-grow: 1 !important; /* 가운데 정렬을 위해 공간 차지 */
  justify-content: center !important; /* 메뉴 가운데 정렬 */
}

.navbar .nav-link {
  font-family: var(--font-primary) !important; /* Lato for nav links to match style.css */
  color: var(--color-text-light) !important;
  font-weight: 500 !important;
  font-size: 1rem !important; /* Ensure consistent font size */
  padding: 0.5rem 1rem !important; /* Match style.css padding */
  margin: 0 0.75rem !important; /* 메뉴 간격 늘림 */
  border-radius: var(--border-radius-sm) !important;
  transition: all 0.3s ease !important;
  position: relative !important;
  height: auto !important; /* Allow natural height */
  display: flex !important;
  align-items: center !important;
  line-height: 1.5 !important;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .nav-item.dropdown:hover > .nav-link { /* Highlight dropdown toggle only when its own link is hovered */
  color: var(--color-accent-gold) !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)) !important;
  backdrop-filter: blur(5px) !important;
  text-decoration: none !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* Guard: when dropdown parent is hovered but its link itself is not hovered,
   do NOT apply background to avoid affecting neighbors (e.g., 커뮤니티) */
.navbar .nav-item.dropdown:hover > .nav-link:not(:hover) {
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
  color: var(--color-text-light) !important;
}

/* Active page indication */
.navbar .nav-link.active {
  color: var(--color-accent-gold) !important;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.1)) !important;
  border-bottom: 2px solid var(--color-accent-gold) !important;
  font-weight: 600 !important;
}

/* Animated underline effect */
.navbar .nav-link::after {
  content: '' !important;
  position: absolute !important;
  bottom: 0 !important;
  left: 50% !important;
  width: 0 !important;
  height: 2px !important;
  background: var(--color-accent-gold) !important;
  transition: all 0.3s ease !important;
  transform: translateX(-50%) !important;
}

.navbar .nav-link:hover::after {
  width: 80% !important;
}

.navbar .dropdown-menu {
  background-color: var(--color-primary-dark) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: var(--border-radius-sm) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
  margin-top: 0 !important; /* 간격 제거 */
  min-width: 200px !important;
  max-width: 250px !important;
  padding: 0.5rem 0 !important;
}

.navbar .dropdown-item {
  color: var(--color-text-light) !important;
  font-family: var(--font-korean) !important;
  padding: 0.5rem 1rem !important;
  text-align: center !important;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
  background-color: var(--color-background-medium) !important;
  color: var(--color-text-dark) !important;
}

.navbar-nav .dropdown {
  position: relative !important;
}

/* 드롭다운 호버 영역 확장 */
.navbar-nav .dropdown::before {
  content: '' !important;
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  right: 0 !important;
  height: 10px !important; /* 보이지 않는 호버 영역 */
  background: transparent !important;
  z-index: 999 !important;
  pointer-events: none !important; /* don't capture hover to adjacent items */
}

.navbar-nav .dropdown:hover .dropdown-menu {
  display: block;
  animation: fadeIn 0.2s ease-in;
}

.navbar-nav .dropdown-menu {
  display: none;
  transition: all 0.2s ease;
}

.navbar-nav .dropdown-menu:hover {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Dropdown item styling */
.navbar .dropdown-item {
  color: var(--color-text-light) !important;
  font-family: var(--font-korean);
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--color-accent-gold) !important;
  text-decoration: none !important; /* 밑줄 제거 */
}

.navbar .dropdown-item:hover {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 215, 0, 0.05));
  backdrop-filter: blur(5px);
  transform: translateX(5px);
}

.navbar .dropdown-item:hover::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--color-accent-gold);
  border-radius: 0 2px 2px 0;
}

.navbar .navbar-toggler {
  border-color: rgba(255,255,255,0.25);
}
.navbar-collapse {
  z-index: 1031; /* Ensure it's above other content, Bootstrap's fixed-top is 1030 */
  padding: 0;
}

.navbar .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28248, 249, 250, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* User profile/login icon in navbar */
/* Anonymous profile icon (font-awesome) size increase */
.navbar .d-flex .dropdown #loginDropdown i.fa-user-circle {
  font-size: 1.9rem !important; /* ~30px on desktop */
  line-height: 1 !important;
}

@media (max-width: 991.98px) { /* Bootstrap lg breakpoint for navbar collapse */
  .navbar-collapse {
    background-color: var(--color-primary-dark) !important; /* Match navbar background */
    padding: 1rem 0 !important; /* 상하 패딩 추가 */
    margin-top: 0.5rem !important;
    border-radius: var(--border-radius-sm) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
  }

  .navbar-nav {
    align-items: center !important; /* Center nav items when stacked */
    width: 100% !important;
    margin: 0 !important;
  }

  .navbar .nav-item {
    width: 100% !important; /* Make nav items take full width */
    text-align: center !important; /* Center text in nav items */
    margin: 0.25rem 0 !important; /* 수직 간격 추가 */
  }

  .navbar .nav-item .nav-link {
    display: flex !important; /* Flex로 변경 */
    justify-content: center !important; /* 가운데 정렬 */
    align-items: center !important;
    width: 100% !important;
    padding: 0.75rem 1rem !important; /* 패딩 증가 */
    margin: 0 !important;
    font-size: 1.1rem !important; /* 폰트 크기 증가 */
    border-radius: var(--border-radius-sm) !important;
    transition: all 0.3s ease !important;
  }

  .navbar .nav-item .nav-link:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08)) !important;
    transform: scale(1.02) !important;
  }

  /* Mobile navbar improvements */
  .navbar {
    padding: 0.5rem 1rem;
  }

  /* Navbar collapsed menu - mobile */
  .navbar-collapse {
    background-color: var(--color-primary-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 0.5rem;
    padding: 1rem 0;
    border-radius: var(--border-radius-sm);
    text-align: center;
  }

  .navbar-nav {
    text-align: center;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center !important;
  }

  .navbar-nav .nav-link {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    min-height: 44px;
    display: block;
    color: var(--color-text-light) !important;
    text-align: center;
    width: 100%;
    margin: 0 auto;
  }

  .navbar-toggler {
    border: none;
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
  }

  .navbar-brand .logo-img {
    height: 35px;
  }

  /* Mobile dropdown behavior - disable hover but keep click */
  .navbar-nav .dropdown:hover .dropdown-menu {
    display: none;
  }

  /* Enable Bootstrap dropdown click functionality */
  .navbar-nav .dropdown-menu.show {
    display: block !important;
  }

  /* Mobile dropdown  /* 모바일 드롭다운 메뉴 개선 */
  .navbar .nav-item.dropdown .dropdown-menu {
    position: static !important;
    float: none !important;
    width: 90% !important;
    margin: 0.5rem auto !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: var(--border-radius-sm) !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
    text-align: center !important;
  }

  .navbar .nav-item.dropdown .dropdown-menu .dropdown-item {
    text-align: center !important;
    padding: 0.75rem 1rem !important;
    color: var(--color-text-light) !important;
    font-size: 1rem !important;
    border-radius: var(--border-radius-sm) !important;
    margin: 0.25rem !important;
    transition: all 0.3s ease !important;
  }
  
  .navbar .nav-item.dropdown .dropdown-menu .dropdown-item:hover {
    background-color: var(--color-accent-gold) !important;
    color: var(--color-primary-dark) !important;
    transform: scale(1.02) !important;
  }

  .navbar-nav .dropdown-item {
    padding: 0.75rem 1.5rem !important;
    min-height: 44px !important;
    display: block !important;
    color: var(--color-text-light) !important;
    background-color: transparent !important;
    border: none !important;
    text-align: center !important;
    width: 100% !important;
    font-family: var(--font-korean) !important;
    margin: 0 auto !important;
  }

  .navbar-nav .dropdown-item:hover,
  .navbar-nav .dropdown-item:focus {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--color-accent-gold) !important;
  }

  .navbar-nav .dropdown-item:focus {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--color-accent-gold) !important;
  }

  /* Profile section alignment  /* 모바일 프로필 섹션 개선 */
  .navbar .d-flex.align-items-center {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin-top: 1.5rem !important;
    padding: 1rem 0 !important;
    border-top: 2px solid rgba(255, 255, 255, 0.1) !important;
  }

  .navbar .d-flex.align-items-center .dropdown {
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    position: relative !important; /* anchor for absolute dropdown */
  }

  .navbar .d-flex .dropdown > a.dropdown-toggle {
    padding: 0.75rem 1.5rem !important;
    border-radius: var(--border-radius-sm) !important;
    background: transparent !important; /* 배경 제거 */
    transition: all 0.3s ease !important;
  }

  .navbar .d-flex .dropdown > a.dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.05) !important; /* 호버시에만 약간의 배경 */
    transform: scale(1.05) !important;
  }

  .navbar .d-flex .dropdown {
    margin: 0 auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: auto !important;
  }

  .navbar .d-flex .dropdown > a.dropdown-toggle {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }

  /* Larger profile image for mobile */
  .navbar .d-flex .dropdown img.rounded-circle {
    width: 48px !important;
    height: 48px !important;
    border: 2px solid var(--color-accent-gold);
  }

  .navbar .d-flex .dropdown .dropdown-menu {
    position: absolute !important; /* place under toggle */
    top: 100% !important;
    bottom: auto !important;
    right: 0 !important;
    left: auto !important;
    transform: none !important;
    margin-top: 0.5rem !important;
    min-width: 180px !important;
    max-width: 250px !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    background-color: var(--color-primary-dark) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: var(--border-radius-sm) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    z-index: 1050 !important;
  }

  .navbar .d-flex .btn {
    width: 100%;
    margin-bottom: 0.5rem;
    min-height: 44px;
  }

  .navbar .d-flex .btn:last-child {
    margin-bottom: 0;
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  .navbar {
    padding: 0.25rem 0.5rem;
  }

  .navbar-brand .logo-img {
    height: 30px;
  }

  .navbar-nav .nav-link {
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    min-height: 44px;
  }

  .navbar-nav .dropdown-item {
    padding: 0.75rem 1.5rem !important;
    font-size: 0.9rem;
  }

  .navbar-toggler {
    padding: 0.25rem 0.5rem;
  }

  .footer-custom {
    padding: 1.5rem 0.5rem;
  }

  .footer-custom h5 {
    font-size: 1.1rem;
  }

  .footer-custom .small {
    font-size: 0.8rem;
  }

  .footer-custom .social-icons {
    justify-content: center;
    gap: 0.5rem;
  }
}

.footer-custom .row > div {
  position: relative;
}

.footer-custom h5 {
  color: var(--color-accent-gold);
  font-weight: 600;
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
}

.footer-custom h5 i {
  margin-right: 0.5rem;
  font-size: 1.2rem;
}

/* Newsletter section styling */
.footer-custom .newsletter-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-md);
  padding: 1.5rem;
  margin-top: 1rem;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-custom .newsletter-section .input-group {
  margin-bottom: 1rem;
}

.footer-custom .newsletter-section input {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--color-text-light);
  border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
}

.footer-custom .newsletter-section input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.footer-custom .newsletter-section button {
  background: linear-gradient(135deg, var(--color-accent-gold), #e6ac00);
  border: none;
  color: var(--color-primary-dark);
  font-weight: 600;
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
  transition: all 0.3s ease;
}

.footer-custom .newsletter-section button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

/* Footer links styling */
.footer-custom ul.list-unstyled li {
  margin-bottom: 0.5rem;
}

.footer-custom ul.list-unstyled a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  padding: 0.25rem 0;
}

.footer-custom ul.list-unstyled a:hover {
  color: var(--color-accent-gold);
  transform: translateX(5px);
}

.footer-custom ul.list-unstyled a i {
  margin-right: 0.5rem;
  width: 16px;
  text-align: center;
  color: var(--color-accent-gold);
  font-size: 0.9rem;
}

/* Ensure the copyright div itself also has the dark background */
footer.footer-custom .text-center.small,
.footer-custom .text-center.small {
  background-color: var(--color-primary-dark) !important; /* Explicitly dark */
  color: var(--color-text-light) !important;
}

/* Ensure consistent footer text styling across all pages */
.footer-custom h5 {
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  margin-bottom: 1rem !important;
  color: var(--color-text-light) !important;
}

.footer-custom p.small,
.footer-custom .small {
  font-size: 0.8125rem !important;
  line-height: 1.5 !important;
  color: var(--color-text-light) !important;
}

.footer-custom ul.list-unstyled li {
  margin-bottom: 0.5rem !important;
}

.footer-custom .newsletter-section .form-control {
  height: calc(1.5em + 0.5rem + 2px) !important;
  padding: 0.25rem 0.5rem !important;
  font-size: 0.8125rem !important;
  border-radius: 0.2rem !important;
}

.footer-custom .newsletter-section .btn-primary {
  color: #fff !important;
  background-color: var(--color-primary-medium) !important;
  border-color: var(--color-primary-medium) !important;
  padding: 0.25rem 0.5rem !important;
  font-size: 0.8125rem !important;
  border-radius: 0.2rem !important;
}

.footer-custom .newsletter-section .btn-primary:hover {
  background-color: var(--color-accent-gold) !important;
  border-color: var(--color-accent-gold) !important;
}

.footer-custom .social-icons a {
  margin-right: 0.75rem !important;
  font-size: 1rem !important;
}

/* Ensure text and links in the copyright section are light and override other specificities */
footer.footer-custom .container a, footer.footer-custom .container-fluid a {
  color: var(--color-text-light) !important;
  text-decoration: none;
  transition: color 0.2s ease;
  background-color: transparent !important;
}

footer.footer-custom .container .text-center.small a, footer.footer-custom .container-fluid .text-center.small a { /* Links in copyright section */
    color: #ccc !important; /* Lighter grey for links here */
    background-color: transparent !important;
}

footer.footer-custom .container a:hover, footer.footer-custom .container-fluid a:hover {
  color: var(--color-accent-gold) !important;
  text-decoration: underline;
  background-color: transparent !important;
}

footer.footer-custom .container a:focus, footer.footer-custom .container-fluid a:focus,
footer.footer-custom .container a:focus-visible, footer.footer-custom .container-fluid a:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
}

footer.footer-custom .container-fluid a i { /* Ensure icons inherit link color */
    color: inherit !important;
}

@media (max-width: 767.98px) { /* md breakpoint 미만 - 모바일 뷰 */
  .footer-custom .row > div[class*="col-"] { /* 푸터의 모든 컬럼 */
    margin-bottom: 1.5rem; /* 각 컬럼 하단에 여백 추가 */
    text-align: center;    /* 모바일에서 푸터 컬럼 내용 중앙 정렬 */
  }

  .footer-custom .input-group { /* 뉴스레터 입력 그룹 */
    flex-direction: column; /* 이메일 입력창과 버튼을 세로로 쌓음 */
    align-items: stretch;   /* 내부 요소들을 가로로 꽉 채움 */
  }

  .footer-custom .input-group .form-control {
    margin-bottom: 0.5rem; /* 입력창과 버튼 사이 여백 */
    width: 100%;           /* 입력창 너비 100% */
  }

  .footer-custom .input-group .btn {
    width: 100%;           /* 버튼 너비 100% */
  }
  
  .footer-custom .social-icons {
    justify-content: center; /* 소셜 아이콘 중앙 정렬 */
    margin-top: 1rem;        /* 소셜 아이콘 상단 여백 */
  }

  .footer-custom .text-center.small p { /* 저작권 및 고지 사항 텍스트 */
    font-size: 0.8rem; /* 모바일에서 폰트 크기 약간 줄임 (필요시) */
    line-height: 1.5;  /* 줄 간격 조정 */
  }
  .footer-custom .text-center.small p:last-child {
      margin-bottom: 0;
  }
  /* 모바일에서 컨테이너 패딩 제거 */
  .footer-custom > .container {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    max-width: none;
  }
  
  /* 모바일에서 푸터 행(row) 마진 제거 */
  .footer-custom .row {
    margin-left: 0;
    margin-right: 0;
  }
}

/* ===== FOOTER STYLES ===== */
.footer-custom {
  background-color: var(--color-primary-dark) !important;
  color: var(--color-text-light);
  padding-top: 4rem;
  padding-bottom: 3rem;
  flex-shrink: 0;
  width: 100%;
}

/* Override global .container padding for the footer's container */
.footer-custom > .container {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin: 0 auto !important;
  max-width: 1200px !important;
  position: relative;
  z-index: 1;
}
