/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 2;
}

/* Header Styles */
header {
    background-color: #2c3e50;
    color: white;
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: fadeIn 1s ease-in-out;
    position: relative;
    z-index: 3;
}

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

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

/* Search Styles */
.search-container {
    display: flex;
    justify-content: flex-end;
    margin: 15px 0;
}

.search-box {
    display: flex;
    align-items: center;
}

.search-input {
    width: 0;
    padding: 0;
    border: none;
    border-radius: 20px;
    transition: all 0.3s ease;
    opacity: 0;
    margin-right: -30px;
}

.search-input.active {
    width: 200px;
    padding: 8px 15px;
    opacity: 1;
    margin-right: 10px;
    border: 1px solid #ddd;
}

.search-icon {
    font-size: 1.2rem;
    color: #555;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-icon:hover {
    color: #2c3e50;
    transform: scale(1.1);
}

/* Tab Navigation */
.tabs {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    border-bottom: 1px solid #ddd;
}

.tab-btn {
    padding: 12px 30px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: #555;
    position: relative;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #2c3e50;
}

.tab-btn.active {
    color: #2c3e50;
    font-weight: bold;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #3498db;
    animation: underline 0.3s ease-out;
}

@keyframes underline {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.5s ease-out;
    position: relative;
    z-index: 2;
}

.tab-content-header {
    margin-bottom: 20px;
    cursor: pointer;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    padding-right: 40px;
}

.tab-content-header:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.tab-content-header h2 {
    color: #2c3e50;
    transition: color 0.3s ease;
}

.tab-content-header:hover h2 {
    color: #3498db;
}

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

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

/* Document List */
.document-list {
    list-style: none;
    transition: all 0.4s ease;
    overflow: hidden;
    max-height: 1000px;
}

.document-list.hidden {
    max-height: 0;
    margin: 0;
    padding: 0;
    opacity: 0;
}

.document-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.document-item::before {
    content: "→";
    margin-right: 10px;
    color: #3498db;
    transition: all 0.3s ease;
}

.document-item:hover {
    background-color: #f9f9f9;
    transform: translateX(5px);
}

.document-item:hover::before {
    transform: translateX(5px);
    color: #2c3e50;
}

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

/* Document Detail */
.document-detail {
    display: none;
    padding: 20px;
    margin-top: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    animation: fadeIn 0.5s ease-out;
}

.document-detail.active {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.document-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.document-icon {
    font-size: 3rem;
    color: #3498db;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.document-info {
    flex-grow: 1;
}

.document-info h3 {
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 1.5rem;
}

/* Buttons Section */
.document-buttons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.doc-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.doc-btn i {
    font-size: 1.1rem;
}

.doc-btn-primary {
    background-color: #3498db;
    color: white;
}

.doc-btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(41, 128, 185, 0.3);
}

.doc-btn-secondary {
    background-color: #2ecc71;
    color: white;
}

.doc-btn-secondary:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

.doc-btn-tertiary {
    background-color: #e74c3c;
    color: white;
}

.doc-btn-tertiary:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

/* Stats Section */
.document-stats {
    display: flex;
    gap: 30px;
    margin-top: 10px;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.download-count,
.rating {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Rating Stars */
.stars {
    color: #f39c12;
    font-size: 1.1rem;
}

/* Comments Section */
.comments-section {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.comments-section h4 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
    resize: vertical;
    min-height: 80px;
}

.comment-form button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.comment-form button:hover {
    background-color: #2980b9;
}

.comments-list {
    margin-top: 20px;
}

.comment {
    padding: 15px;
    background-color: white;
    border-radius: 5px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    color: #777;
    font-size: 0.9rem;
    position: relative;
    z-index: 2;
}

/* Toggle Indicator */
.toggle-indicator {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.3s ease;
    font-size: 1.2rem;
    color: #3498db;
}

.toggle-indicator.collapsed {
    transform: translateY(-50%) rotate(-90deg);
}

.attention-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(52, 152, 219, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0);
    }
}

/* Chevron for document items */
.document-chevron {
    margin-left: auto;
    color: #7f8c8d;
    transition: all 0.3s ease;
}

.document-item:hover .document-chevron {
    color: #8d99a1;
    transform: translateX(3px);
}

/* Community Features */
.community-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.community-card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
}

.community-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.community-icon {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 15px;
}

/* University Sections */
.university-sections {
    transition: all 0.4s ease;
    overflow: hidden;
}

.university-sections.collapsed {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
}

.university-section {
    margin-bottom: 30px;
}

.master-header {
    background-color: #1e3544;
    color: white;
}

.master-header h2 {
    color: white;
}

.master-header:hover {
    background-color: #bfd1dd;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        width: 100%;
        text-align: center;
    }
    
    .document-buttons {
        flex-direction: column;
    }
    
    .document-header {
        flex-direction: column;
    }
    
    .document-icon {
        align-self: center;
    }
    
    .library-decoration {
        display: none;
    }
}
/* styles.css */
/* Add these rules at the end of the file */

/* Initially collapse all content */
.document-list {
    max-height: 0;
    margin: 0;
    padding: 0;
    opacity: 0;
}

.document-list.hidden {
    max-height: 0 !important;
}

.document-list:not(.hidden) {
    max-height: 1000px;
    opacity: 1;
    margin: initial;
    padding: initial;
    transition: all 0.4s ease;
}

.university-sections {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
}

.university-sections:not(.collapsed) {
    max-height: 5000px;
    opacity: 1;
    margin: initial;
    padding: initial;
    transition: all 0.4s ease;
}
/* Add these CSS rules to your styles.css */
/* Initial state - collapsed */
.university-sections,
.document-list,
.document-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    margin: 0;
    padding: 0;
    opacity: 0;
}

/* Expanded state */
.university-sections:not(.collapsed),
.document-list:not(.hidden),
.document-detail.active {
    max-height: 5000px;
    opacity: 1;
    margin: initial;
    padding: initial;
}

/* Toggle indicator rotation */
.toggle-indicator.collapsed {
    transform: rotate(-90deg);
}

/* Chevron rotation for document items */
.document-item.active .document-chevron i {
    transform: rotate(90deg);
}

/* Pulse animation for attention */
.attention-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(52, 152, 219, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0); }
}
