/* common.css - Auto-merged from 2 section files */
/* Do not edit directly - regenerate with merge_section_css.py */

/* ========== footer ========== */
/* ==========================================================================
   Footer Component
   ========================================================================== */

.footer {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* --------------------------------------------------------------------------
   CTA Section
   -------------------------------------------------------------------------- */

.footer-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 9.375rem 16.875rem; /* 150px 270px */
  background-color: var(--darkgreen);
  overflow: hidden;
}

.footer-cta-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem; /* 24px */
  text-align: center;
  text-transform: capitalize;
}

.footer-cta-title {
  font-family: var(--font-paperlogy);
  font-weight: 700;
  font-size: 2.625rem; /* 42px */
  line-height: 1.3;
  color: var(--lightgray);
  width: 63.625rem; /* 1018px */
  max-width: 100%;
  margin: 0;
}

.footer-cta-description {
  font-family: var(--font-pretendard);
  font-weight: 400;
  font-size: 1.25rem; /* 20px */
  line-height: 1.6;
  letter-spacing: -0.025rem; /* -0.4px */
  color: rgba(241, 237, 226, 0.7);
  width: 63.625rem; /* 1018px */
  max-width: 100%;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Main Footer
   -------------------------------------------------------------------------- */

.footer-main {
  display: flex;
  flex-direction: column;
  gap: 2rem; /* 32px */
  background-color: #000000;
  width: 100%;
}

.footer-content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 3rem 5rem; /* 48px 80px */
}

/* Logo */
.footer-logo {
  width: 12.375rem; /* 198px */
  height: 2.6875rem; /* 43px */
  flex-shrink: 0;
}

.footer-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Navigation */
.footer-nav {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 80rem; /* 1280px */
  padding: 0.375rem 0; /* 6px 0 */
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 1rem; /* 16px */
  overflow: hidden;
}

.footer-column-title {
  font-family: var(--font-poppins);
  font-weight: 600;
  font-size: 1.125rem; /* 18px */
  line-height: 1.4;
  letter-spacing: -0.0225rem; /* -0.36px */
  text-transform: uppercase;
  color: var(--logogreen);
  margin: 0;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.footer-links li {
  padding: 0.5rem 0; /* 8px 0 */
}

.footer-links a {
  font-family: var(--font-pretendard);
  font-weight: 400;
  font-size: 1.0625rem; /* 17px */
  line-height: 1.5;
  color: rgba(241, 237, 226, 0.7);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--lightgray);
}

/* --------------------------------------------------------------------------
   Credits Section
   -------------------------------------------------------------------------- */

.footer-credits {
  display: flex;
  flex-direction: column;
  padding: 2rem 5rem; /* 32px 80px */
  background-color: rgba(255, 255, 255, 0.1);
}

.footer-credits-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: 1.5rem; /* 24px */
  font-family: var(--font-pretendard);
  font-weight: 400;
  font-size: 0.9375rem; /* 15px */
  line-height: 1.5;
  color: rgba(241, 237, 226, 0.8);
}

.footer-legal a {
  color: rgba(241, 237, 226, 0.8);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-legal a:hover {
  color: var(--lightgray);
}

.footer-copyright {
  white-space: nowrap;
}

/* Social Links */
.footer-social {
  display: flex;
  gap: 0.75rem; /* 12px */
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem; /* 24px */
  height: 1.5rem; /* 24px */
}

.social-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.footer-social a:hover .social-icon {
  opacity: 1;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

/* Tablet (768px - 1199px) */
@media (max-width: 1199px) {
  .footer-cta {
    padding: 5rem 5%;
  }

  .footer-cta-title {
    font-size: 2rem;
    width: 100%;
  }

  .footer-cta-description {
    font-size: 1.125rem;
    width: 100%;
  }

  .footer-content {
    flex-direction: column;
    gap: 2.5rem;
    padding: 2.5rem 5%;
  }

  .footer-logo {
    margin-bottom: 1rem;
  }

  .footer-nav {
    width: 100%;
    flex-wrap: wrap;
    gap: 2rem;
  }

  .footer-column {
    min-width: calc(33.333% - 1.5rem);
  }

  .footer-credits {
    padding: 1.5rem 5%;
  }

  .footer-credits-row {
    flex-direction: column;
    gap: 1.5rem;
  }

  .footer-legal {
    flex-wrap: wrap;
    gap: 1rem;
  }
}

/* Mobile (max-width: 767px) */
@media (max-width: 767px) {
  .footer-cta {
    padding: 3rem 5%;
  }

  .footer-cta-title {
    font-size: 1.5rem;
  }

  .footer-cta-description {
    font-size: 1rem;
  }

  .footer-cta-description br {
    display: none;
  }

  .footer-content {
    padding: 2rem 5%;
    gap: 2rem;
  }

  .footer-nav {
    flex-direction: column;
    gap: 1.5rem;
  }

  .footer-column {
    width: 100%;
    min-width: 100%;
  }

  .footer-column-title {
    font-size: 1rem;
  }

  .footer-links a {
    font-size: 0.9375rem;
  }

  .footer-credits {
    padding: 1.25rem 5%;
  }

  .footer-legal {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.875rem;
  }

  .footer-social {
    gap: 1rem;
  }

  .footer-social a {
    width: 2rem;
    height: 2rem;
    min-height: 44px;
    min-width: 44px;
  }
}

/* ========== navbar ========== */
/* ==============================================
   Navbar Component
   - Position: fixed-top (overlay on first section)
   - Total height: 130px (top: 40px + main: 90px)
   ============================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background-color: transparent;
  transition: background-color 0.3s ease;
}

/* Scrolled state: top bar collapses, background turns white */
.navbar.scrolled {
  background-color: #ffffff;
}

.navbar.scrolled .navbar-top {
  height: 0;
  padding: 0;
  overflow: hidden;
  border-bottom: none;
}

.navbar.scrolled .navbar-main {
  box-shadow: 0px 4px 30px 0px rgba(0, 0, 0, 0.15);
}

/* ------------------------------------------
   Top Bar (Language Selector)
   ------------------------------------------ */
.navbar-top {
  height: 2.5rem; /* 40px */
  padding: 0.375rem 0.75rem; /* 6px 12px */
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #cccccc;
  transition: height 0.3s ease, padding 0.3s ease, border-bottom 0.3s ease;
}

.navbar-top-container {
  width: 100%;
  max-width: 1920px;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
}

.navbar-top-actions {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lang-button {
  width: 3.125rem; /* 50px */
  padding: 0.375rem 0; /* 6px */
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.lang-icon {
  width: 1.125rem; /* 18px */
  height: 1.125rem;
}

/* ------------------------------------------
   Main Navbar
   ------------------------------------------ */
.navbar-main {
  height: 5.625rem; /* 90px */
  padding: 0 5rem; /* 0 80px */
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar-container {
  width: 100%;
  max-width: 1920px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ------------------------------------------
   Logo
   ------------------------------------------ */
.navbar-brand {
  display: block;
  text-decoration: none;
}

.navbar-logo {
  width: 11.5625rem; /* 185px */
  height: 2.5rem; /* 40px */
}

/* ------------------------------------------
   Navigation Menu
   ------------------------------------------ */
.navbar-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5.625rem; /* 90px */
  height: 100%;
}

.nav-link {
  font-family: var(--font-poppins);
  font-weight: 500;
  font-size: 1.25rem; /* 20px */
  line-height: 1;
  color: var(--te-papa-green);
  text-decoration: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
  height: 100%;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--logogreen);
}

/* ------------------------------------------
   Nav Item
   ------------------------------------------ */
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-item .nav-link {
  height: 100%;
  cursor: pointer;
  box-sizing: border-box;
  border-bottom: 6px solid transparent;
}

.nav-item.has-panel .nav-link {
  cursor: pointer;
}

/* Active nav item (panel open) */
.nav-item.active .nav-link {
  font-weight: 700;
  font-size: 1.375rem; /* 22px */
  letter-spacing: -0.44px;
  color: var(--te-papa-green);
  border-bottom-color: var(--logogreen);
}

/* ------------------------------------------
   Mega-Menu Panel
   ------------------------------------------ */
.mega-panel {
  width: 100%;
  height: 0;
  overflow: hidden;
  background: #ffffff;
  border-top: none;
  transition: height 0.35s ease, box-shadow 0.35s ease;
}

.mega-panel.open {
  height: 16.875rem; /* 270px */
  border-top: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0px 10px 40px rgba(0, 0, 0, 0.25);
}

.mega-panel__inner {
  height: 16.875rem; /* 270px */
  padding: 0 5rem; /* matches navbar-main */
  max-width: 120rem; /* 1920px */
  margin: 0 auto;
}

/* Panel content: only one visible at a time */
.mega-panel__content {
  display: none;
  width: 100%;
  height: 100%;
}

.mega-panel__content.active {
  display: flex;
  align-items: center;
}

/* Column 1: spacer matching logo width */
.mega-panel__spacer {
  flex: 0 0 11.5625rem; /* 185px = navbar-logo width */
}

/* Column 2: description text fills the gap */
.mega-panel__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0 1.5rem 0 0;
  align-self: center;
  box-sizing: border-box;
  overflow: hidden;
}

.mega-panel__title {
  font-family: var(--font-poppins);
  font-weight: 300;
  font-style: italic;
  font-size: 2.25rem; /* 36px */
  line-height: 1.2;
  color: var(--logogreen);
  margin: 0;
  text-transform: capitalize;
}

.mega-panel__desc {
  font-family: var(--font-poppins);
  font-weight: 300;
  font-size: 1rem; /* 16px */
  line-height: 1.5;
  color: #000000;
  margin: 0;
}

.mega-panel__desc strong {
  font-weight: 600;
}

/* Column 3: sub-item links (width set by JS to match .navbar-menu) */
.mega-panel__links {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 3.125rem 0; /* 50px vertical */
  align-self: stretch;
  justify-content: center;
  box-sizing: border-box;
}

.mega-panel__link {
  display: block;
  padding: 0.5rem 0.75rem; /* 8px 12px */
  font-family: var(--font-poppins);
  font-weight: 400;
  font-size: 1.125rem; /* 18px */
  line-height: 1.5;
  color: var(--gray); /* #283C36 */
  text-decoration: underline;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.mega-panel__link:hover {
  color: var(--logogreen);
}

.mega-panel__link--active {
  font-weight: 600;
  color: var(--logogreen);
}

/* Per-panel links positions are set dynamically by JS to align with nav items */

/* Hide mobile sub-menus on desktop */
.mega-panel-mobile {
  display: none;
}

/* ------------------------------------------
   Hamburger Toggle (Hidden on Desktop)
   ------------------------------------------ */
.navbar-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.375rem;
  width: 2.75rem; /* 44px */
  height: 2.75rem;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
}

.hamburger-line {
  display: block;
  width: 1.5rem; /* 24px */
  height: 0.125rem; /* 2px */
  background-color: var(--te-papa-green);
  border-radius: 0.0625rem;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.navbar-toggle.active .hamburger-line:nth-child(1) {
  transform: translateY(0.5rem) rotate(45deg);
}

.navbar-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.navbar-toggle.active .hamburger-line:nth-child(3) {
  transform: translateY(-0.5rem) rotate(-45deg);
}

/* Measurement mode: hide menu during compact mode measurement to prevent flicker */
.navbar--measuring .navbar-menu,
.navbar--measuring .navbar-toggle {
  visibility: hidden !important;
  transition: none !important;
}

/* ==============================================
   Responsive Styles
   ============================================== */

/* Tablet */
@media (max-width: 1199px) {
  .navbar-main {
    padding: 0 2.5rem; /* 40px */
  }

  .navbar-menu {
    gap: 2.5rem; /* 40px */
  }

  .nav-link {
    font-size: 1rem; /* 16px */
  }

  .nav-item.active .nav-link {
    font-size: 1.125rem; /* 18px */
  }

  .mega-panel__inner {
    padding: 0 2.5rem; /* matches tablet navbar padding */
  }

  .mega-panel__spacer {
    flex-basis: 8rem; /* matches tablet logo size */
  }

  .mega-panel__title {
    font-size: 1.75rem; /* 28px */
  }

  .mega-panel__desc {
    font-size: 0.875rem; /* 14px */
  }

  .mega-panel__link {
    font-size: 1rem; /* 16px */
  }
}

/* Mobile */
@media (max-width: 768px) {
  .navbar-top {
    display: none;
  }

  .navbar-main {
    height: 4rem; /* 64px */
    padding: 0 5%;
  }

  .navbar-logo {
    width: 8rem; /* smaller logo */
    height: auto;
  }

  .navbar-toggle {
    display: flex;
  }

  .navbar-menu {
    position: fixed;
    top: 4rem; /* below navbar */
    left: 0;
    right: 0;
    height: auto;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    background: #ffffff;
    padding: 1rem 0;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    box-shadow: 0px 4px 30px 0px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    max-height: calc(100vh - 4rem);
  }

  .navbar-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-item {
    flex-direction: column;
    align-items: stretch;
    height: auto;
  }

  /* Main nav items (section headers) */
  .nav-item .nav-link {
    padding: 0.875rem 1.25rem;
    font-size: 1.125rem;
    font-weight: 600;
    height: auto;
    white-space: nowrap;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }

  .nav-item:last-child .nav-link {
    border-bottom: none;
  }

  .nav-item .nav-link:active,
  .mega-panel-mobile__link:active {
    background-color: rgba(0, 98, 65, 0.05);
  }

  /* Hide desktop mega-panel on mobile */
  .mega-panel {
    display: none;
  }

  /* Show sub-items directly under main items (no accordion) */
  .mega-panel-mobile {
    display: block;
  }

  .mega-panel-mobile__link {
    display: block;
    padding: 0.625rem 1.25rem 0.625rem 2.25rem;
    font-family: var(--font-poppins);
    font-weight: 400;
    font-size: 1rem;
    color: var(--te-papa-green);
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    transition: background-color 0.15s ease;
  }
}

/* Dynamic compact mode (JS-driven hamburger when space is insufficient) */
.navbar--compact .navbar-top {
  display: none;
}

.navbar--compact .navbar-main {
  height: 4rem;
  padding: 0 5%;
}

.navbar--compact .navbar-logo {
  width: 8rem;
  height: auto;
}

.navbar--compact .navbar-toggle {
  display: flex;
}

.navbar--compact .navbar-menu {
  position: fixed;
  top: 4rem;
  left: 0;
  right: 0;
  height: auto;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  background: #ffffff;
  padding: 1rem 0;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
  box-shadow: 0px 4px 30px 0px rgba(0, 0, 0, 0.15);
  overflow-y: auto;
  max-height: calc(100vh - 4rem);
}

.navbar--compact .navbar-menu.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.navbar--compact .nav-item {
  flex-direction: column;
  align-items: stretch;
  height: auto;
}

/* Main nav items (section headers) */
.navbar--compact .nav-item .nav-link {
  padding: 0.875rem 1.25rem;
  font-size: 1.125rem;
  font-weight: 600;
  height: auto;
  white-space: nowrap;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar--compact .nav-item:last-child .nav-link {
  border-bottom: none;
}

.navbar--compact .mega-panel {
  display: none;
}

/* Show sub-items directly under main items (no accordion) */
.navbar--compact .mega-panel-mobile {
  display: block;
}

.navbar--compact .mega-panel-mobile__link {
  display: block;
  padding: 0.625rem 1.25rem 0.625rem 2.25rem;
  font-family: var(--font-poppins);
  font-weight: 400;
  font-size: 1rem;
  color: var(--te-papa-green);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

/* ========== Navbar Index (Breadcrumb) ========== */
.navbar-index {
  width: 100%;
  height: 4.5rem; /* 72px */
  display: flex;
  align-items: center;
  padding: 1.875rem clamp(1.25rem, calc((100vw - 80rem) / 2), 20rem) 0;
  box-sizing: border-box;
}

.navbar-index__breadcrumb {
  display: flex;
  align-items: center;
}

.navbar-index__link {
  font-family: var(--font-poppins);
  font-weight: 400;
  font-size: 1.25rem; /* 20px */
  line-height: 2.625rem; /* 42px */
  color: rgba(0, 0, 0, 0.7);
}

.navbar-index__link--active {
  font-weight: 500;
  color: rgba(0, 0, 0, 0.9);
}

@media (max-width: 1199px) {
  .navbar-index {
    padding: 1.5rem 5% 0;
    height: auto;
  }

  .navbar-index__link {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .navbar-index {
    padding: 1rem 5% 0;
  }

  .navbar-index__link {
    font-size: 0.875rem;
  }
}

/* ========== Page Header (공통 헤더 타이틀) ========== */
.page-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  height: 25rem; /* 400px */
  padding: 0 clamp(1.25rem, calc((100vw - 80rem) / 2), 20rem) 2.5rem;
  background-color: #ffffff;
  box-sizing: border-box;
}

.page-header__inner {
  width: 100%;
  max-width: 80rem; /* 1280px */
}

.page-header__content {
  display: flex;
  align-items: center;
  gap: 2.1875rem; /* 35px */
  padding: 0.375rem 0;
}

.page-header__accent {
  width: 0.625rem; /* 10px */
  align-self: stretch;
  background-color: var(--logogreen);
  flex-shrink: 0;
}

.page-header__title {
  font-family: var(--font-paperlogy);
  font-weight: 700;
  font-size: clamp(1.75rem, 3.125vw, 3.75rem); /* 60px at 1920 */
  line-height: 1.2;
  color: var(--logogreen);
  margin: 0;
}

@media (max-width: 1199px) {
  .page-header {
    height: auto;
    min-height: 15rem;
  }
}

@media (max-width: 767px) {
  .page-header__content {
    gap: 1rem;
  }

  .page-header__accent {
    width: 0.375rem;
  }
}

/* ==========================================================================
   Global Scroll-Reveal Animation
   Applied by js/common.js to section children across all pages
   ========================================================================== */

.scroll-reveal {
  opacity: 0;
  transform: translateY(2.5rem);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

