/**
 * Shrichakra Theme - Layout Grid, Containers & Utility Classes
 */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

.container-wide {
  width: 100%;
  max-width: var(--container-wide);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

/* Sections */
.site-main {
  flex: 1 0 auto;
}

.section {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
  position: relative;
}

.section-sm {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}

.section-lg {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

.section-bg-alt {
  background-color: var(--color-bg-alt);
}

.section-bg-primary {
  background-color: var(--color-primary-dark);
  color: var(--color-text-inverse);
}

.section-bg-primary h2, 
.section-bg-primary h3, 
.section-bg-primary p {
  color: var(--color-text-inverse);
}

.section-bg-gold-tint {
  background: linear-gradient(135deg, rgba(197, 138, 42, 0.08) 0%, rgba(139, 30, 63, 0.04) 100%);
}

/* Section Headers */
.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto var(--space-10);
}

.section-subtitle {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-secondary-dark);
  margin-bottom: var(--space-2);
  position: relative;
}

.section-subtitle::before,
.section-subtitle::after {
  content: '❖';
  margin: 0 var(--space-2);
  font-size: 0.75rem;
  color: var(--color-secondary);
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--color-primary);
  margin-bottom: var(--space-3);
  position: relative;
}

.section-description {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
}

/* Flex & Grid Utilities */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-cols-2 {
  /* minmax(0, 1fr) keeps wide children (tables, long words) from blowing the
     column out instead of shrinking with it */
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
  /* minmax(0, 1fr) keeps wide children (tables, long words) from blowing the
     column out instead of shrinking with it */
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
  /* minmax(0, 1fr) keeps wide children (tables, long words) from blowing the
     column out instead of shrinking with it */
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-auto-fit {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Breadcrumbs */
.breadcrumbs {
  padding: var(--space-3) 0;
  font-size: var(--text-sm);
  color: var(--color-text-subtle);
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
.breadcrumbs li + li::before {
  content: '›';
  margin-right: var(--space-2);
  color: var(--color-secondary);
}
.breadcrumbs a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}
