/* === GLOBAL RESET === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  font-family: "EB Garamond", serif !important;
  color: white;
  background-color: black;
  overflow-x: hidden;
  scroll-behavior: smooth;
  font-size: 20px;
}

/* --- MAIN PAGE STYLE --- */
.page {
  width: 100vw;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-align: center;
  position: relative;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center top;
  padding-bottom: 1.5rem;
}

.page-content {
  position: relative;
  z-index: 1;
  max-width: 100%;
  overflow-y: auto;
}

.page-content h1 {
  width: fit-content;
  padding: 0rem 3rem;
  font-size: 3rem;
  margin: 0rem auto 0.5rem auto;
  border-radius: 10px;
}

.page-content p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0.5rem auto 1rem auto;
}

/* --- NAVBAR STYLES --- */
#navbar {
  position: fixed;
  bottom: 30px;
  right: 40px;
  display: flex;
  gap: 15px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.001);
  backdrop-filter: blur(15px) saturate(160%);
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3),
    inset 1px 1px 2px rgba(255, 255, 255, 0.1),
    inset -1px -1px 2px rgba(0, 0, 0, 0.2);
  z-index: 50;
  transition: all 0.3s ease;
}

/* Fix multi-layer navbar overlap */
#navbar .navbar-children {
  position: fixed; /* first layer remains fixed */
  bottom: 110%;
  right: 2px;
  display: flex;
  gap: 15px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.001);
  backdrop-filter: blur(15px) saturate(160%);
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3),
    inset 1px 1px 2px rgba(255, 255, 255, 0.1),
    inset -1px -1px 2px rgba(0, 0, 0, 0.2);
  z-index: 50;
  transition: all 0.3s ease;
}

/* Second and deeper levels should be positioned inside parent */
#navbar .navbar-children .navbar-children {
  position: absolute;
  bottom: 105%; /* appear above their parent */
  right: 5%;
  flex-direction: column; /* stack vertically */
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  z-index: 60; /* slightly higher */
}

#navbar button {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  border-radius: 10px;
  color: white;
  padding: 10px 18px;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4),
    -2px -2px 5px rgba(255, 255, 255, 0.05);
  transition: all 0.25s ease;
  margin-bottom: 10px;
}
#navbar .navbar-children .navbar-children button:last-child {
  margin-bottom: 7%;
  /* background: aqua; */
}

#navbar button:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

#navbar button:active {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(0.98);
}

/* Instagram Page Layout */

/* === FINAL INSTAGRAM PAGE GRID === */

.instagram-page h3 {
  font-size: 150% !important;
}
.instagram-page h4 {
  font-size: 110% !important;
  color: #dcdcdc !important;
}

.instagram-page #cards-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  /* justify-items: center;
  align-items: center; */
  width: 80%;
  margin: 2rem auto;
  box-sizing: border-box;
}

.instagram-page #cards-container .instagram-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.3s ease;

  /* border-radius: 10px;
  background: linear-gradient(145deg, #222222, #1d1d1d);
  box-shadow: 5px 5px 17px #141414, -5px -5px 17px #2c2c2c; */
}

/* --- Add this after your .instagram-card --- */
.instagram-page #cards-container .instagram-card .card-inner {
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
  transform-origin: center center;
}

/* --- Move the hover scale to .card-inner --- */
.instagram-page #cards-container .instagram-card:hover .card-inner {
  transform: scale(1.03);
}

/* .instagram-page #cards-container .instagram-card:hover {
  transform: scale(1.03);
} */

.instagram-page #cards-container .instagram-card .card-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  max-height: 100%;
}

.instagram-page #cards-container .instagram-card video {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}

.instagram-page #cards-container .instagram-card .instagram-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  color: white;
  transition: opacity 0.3s ease;
  text-align: center;
  padding-bottom: 15px;
}

.instagram-page #cards-container .instagram-card:hover .instagram-overlay {
  opacity: 1;
}

.instagram-page #cards-container .instagram-overlay h3 {
  font-size: 150%;
  font-weight: 600;
  margin-bottom: 4px;
}

.instagram-page #cards-container .instagram-overlay h4 {
  font-size: 110% !important;
  font-weight: 400;
  opacity: 0.8;
}
.instagram-page #cards-container .instagram-overlay h4,
.instagram-page .page-info-container .subtitle {
  color: #dcdcdc !important;
}
.instagram-page .page-info-container .subtitle {
  font-size: 150%;
}

/* === Modal Overlay === */

.art-modal.show {
  display: flex; /* show modal as flex container */
}

/* Hide scrollbar for modal content */
.art-modal .modal-content {
  overflow-y: auto; /* still scrollable */

  /* Hide scrollbar for Chrome, Safari, Edge */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE 10+ */
}

.art-modal .modal-content::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}

/* Images and videos inside modal */
.art-modal .modal-content img,
.art-modal .modal-content video {
  max-width: 100%; /* scale down if too wide */
  max-height: 70vh; /* scale down if too tall */
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 1rem auto;
}

/* === Close Button === */
.art-modal .close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  z-index: 10;
}

.art-modal .close-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

.art-modal .close-btn:active {
  transform: scale(0.95);
}
.art-modal.show {
  opacity: 1;
}

.art-modal .modal-content h3 {
  white-space: pre-wrap; /* respects line breaks and wraps text */
  font-size: 130%;
}
.art-modal .modal-content h4 {
  white-space: pre-wrap; /* respects line breaks and wraps text */
  margin-top: 0.75rem;
  font-size: 110%;
  color: #909090;
}

.art-modal .modal-content p {
  white-space: pre-wrap; /* respects line breaks and wraps text */
  margin: 1rem 0;
}

.instagram-page .page-info-container {
  width: 90%;
  padding: 1rem 1.5rem;
  margin: 1.5rem auto 0rem auto;
}
.navbar-children {
  display: none;
  transition: all 0.25s ease;
}

.navbar-children.open {
  display: block;
}

.home-hero .page-content {
  display: flex;
  justify-content: center; /* horizontally center */
  align-items: center; /* vertically center */
  text-align: center;
  height: 100vh; /* full viewport height */
  width: 100%;
  position: relative;
  z-index: 1;
}

.home-hero .page-info-container {
  margin: 1.5rem;
  padding: 0.75rem;

  border-radius: 10px;
  background: hsla(118, 88%, 23%, 0.4);
  box-shadow: 5px 5px 15px #085405, -5px -5px 15px #0e8609;
}
.home-hero .page-info-container .subtitle {
  color: #c5ffc3;
}

/* === FIX: Remove unwanted vertical scrolling on full-screen home === */

.home-hero {
  /* height: 100vh;
  width: 100vw;
    overflow-y: hidden; */
  padding: 0;
}

/* === MODAL FIX FOR LONG DESCRIPTIONS === */
.art-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.85);
  display: none;
  z-index: 1000;
  justify-content: center; /* default: center vertically */
  align-items: center;
  overflow-y: auto;
  padding: 4vh 0; /* breathing space for tall modals */
  transition: all 0.3s ease;

  opacity: 0;
  transition: opacity 0.3s ease;

  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px) saturate(160%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3),
    inset 1px 1px 2px rgba(255, 255, 255, 0.1),
    inset -1px -1px 2px rgba(0, 0, 0, 0.2);
}

.art-modal.show {
  display: flex;
}

.art-modal .modal-content {
  position: relative;
  background-color: rgba(0, 0, 0, 0.88);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 90%;
  max-width: 800px;
  margin: auto;
  padding: 0.5rem 2.5rem;
  box-sizing: border-box;
  overflow: visible;
  text-align: center;
}

/* When modal is tall, stick it to the top */
.art-modal.tall {
  align-items: flex-start; /* align modal near top */
}

.art-modal.tall .modal-content {
  margin-top: 4vh; /* top spacing */
  margin-bottom: 4vh;
}

/* Responsive modal padding */
@media (max-width: 768px) {
  .art-modal .modal-content {
    width: 95%;
    padding: 1.2rem;
  }
}

/* === Modal Media Fix (Preserve True Aspect Ratio) === */
.art-modal .modal-content img,
.art-modal .modal-content video {
  display: block;
  width: auto; /* natural width */
  height: auto; /* natural height */
  max-width: 100%; /* prevent horizontal overflow */
  max-height: 90vh; /* allow near full viewport height */
  object-fit: contain; /* preserve original ratio */
  margin: 1rem auto; /* centered with spacing */
}

.art-modal .modal-content video {
  aspect-ratio: auto;
}

/* Allow modal text to flow below image */
.art-modal .modal-content h3,
.art-modal .modal-content h4,
.art-modal .modal-content p {
  margin: 0.5rem 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.protected {
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.media-protect-overlay {
  user-select: none;
  -webkit-user-drag: none;
}

/* Custom designs */

.instagram-page.atTearsEnd #cards-container .instagram-card {
  border-radius: 10px;
  background: hsla(337, 59%, 33%, 0.4);
  box-shadow: 2px 2px 6px #661a37, -2px -2px 6px #a42a59;
}
.instagram-page.atTearsEnd .page-info-container {
  border-radius: 10px;
  background: hsla(337, 59%, 33%, 0.4);
  box-shadow: 5px 5px 15px #661a37, -5px -5px 15px #a42a59;
}
.instagram-page.atTearsEnd .page-info-container .subtitle {
  color: #ff97bf !important;
}

.instagram-page.sweatItOff #cards-container .instagram-card {
  border-radius: 10px;
  background: hsla(152, 35%, 30%, 0.6);
  box-shadow: 5px 5px 15px #28523e, -5px -5px 15px #3c7c5e;
}
.instagram-page.sweatItOff .page-info-container {
  border-radius: 10px;
  background: hsla(152, 35%, 30%, 0.6);
  box-shadow: 5px 5px 15px #28523e, -5px -5px 15px #3c7c5e;
}
.instagram-page.sweatItOff .page-info-container .subtitle {
  color: #9cdba8 !important;
}

.instagram-page.art-experimental #cards-container .instagram-card {
  border-radius: 10px;
  background: hsla(0, 59%, 35%, 0.6);
  box-shadow: 2px 2px 6px #6d1c1c, -2px -2px 6px #af2e2e;
}
.instagram-page.art-experimental .page-info-container {
  border-radius: 10px;
  background: hsla(0, 59%, 35%, 0.6);
  box-shadow: 5px 5px 15px #6d1c1c, -5px -5px 15px #af2e2e;
}
.instagram-page.art-experimental .page-info-container .subtitle {
  color: #f49898 !important;
}

.instagram-page.art-pieces #cards-container .instagram-card {
  border-radius: 10px;
  background: #61039c66;
  box-shadow: 2px 2px 6px #ad7bcc, -2px -2px 6px #e9a7ff;
}
.instagram-page.art-pieces .page-info-container {
  border-radius: 10px;
  background: #61039c66;
  box-shadow: 5px 5px 15px #ad7bcc, -5px -5px 15px #e9a7ff;
}
.instagram-page.art-pieces .page-info-container .subtitle {
  color: #efbfff !important;
}
