/*==================================================
VILLA TAZITUNT
03-layout.css
V6.1 — Global Layout Utilities
==================================================*/


/*==================================================
DOCUMENT
==================================================*/

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    overflow-x: hidden;
}

main {
    width: 100%;
}

section {
    position: relative;
}


/*==================================================
LAYOUT SAFETY
==================================================*/

*,
*::before,
*::after {
    box-sizing: border-box;
}

.grid > *,
.editorial-grid > *,
.row > *,
.row-between > *,
.row-center > * {
    min-width: 0;
}


/*==================================================
GLOBAL CONTAINERS
==================================================*/

.container {
    width: min(
        calc(100% - (var(--page-padding) * 2)),
        var(--container)
    );

    margin-inline: auto;
}

.container-wide {
    width: min(
        calc(100% - (var(--page-padding) * 2)),
        var(--container-wide)
    );

    margin-inline: auto;
}

.container-narrow {
    width: min(
        calc(100% - (var(--page-padding) * 2)),
        var(--container-narrow)
    );

    margin-inline: auto;
}


/*==================================================
GENERIC GRID SYSTEM
==================================================*/

.grid {
    display: grid;
    gap: 32px;
}

.grid-2 {
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
}


/*==================================================
EDITORIAL 12 COLUMN GRID
==================================================*/

.editorial-grid {
    display: grid;

    grid-template-columns:
        repeat(12, minmax(0, 1fr));

    column-gap:
        clamp(18px, 2vw, 32px);
}


/*==================================================
SPACING UTILITIES
==================================================*/

.mt-16 {
    margin-top: 16px;
}

.mt-24 {
    margin-top: 24px;
}

.mt-32 {
    margin-top: 32px;
}

.mt-48 {
    margin-top: 48px;
}

.mt-64 {
    margin-top: 64px;
}

.mt-96 {
    margin-top: 96px;
}

.mb-16 {
    margin-bottom: 16px;
}

.mb-24 {
    margin-bottom: 24px;
}

.mb-32 {
    margin-bottom: 32px;
}

.mb-48 {
    margin-bottom: 48px;
}

.mb-64 {
    margin-bottom: 64px;
}

.mb-96 {
    margin-bottom: 96px;
}


/*==================================================
TEXT ALIGNMENT UTILITIES
==================================================*/

.text-left {
    text-align: left;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}


/*==================================================
VISIBILITY
==================================================*/

.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}


/*==================================================
MEDIA DEFAULTS
==================================================*/

figure {
    margin: 0;
}

img,
video {
    display: block;
    max-width: 100%;
}


/*==================================================
FULL BLEED
==================================================*/

.full-bleed {
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
}


/*==================================================
OVERFLOW HELPERS
==================================================*/

.overflow-hidden {
    overflow: hidden;
}


/*==================================================
STACK UTILITIES
==================================================*/

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

.stack-16 {
    gap: 16px;
}

.stack-24 {
    gap: 24px;
}

.stack-32 {
    gap: 32px;
}

.stack-48 {
    gap: 48px;
}


/*==================================================
ROW UTILITIES
==================================================*/

.row {
    display: flex;
    align-items: center;
}

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

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


/*==================================================
TABLET
==================================================*/

@media (max-width: 1100px) {

    .container {
        width: min(
            calc(100% - (var(--page-padding-tablet) * 2)),
            var(--container)
        );
    }

    .container-wide {
        width: min(
            calc(100% - (var(--page-padding-tablet) * 2)),
            var(--container-wide)
        );
    }

    .container-narrow {
        width: min(
            calc(100% - (var(--page-padding-tablet) * 2)),
            var(--container-narrow)
        );
    }

    .grid-3 {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/*==================================================
MOBILE
==================================================*/

@media (max-width: 768px) {

    .container,
    .container-wide,
    .container-narrow {
        width:
            calc(
                100% - (var(--page-padding-mobile) * 2)
            );
    }

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

    .editorial-grid {
        grid-template-columns: 1fr;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block;
    }

    .full-bleed {
        width: 100vw;
    }

}


/*==================================================
SMALL MOBILE
==================================================*/

@media (max-width: 480px) {

    .container,
    .container-wide,
    .container-narrow {
        width: calc(100% - 32px);
    }

}