/* ============================================
   ADMIN EDITING MODE STYLES
   ============================================ */

[data-editable="true"].editing {
    outline: 2px dashed rgba(33, 150, 243, 0.5);
    background: rgba(33, 150, 243, 0.03);
    padding: 4px;
    cursor: text;
    transition: outline 0.3s ease, background 0.3s ease;
}

[data-editable="true"].editing:focus {
    outline: 2px solid var(--primary-blue);
    background: rgba(33, 150, 243, 0.07);
}

.admin-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    background: var(--dark-navy);
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 4px;
    opacity: 0.5;
    transition: opacity 0.3s ease, background 0.3s ease;
}

.admin-toggle-btn:hover {
    opacity: 1;
}

.admin-toggle-btn.active {
    background: var(--primary-blue);
    opacity: 1;
}

.admin-toolbar {
    position: fixed;
    bottom: 60px;
    right: 20px;
    z-index: 9999;
    background: var(--dark-navy);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 1rem;
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    min-width: 200px;
}

.admin-toolbar.visible {
    display: flex;
}

.admin-toolbar button {
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 0.5rem 1rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-align: left;
}

.admin-toolbar button:hover {
    background: rgba(33, 150, 243, 0.3);
}

.admin-toolbar button.save-btn {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
}

.admin-toolbar button.save-btn:hover {
    background: #1976D2;
}

.admin-toolbar button.cancel-btn {
    background: rgba(255, 87, 34, 0.3);
}

.admin-toolbar button.reset-btn {
    background: rgba(244, 67, 54, 0.3);
}

.admin-toolbar .toolbar-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 0.25rem 0;
}

.admin-toolbar .toolbar-label {
    color: rgba(255,255,255,0.5);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.25rem 0;
}

/* ============================================
   ARTICLES SECTION STYLES
   ============================================ */

.articles-section {
    padding: 6rem 4rem;
    background: var(--off-white);
}

.articles-section .section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.articles-section .section-title h2 {
    font-size: 2.5rem;
    color: #000000;
    margin-bottom: 0.75rem;
}

.articles-section .section-title p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.article-card {
    background: var(--white);
    border: 1px solid #E0E0E0;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-blue);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.article-card:hover::before {
    transform: scaleX(1);
}

.article-card-body {
    padding: 2rem;
}

.article-card-date {
    color: var(--primary-blue);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    display: block;
}

.article-card-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: #000000;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.article-card-excerpt {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.article-card-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.article-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
}

.article-btn-read {
    background: var(--primary-blue);
    color: var(--white);
}

.article-btn-read:hover {
    background: #1976D2;
}

.article-btn-linkedin {
    background: transparent;
    color: var(--primary-blue);
    border: 1px solid var(--primary-blue);
}

.article-btn-linkedin:hover {
    background: var(--primary-blue);
    color: var(--white);
}

.article-admin-actions {
    display: none;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.admin-mode .article-admin-actions {
    display: flex;
}

.article-admin-btn {
    padding: 0.3rem 0.75rem;
    font-size: 0.75rem;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 3px;
    transition: all 0.3s ease;
    background: var(--off-white);
    color: var(--text-dark);
}

.article-admin-btn.edit-article-btn:hover {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.article-admin-btn.delete-article-btn {
    color: #F44336;
    border-color: #F44336;
}

.article-admin-btn.delete-article-btn:hover {
    background: #F44336;
    color: white;
}

.add-article-btn {
    display: none;
    margin: 2rem auto 0;
    padding: 0.75rem 2rem;
    background: var(--primary-blue);
    color: white;
    border: none;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.admin-mode .add-article-btn {
    display: block;
}

.add-article-btn:hover {
    background: #1976D2;
}

.linkedin-follow-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin: 2rem auto 0;
    padding: 0.75rem 2rem;
    background: #0A66C2;
    color: white;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.linkedin-follow-link:hover {
    background: #004182;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 102, 194, 0.3);
}

.linkedin-follow-wrapper {
    text-align: center;
    margin-top: 2rem;
}

.no-articles-msg {
    text-align: center;
    color: var(--text-muted);
    font-size: 1rem;
    padding: 3rem;
    grid-column: 1 / -1;
}

/* ============================================
   ARTICLE MODAL
   ============================================ */

.article-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    backdrop-filter: blur(4px);
}

.article-modal-overlay.visible {
    display: flex;
}

.article-modal {
    background: var(--white);
    max-width: 800px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 8px;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.article-modal-close {
    position: sticky;
    top: 0;
    float: right;
    background: rgba(0,0,0,0.05);
    border: none;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem;
    border-radius: 50%;
    transition: background 0.3s ease;
    z-index: 1;
}

.article-modal-close:hover {
    background: rgba(0,0,0,0.1);
}

.article-modal-body {
    padding: 2rem 3rem 3rem;
}

.article-modal-date {
    color: var(--primary-blue);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.article-modal-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 600;
    color: #000000;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.article-modal-content {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.8;
}

.article-modal-content p {
    margin-bottom: 1rem;
}

/* ============================================
   ARTICLE FORM MODAL
   ============================================ */

.article-form-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    backdrop-filter: blur(4px);
}

.article-form-modal-overlay.visible {
    display: flex;
}

.article-form-modal {
    background: var(--white);
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 8px;
    padding: 2rem;
    animation: modalSlideIn 0.3s ease;
}

.article-form-modal h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #000;
}

.article-form-modal .form-group {
    margin-bottom: 1.25rem;
}

.article-form-modal .form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.article-form-modal .form-group input,
.article-form-modal .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #E0E0E0;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
    background: var(--off-white);
    border-radius: 4px;
}

.article-form-modal .form-group input:focus,
.article-form-modal .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.article-form-modal .form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.article-form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.article-form-actions button {
    padding: 0.6rem 1.5rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 4px;
    border: none;
    transition: all 0.3s ease;
}

.article-form-cancel {
    background: var(--off-white);
    color: var(--text-dark);
    border: 1px solid #E0E0E0 !important;
}

.article-form-save {
    background: var(--primary-blue);
    color: white;
}

.article-form-save:hover {
    background: #1976D2;
}

/* ============================================
   ADMIN NOTIFICATION
   ============================================ */

.admin-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10002;
    background: var(--dark-navy);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    transform: translateX(120%);
    transition: transform 0.4s ease;
}

.admin-notification.visible {
    transform: translateX(0);
}

.admin-notification.success {
    border-left: 3px solid #4CAF50;
}

.admin-notification.error {
    border-left: 3px solid #F44336;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .articles-section {
        padding: 5rem 2rem;
    }
}

@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }

    .article-modal-body {
        padding: 1.5rem;
    }

    .article-modal-title {
        font-size: 1.5rem;
    }

    .admin-toolbar {
        bottom: 55px;
        right: 10px;
        left: 10px;
        min-width: auto;
    }

    .admin-toggle-btn {
        bottom: 10px;
        right: 10px;
    }

    .article-form-modal {
        padding: 1.5rem;
    }
}
