.modern-blogs-container .section-header {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.modern-blogs-container .section-header h2 {
    padding-bottom: 0;
}

.blog-nexus-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

.blog-nexus-hero-section {
    text-align: center;
    margin-bottom: 3rem;
    padding: 3rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
    position: relative;
    overflow: hidden;
}

.blog-nexus-hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1.5" fill="rgba(255,255,255,0.1)"/></svg>');
}

.blog-nexus-main-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    position: relative;
    z-index: 1;
}

.blog-nexus-admin-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.blog-nexus-highlight {
    background: linear-gradient(45deg, #ff6b6b, #ffa726);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-nexus-success-alert {
    background: linear-gradient(45deg, #4caf50, #81c784);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.3);
}

.blog-nexus-success-icon {
    margin-right: 0.5rem;
    font-weight: bold;
}

.blog-nexus-admin-controls {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 2rem;
}

.blog-nexus-logout-btn {
    background: linear-gradient(45deg, #ff4757, #ff6b7a);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-nexus-logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 71, 87, 0.4);
}

.blog-nexus-form-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 3rem;
    overflow: hidden;
}

.blog-nexus-form-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem;
}

.blog-nexus-form-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.blog-nexus-form-body {
    padding: 2rem;
}

.blog-nexus-input-group {
    margin-bottom: 1.5rem;
}

.blog-nexus-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2d3748;
}

.blog-nexus-input,
.blog-nexus-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.blog-nexus-input:focus,
.blog-nexus-textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.blog-nexus-file-upload {
    position: relative;
}

.blog-nexus-file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.blog-nexus-file-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.blog-nexus-file-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.blog-nexus-current-image {
    margin-top: 1rem;
}

.blog-nexus-preview-img {
    max-width: 200px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.blog-nexus-image-caption {
    color: #64748b;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.blog-nexus-form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.blog-nexus-primary-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.blog-nexus-primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.blog-nexus-secondary-btn {
    background: #e2e8f0;
    color: #4a5568;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.blog-nexus-secondary-btn:hover {
    background: #cbd5e0;
    transform: translateY(-2px);
}

.blog-nexus-management-panel {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.blog-nexus-panel-header {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    color: white;
    padding: 1.5rem 2rem;
}

.blog-nexus-panel-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.blog-nexus-table-container {
    overflow-x: auto;
}

.blog-nexus-table {
    width: 100%;
    border-collapse: collapse;
}

.blog-nexus-table-head {
    background: #f8fafc;
}

.blog-nexus-th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #2d3748;
    border-bottom: 2px solid #e2e8f0;
}

.blog-nexus-table-row:hover {
    background: #f8fafc;
}

.blog-nexus-td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.blog-nexus-table-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
}

.blog-nexus-no-image {
    width: 50px;
    height: 50px;
    background: #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a0aec0;
}

.blog-nexus-title-cell {
    font-weight: 600;
    color: #2d3748;
}

.blog-nexus-action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.blog-nexus-edit-btn,
.blog-nexus-view-btn {
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.blog-nexus-edit-btn {
    background: #ffa726;
    color: white;
}

.blog-nexus-edit-btn:hover {
    background: #ff9800;
}

.blog-nexus-view-btn {
    background: #667eea;
    color: white;
}

.blog-nexus-view-btn:hover {
    background: #5a67d8;
}

.blog-nexus-delete-form {
    display: inline;
}

.blog-nexus-delete-btn {
    background: #ff4757;
    color: white;
    border: none;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.blog-nexus-delete-btn:hover {
    background: #ff3742;
}

.blog-nexus-auth-section {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.blog-nexus-auth-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 400px;
}

.blog-nexus-auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.blog-nexus-auth-subtitle {
    color: #64748b;
    margin-bottom: 1.5rem;
}

.blog-nexus-auth-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.blog-nexus-login-btn,
.blog-nexus-signup-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.blog-nexus-login-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.blog-nexus-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.blog-nexus-signup-btn {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.blog-nexus-signup-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.blog-nexus-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.blog-nexus-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    position: relative;
}

.blog-nexus-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.blog-nexus-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.blog-nexus-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-nexus-card:hover .blog-nexus-img {
    transform: scale(1.05);
}

.blog-nexus-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(102, 126, 234, 0.1),
        rgba(118, 75, 162, 0.1)
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-nexus-card:hover .blog-nexus-image-overlay {
    opacity: 1;
}

.blog-nexus-card-content {
    padding: 1.5rem;
}

.blog-nexus-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.blog-nexus-card-excerpt {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-nexus-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.blog-nexus-read-more:hover {
    color: #5a67d8;
    transform: translateX(5px);
}

.blog-nexus-arrow {
    transition: transform 0.3s ease;
}

.blog-nexus-read-more:hover .blog-nexus-arrow {
    transform: translateX(5px);
}

.blog-nexus-card-footer {
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.blog-nexus-date-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.875rem;
}

.blog-nexus-hero-logout-form {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

/* Modal Styles */
.blog-nexus-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.blog-nexus-modal-content {
    background-color: white;
    margin: 10vh auto;
    width: 80%;
    max-width: 800px;
    border-radius: 20px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.blog-nexus-modal-small {
    max-width: 500px;
}

.blog-nexus-modal-large {
    max-width: 900px;
}

.blog-nexus-modal-header {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.blog-nexus-modal-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.blog-nexus-modal-close {
    color: white;
    font-size: 1.75rem;
    cursor: pointer;
    line-height: 1;
}

.blog-nexus-modal-close:hover {
    opacity: 0.8;
}

.blog-nexus-modal-body {
    padding: 2rem;
    overflow-y: auto;
}

.blog-nexus-modal-image {
    margin-bottom: 1.5rem;
}

.blog-nexus-modal-image img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 12px;
    object-fit: cover;
}

.blog-nexus-modal-date {
    display: flex;
    align-items: center;
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.blog-nexus-modal-text {
    color: #2d3748;
    line-height: 1.8;
    white-space: normal;
}

/* Rich content styling for modal */
.blog-nexus-modal-text h1,
.blog-nexus-modal-text h2,
.blog-nexus-modal-text h3,
.blog-nexus-modal-text h4,
.blog-nexus-modal-text h5,
.blog-nexus-modal-text h6 {
    color: #2d3748;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: bold;
}

.blog-nexus-modal-text p {
    margin-bottom: 1em;
}

.blog-nexus-modal-text img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.blog-nexus-modal-text blockquote {
    border-left: 4px solid #e2e8f0;
    margin: 1.5em 0;
    padding: 0.5em 0 0.5em 1em;
    background-color: #f7fafc;
    border-radius: 4px;
}

.blog-nexus-modal-text code {
    background-color: #f1f5f9;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: "Courier New", monospace;
    font-size: 0.9em;
}

.blog-nexus-modal-text pre {
    background-color: #1a202c;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1rem 0;
}

.blog-nexus-modal-text ul,
.blog-nexus-modal-text ol {
    margin: 1em 0;
    padding-left: 2em;
}

.blog-nexus-modal-text li {
    margin-bottom: 0.5em;
}

.blog-nexus-modal-text table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
}

.blog-nexus-modal-text table td,
.blog-nexus-modal-text table th {
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
    text-align: left;
}

.blog-nexus-modal-text table th {
    background-color: #f7fafc;
    font-weight: bold;
}

.blog-nexus-modal-text a {
    color: #667eea;
    text-decoration: none;
}

.blog-nexus-modal-text a:hover {
    text-decoration: underline;
}

.blog-nexus-modal-message {
    color: #2d3748;
    text-align: center;
    font-size: 1.1rem;
    margin: 1rem 0;
}

.blog-nexus-modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .blog-nexus-container {
        padding: 1rem;
    }

    .blog-nexus-main-title {
        font-size: 2rem;
    }

    .blog-nexus-gallery {
        grid-template-columns: 1fr;
    }

    .blog-nexus-auth-buttons {
        flex-direction: column;
    }

    .blog-nexus-action-buttons {
        flex-direction: column;
    }
}

/* TinyMCE Editor Customization */
.tox-tinymce {
    border-radius: 12px !important;
    border: 2px solid #e2e8f0 !important;
    box-shadow: none !important;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif !important;
}

.tox-tinymce:focus-within {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

.tox .tox-menubar {
    background: #f8fafc !important;
    border: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.tox .tox-toolbar {
    background: #f8fafc !important;
    border: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.tox .tox-statusbar {
    background: #f8fafc !important;
    border: none !important;
    border-top: 1px solid #e2e8f0 !important;
}

.tox .tox-edit-area {
    border: none !important;
}

.tox .tox-edit-area iframe {
    background: white !important;
}

/* TinyMCE Button Styling */
.tox .tox-tbtn {
    border-radius: 6px !important;
    margin: 2px !important;
}

.tox .tox-tbtn--enabled {
    background: #667eea !important;
    color: white !important;
}

.tox .tox-tbtn:hover {
    background: #5a67d8 !important;
    color: white !important;
}

/* TinyMCE Modal Styling */
.tox .tox-dialog {
    border-radius: 12px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}

.tox .tox-dialog-header {
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

/* Make TinyMCE responsive */
@media (max-width: 768px) {
    .tox .tox-toolbar {
        flex-wrap: wrap !important;
    }

    .tox .tox-toolbar__group {
        flex-wrap: wrap !important;
    }
}
