/**
 * Layout Styles
 * Responsive grid layouts
 *
 * @package TBC_News
 */

/* ===================================
   SITE STRUCTURE FOR STICKY FOOTER
   =================================== */

html {
    height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

/* Main content areas grow to push footer down */
#page > .site-container:not(.footer-container) {
    flex: 1 0 auto;
}

/* ===================================
   MAIN CONTENT WRAPPER
   =================================== */

.site-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===================================
   CONTENT WITH SIDEBAR LAYOUT
   =================================== */

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    margin: 32px 0 64px;
}

.content-wrapper.no-sidebar {
    grid-template-columns: 1fr;
}

/* Main content area */
.site-main {
    min-width: 0; /* Prevent grid blowout */
}

/* Sidebar area */
.sidebar-area {
    min-width: 0; /* Prevent grid blowout */
}

/* ===================================
   RESPONSIVE BREAKPOINTS
   =================================== */

/* Large tablets and below */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr 300px;
        gap: 32px;
    }
}

/* Tablets and below */
@media (max-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .sidebar-area {
        margin-top: 48px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .site-container {
        padding: 0 15px;
    }
    
    .content-wrapper {
        margin: 24px 0 48px;
    }
}

/* ===================================
   HOMEPAGE SPECIFIC
   =================================== */

.homepage-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    margin-top: 32px;
    margin-bottom: 64px;
}

.homepage-content-wrapper.fullwidth {
    grid-template-columns: 1fr;
}

@media (max-width: 1024px) {
    .homepage-content-wrapper {
        grid-template-columns: 1fr 300px;
        gap: 32px;
    }
}

@media (max-width: 992px) {
    .homepage-content-wrapper {
        grid-template-columns: 1fr;
        margin-bottom: 48px;
    }
    
    .homepage-content-wrapper .sidebar-area {
        margin-top: 48px;
    }
}


/* ===================================
   MINIMUM CONTENT HEIGHT
   =================================== */

/* Ensure content has minimum height to push footer down */
.site-main {
    min-height: 400px;
}

/* For pages with very little content */
.error-404,
.search-no-results,
.page-content {
    min-height: 500px;
}

@media (max-width: 768px) {
    .site-main {
        min-height: 300px;
    }
    
    .error-404,
    .search-no-results,
    .page-content {
        min-height: 400px;
    }
}










