/* =====================================================
   LAYOUT.CSS (CHATEAU SYSTEM CORE)
   -----------------------------------------------------
   PURPOSE:
   - Single source of truth for ALL layout behavior
   - Containers, sections, grids, spacing
   - Replaces ALL legacy framework layout rules

   RULES:
   - NO colors
   - NO buttons or UI styling
   - NO component styles
===================================================== */

/* =========================
   CONTAINERS
========================= */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: block;
}
.container > *:last-child {
  margin-bottom: 0;
}

.container.narrow { max-width: 900px; }
.container.text { max-width: 850px; }  /*phase out*/
.container.standard { max-width: 1100px; }
.container.wide { max-width: 100px; }
.container.full { max-width: 100%; }

/* =========================
   SECTIONS
========================= */

.section {
  display: block;
  width: 100%;
  padding: 60px 20px;
  position: relative;
  color: #222;
  background: transparent;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.section:last-child {
  border-bottom: none;
}
.section--tight {
  padding: 15px 0;
}

.section-gap {
  height: 40px;
}

/* =========================
   GRID SYSTEMS
========================= */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.tab-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

/* =========================
   ALIGNMENT UTILITIES
========================= */

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

/* utilities.css */

img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

img.loaded {
  opacity: 1;
}
.image-row-2 {
  display: flex;
  flex-wrap: nowrap;      /* forces horizontal row */
  gap: 20px;
  justify-content: center;
  align-items: stretch;
}

.image-row-2 img {
  width: 50%;
  height: 320px;
  object-fit: cover;
  border-radius: 8px;
}

/* Tablet */
@media (max-width: 900px) {
  .image-row-2 {
    flex-wrap: wrap;
  }

  .image-row-2 img {
    width: 48%;
    height: 260px;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .image-row-2 img {
    width: 100%;
    height: auto;
  }
}
.image-row-3 {
  display: flex;
  flex-wrap: nowrap;     /* keeps all 3 in one row */
  gap: 18px;
  justify-content: center;
  align-items: stretch;
}

.image-row-3 img {
  width: 33.333%;
  height: 260px;
  object-fit: cover;
  border-radius: 8px;
}

/* Tablet: 2 per row */
@media (max-width: 900px) {
  .image-row-3 {
    flex-wrap: wrap;
  }

  .image-row-3 img {
    width: 48%;
    height: 240px;
  }
}

/* Mobile: stack */
@media (max-width: 600px) {
  .image-row-3 img {
    width: 100%;
    height: auto;
  }
}