/* ==========================================================================
   LAYOUT.CSS — Containers, Sections, Grids, Flex Helpers
   Plaza Hotel
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Page Wrapper
   -------------------------------------------------------------------------- */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1 1 auto;
  padding-top: 80px; /* offset for fixed header */
}

/* Homepage hero starts directly under fixed header with no top padding */
.main-content--hero {
  padding-top: 0;
}

/* --------------------------------------------------------------------------
   2. Containers
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1280px;
  margin-right: auto;
  margin-left: auto;
  padding-right: 1.5rem;
  padding-left: 1.5rem;
}

.container-sm {
  width: 100%;
  max-width: 800px;
  margin-right: auto;
  margin-left: auto;
  padding-right: 1.5rem;
  padding-left: 1.5rem;
}

.container-lg {
  width: 100%;
  max-width: 1400px;
  margin-right: auto;
  margin-left: auto;
  padding-right: 1.5rem;
  padding-left: 1.5rem;
}

/* --------------------------------------------------------------------------
   3. Sections
   -------------------------------------------------------------------------- */
.section {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.section-sm {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.section-lg {
  padding-top: 7rem;
  padding-bottom: 7rem;
}

/* Alternating background sections */
.section--surface {
  background-color: var(--color-surface);
}

.section--dark {
  background-color: var(--color-dark);
  color: var(--color-white);
}

.section--white {
  background-color: var(--color-white);
}

/* --------------------------------------------------------------------------
   4. CSS Grid — Multi-column Layouts
   -------------------------------------------------------------------------- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* Auto-fill responsive grids */
.grid-auto-sm {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.grid-auto-md {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.grid-auto-lg {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 2rem;
}

/* Asymmetric grids */
.grid-2-1 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.grid-1-2 {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
}

.grid-3-1 {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 2rem;
}

/* --------------------------------------------------------------------------
   5. Flexbox Helpers
   -------------------------------------------------------------------------- */
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-start {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.flex-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.flex-col-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-gap-1 { gap: 0.5rem; }
.flex-gap-2 { gap: 1rem; }
.flex-gap-3 { gap: 1.5rem; }
.flex-gap-4 { gap: 2rem; }

.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }

/* --------------------------------------------------------------------------
   6. Sidebar Layout (e.g. room detail)
   -------------------------------------------------------------------------- */
.layout-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2.5rem;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 100px; /* below fixed header */
}

/* --------------------------------------------------------------------------
   7. Two-column content + image
   -------------------------------------------------------------------------- */
.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.split-section--reverse .split-content {
  order: 2;
}

.split-section--reverse .split-image {
  order: 1;
}

.split-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
}

/* --------------------------------------------------------------------------
   8. Aspect ratio helpers
   -------------------------------------------------------------------------- */
.aspect-16-9 { aspect-ratio: 16 / 9; }
.aspect-4-3  { aspect-ratio: 4 / 3; }
.aspect-3-2  { aspect-ratio: 3 / 2; }
.aspect-1-1  { aspect-ratio: 1 / 1; }
.aspect-2-3  { aspect-ratio: 2 / 3; }

/* --------------------------------------------------------------------------
   9. Overflow helpers
   -------------------------------------------------------------------------- */
.overflow-hidden { overflow: hidden; }
.overflow-auto   { overflow: auto; }
.overflow-scroll { overflow: scroll; }

/* --------------------------------------------------------------------------
   10. Position helpers
   -------------------------------------------------------------------------- */
.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-sticky   { position: sticky; }
