/* Resources & News Page Styles */

/* Main Content Layout */
.main-content {
    padding: 60px 0;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    color: var(--text);
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.section-header p {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Featured Resources Section */
.featured-section {
    margin-bottom: 4rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

/* News Section */
.news-section {
    margin-bottom: 4rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Learning Resources Section */
.learning-section {
    margin-bottom: 4rem;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* Content Cards */
.content-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.content-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.12);
}

.card-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.8) 0%, rgba(30, 58, 138, 0.8) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.content-card:hover .card-image::before {
    opacity: 1;
}

.card-content {
    padding: 2rem;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.card-category {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.card-date {
    color: var(--text-light);
    font-size: 0.875rem;
}

.card-title {
    color: var(--text);
    margin-bottom: 1rem;
    font-size: 1.25rem;
    line-height: 1.4;
}

.card-description {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.card-link:hover {
    color: var(--primary-dark);
    transform: translateX(5px);
}

/* Admin Panel Styles */
.admin-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}



/* Login Screen */
.admin-login {
    padding: 3rem 2rem;
    text-align: center;
}

.login-header h2 {
    color: var(--text);
    margin-bottom: 1rem;
    font-size: 2rem;
}

.login-header p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.login-form {
    max-width: 400px;
    margin: 0 auto;
}

.login-help {
    margin-top: 2rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 12px;
    color: var(--text-light);
    font-size: 0.875rem;
}

.login-help i {
    color: var(--primary);
    margin-right: 0.5rem;
}

/* Admin Controls */
.admin-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#logoutBtn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.admin-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(30, 58, 138, 0.4);
}

/* Admin Modal */
.admin-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    backdrop-filter: blur(10px);
}

.admin-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-content {
    background: var(--white);
    border-radius: 24px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2);
    position: relative;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.admin-header h2 {
    color: var(--text);
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text);
}

/* Admin Tabs */
.admin-tabs {
    display: flex;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0 2rem;
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-btn:hover {
    color: var(--primary);
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 2rem;
}

.tab-content.active {
    display: block;
}

/* Admin Forms */
.admin-form {
    display: grid;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Image Upload Styles */
.image-upload-container {
    margin-top: 0.5rem;
}

.image-upload-area {
    border: 2px dashed rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-light);
}

.image-upload-area:hover {
    border-color: var(--primary);
    background: rgba(30, 58, 138, 0.05);
}

.image-upload-area i {
    font-size: 2rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.image-upload-area p {
    color: var(--text-light);
    margin: 0;
}

.image-preview {
    position: relative;
    display: inline-block;
    margin-top: 1rem;
}

.image-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #dc2626;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.remove-image:hover {
    background: #b91c1c;
    transform: scale(1.1);
}

.form-help {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block;
}

/* Content List */
.content-list {
    display: grid;
    gap: 1rem;
}

.content-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.content-info h4 {
    color: var(--text);
    margin-bottom: 0.25rem;
}

.content-info p {
    color: var(--text-light);
    font-size: 0.875rem;
    margin: 0;
}

.content-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-light);
}

.action-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text);
}

.action-btn.edit:hover {
    color: var(--primary);
}

.action-btn.delete:hover {
    color: #dc2626;
}

/* Manage Tab */
.manage-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.data-stats {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 16px;
}

.data-stats h3 {
    color: var(--text);
    margin-bottom: 1.5rem;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-light);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--text);
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .featured-grid,
    .news-grid,
    .resources-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-content {
        width: 95%;
        margin: 1rem;
    }
    
    .admin-header,
    .admin-tabs,
    .tab-content {
        padding: 1rem;
    }
    
    .admin-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
    
    .manage-actions {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .section-header h2 {
        font-size: 2rem;
    }
    
    .card-content {
        padding: 1.5rem;
    }
    
    .admin-toggle {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}
