/* Chapter page specific styles */

/* Header layout for chapter pages */
.chapter-header {
    padding: 30px 0;
}

.chapter-header .header-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
}

.college-info-left {
    text-align: left;
    animation: fadeIn 1s ease-out;
}

.college-info-left .college-name,
.college-info-left .college-subname {
    text-align: left;
}

.chapter-title-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    animation: slideInRight 1s ease-out;
}

.chapter-badge {
    background: var(--gradient-primary);
    color: var(--text-light);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px var(--shadow-color);
    animation: pulse 2s infinite ease-in-out;
}

.chapter-main-title {
    font-size: 36px;
    margin-bottom: 15px;
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    background-size: 200% 200%;
    animation: gradientFlow 5s ease infinite;
}

.chapter-date-display {
    color: var(--text-secondary);
    font-size: 18px;
}

.chapter-date-display i {
    color: var(--secondary-color);
    margin-right: 8px;
}

/* Chapter description section */
.chapter-description-section {
    padding: 60px 0;
    background-color: var(--dark-surface);
    position: relative;
    overflow: hidden;
}

.chapter-description-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(98, 0, 234, 0.1) 0%, rgba(0, 229, 255, 0.05) 50%, transparent 70%);
    pointer-events: none;
}

.chapter-description {
    max-width: 900px;
    margin: 0 auto;
    animation: fadeIn 1.5s ease-out;
}

.chapter-description h3 {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--text-light);
    position: relative;
    padding-bottom: 15px;
    display: inline-block;
}

.chapter-description h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    background-size: 200% 200%;
    animation: gradientFlow 5s ease infinite;
}

.chapter-description p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 16px;
}

/* Departments section */
.departments-section {
    padding: 80px 0;
    background-color: var(--dark-bg);
    position: relative;
    overflow: hidden;
}

.departments-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 229, 255, 0.1) 0%, rgba(98, 0, 234, 0.05) 50%, transparent 70%);
    pointer-events: none;
}

.departments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.department-card {
    background-color: var(--dark-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 25px var(--shadow-color);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: slideInUp 1s ease-out forwards;
    animation-delay: calc(var(--i, 0) * 0.2s);
}

.department-card:nth-child(1) { --i: 1; }
.department-card:nth-child(2) { --i: 2; }
.department-card:nth-child(3) { --i: 3; }

.department-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px var(--shadow-color);
}

.department-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
}

.department-card:hover::before {
    opacity: 0.05;
}

.department-header {
    padding: 25px;
    background: var(--gradient-primary);
    background-size: 200% 200%;
    animation: gradientFlow 5s ease infinite;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.department-header h4 {
    color: var(--text-light);
    font-size: 20px;
    margin: 0;
}

.department-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.dept-logo-img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 5px;
}

.department-content {
    padding: 25px;
}

.department-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
    transition: color 0.3s ease;
}

.department-card:hover .department-content p {
    color: var(--text-light);
}

.event-heading {
    color: var(--secondary-color);
    font-size: 18px;
    margin: 20px 0 10px 0;
    padding-left: 10px;
    border-left: 3px solid var(--primary-color);
    font-weight: 600;
}

.event-list {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
}

.event-list li {
    padding: 8px 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    transition: transform 0.3s ease, color 0.3s ease;
}

.event-list li i {
    color: var(--secondary-color);
    margin-right: 10px;
}

.department-card:hover .event-list li {
    transform: translateX(5px);
    color: var(--text-light);
}

.department-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-light);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--gradient-primary);
    color: var(--text-light);
}

/* Call to action section */
.cta-section {
    padding: 80px 0;
    background: var(--dark-surface);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.05;
    z-index: 0;
}

.cta-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    animation: fadeIn 1.5s ease-out;
}

.cta-content h3 {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--text-light);
}

.cta-content p {
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 30px;
}

.btn-large {
    padding: 15px 40px;
    font-size: 18px;
    border-radius: 30px;
    animation: pulse 2s infinite ease-in-out;
}

/* Back to home button */
.back-to-home {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
}

.back-to-home a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: var(--text-light);
    border-radius: 50%;
    box-shadow: 0 5px 15px var(--shadow-color);
    font-size: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.back-to-home a:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow-color);
}

/* Responsive styles for chapter pages */
@media (max-width: 991.98px) {
    .chapter-header .header-container {
        gap: 20px;
    }
    
    .chapter-main-title {
        font-size: 30px;
    }
    
    .chapter-date-display {
        font-size: 16px;
    }
    
    .department-header h4 {
        font-size: 18px;
    }
}

@media (max-width: 767.98px) {
    .chapter-header .header-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .college-info-left {
        text-align: center;
    }
    
    .college-info-left .college-name,
    .college-info-left .college-subname {
        text-align: center;
    }
    
    .chapter-title-container {
        align-items: center;
    }
    
    .departments-grid {
        grid-template-columns: 1fr;
    }
    
    .department-buttons {
        flex-direction: column;
    }
    
    .btn-large {
        padding: 12px 30px;
        font-size: 16px;
    }
}

@media (max-width: 575.98px) {
    .chapter-badge {
        font-size: 14px;
        padding: 6px 15px;
    }
    
    .chapter-main-title {
        font-size: 24px;
    }
    
    .chapter-date-display {
        font-size: 14px;
    }
    
    .chapter-description h3 {
        font-size: 22px;
    }
    
    .chapter-description p {
        font-size: 14px;
    }
    
    .department-header {
        padding: 20px;
    }
    
    .dept-logo-img {
        width: 50px;
        height: 50px;
    }
    
    .department-content {
        padding: 20px;
    }
    
    .cta-content h3 {
        font-size: 24px;
    }
    
    .cta-content p {
        font-size: 16px;
    }
    
    .back-to-home {
        bottom: 20px;
        right: 20px;
    }
    
    .back-to-home a {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}
