/* Broadsheet Grid System */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--grid-gap);
    background-color: var(--paper-color);
    /* Enforce crema color */
}

/* 12 Column Grid */
.row {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--grid-gap);
    margin-bottom: calc(var(--grid-gap) * 1.5);
    align-items: start;
}

/* Base constraints para evitar Grid Blowouts con imágenes pesadas */
[class*="col-"] {
    min-width: 0 !important;
    min-height: 0 !important;
}

/* Spans */
.col-1 {
    grid-column: span 1;
}

.col-2 {
    grid-column: span 2;
}

.col-3 {
    grid-column: span 3;
}

.col-4 {
    grid-column: span 4;
}

.col-5 {
    grid-column: span 5;
}

.col-6 {
    grid-column: span 6;
}

.col-7 {
    grid-column: span 7;
}

.col-8 {
    grid-column: span 8;
}

.col-9 {
    grid-column: span 9;
}

.col-10 {
    grid-column: span 10;
}

.col-11 {
    grid-column: span 11;
}

.col-12 {
    grid-column: span 12;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .container {
        max-width: 95%;
    }
}

@media (max-width: 992px) {
    .row {
        grid-template-columns: repeat(8, 1fr);
    }

    .col-md-hide {
        display: none !important;
    }

    /* Auto collapse spans that are too wide */
    [class*="col-"] {
        grid-column: span 8 !important;
    }

    .col-md-4 {
        grid-column: span 4 !important;
    }
}

@media (max-width: 768px) {
    .row {
        grid-template-columns: repeat(4, 1fr);
    }

    [class*="col-"] {
        grid-column: span 4 !important;
    }

    .col-sm-2 {
        grid-column: span 2 !important;
    }
}

@media (max-width: 480px) {
    .row {
        display: block;
        /* Collapse to single column stack */
    }

    [class*="col-"] {
        width: 100% !important;
        grid-column: auto !important;
        margin-bottom: var(--grid-gap);
    }

    .filete-vertical {
        border-right: none;
        border-bottom: 1px solid var(--ink-primary);
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }

    .hidden-sm {
        display: none !important;
    }
}