/* Base styles for editor-generated content */
.gjs-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.gjs-cell {
    flex: 1;
    padding: 0 15px;
    min-height: 50px;
}

.gjs-text {
    padding: 10px;
}

.gjs-image {
    max-width: 100%;
    height: auto;
}

.gjs-link {
    color: #2196F3;
    text-decoration: none;
}

.gjs-link:hover {
    text-decoration: underline;
}

/* Override/Add styles for full width page */
body {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header a {
    font-weight: bold;
    text-decoration: none;
    color: #333;
    font-size: 1.2rem;
}

.header h1 {
    margin: 0;
    font-size: 1rem;
    color: #666;
    font-weight: normal;
}

/* Main Content - Centered Boxed Layout */
main {
    flex: 1;
    width: 100%;
    /* Match footer width */
    margin: 0 auto;
    /* Center content */
    padding: 0 15px;
    /* Safe area for mobile & negative margins */
    display: block;
    background: white;
}

/* Content Only Layout (Sidebar) */
.layout-content-only main {
    margin: 0 auto;
    padding: 20px;
    gap: 30px;
    display: flex;
    /* Restore flex for sidebar layout */
}

.main-content-area {
    flex: 1;
}

.sidebar {
    width: 300px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.sidebar-widget {
    margin-bottom: 20px;
}

.sidebar-widget h3 {
    margin-top: 0;
    font-size: 1.1rem;
    border-bottom: 2px solid #2196F3;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* Footer Styles */
.site-footer {
    background: #1a1a1a;
    color: #fff;
    padding: 40px 20px;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-section h3 {
    color: #2196F3;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-section p {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 10px;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #2196F3;
}

.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid #333;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header {
        padding: 15px;
    }

    .header h1 {
        display: none;
    }

    .layout-content-only main {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    /* Stack columns on mobile */
    .gjs-row {
        margin: 0;
    }

    .gjs-cell {
        flex: 0 0 100%;
        padding: 10px 0;
    }
}