/* Education Page Styles */

/* General Layout */
.education-content {
    padding-top: 80px; /* Account for fixed navbar */
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Hero Section */
.edu-hero {
    text-align: center;
    padding: 6rem 1rem;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.8)), url('../../assets/img/unsplash-image-05HLFQu8bFw.webp');
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    margin-bottom: 4rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.edu-hero-logo {
    max-width: 800px;
    width: 100%;
    height: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2));
}

.edu-hero h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, #fff, #aaa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.edu-hero p {
    color: #ccc;
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Wiki Section */
.wiki-section {
    text-align: center;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    margin-bottom: 5rem;
    transition: transform 0.3s ease;
}

.wiki-section:hover {
    transform: translateY(-5px);
    border-color: rgba(52, 152, 219, 0.5);
}

.wiki-section h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.wiki-btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: linear-gradient(90deg, #3498db, #2980b9);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.wiki-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
    color: white;
}

/* Courses Section */
.courses-container {
    display: flex;
    flex-direction: column;
    gap: 6rem;
    margin-bottom: 6rem;
}

.course-row {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.course-row:nth-child(even) {
    flex-direction: row-reverse;
}

.course-content {
    flex: 1;
}

.course-image {
    flex: 1;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.course-row:hover .course-image img {
    transform: scale(1.05);
}

.course-content h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.course-date {
    display: inline-block;
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

body.light-mode .course-date {
    background: rgba(52, 152, 219, 0.15);
    color: #0d47a1;
}

.course-content p {
    margin-bottom: 2rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.course-info-btn {
    display: inline-block;
    text-decoration: none;
    background: transparent;
    border: 2px solid #3498db;
    color: #3498db;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.course-info-btn:hover {
    background: #3498db;
    color: white;
}

.course-missed {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #e74c3c;
    font-style: italic;
}

/* Partnerships Section */
.partnerships-section {
    text-align: center;
    padding: 4rem 0;
    margin-bottom: 4rem;
}

.partnerships-section h2 {
    margin-bottom: 3rem;
    font-size: 2rem;
}

.partnerships-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    align-items: center;
    justify-items: center;
}

.partnership-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.partnership-item:hover {
    opacity: 1;
}

.partnership-item img {
    max-width: 150px;
    height: auto;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.partnership-item:hover img {
    filter: grayscale(0%);
}

.partnership-item span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .course-row, .course-row:nth-child(even) {
        flex-direction: column;
        gap: 2rem;
    }
    
    .edu-hero h2 {
        font-size: 1.8rem;
    }
}

/* Light Mode Overrides */
body.light-mode .education-content {
    color: #1e293b;
}

body.light-mode .edu-hero {
    background: linear-gradient(rgba(255,255,255,0.8), rgba(255,255,255,0.9)), url('../../assets/img/unsplash-image-05HLFQu8bFw.webp');
    background-size: cover;
    background-position: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

body.light-mode .edu-hero-logo {
    filter: invert(1) drop-shadow(0 10px 20px rgba(0,0,0,0.1));
}

body.light-mode .edu-hero h2 {
    background: linear-gradient(90deg, #1e293b, #475569);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-mode .edu-hero p {
    color: #475569;
}

body.light-mode .wiki-section {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0,0,0,0.05);
}

body.light-mode .wiki-section:hover {
    border-color: rgba(52, 152, 219, 0.3);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

body.light-mode .course-content h3 {
    color: #1e293b;
}

body.light-mode .course-content p {
    color: #475569;
}

body.light-mode .partnership-item span {
    color: #475569;
}

body.light-mode .partnership-item img {
    filter: grayscale(100%);
}

body.light-mode .partnership-item:hover img {
    filter: grayscale(0%);
}

/* Specific fix for INAOE logo visibility */
.partnership-item img.inaoe-logo {
    filter: grayscale(100%) brightness(0) invert(1); /* Force White in Dark Mode */
}

.partnership-item:hover img.inaoe-logo {
    filter: grayscale(0%) brightness(1) invert(0); /* Reveal original functionality on hover */
}

body.light-mode .partnership-item img.inaoe-logo {
    filter: grayscale(100%) brightness(0); /* Force Black in Light Mode */
}

body.light-mode .partnership-item:hover img.inaoe-logo {
    filter: grayscale(0%) brightness(1);
}
