/* Text Style */
.text-primary { color: #037f9b; }
.text-secondary { color: #004253; }

/* Button */
.logo { cursor: pointer; }
.btn {
  cursor: pointer;
  display: inline-block;
  padding: 2px 30px;
  color: #fff;
  background-color: #037f9b;
  border: none;
  transition: opacity 1s ease-in-out;
}
.btn:hover { opacity: 0.7; }
.btn:active {
  transition: 0.5s ease-in;
  transform: scale(0.95);
}

/* Variants / utilities */
.btn-primary, .bg-primary { background: #037f9b; color: #fff; }
.btn-secondary, .bg-secondary { background: #004253; color: #fff; }
.btn-dark, .bg-dark { background: #333; color: #fff; }
.btn-light, .bg-light { background: #f4f4f4; color: #333; }
.btn-outline { background: transparent; border: 1px solid #fff; }

/* Flex columns */
.flex-columns .row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  width: 100%;
  background-color: #037f9b;
}
.flex-columns .column {
  display: flex;
  flex-direction: column;
  flex-basis: 100%;
  flex: 1;
}
.flex-columns .column .column-1,
.flex-columns .column .column-2 {
  height: 100%;
  width: 100%;
  object-fit: cover;
}
.flex-columns img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.flex-columns .column-2 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 90px;
}
.flex-columns h2 {
  font-size: 40px;
  font-weight: 100; /* fixed from 100px */
  margin-bottom: 20px;
}
.flex-columns h4 { margin-bottom: 10px; }
.flex-columns p { margin: 15px 0; }

/* Section header */
.section-header {
  padding: 30px 0 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.section-header h2 {
  font-size: 40px;
  margin: 20px 0;
}

/* TEST */
.column-1 img {
  --size: 60vmin;
  --space: 8vmin;
  --duration: 300ms;
  --ease-out: cubic-bezier(0.25, 1, 0.5, 1);
  --bounce-out: cubic-bezier(0.34, 1.56, 0.64, 1);
  --overlay-color: hotpink;
}

.hover-animation {
  position: relative;
  cursor: pointer;
  width: var(--size);
  height: var(--size);
}

.dark {
  width: var(--size);
  height: var(--size);
  overflow: hidden;
  clip-path: polygon(100% 0, 100% 50%, 100% 100%, 0% 100%, 0 50%, 0% 0%);
  transition: transform var(--duration) var(--ease-out),
    clip-path var(--duration) var(--ease-out);
}

.dark img {
  position: relative;
  width: 120%;
  height: 100%;
  object-fit: cover;
  transform: translateX(-10%);
  transition: transform var(--duration) var(--ease-out);
}

.hover-animation::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--overlay-color);
  mix-blend-mode: multiply;
  opacity: 0;
  transform: translateZ(0);
  transition: opacity var(--duration) var(--ease-out);
}

.hover-animation:hover img {
  transform: translateX(0);
}

.hover-animation:hover .dark {
  clip-path: polygon(75% 0%, 100% 50%, 75% 100%, 0% 100%, 25% 50%, 0% 0%);
  transform: translateX(7%);
  transition-timing-function: var(--bounce-out);
}

.hover-animation:hover {
  transform: translate(5%, -50%);
  opacity: 1;
  transform: translateX(0);
  transition-timing-function: var(--bounce-out);
  mix-blend-mode:hard-light;
}

.hover-animation:hover .dark::after {
  opacity: 1;
}

/* Contact Animation */
.card {
  background: url('../img/stylus.jpg') no-repeat center center/cover;
  position: relative;
  max-height: 100%;
  cursor: pointer;
}

.contact img{
  position: absolute;
  animation-play-state: running;
  max-height: 100%;
  z-index: 99;
}

/* Flex grid */
.flex-grid .row {
  display: flex;
  flex-wrap: wrap;
  padding: 1px 2px;
  background-color: #004253;
}
.flex-grid .column {
  flex: 32%;
  max-width: 100%;
  padding: 4px 2px 0;
  background-color: #004253;
}

/* Portfolio Code */
.py-3 { margin: 0 100px 50px; }

.items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px; /* grid gap handles spacing */
  box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.3);
}
.item {
  position: relative;
  background: #037f9b;
  overflow: hidden;
  padding: 0.0001px;
  margin: 0;
}
.item::after {
  content: '';
  position: absolute;
  display: block;
  background: inherit;
  opacity: 0.9;
  top: 0; left: 0;
  width: 100%; height: 100%;
  transform: scale(2) translateX(-75%) translateY(-75%) rotate(-28deg);
  transition: transform 3s cubic-bezier(0.2, 1, 0.3, 1);
}
.item:hover::after { transform: scale(2) translateX(0) translateY(0) rotate(-28deg); }
.item:hover .item-image { transform: scale(1.2); }
.item:hover .item-text { opacity: 1; transform: translateY(0); }

.item-image {
  height: auto;
  transform: translateZ(0);
  display: block;
  transition: transform 750ms cubic-bezier(0.2, 1, 0.3, 1);
}
.item-image::before {
  content: '';
  display: block;
  padding-top: 75%;
  overflow: hidden;
}
.item-image img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: auto;
  line-height: 0;
}

.item-text {
  position: absolute;
  inset: 0;
  opacity: 0;
  text-align: center;
  z-index: 1;
  color: #fff;
  transform: translateY(-20%);
  transition: opacity 500ms cubic-bezier(0.2, 1, 0.3, 1),
              transform 500ms cubic-bezier(0.2, 1, 0.3, 1); /* fixed */
  transition-delay: 300ms;
}
.item-text-wrap {
  position: absolute;
  width: 100%;          /* deduped */
  top: 50%;
  transform: translateY(-50%);
}
.item-text-title {
  font-size: 2rem;
  padding: 0 1rem;
  margin: 5px 0 0 0;
}
.item-text-category {
  text-transform: uppercase;
  font-size: 1.2rem;
  opacity: 0.7;
  margin: 0;
}

/* Contact card background (kept minimal) */

/* =========================================================
   LIGHTBOX — CONSOLIDATED & RESPONSIVE
   (portrait = stacked, wide screens = image + caption side by side)
   ========================================================= */

/* --- Base layout & polish --- */
#lightbox .lb-outerContainer {
  max-width: min(90vw, 1200px) !important;
  margin: 0 auto !important;
}

#lightbox .lb-data {
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.12) 0%,
    rgba(0,0,0,0.55) 55%,
    rgba(0,0,0,0.78) 100%
  ) !important;
  color: #fff !important;
  padding: 1rem 1.25rem !important;
  box-sizing: border-box !important;
}

#lightbox .lb-data::after {
  content: "";
  display: table;
  clear: both;
}

#lightbox .lb-number { 
  display: none !important;  /* hide “Image 1 of N” */ 
}

/* Make caption title full-width under the image bar */
.lb-details {
  float: none !important;
  width: 100% !important;
}

/* Close button + nav layering */
#lightbox .lb-data .lb-close {
  position: relative !important;
  z-index: 5 !important;
  float: right !important;
  margin-top: 2px !important;
}
#lightbox .lb-nav a { opacity: 1 !important; }
#lightbox .lb-nav,
#lightbox .lb-prev,
#lightbox .lb-next {
  z-index: 4 !important;
}

/* Caption typography */
#lightbox .lb-data .lb-caption {
  display: block !important;
  clear: both !important;
  text-align: left !important;
  font-family: "Dosis", sans-serif !important;
  max-width: 900px !important;
  margin: 0 auto !important;
  white-space: normal !important;
  word-break: normal !important;
}

#lightbox .lb-caption h2 {
  font-weight: 500 !important;
  margin: 0 0 0.4rem !important;
  line-height: 1.3 !important;
}

#lightbox .lb-caption p {
  font-weight: 400 !important;
  margin: 0 0 0.35rem !important;
  line-height: 1.6 !important;
}

/* --- First-open blank image fix (Safari/Firefox) & safe sizing --- */
#lightbox .lb-image {
  display: block !important;           /* avoid inline baseline quirks */
  width: auto !important;              /* don’t pre-stretch before sizing */
  max-width: 100% !important;
  height: auto !important;
  max-height: calc(100dvh - 200px) !important; /* gives more room for caption */
  object-fit: contain !important;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: opacity, transform;
}

#lightbox .lb-outerContainer,
#lightbox .lb-container {
  width: auto !important;              /* follow the bitmap */
  height: auto !important;
  max-height: none !important;
  contain: paint;                       /* isolate painting */
}

/* --- Desktop side-by-side tweak: give caption more vertical room --- */
@media (min-width: 1100px) {
  #lightbox .lb-data {
    max-height: 70vh !important;       /* taller caption area */
    overflow-y: auto !important;       /* scroll only if truly needed */
    padding: 1.2rem 1.5rem !important;
  }

  #lightbox .lb-outerContainer {
    max-height: 85vh !important;       /* keep full layout comfortably on screen */
  }
}

/* =========================================================
   PORTFOLIO GRID — overlay text (keeps 3-up, improves legibility)
   ========================================================= */
.item-text-title {
  font-size: clamp(1.15rem, 2.6vw, 1.8rem) !important;
  line-height: 1.25 !important;
}

.item-text-category {
  font-size: clamp(0.85rem, 1.9vw, 1.05rem) !important;
  letter-spacing: 0.02em;
}
