/* =========================================
   DAINDIA Project Windows - Core Desktop Styles
   ========================================= */

:root {
  --font-main: 'Poppins', sans-serif;
  --bg-color: #ffffff;
  --text-main: #000000;
  --text-muted: #999999;
  --border-color: #e5e5e5;
  --header-height: 80px;
  --page-padding: 50px;
  --left-col-width: 280px;
  --grid-gap: 60px;
  /* ========================================================
     THUMBNAIL SIZE VARIABLE (Change here to adjust preview size)
     ======================================================== */
  --thumb-size: 300px;
  --thumb-width: var(--thumb-size, 300px);
  --thumb-height: var(--thumb-size, 300px);
  --ease-butter: cubic-bezier(0.19, 1, 0.22, 1);
}

.daindia-pw-container {
  width: 100%;
  position: relative;
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  padding: 30px 0 60px 0;
  clear: both;
  display: block;
}

.daindia-pw-container * {
  box-sizing: border-box;
}

/* Document Flow Project Wrapper */
#smooth-wrapper {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  overflow: visible;
}

.project-list {
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
}

/* =========================================
   Project Container (Closed State)
   ========================================= */
.project {
  padding: 30px 0;
  cursor: pointer;
  background-color: transparent;
  transition: padding 1.5s var(--ease-butter), border-color 0.4s ease;
  position: relative;
  z-index: 1;
}

.project:not(.is-expanded):hover {
  z-index: 10;
}

/* Prominent Thumbnail Scaling on Hover */
.project:not(.is-expanded):hover .img-wrapper {
  transform: scale(1.10);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.16);
}

.project:not(.is-expanded):hover .img-wrapper img {
  opacity: 0.98;
  transform: scale(1.04);
}

.project:not(.is-expanded):hover .title {
  transform: translateX(-4px);
}

.scroll-window {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  overflow: visible; /* Prevents clipping when thumbnail scales up */
  cursor: pointer;
  transition: max-width 1.5s var(--ease-butter);
}

.project-content {
  display: flex;
  gap: var(--grid-gap);
  width: max-content;
  padding: 0 var(--page-padding);
  will-change: transform;
  align-items: flex-start;
}

/* Left Column Meta */
.meta {
  width: var(--left-col-width);
  flex-shrink: 0;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.icon {
  width: 40px;
  height: 40px;
  background-color: #000000;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 16px;
}

.title {
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
  color: var(--text-main);
  transition: transform 0.4s var(--ease-butter), color 0.3s ease;
}

.location {
  font-family: var(--font-main);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.meta-extended {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 1.5s var(--ease-butter);
  width: 100%;
}

.meta-extended-inner {
  overflow: hidden;
  opacity: 0;
  font-family: var(--font-main);
  font-size: 10px;
  line-height: 2;
  transform: translateY(-10px);
  transition: opacity 0.6s ease, transform 1.5s var(--ease-butter);
}

.meta-row {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.meta-label {
  font-family: var(--font-main);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.meta-value {
  font-family: var(--font-main);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  color: var(--text-main);
}

/* Gallery & Items */
.gallery {
  display: flex;
  gap: var(--grid-gap);
  padding-right: var(--page-padding);
  pointer-events: none;
  align-items: flex-start;
}

.img-wrapper {
  height: var(--thumb-height, 250px);
  width: var(--thumb-width, 350px);
  overflow: hidden;
  transition: height 1.5s var(--ease-butter), width 1.5s var(--ease-butter), transform 0.6s var(--ease-butter), box-shadow 0.6s ease;
  pointer-events: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transform-origin: center center;
}

.img-wrapper h4 {
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #111111;
  margin: 0 0 10px 0;
  display: block;
  flex-shrink: 0;
}

.img-wrapper img {
  height: 100%;
  width: 100%;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center;
  transition: opacity 0.4s ease, transform 0.6s var(--ease-butter);
  -webkit-user-drag: none;
  user-select: none;
  display: block;
}

.img-wrapper img.daindia-lazy-img {
  opacity: 0;
  transition: opacity 0.5s ease, transform 1.3s var(--ease-butter);
}

.img-wrapper img.daindia-lazy-img.is-loaded {
  opacity: 1;
}

.gallery-extra {
  opacity: 0;
  visibility: hidden;
  transform: translateX(60px) scale(0.96);
  transition: opacity 0.6s ease, transform 1.3s var(--ease-butter), visibility 0s 1.3s;
}

/* Rich Text Card with Full Text Wrapping & Alignment */
.gallery-text {
  width: 360px;
  min-width: 280px;
  max-width: 440px;
  flex-shrink: 0;
  font-family: var(--font-main);
  font-size: 13px;
  line-height: 1.8;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: normal;
  color: #333333;
  pointer-events: auto;
  user-select: text;
  -webkit-user-drag: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.gallery-text.align-left {
  text-align: left;
}

.gallery-text.align-center {
  text-align: center;
}

.gallery-text.align-right {
  text-align: right;
}

.gallery-text.align-justify {
  text-align: justify;
}

.gallery-text p {
  margin: 0 0 16px 0;
}

.gallery-text p:last-child {
  margin-bottom: 0;
}

.gallery-text strong,
.gallery-text b {
  font-weight: 700;
  color: #000000;
}

.gallery-text em,
.gallery-text i {
  font-style: italic;
}

.gallery-text u {
  text-decoration: underline;
}

.gallery-text h1,
.gallery-text h2,
.gallery-text h3,
.gallery-text h4,
.gallery-text h5 {
  font-family: var(--font-main);
  color: #000000;
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.gallery-text ul,
.gallery-text ol {
  margin: 0 0 16px 20px;
  padding: 0;
}

.gallery-text li {
  margin-bottom: 6px;
}

.gallery-text blockquote {
  border-left: 2px solid #000000;
  padding-left: 14px;
  margin: 14px 0;
  font-style: italic;
  color: #555555;
}

.gallery-text a {
  color: #000000;
  text-decoration: underline;
}

/* =========================================
   Project Container (Expanded State) 
   ========================================= */
.project.is-expanded {
  padding: 20px 0;
  cursor: default;
  border-color: transparent;
}

.project.is-expanded .scroll-window {
  max-width: 100%;
  overflow: hidden;
}

.project.is-expanded .meta-extended {
  grid-template-rows: 1fr;
}

.project.is-expanded .meta-extended-inner {
  opacity: 1;
  transform: translateY(0);
  padding-top: 40px;
  transition-delay: 0.1s;
}

/* Image Fitting in Expanded State (Grow Animation Bloom) */
.project.is-expanded .img-wrapper {
  height: calc(100vh - var(--header-height) - 140px);
  min-height: 500px;
  max-height: 900px;
  width: auto;
  flex-shrink: 0;
  transform: none !important;
  box-shadow: none !important;
}

.project.is-expanded .img-wrapper img {
  opacity: 1;
  transform: scale(1.0);
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: contain;
  flex: 1 1 auto;
  min-height: 0;
}

.project.is-expanded .gallery-extra {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1.0);
  transition: opacity 0.8s ease 0.15s, transform 1.3s var(--ease-butter) 0.1s, visibility 0s 0s;
}

/* =========================================
   Smart Architectural Pagination
   ========================================= */
.daindia-pagination {
  width: 100%;
  max-width: 1000px;
  margin: 60px auto 20px auto;
  padding: 0 var(--page-padding);
  display: flex;
  justify-content: center;
  clear: both;
}

.daindia-pagination-inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 4px;
}

.daindia-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  text-decoration: none;
  border-radius: 3px;
  transition: all 0.25s ease;
}

.daindia-pagination .page-numbers:hover {
  background-color: #f2f2f2;
  color: #000000;
}

.daindia-pagination .page-numbers.current {
  background-color: #000000;
  color: #ffffff;
  font-weight: 600;
}

.daindia-pagination .page-numbers.dots {
  background: transparent;
  color: var(--text-muted);
  cursor: default;
}

.daindia-pagination .page-numbers.prev,
.daindia-pagination .page-numbers.next {
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 14px;
}