
:root {
  --default-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans",
    sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
    "Noto Color Emoji";

  /* ✅ 애플 느낌: 제목도 sans로 통일 */
  --heading-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;

  --nav-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ✅ Apple-like clean colors (가독성 최우선) */
:root {
  --background-color: #ffffff;
  --default-color: #000000;     /* 본문 글자: 짙은 차콜 */
  --heading-color: #1178ff;     /* 제목: 더 진한 차콜 */
  --accent-color: #0a84ff;      /* iOS 느낌 블루 */
  --surface-color: #ffffff;
  --contrast-color: #ffffff;
}

/* Nav Menu Colors */
:root {
  --nav-color: rgba(0, 0, 0, 0.6);
  --nav-hover-color: rgba(0, 0, 0, 1);
  --nav-mobile-background-color: #0b0b0c;      /* 모바일 메뉴 배경: 블랙 */
  --nav-dropdown-background-color: #0b0b0c;    /* 드롭다운 배경: 블랙 */
  --nav-dropdown-color: rgba(255, 255, 255, 0.72);
  --nav-dropdown-hover-color: #ffffff;
}

/* Color Presets */
.light-background {
  --background-color: #0b0b0c;
  --surface-color: #121214;
  --default-color: #ffffff;
  --heading-color: #ffffff;
  --contrast-color: #ffffff;
}

.dark-background {
  --background-color: #050506;
  --default-color: #ffffff;
  --heading-color: #ffffff;
  --surface-color: #0b0b0c;
  --contrast-color: #ffffff;
}

/* Smooth scroll */
:root {
  scroll-behavior: smooth;
}

/*--------------------------------------------------------------
# General Styling & Shared Classes
--------------------------------------------------------------*/
body {
  color: var(--default-color);
  background-color: var(--background-color);
  font-family: var(--default-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  color: color-mix(in srgb, var(--accent-color), transparent 15%);
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--heading-color);
  font-family: var(--heading-font);
}

/* 작은 전체 폴리시 */
.container, .container-fluid { --bs-gutter-x: 1.5rem; }
.section, section { scroll-margin-top: 100px; }

/*--------------------------------------------------------------
# PHP Email Form Messages
--------------------------------------------------------------*/
.php-email-form .error-message {
  display: none;
  background: #df1529;
  color: #ffffff;
  text-align: left;
  padding: 15px;
  margin-bottom: 24px;
  font-weight: 700;
  border-radius: 14px;
}

.php-email-form .sent-message {
  display: none;
  color: #ffffff;
  background: #059652;
  text-align: center;
  padding: 15px;
  margin-bottom: 24px;
  font-weight: 700;
  border-radius: 14px;
}

.php-email-form .loading {
  display: none;
  background: var(--surface-color);
  text-align: center;
  padding: 15px;
  margin-bottom: 24px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.php-email-form .loading:before {
  content: "";
  display: inline-block;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  margin: 0 10px -6px 0;
  border: 3px solid var(--accent-color);
  border-top-color: rgba(0, 0, 0, 0.06);
  animation: php-email-form-loading 1s linear infinite;
}

@keyframes php-email-form-loading {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/*--------------------------------------------------------------
# Global Header
--------------------------------------------------------------*/
.header {
  color: var(--default-color);
  background-color: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 16px 0;
  transition: all 0.35s ease;
  z-index: 997;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header .logo {
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* ✅ 로고 크기 컨트롤 */
.header .logo img,
.troogg-logo {
  max-height: 46px;
  height: 46px;
  width: auto;
  border-radius: 12px;
  margin-right: 0;
  box-shadow: 0 8px 22px rgba(0,0,0,0.14);
}

.header .logo h1 {
  font-family: var(--heading-font);
  font-size: 30px;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--heading-color);
}

.header .header-social-links { padding-right: 15px; }

.header .header-social-links a {
  color: rgb(255, 6, 255);
  padding-left: 10px;
  display: inline-block;
  transition: 0.2s ease;
  font-size: 16px;
}

.header .header-social-links a:hover { color: var(--accent-color); }
.header .header-social-links a i { line-height: 0px; }

@media (max-width: 576px) {
  #memoBackdrop > div > div:nth-child(2) {
    grid-template-columns: 1fr !important;
  }

  #memoImg {
    height: 240px !important;   /* 원하는 높이로 조절 */
    object-fit: contain !important;
  }
}

.scrolled .header {
  background-color: rgba(255, 255, 255, 0.94);
  border-color: rgba(0, 0, 0, 0.08);
}

/*--------------------------------------------------------------
# Navigation Menu
--------------------------------------------------------------*/
/* Desktop */
@media (min-width: 1200px) {
  .navmenu { padding: 0; }

  .navmenu ul {
    margin: 0;
    padding: 0;
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2px;
  }

  .navmenu li { position: relative; }

  .navmenu a,
  .navmenu a:focus {
    color: var(--nav-color);
    padding: 14px 12px;
    font-size: 13px;
    font-family: var(--nav-font);
    font-weight: 700;
    display: flex;
    align-items: center;
    white-space: nowrap;
    transition: 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    border-radius: 12px;
  }

  .navmenu li:hover > a,
  .navmenu .active,
  .navmenu .active:focus {
    color: var(--nav-hover-color);
    background: rgba(10,132,255,0.10);
  }

  .navmenu .dropdown ul {
    margin: 0;
    padding: 10px 0;
    background: var(--nav-dropdown-background-color);
    display: block;
    position: absolute;
    visibility: hidden;
    left: 14px;
    top: 120%;
    opacity: 0;
    transition: 0.2s ease;
    border-radius: 16px;
    z-index: 99;
    box-shadow: 0 18px 50px rgba(0,0,0,0.30);
  }

  .navmenu .dropdown ul li { min-width: 220px; }

  .navmenu .dropdown ul a {
    padding: 10px 18px;
    font-size: 14px;
    text-transform: none;
    color: var(--nav-dropdown-color);
    border-radius: 12px;
    margin: 0 8px;
  }

  .navmenu .dropdown ul a:hover,
  .navmenu .dropdown ul li:hover > a {
    color: var(--nav-dropdown-hover-color);
    background: rgba(255,255,255,0.08);
  }

  .navmenu .dropdown:hover > ul {
    opacity: 1;
    top: 100%;
    visibility: visible;
  }
}

/* Mobile */
@media (max-width: 1199px) {
  .mobile-nav-toggle {
    color: rgba(0,0,0,0.75);
    font-size: 28px;
    line-height: 0;
    margin-right: 10px;
    cursor: pointer;
    transition: color 0.2s ease;
  }

  .navmenu { padding: 0; z-index: 9997; }

  .navmenu ul {
    display: none;
    position: absolute;
    inset: 60px 14px 14px 14px;
    padding: 12px 0;
    margin: 0;
    border-radius: 18px;
    background-color: var(--nav-mobile-background-color);
    overflow-y: auto;
    transition: 0.2s ease;
    z-index: 9998;
    box-shadow: 0px 18px 60px rgba(0, 0, 0, 0.30);
  }

  .navmenu a,
  .navmenu a:focus {
    color: rgba(0, 0, 0, 0.82);
    padding: 12px 18px;
    font-family: var(--nav-font);
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    white-space: nowrap;
    transition: 0.2s ease;
    border-radius: 14px;
    margin: 0 10px;
  }

  .navmenu a:hover,
  .navmenu .active,
  .navmenu .active:focus {
    color: #fff;
    background: rgba(255,255,255,0.10);
  }

  .mobile-nav-active { overflow: hidden; }

  .mobile-nav-active .mobile-nav-toggle {
    color: #fff;
    position: absolute;
    font-size: 32px;
    top: 15px;
    right: 15px;
    margin-right: 0;
    z-index: 9999;
  }

  .mobile-nav-active .navmenu {
    position: fixed;
    overflow: hidden;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    transition: 0.2s ease;
  }

  .mobile-nav-active .navmenu > ul { display: block; }
}

/*--------------------------------------------------------------
# Global Footer
--------------------------------------------------------------*/
.footer {
  --background-color: color-mix(in srgb, var(--default-color), transparent 95%);
  border-top: 1px solid rgba(0,0,0,0.06);
  color: var(--default-color);
  background-color: var(--background-color);
  font-size: 14px;
  padding: 40px 0;
  position: relative;
}

.footer .social-links a {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.12);
  font-size: 16px;
  color: rgba(0,0,0,0.55);
  transition: 0.2s ease;
}

.footer .social-links a:hover {
  color: var(--accent-color);
  border-color: rgba(10,132,255,0.40);
  background: rgba(10,132,255,0.08);
}

/*--------------------------------------------------------------
# Preloader
--------------------------------------------------------------*/
#preloader {
  display: flex;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  z-index: 99999;
}

#preloader:before,
#preloader:after {
  content: "";
  background-color: #0b0b0c;
  position: absolute;
  inset: 0;
  width: 50%;
  height: 100%;
  transition: all 0.3s ease 0s;
  z-index: -1;
}

#preloader:after { left: auto; right: 0; }

#preloader .line {
  position: relative;
  overflow: hidden;
  margin: auto;
  width: 1px;
  height: 280px;
  transition: all 0.8s ease 0s;
}

#preloader .line:before {
  content: "";
  position: absolute;
  background-color: #ffffff;
  left: 0;
  top: 50%;
  width: 1px;
  height: 0%;
  transform: translateY(-50%);
  animation: lineincrease 1000ms ease-in-out 0s forwards;
}

#preloader .line:after {
  content: "";
  position: absolute;
  background-color: rgba(255,255,255,0.18);
  left: 0;
  top: 0;
  width: 1px;
  height: 100%;
  transform: translateY(-100%);
  animation: linemove 1200ms linear 0s infinite;
  animation-delay: 2000ms;
}

#preloader.loaded .line { opacity: 0; height: 100% !important; }
#preloader.loaded .line:after { opacity: 0; }
#preloader.loaded:before,
#preloader.loaded:after { animation: preloaderfinish 300ms ease-in-out 500ms forwards; }

@keyframes lineincrease {
  0% { height: 0%; }
  100% { height: 100%; }
}

@keyframes linemove {
  0% { transform: translateY(200%); }
  100% { transform: translateY(-100%); }
}

@keyframes preloaderfinish {
  0% { width: 50%; }
  100% { width: 0%; }
}

/*--------------------------------------------------------------
# Scroll Top Button
--------------------------------------------------------------*/
.scroll-top {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  right: 18px;
  bottom: -15px;
  z-index: 99999;
  background-color: var(--accent-color);
  width: 46px;
  height: 46px;
  border-radius: 999px;
  transition: all 0.25s ease;
  box-shadow: 0 16px 40px rgba(10,132,255,0.28);
}

.scroll-top i {
  font-size: 24px;
  color: var(--contrast-color);
  line-height: 0;
}

.scroll-top:hover { filter: brightness(0.95); }
.scroll-top.active { visibility: visible; opacity: 1; bottom: 18px; }

/*--------------------------------------------------------------
# Disable aos animation delay on mobile devices
--------------------------------------------------------------*/
@media screen and (max-width: 768px) {
  [data-aos-delay] { transition-delay: 0 !important; }
}

/*--------------------------------------------------------------
# Global Sections
--------------------------------------------------------------*/
section,
.section {
  color: var(--default-color);
  background-color: var(--background-color);
  padding: 60px 0;
  overflow: clip;
}

@media (max-width: 1199px) {
  section, .section { scroll-margin-top: 66px; }
}

/*--------------------------------------------------------------
# Global Section Titles (✅ 여기서 “최근 여행지” 애플 느낌 완성)
--------------------------------------------------------------*/
.section-title { padding-bottom: 50px; }

.section-title h2 {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.45);
  font-family: var(--nav-font);
}

.section-title h2::after {
  content: "";
  width: 110px;
  height: 2px;
  display: inline-block;
  background: rgba(10,132,255,0.55);
  margin: 4px 10px;
}

/* ✅ “최근 여행지” 큰 글자 */
.section-title p {
  font-family: var(--heading-font);
  color: var(--heading-color);
  margin: 10px 0 0 0;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

/*--------------------------------------------------------------
# Hero Section
--------------------------------------------------------------*/
.hero {
  width: 100%;
  min-height: 30vh;
  position: relative;
  padding: 120px 0 60px 0;
  display: flex;
  align-items: center;
}

.hero h2 {
  margin: 0 0 10px 0;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--heading-color);
}

.hero p {
  color: rgba(0,0,0,0.65);
  margin-bottom: 28px;
  font-size: 18px;
}

@media (max-width: 768px) {
  .hero { padding-top: 96px; }
  .hero h2 { font-size: 32px; }
}

/*--------------------------------------------------------------
# Gallery Section
--------------------------------------------------------------*/
.gallery .gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 16px 45px rgba(0,0,0,0.08);
}

.gallery .gallery-item img {
  transition: transform 0.35s ease;
  will-change: transform;
}

.gallery .gallery-links {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: all ease-in-out 0.25s;
  background: rgba(0, 0, 0, 0.58);
  z-index: 3;
}

.gallery .gallery-links .preview-link,
.gallery .gallery-links .details-link {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.78);
  transition: 0.2s ease;
  line-height: 1.2;
  margin: 30px 8px 0 8px;
}

.gallery .gallery-links .preview-link:hover,
.gallery .gallery-links .details-link:hover { color: #ffffff; }

.gallery .gallery-item:hover .gallery-links { opacity: 1; }
.gallery .gallery-item:hover img { transform: scale(1.08); }
.gallery .gallery-item:hover .preview-link,
.gallery .gallery-item:hover .details-link { margin-top: 0; }

/*--------------------------------------------------------------
# ✅ Custom Buttons (너가 쓰는 버튼들 “보기 좋게” 통일)
--------------------------------------------------------------*/
.btn-troogg-login,
.btn-troogg-logout,
.btn-troogg-friends,
.btn-troogg-view,
.btn-logout {
  border-radius: 12px !important;
  font-weight: 800 !important;
}

/* 로그아웃 버튼(빨간색) */
.btn-logout {
  background-color: #dc3545;
  border-color: #dc3545;
  color: #fff;
}
.btn-logout:hover {
  background-color: #bb2d3b;
  border-color: #bb2d3b;
  color: #fff;
}

/* =======================================================================
   ✅ MOBILE FIX (다른 건 건들지 않고 "모바일에서만" 보기 편하게)
   ======================================================================= */
@media (max-width: 768px) {

  /* 1) 폰에서 전체 좌우 여백 조금 줄여서 답답함 해소 */
  .container, .container-fluid { --bs-gutter-x: 1rem; }

  /* 2) 헤더 높이/패딩 줄여서 로고+메뉴 공간 확보 */
  .header { padding: 10px 0; }

  /* 3) 로고/텍스트 크기 모바일 최적화 */
  .header .logo img,
  .troogg-logo {
    max-height: 34px;
    height: 34px;
    border-radius: 10px;
  }
  .header .logo h1 {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
  }

  /* 4) 모바일에서 메뉴(햄버거) 누르기 쉽게 */
  .mobile-nav-toggle {
    font-size: 30px;
    margin-right: 6px;
  }

  /* 5) 히어로(첫 화면) 글자/줄간격 모바일에서 더 잘 보이게 */
  .hero { padding: 86px 0 40px 0; }
  .hero h2 {
    font-size: 28px;
    line-height: 1.15;
  }
  .hero p {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 18px;
  }

  /* 6) 섹션 간격 모바일에서 과하게 크지 않게 */
  section, .section { padding: 42px 0; }

  /* 7) “최근 여행지” 같은 타이틀 모바일 최적화 */
  .section-title { padding-bottom: 28px; }
  .section-title h2 {
    font-size: 11px;
    letter-spacing: 0.16em;
  }
  .section-title p {
    font-size: 24px;
    line-height: 1.18;
    letter-spacing: -0.03em;
  }

  /* 8) 카드/갤러리 아이템 터치하기 좋게 + 과한 그림자 줄임 */
  .gallery .gallery-item {
    border-radius: 14px;
    box-shadow: 0 10px 26px rgba(0,0,0,0.10);
  }

  /* 9) 어떤 요소가 display:none 때문에 안 보이면, 최소한 핵심은 보이게
        (⚠️ 특정 클래스가 있을 때만 살려주려면 아래 selector를 너 사이트에 맞게 수정)
        예: 로그인 이메일이 안 보이면 보통 .user-email 같은 걸로 잡혀있음
  */
  /* .user-email, .user-info { display: block !important; } */
}

/* ✅ 다이어리 버튼 (모바일 상단) */
.btn-diary {
  background: #1bf726;
  color: #000000;
  border: none;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  margin-left: 6px;
  white-space: nowrap;
}

.btn-diary:hover {
  background: #111;
}

/* ✅ 클립 버튼(메모) - 확대 버튼 옆 */
.gallery .gallery-links .clip-link{
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  margin: 30px 8px 0 8px;
  font-size: 20px;
  color: rgba(255,255,255,.70);
  transition: .2s ease;
  line-height: 1;
}

.gallery .gallery-links .clip-link:hover{
  color: #fff;
}

.gallery .gallery-item:hover .clip-link{
  margin-top: 0;
}
/* 로그인 전에는 헤더 숨김 (페북처럼) */
body.logged-out #header {
  display: none;
}
/* =========================================================
   ✅ Troogg - 사진 메모(모달) 이미지 여백 없이 꽉 채우기
   (기존 코드 절대 건드리지 않음 / 아래에만 추가)
========================================================= */
#memoBackdrop #memoImg {
  width: 100% !important;
  height: 100% !important;
  display: block !important;     /* ✅ 이미지 아래 여백 제거 */
  object-fit: cover !important;  /* ✅ 빈 공간 없이 꽉 채움 */
}

/* memoImg가 들어있는 왼쪽 박스도 꽉 차게(여백 방지) */
#memoBackdrop img#memoImg {
  margin: 0 !important;
  padding: 0 !important;
}

/* 왼쪽 이미지 박스(현재 inline 스타일이지만, 안전하게 보정) */
#memoBackdrop div[style*="border:1px solid"][style*="overflow:hidden"] {
  padding: 0 !important;
}
/* ✅ 삭제 버튼 클릭 안정화(모바일 터치 미스 방지) */
.troogg-del-btn{
  z-index: 9999 !important;
  pointer-events: auto !important;
  padding: 8px 10px;          /* 터치 영역 확대 */
  border-radius: 12px;
}
