/* ==========================================================================
   Layout & Grid System
   ========================================================================== */

.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--section-padding-x);
    padding-right: var(--section-padding-x);
}

.section {
    padding-top: var(--section-padding-y);
    padding-bottom: var(--section-padding-y);
    position: relative;
    overflow: hidden;
}

/* Advanced Grid layout */
.grid {
    display: grid;
    gap: var(--space-32);
}

.grid-cols-2 {
    grid-template-columns: 1fr;
}

.grid-cols-3 {
    grid-template-columns: 1fr;
}

.grid-cols-4 {
    grid-template-columns: 1fr;
}

/* Responsive Grid Adjustments */
@media (min-width: 768px) {
    .grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Flexbox Utilities */
.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-4 { gap: var(--space-16); }
.gap-8 { gap: var(--space-32); }

/* Common Structural Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-8); }
.mb-4 { margin-bottom: var(--space-16); }
.mb-8 { margin-bottom: var(--space-32); }
.mb-16 { margin-bottom: var(--space-64); }

.mt-8 { margin-top: var(--space-32); }

/* Visibility Classes */
@media (max-width: 767px) {
    .hidden-mobile {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .hidden-desktop {
        display: none !important;
    }
}
