/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    margin-bottom: 30px;
    color: white;
    position: relative;
    z-index: 200;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.header-title {
    text-align: center;
    flex: 1;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.site-logo {
    height: 60px;
    width: auto;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

.header h1 {
    font-size: 3.5rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.3rem;
    opacity: 0.9;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.user-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.user-role {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: capitalize;
}

.user-actions {
    display: flex;
    gap: 8px;
}

.user-actions .btn {
    padding: 8px 12px;
    font-size: 0.9rem;
}

/* Global Resource Search Bar (Right Side Under User) */
.header-search {
    position: relative;
    width: 350px;
}

.header-search .search-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.header-search .search-icon {
    position: absolute;
    left: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 1;
}

.header-search .search-input {
    width: 100%;
    padding: 10px 40px 10px 38px;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    outline: none;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-search .search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.header-search .search-input:focus {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15), 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.header-search .clear-search-btn {
    position: absolute;
    right: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 1;
}

.header-search .clear-search-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    color: white;
    transform: scale(1.05);
}

.search-filters {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}

.search-filter-select {
    padding: 5px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.8rem;
    outline: none;
    cursor: pointer;
    background: white;
    transition: all 0.3s ease;
    min-width: 110px;
    flex: 1;
}

.search-filter-select:focus {
    border-color: #667eea;
}

.search-result-count {
    font-size: 0.75rem;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
}

.search-results-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 450px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    max-height: 500px;
    overflow-y: auto;
    z-index: 250;
    animation: slideDown 0.3s ease;
}

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

.search-results-list {
    padding: 10px;
}

.search-result-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin-bottom: 3px;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    transform: translateX(3px);
}

.search-result-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 6px;
}

.search-result-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 6px;
    line-height: 1.3;
}

.search-result-title .highlight {
    background: rgba(255, 235, 59, 0.4);
    padding: 2px 4px;
    border-radius: 3px;
}

.search-result-description {
    font-size: 0.88rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 8px;
}

.search-result-description .highlight {
    background: rgba(255, 235, 59, 0.4);
    padding: 2px 4px;
    border-radius: 3px;
}

.search-result-url {
    font-size: 0.8rem;
    color: #667eea;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    word-break: break-all;
}

.search-result-url:hover {
    text-decoration: underline;
}

.search-result-url i {
    font-size: 0.8rem;
}

.search-result-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.search-meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    font-size: 0.75rem;
    color: #667eea;
    font-weight: 500;
}

.search-meta-badge i {
    font-size: 0.7rem;
}

.search-meta-badge.section {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.search-meta-badge.type {
    background: rgba(255, 152, 0, 0.1);
    color: #FF9800;
}

.search-meta-badge.category {
    background: rgba(156, 39, 176, 0.1);
    color: #9C27B0;
}

.search-no-results {
    padding: 30px;
    text-align: center;
    color: #999;
}

.search-no-results i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.search-no-results p {
    font-size: 1rem;
    margin-bottom: 4px;
}

.search-no-results small {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Responsive Design for Search */
@media (max-width: 1024px) {
    .header-search {
        width: 300px;
    }
    
    .search-results-panel {
        width: 400px;
    }
}

@media (max-width: 768px) {
    .header-content {
        gap: 10px;
    }
    
    .header-right {
        align-items: stretch;
        width: 100%;
        order: 3;
    }
    
    .user-info {
        width: 100%;
    }
    
    .header-search {
        width: 100%;
        margin-top: 5px;
    }
    
    .header-search .search-input {
        font-size: 0.9rem;
        padding: 10px 40px 10px 38px;
    }
    
    .header-search .search-icon {
        left: 12px;
        font-size: 0.9rem;
    }
    
    .header-search .clear-search-btn {
        right: 10px;
        padding: 5px 8px;
        font-size: 0.85rem;
    }
    
    .search-results-panel {
        width: 100%;
        right: 0;
        left: 0;
        max-height: 400px;
    }
    
    .search-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 8px 10px;
    }
    
    .search-filter-select {
        min-width: 100px;
        font-size: 0.75rem;
        padding: 4px 8px;
        flex: 0 0 auto;
    }
    
    .search-result-count {
        font-size: 0.7rem;
    }
    
    .search-result-item {
        padding: 10px 12px;
    }
}

/* Hub Grid */
.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.hub-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 0; /* avoid side halos by removing transparent border */
}

/* Background image wrapper for zoom effect */
.hub-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: inherit;
    background-size: inherit;
    background-position: inherit;
    background-repeat: inherit;
    transition: transform 0.5s ease, opacity 0.3s ease;
    z-index: 0;
    opacity: 1;
}

.hub-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35));
    z-index: 1;
    transition: background 0.3s ease;
    pointer-events: none;
}

.hub-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border-color: transparent; /* remove green outline on hover */
}

/* Brighten overlay on hover */
.hub-card:hover::before {
    background: linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25));
}

/* Zoom effect on background image when hovering */
.hub-card:hover::after {
    transform: scale(1.1);
}

.card-header {
    position: relative;
    z-index: 2;
}

.card-title {
    position: relative;
    z-index: 2;
}

.card-intro {
    position: relative;
    z-index: 2;
}

.card-icon {
    font-size: clamp(2rem, 6vw, 3rem);
    color: #4CAF50;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hub-card h3 {
    font-size: clamp(1.2rem, 3.5vw, 1.8rem);
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hub-card p {
    color: #666;
    margin-bottom: 25px;
    text-align: center;
    line-height: 1.6;
    position: relative;
    z-index: 2;
}

/* Card intro text with smooth transitions */
.card-intro {
    overflow: hidden;
    transition: all 0.3s ease;
    max-height: 4.8em; /* ~3 lines at 1.6 line-height */
}

.card-intro .intro-text {
    display: inline;
    transition: all 0.3s ease;
}

/* Read more indicator */
.read-more-indicator {
    color: #4CAF50;
    font-weight: 600;
    margin-left: 4px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    animation: pulse 2s ease-in-out infinite;
}

.hub-card:hover .read-more-indicator {
    opacity: 1;
    animation: none;
}

/* Subtle pulse animation for read-more indicator */
@keyframes pulse {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
}

/* Expanded text state */
.hub-card.text-expanded .card-intro {
    max-height: 20em; /* Allow more text to show */
}

/* Subtle zoom-out effect when text is expanded */
.hub-card.has-long-text.text-expanded {
    transform: translateY(-8px) scale(1.03);
}

/* For cards with backgrounds and long text */
.hub-card.has-long-text.bg-ready .card-intro {
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    font-weight: 500;
}

.hub-card.has-long-text.bg-ready h3 {
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.hub-card.has-long-text.bg-ready .read-more-indicator {
    color: #8BC34A;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* For cards with background, ensure text remains readable when expanded */
.hub-card.bg-ready .card-intro {
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* When a background image is applied, avoid white halo on rounded corners */
.hub-card.bg-ready {
    background-color: #0e0f10; /* dark base under transparent gradient to prevent white outlines */
    border: 0; /* remove transparent border that can show page background at sides */
    background-clip: border-box;
}

.hub-card.bg-ready:hover {
    border: 0;
}

/* For cards without background images, add subtle scale effect */
.hub-card:not(.bg-ready):hover {
    transform: translateY(-8px) scale(1.02);
}

.card-stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    position: relative;
    z-index: 2;
    border-top: 1px solid #eee;
}

.card-stats span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
}

.card-stats i {
    color: #4CAF50;
}

/* Quick Actions */
.quick-actions {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    text-align: center;
}

.quick-actions h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 25px;
}

.action-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 15px 25px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Section Page Styles */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-title h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin: 0;
}

.section-title i {
    font-size: 2.5rem;
    color: #4CAF50;
}

.back-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.back-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    background: white;
    border-radius: 15px;
    padding: 10px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.nav-tab {
    flex: 1;
    padding: 15px 20px;
    text-align: center;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #666;
    border: 2px solid transparent;
}

.nav-tab.active {
    background: #4CAF50;
    color: white;
    border-color: #45a049;
}

.nav-tab:hover:not(.active) {
    background: #f8f9fa;
    color: #333;
}

.nav-tab .tab-count {
    font-size: 0.85em;
    opacity: 0.8;
    font-weight: 600;
    margin-left: 4px;
}

.nav-tab.active .tab-count {
    opacity: 0.9;
}

/* Content Sections */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* Resource Grid */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.resource-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.resource-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4CAF50, #45a049);
}

.resource-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.resource-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.resource-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
    flex: 1;
}

.resource-type {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.resource-description {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.resource-url {
    display: inline-block;
    color: #4CAF50;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 15px;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.resource-url:hover {
    text-decoration: underline;
}

.resource-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.resource-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    background: #f1f3f4;
    color: #5f6368;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.resource-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #999;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

/* Add Resource Button */
.add-resource-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.add-resource-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

/* Search and Filter */
.search-filter-container {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: center;
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.search-container {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.filter-container {
    min-width: 200px;
}

.filter-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #ccc;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #666;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.close:hover {
    opacity: 0.7;
}

/* Form Styles */
form {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding: 14px 0 0 0;
    border-top: 1px solid #eee;
    position: sticky;
    bottom: 0;
    background: #fff;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.action-btn {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    color: #666;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.action-btn:hover {
    background: #f8f9fa;
    color: #333;
}

.edit-btn:hover {
    color: #007bff;
}

.delete-btn:hover {
    color: #dc3545;
}

/* Resource contact section */
.resource-contact {
    padding: 12px;
    background: #f8f9fa;
    border-left: 3px solid #667eea;
    margin: 10px 0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.resource-contact i {
    color: #667eea;
    font-size: 16px;
}

.contact-creator {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.contact-creator:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2.5rem;
    }
    
    .hub-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 20px;
    }
    
    .hub-card {
        padding: 20px;
    }
    
    /* Reduce text expansion height on mobile */
    .hub-card.text-expanded .card-intro {
        max-height: 15em;
    }
    
    /* Reduce zoom effect on mobile for better fit */
    .hub-card.has-long-text.text-expanded {
        transform: translateY(-5px) scale(1.02);
    }
    
    .card-stats {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .section-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .nav-tabs {
        flex-direction: column;
    }
    
    .search-filter-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-container {
        max-width: none;
    }
    
    .resource-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .hub-card h3 {
        font-size: 1.5rem;
    }
    
    .section-title h1 {
        font-size: 2rem;
    }
}

/* Animation for cards - only on initial page load, not on tab switches */
.hub-card.animate-in, .resource-card.animate-in {
    animation: fadeInUp 0.3s ease;
}

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

/* Toast notification animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Loading state */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Smooth page transition fallback */
body.fade-out {
    opacity: 0;
    transition: opacity 150ms ease;
}

/* Success/Error messages */
.message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Authentication Styles */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.site-logo {
    height: 60px;
    width: auto;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

.auth-header .logo-container {
    margin-bottom: 20px;
}

.auth-header .site-logo {
    height: 40px;
}

.auth-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin: 0;
}

.auth-header p {
    color: #666;
    font-size: 1.1rem;
}

.auth-form {
    margin-bottom: 30px;
}

.auth-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    margin-top: 10px;
}

.auth-footer {
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.auth-footer p {
    margin-bottom: 15px;
    color: #666;
    font-weight: 600;
}

.demo-accounts {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.demo-account {
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 0.9rem;
}

.demo-account:hover {
    background: #e9ecef;
}

/* Access Control Styles */
.hub-card.restricted {
    opacity: 0.6;
    cursor: not-allowed;
    position: relative;
}

.hub-card.restricted::after {
    content: '🔒';
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
}

.hub-card.restricted:hover {
    transform: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Profile Modal Styles */
.profile-info {
    padding: 20px 0;
}

.profile-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.profile-item:last-child {
    border-bottom: none;
}

.profile-item label {
    font-weight: 600;
    color: #333;
}

.sections-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.sections-list .tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    text-transform: capitalize;
}

/* Admin Panel Styles */
.admin-modal .modal-content {
    max-width: 1000px;
    width: 95%;
    max-height: 90vh;
    margin: 2% auto;
    display: flex;
    flex-direction: column;
}

.admin-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.admin-modal .admin-content {
    max-height: 70vh;
    overflow-y: auto;
    padding: 20px 30px;
}

.admin-tabs {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 20px;
}

.admin-tab {
    padding: 15px 25px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #666;
}

.admin-tab.active {
    color: #4CAF50;
    border-bottom-color: #4CAF50;
    background: #f8f9fa;
}

.admin-tab:hover:not(.active) {
    background: #f8f9fa;
    color: #333;
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.users-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.user-details-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.user-details-info .name {
    font-weight: 600;
    color: #333;
}

.user-details-info .role {
    color: #666;
    font-size: 0.9rem;
    text-transform: capitalize;
}

.user-details-info .sections {
    color: #999;
    font-size: 0.8rem;
}

.user-item-actions {
    display: flex;
    gap: 8px;
}

.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.permission-group {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.permission-group h4 {
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

.permission-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.permission-item:last-child {
    border-bottom: none;
}

.permission-item label {
    font-size: 0.9rem;
    color: #666;
}

.audit-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.audit-filters select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

.audit-log {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.audit-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f1f3f4;
    font-size: 0.9rem;
}

.audit-entry:last-child {
    border-bottom: none;
}

.audit-entry:hover {
    background: #f8f9fa;
}

.audit-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.audit-user {
    font-weight: 600;
    color: #333;
}

.audit-action {
    color: #666;
    font-size: 0.8rem;
}

.audit-description {
    color: #999;
    font-size: 0.8rem;
}

.audit-time {
    color: #999;
    font-size: 0.8rem;
    text-align: right;
}

/* Hub Settings Styles */
.hub-settings-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.settings-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.settings-section h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group .form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

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

.form-group textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.settings-preview {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.settings-preview h4 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.2rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.preview-box {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    text-align: center;
    color: white;
}

.preview-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.preview-description {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.5;
}

/* Responsive Design Updates */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .user-info {
        flex-direction: column;
        text-align: center;
    }
    
    .user-details {
        align-items: center;
    }
    
    .admin-modal .modal-content {
        width: 98%;
        margin: 2% auto;
    }
    
    .permissions-grid {
        grid-template-columns: 1fr;
    }
    
    .audit-filters {
        flex-direction: column;
    }
    
    .hub-settings-form {
        grid-template-columns: 1fr;
    }
}

/* Export Options Styles */
.export-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.export-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    text-align: center;
}

.export-card h4 {
    margin-bottom: 10px;
    color: #333;
}

.export-card p {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.export-card select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.export-card .btn {
    width: 100%;
    justify-content: center;
}

.export-card .btn i {
    margin-right: 8px;
}
