/* ======================== [CSS VARIABLES] ======================== */
:root {
    --primary: #d32f2f;
    --primary-dark: #b71c1c;
    --dark: #121212;
    --white: #ffffff;
    --bg-gray: #f4f6f8;
    --text-main: #333;
    
    /* Status Colors */
    --green: #2e7d32;
    --blue: #1565c0;
    --orange: #ef6c00;
    --purple: #7b1fa2;
    
    --shadow: 0 4px 10px rgba(0,0,0,0.05);
    --shadow-hover: 0 10px 30px rgba(0,0,0,0.15);
    --radius: 8px;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    background-color: var(--white);
}

.container { 
    max-width: 1350px; 
    margin: 0 auto; 
    padding: 0 15px; 
}

/* ======================== [FIX: FORCE BLOCK LAYOUT] ======================== */
/* This ensures content stacks vertically even if parent is flex */
.mc-block-wrapper {
    display: block !important;
    width: 100% !important;
    clear: both;
}

a { 
    text-decoration: none; 
    color: inherit; 
    transition: 0.3s; 
}

/* ======================== [HEADING - HIGHLIGHTED & TOP] ======================== */
.style-heading {
    display: flex !important; /* Force flex for internal alignment */
    align-items: center;
    width: 100% !important; /* Force full width so it stays on TOP */
    box-sizing: border-box;
    
    /* Highlight Styles */
    background: linear-gradient(to right, #f9f9f9, #ffffff);
    padding: 15px 20px;
    border-left: 6px solid var(--primary); /* Thick Red Accent Line */
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 3px 8px rgba(0,0,0,0.03);
    border-radius: 0 6px 6px 0;
    
    margin-bottom: 30px;
    margin-top: 20px;
}

.style-heading h2 {
    font-size: 26px;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    letter-spacing: 0.5px;
}

.heading-icon {
    color: var(--primary);
    font-size: 24px;
}

/* ======================== [MAIN GRID SYSTEM] ======================== */
.main-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 40px;
    width: 100%; /* Ensure grid takes full width */
}

/* Desktop: 3 columns (3*3) */
@media (min-width: 1025px) {
    .main-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet: 2 columns */
@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile: 2 Columns (2*2) - Strictly Enforced */
@media (max-width: 768px) {
    .main-grid {
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px;
    }

    .container {
        padding: 0 10px;
    }

    /* Adjust heading for mobile */
    .style-heading {
        padding: 12px 15px;
        margin-bottom: 20px;
        border-left-width: 5px;
    }
    
    .style-heading h2 {
        font-size: 18px;
    }
    
    .heading-icon {
        font-size: 20px;
    }
}

/* --- [CARD STYLING] --- */
.grid-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s ease;
}

.grid-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

/* Card Header */
.gc-header {
    background: #111;
    color: var(--white);
    padding: 10px 15px;
    font-weight: 700;
    font-size: 15px;
    border-bottom: 3px solid var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Card List */
.gc-list {
    list-style: none;
    padding: 0;
    flex-grow: 1;
    margin: 0;
}

.gc-list li {
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    line-height: 1.4;
}

.gc-list li:last-child { 
    border-bottom: none; 
}

.gc-list a {
    color: var(--text-main);
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 5px;
}

.gc-list li:hover a {
    color: var(--primary);
}

/* --- [BADGES] --- */
.status-badge {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 3px;
    color: white;
    white-space: nowrap;
    flex-shrink: 0;
}

.status-new { background: linear-gradient(135deg, #ff9800, #f57c00); }
.status-hot { background: linear-gradient(135deg, #e53935, #c62828); animation: pulse 1.5s infinite; }
.status-live { background: linear-gradient(135deg, #43a047, #2e7d32); }
.status-imp { background: linear-gradient(135deg, #8e24aa, #6a1b9a); }
.status-upd { background: linear-gradient(135deg, #039be5, #0277bd); }

/* Card Footer */
.gc-footer {
    padding: 10px;
    background: #fdfdfd;
    border-top: 1px solid #eee;
    text-align: right;
}

.btn-view {
    color: var(--primary);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    display: inline-block;
    transition: 0.3s;
}

.btn-view:hover {
    text-decoration: underline;
}

/* --- [MOBILE SPECIFIC TWEAKS] --- */
@media (max-width: 768px) {
    .gc-header {
        font-size: 12px; 
        padding: 8px 10px;
    }

    .gc-list li {
        padding: 8px 10px;
        font-size: 11px;
    }

    .status-badge {
        font-size: 8px;
        padding: 1px 4px;
    }
    
    .gc-footer {
        padding: 8px;
        text-align: center;
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Empty State */
.gc-list .no-posts {
    text-align: center;
    padding: 20px 10px;
    color: #999;
    font-size: 12px;
    font-style: italic;
}
