/* 
  ====================================
  LAYOUT - Grid, Flexbox, Container
  ====================================
*/

/* Flex Utilities */
.flex {
    display: flex;
}

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

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

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

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

/* Grid Utilities */
.grid {
    display: grid;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* Spacing Utilities */
.m-0 { margin: 0; }
.m-auto { margin: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mt-3xl { margin-top: var(--space-3xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.mb-3xl { margin-bottom: var(--space-3xl); }

.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }

/* Width & Height */
.w-full { width: 100%; }
.h-full { height: 100%; }
.h-screen { height: 100vh; }

.min-h-screen { min-height: 100vh; }

/* Display & Visibility */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.invisible {
    visibility: hidden;
}

.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }

/* Text Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* Main Page Structure */
main {
    min-height: 100vh;
    padding-top: 80px;
}

.page {
    min-height: calc(100vh - 80px - 200px);
    padding: var(--space-3xl) var(--space-lg);
    width: 100%;
}

.page-title {
    text-align: center;
    margin-bottom: var(--space-2xl);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: var(--fs-5xl);
    font-weight: var(--fw-bold);
}

/* Highlight */
.highlight {
    color: var(--primary-green);
    font-weight: var(--fw-bold);
}

.highlight-blue {
    color: var(--primary-blue);
}

/* Gradient Background */
.gradient-bg {
    background: var(--gradient-primary);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Aspect Ratio */
.aspect-square { aspect-ratio: 1 / 1; }
.aspect-video { aspect-ratio: 16 / 9; }

/* Background Patterns */
.gradient-subtle-bg {
    background: var(--gradient-subtle);
}

/* Icon & Image Wrapper */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 32px; height: 32px; }
.icon-xl { width: 48px; height: 48px; }

/* Divider */
.divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--primary-green), transparent);
    margin: var(--space-xl) 0;
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    margin-bottom: var(--space-xl);
    color: var(--primary-green);
    font-weight: var(--fw-medium);
    transition: all var(--transition-base);
}

.back-link:hover {
    gap: var(--space-sm);
    text-decoration: none;
}
