/* ==========================================================================
   EDU LINKED — LAYOUT.CSS
   Page structure · containers · section spacing · responsive layout
   ========================================================================== */

/* -------------------------------------------------------
   PAGE CONTAINERS
   ------------------------------------------------------- */

.page-container,
.section-container {
    width: 100%;
    max-width: 1200px;
    padding-left: var(--spacing-sm);
    padding-right: var(--spacing-sm);
    margin-left: auto;
    margin-right: auto;
}

.page-narrow {
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}

/* -------------------------------------------------------
   SECTIONS
   ------------------------------------------------------- */

.section {
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
}

.section-sm {
    padding-top: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
}

.section-xs {
    padding-top: var(--spacing-md);
    padding-bottom: var(--spacing-md);
}

.section-dark {
    background: var(--color-bg-alt);
}

.section-light {
    background: var(--color-bg-soft);
}

/* -------------------------------------------------------
   HERO / MAIN LAYOUTS
   From theme(1).css → Coming Soon grid
   ------------------------------------------------------- */

.hero-layout {
    max-width: 1050px;
    margin: 0 auto;
    padding-left: var(--spacing-sm);
    padding-right: var(--spacing-sm);
}

/* Coming Soon layout (structural only) */
/* Source: theme(1).css lines 71–83 */    /*  */
.coming-soon__layout {
    max-width: 1050px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 2.5rem;
    align-items: center;
    position: relative;
}

@media (max-width: 900px) {
    .coming-soon__layout {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        text-align: center;
    }
}

/* -------------------------------------------------------
   GENERIC GRID LAYOUTS
   (Utilities moved to utilities.css; these are structural)
   ------------------------------------------------------- */

.layout-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--spacing-lg);
}

.layout-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--spacing-lg);
}

.layout-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--spacing-lg);
}

@media (max-width: 900px) {
    .layout-grid-3,
    .layout-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .layout-grid-2,
    .layout-grid-3,
    .layout-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* -------------------------------------------------------
   FEATURED ROW / MEDIA + TEXT LAYOUTS
   ------------------------------------------------------- */

.media-text-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--spacing-xl);
    align-items: center;
}

@media (max-width: 900px) {
    .media-text-layout {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* -------------------------------------------------------
   METRIC / IMPACT GRID SHELLS
   (Only structure; visuals go into components.css)
   These rules generalise the repeated patterns seen in:
   - KPI cards
   - Impact cards
   - SDG cards
   ------------------------------------------------------- */

.metrics-grid,
.impact-grid,
.detail-grid,
.kpi-grid,
.sdg-grid {
    display: grid;
    gap: var(--spacing-lg);
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* -------------------------------------------------------
   WRAPPED GROUPS
   ------------------------------------------------------- */

.group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.group-row {
    display: flex;
    flex-direction: row;
    gap: var(--spacing-lg);
}

@media (max-width: 768px) {
    .group-row {
        flex-direction: column;
    }
}

/* -------------------------------------------------------
   FLEX LAYOUT HELPERS (structural only)
   ------------------------------------------------------- */

.layout-flex {
    display: flex;
    gap: var(--spacing-md);
}

.layout-flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.layout-flex-between {
    display: flex;
    justify-content: space-between;
}

/* -------------------------------------------------------
   SIDEBAR LAYOUTS (structure only)
   ------------------------------------------------------- */

.sidebar-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: var(--spacing-xl);
}

@media (max-width: 900px) {
    .sidebar-layout {
        grid-template-columns: 1fr;
    }
}

/* -------------------------------------------------------
   FULL-WIDTH SECTIONS
   ------------------------------------------------------- */

.fullwidth {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.fullwidth-dark {
    background: var(--color-bg-alt);
    width: 100%;
}

/* -------------------------------------------------------
   HEIGHT UTILITIES (structural)
   ------------------------------------------------------- */

.h-100 {
    height: 100%;
}

.min-h-100 {
    min-height: 100vh;
}
