: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";

  --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;

  --background-color: #f8f9f6;
  --default-color: #000000;
  --heading-color: #000000;
  --accent-color: #1c1c1e;
  --surface-color: #f8f9f6;
  --contrast-color: #f8f9f6;

  --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(248, 249, 246, 0.72);
  --nav-dropdown-hover-color: #f8f9f6;

  scroll-behavior: smooth;
}

/* Color Presets */
.light-background {
  --background-color: #1c1c1e;
  --surface-color: #2a2a2d;
  --default-color: #f8f9f6;
  --heading-color: #f8f9f6;
  --contrast-color: #f8f9f6;
}

.dark-background {
  --background-color: #f8f9f6;
  --default-color: #f8f9f6;
  --heading-color: #f8f9f6;
  --surface-color: #1c1c1e;
  --contrast-color: #f8f9f6;
}

/*--------------------------------------------------------------
# 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: #f8f9f6;
  text-align: left;
  padding: 15px;
  margin-bottom: 24px;
  font-weight: 700;
  border-radius: 14px;
}

.php-email-form .sent-message {
  display: none;
  color: #f8f9f6;
  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: #1c1c1e;
  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(248, 249, 246, 0.08);
}

.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: #f8f9f6;
}

.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;
}

.scrolled .header {
  background-color: #1c1c1e;
  border-color: rgba(248, 249, 246, 0.08);
}

/* 로그인 전에는 헤더 숨김 */
body.logged-out #header {
  display: none;
}

/*--------------------------------------------------------------
# Navigation Menu
--------------------------------------------------------------*/
@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.1);
  }

  .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.3);
  }

  .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(248, 249, 246, 0.08);
  }

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

@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.3);
  }

  .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: #f8f9f6;
    background: rgba(248, 249, 246, 0.1);
  }

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

  .mobile-nav-active .mobile-nav-toggle {
    color: #f8f9f6;
    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.4);
  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: #f8f9f6;
  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(248, 249, 246, 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;
}

/*--------------------------------------------------------------
# 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;
}

/*--------------------------------------------------------------
# Gallery Section
--------------------------------------------------------------*/
.gallery .gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #f8f9f6;
  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: none !important;
  will-change: auto;
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
}

.gallery .gallery-item::before,
.gallery .gallery-item:before,
.gallery .gallery-item::after,
.gallery .gallery-item:after {
  content: none !important;
  display: none !important;
  opacity: 0 !important;
  background: transparent !important;
}

.gallery .gallery-links {
  position: absolute !important;
  left: 50% !important;
  bottom: 14px !important;
  transform: translateX(-50%) !important;
  z-index: 50 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  opacity: 1 !important;
  visibility: visible !important;
  background: transparent !important;
  inset: auto !important;
  width: auto !important;
  height: auto !important;
  pointer-events: none !important;
}

.gallery .gallery-links .preview-link,
.gallery .gallery-links .details-link,
.gallery .gallery-links .clip-link {
  width: 42px !important;
  height: 42px !important;
  border-radius: 999px !important;
  border: none !important;
  background: rgba(0, 0, 0, .52) !important;
  color: #f8f9f6 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  line-height: 1 !important;
  text-decoration: none !important;
  font-size: 18px !important;
  margin: 0 !important;
  pointer-events: auto !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background 0.2s ease, color 0.2s ease !important;
}

.gallery .gallery-links .preview-link:hover,
.gallery .gallery-links .details-link:hover,
.gallery .gallery-links .clip-link:hover {
  background: rgba(0, 0, 0, .72) !important;
  color: #f8f9f6 !important;
}

.gallery .gallery-item:hover .gallery-links {
  opacity: 1 !important;
  visibility: visible !important;
}

.gallery .gallery-item:hover img {
  transform: none !important;
}

.gallery .gallery-item:hover .preview-link,
.gallery .gallery-item:hover .details-link,
.gallery .gallery-item:hover .clip-link {
  margin-top: 0 !important;
}

@media (hover: none) and (pointer: coarse) {
  .gallery .gallery-links {
    opacity: 1 !important;
    visibility: visible !important;
  }

  .gallery .gallery-item:hover .gallery-links {
    opacity: 1 !important;
    visibility: visible !important;
  }

  .gallery .gallery-item:hover img {
    transform: none !important;
  }
}

/* 사진 메모 이미지 */
#memoBackdrop #memoImg {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: cover !important;
}

#memoBackdrop img#memoImg {
  margin: 0 !important;
  padding: 0 !important;
}

#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;
}

/*--------------------------------------------------------------
# Album / Swiper Card
--------------------------------------------------------------*/
.troogg-album-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #f4f4f4;
}

.troogg-album-swiper {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: #f2f2f2;
}

.troogg-album-swiper .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f2f2f2;
}

.troogg-album-swiper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.troogg-album-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 30;
  background: rgba(0, 0, 0, 0.65);
  color: #f8f9f6;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  padding: 5px 10px;
}

.troogg-album-actions {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  gap: 8px;
}

.troogg-album-actions .clip-link,
.troogg-album-actions .preview-link {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  color: #f8f9f6;
  text-decoration: none;
  cursor: pointer;
  margin: 0 !important;
}

.troogg-album-actions .clip-link:hover,
.troogg-album-actions .preview-link:hover {
  background: rgba(0, 0, 0, 0.72);
  color: #f8f9f6;
}

.troogg-album-del-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 40;
  border-radius: 12px;
}

.troogg-swiper-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 35;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  color: #f8f9f6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.troogg-swiper-prev {
  left: 10px;
}

.troogg-swiper-next {
  right: 10px;
}

.troogg-swiper-pagination {
  position: absolute;
  left: 50%;
  bottom: 56px !important;
  transform: translateX(-50%);
  z-index: 35;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 999px;
  padding: 4px 8px;
  width: auto !important;
}

.troogg-swiper-pagination .swiper-pagination-bullet {
  background: #f8f9f6;
  opacity: 0.6;
}

.troogg-swiper-pagination .swiper-pagination-bullet-active {
  opacity: 1;
}

/*--------------------------------------------------------------
# Mobile Fix
--------------------------------------------------------------*/
@media screen and (max-width: 768px) {
  [data-aos-delay] {
    transition-delay: 0 !important;
  }
}

@media (max-width: 768px) {
  .container,
  .container-fluid {
    --bs-gutter-x: 1rem;
  }

  .header {
    padding: 10px 0;
  }

  .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;
    color: #f8f9f6;
  }

  .mobile-nav-toggle {
    font-size: 30px;
    margin-right: 6px;
  }

  .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;
  }

  section,
  .section {
    padding: 42px 0;
  }

  .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;
  }

  .gallery .gallery-item {
    border-radius: 14px;
    box-shadow: 0 10px 26px rgba(165, 73, 73, 0.1);
  }
}

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

  #memoImg {
    height: 240px !important;
    object-fit: contain !important;
  }
}

@media (max-width: 820px) {
  #memoBackdrop > div > div:nth-child(2) > div:first-child {
    display: none !important;
  }

  #memoBackdrop > div > div:nth-child(2) {
    grid-template-columns: 1fr !important;
  }

  #memoBackdrop {
    padding: 10px !important;
    align-items: stretch !important;
  }

  #memoBackdrop > div {
    width: 100% !important;
    height: calc(100vh - 20px) !important;
    overflow: hidden !important;
  }

  #memoBackdrop > div > div:nth-child(2) {
    height: calc(100% - 60px) !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
  }
}
.gallery-item img {
  pointer-events: none;
}
.swiper-slide img{
  width:100%;
  height:100%;
  object-fit:contain;
}
.gallery .gallery-item img {
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
}

.gallery .gallery-item::before,
.gallery .gallery-item:before,
.gallery .gallery-item::after,
.gallery .gallery-item:after {
  display: none !important;
  content: none !important;
  background: transparent !important;
  opacity: 0 !important;
}

@media (hover: none) and (pointer: coarse) {
  .gallery .gallery-item:hover .gallery-links {
    opacity: 1 !important;
    visibility: visible !important;
  }

  .gallery .gallery-item:hover img {
    transform: none !important;
  }
}

.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
