* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1e3a8a;
    --secondary: #3b82f6;
    --accent: #f59e0b;
    --light: #f3f4f6;
    --dark: #1f2937;
    --text: #374151;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    line-height: 1.6;
}

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

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo img {
    height: 40px;
    width: 40px;
    border-radius: 50%;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.8;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 100px 20px;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.btn {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    font-weight: 600;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* About */
.about {
    padding: 80px 20px;
    background: white;
}

.about h2,
.history h2,
.graduates h2,
.teachers h2,
.facts h2,
.contacts h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--primary);
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.specialties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.specialty-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 2rem 1.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.specialty-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.specialty-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.specialty-card .code {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
}

.specialties {
    list-style: none;
    margin-top: 1.5rem;
}

.specialties li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
}

.specialties li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--secondary);
    font-weight: bold;
    font-size: 1.2rem;
}

/* History */
.history {
    padding: 80px 20px;
    background: var(--light);
}

.timeline {
    display: grid;
    gap: 2rem;
}

.timeline-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 2rem;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-left: 4px solid var(--secondary);
}

.timeline-date {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--secondary);
}

.timeline-content h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* Graduates */
.graduates {
    padding: 80px 20px;
    background: white;
}

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

.graduate-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.graduate-card:hover {
    transform: translateY(-5px);
}

.graduate-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.graduate-card p {
    margin: 0.5rem 0;
}

/* Teachers */
.teachers {
    padding: 80px 20px;
    background: var(--light);
}

.teachers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.teacher-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.teacher-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.teacher-card h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.teacher-card .specialty {
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.teacher-card .bio {
    font-size: 0.95rem;
    color: var(--text);
}

.teacher-card .awards {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Facts */
.facts {
    padding: 80px 20px;
    background: white;
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.fact-card {
    background: var(--light);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    border-top: 4px solid var(--secondary);
    transition: transform 0.3s;
}

.fact-card:hover {
    transform: translateY(-5px);
}

.fact-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.fact-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Contacts */
.contacts {
    padding: 80px 20px;
    background: var(--light);
}

.contacts-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.contact-info {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.contact-info h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background: var(--primary);
    color: white;
    text-align: center;
    padding: 2rem;
}

.history-brief {
    margin-bottom: 2rem;
}

.history-full {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    border-left: 4px solid var(--secondary);
}

.history-full p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.expand-btn {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.3s;
}

.specialty-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.filter-btn {
    background: var(--light);
    color: var(--text);
    border: 2px solid var(--secondary);
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s;
}

.filter-btn:hover {
    background: var(--secondary);
    color: white;
}

.filter-btn.active {
    background: var(--secondary);
    color: white;
}


@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .about h2,
    .history h2,
    .graduates h2,
    .teachers h2,
    .facts h2,
    .contacts h2 {
        font-size: 1.8rem;
    }

    .timeline-item {
        grid-template-columns: 1fr;
    }

    .timeline-date {
        font-size: 1.5rem;
    }
}


/* Achievements Timeline */
.achievements {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 20px;
}

.achievements h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: white;
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
}

.timeline-item {
    margin-bottom: 50px;
    position: relative;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: 0;
    margin-right: 52%;
    text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 52%;
    margin-right: 0;
    text-align: left;
}

.timeline-year {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 100px;
    background: white;
    color: #667eea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
    top: 0;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.timeline-content {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.timeline-content h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: white;
}

.timeline-content p {
    font-size: 0.95em;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

/* Archive */
.archive {
    padding: 80px 20px;
    background: white;
}

.archive h2 {
    color: var(--primary);
}

.archive-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.archive-item {
    background: var(--light);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.archive-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.archive-image-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
    overflow: hidden;
}

.archive-image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.archive-clickable {
    cursor: pointer;
    transition: opacity 0.3s;
}

.archive-clickable:hover {
    opacity: 0.8;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    margin: auto;
    display: block;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: zoomIn 0.3s;
}

@keyframes zoomIn {
    from {
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        transform: translate(-50%, -50%) scale(1);
    }
}

#caption {
    margin: auto;
    display: block;
    width: 90%;
    max-width: 1000px;
    text-align: center;
    color: white;
    padding: 10px 0;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s;
}

.close:hover {
    color: #bbb;
}

.archive-item h3 {
    color: var(--primary);
    padding: 1.5rem 1.5rem 0.5rem;
    font-size: 1.1rem;
}

.archive-item p {
    padding: 0 1.5rem 1.5rem;
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.6;
}

/* Partners */
.partners {
    padding: 80px 20px;
    background: var(--light);
}

.partners h2 {
    color: var(--primary);
}

.partners-timeline {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.partner-block {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-left: 4px solid var(--secondary);
    transition: transform 0.3s, box-shadow 0.3s;
}

.partner-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.partner-year {
    display: inline-block;
    background: var(--secondary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.partner-content h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.partner-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.partners-list {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0;
}

.partners-list li {
    padding: 0.5rem 0;
    padding-left: 25px;
    position: relative;
    color: var(--text);
}

.partners-list li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--secondary);
    font-weight: bold;
}

/* Specialties Table */
.specialties-table {
    margin-top: 2rem;
    overflow-x: auto;
}

.specialties-list {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.specialties-list thead {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.specialties-list th {
    padding: 1.5rem;
    text-align: left;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.specialties-list tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.specialties-list tbody tr:hover {
    background-color: #f9fafb;
    box-shadow: inset 0 0 10px rgba(59, 130, 246, 0.1);
}

.specialties-list tbody tr:last-child {
    border-bottom: none;
}

.specialties-list td {
    padding: 1.5rem;
    color: var(--text);
    font-size: 0.95rem;
}

.specialties-list td:first-child {
    font-weight: 600;
    color: var(--primary);
}

.specialties-list td:nth-child(2) {
    color: var(--secondary);
    font-weight: 500;
}

.specialties-list td:nth-child(3),
.specialties-list td:nth-child(4) {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(245, 158, 11, 0.05) 100%);
    font-weight: 500;
    color: var(--primary);
}

.specialties-list tbody tr:nth-child(odd) td:nth-child(3),
.specialties-list tbody tr:nth-child(odd) td:nth-child(4) {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.08) 0%, rgba(245, 158, 11, 0.08) 100%);
}

@media (max-width: 768px) {
    .specialties-list {
        font-size: 0.85rem;
    }
    
    .specialties-list th,
    .specialties-list td {
        padding: 1rem 0.75rem;
    }
    
    .specialties-list th {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .archive-gallery {
        grid-template-columns: 1fr;
    }
    
    .archive-image-placeholder {
        height: 150px;
        font-size: 3rem;
    }
}

/* History Image and Directors styling */
.history-image-wrap {
    margin: 2rem 0;
    text-align: center;
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px dashed var(--secondary);
}

.history-img {
    max-width: 100%;
    max-height: 400px;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.history-img:hover {
    transform: scale(1.02);
}

.image-caption {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--text);
    font-style: italic;
}

.directors-list {
    list-style: none;
    padding-left: 0;
    margin: 1.5rem 0 2rem;
}

.directors-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
    line-height: 1.6;
    text-align: left;
}

.directors-list li:last-child {
    border-bottom: none;
}

/* News/Achievements Section styling */
.news {
    padding: 80px 20px;
    background: var(--light);
}

.news h2 {
    color: var(--primary);
    text-align: center;
    margin-bottom: 3rem;
}

.news-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 0;
    max-width: 1000px;
    margin: 0 auto;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.news-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 25px;
    background: #f8fafc;
}

.news-gallery-item {
    border-radius: 10px;
    overflow: hidden;
    height: 250px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.news-gallery-item:hover {
    transform: scale(1.03);
}

.news-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-date {
    display: inline-block;
    color: var(--secondary);
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: left;
}

.news-content h3 {
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    text-align: left;
}

.news-content p {
    color: var(--text);
    line-height: 1.8;
    font-size: 1.05rem;
    text-align: left;
}

@media (max-width: 900px) {
    .news-card {
        grid-template-columns: 1fr;
    }
    .news-gallery {
        padding: 20px;
    }
    .news-gallery-item {
        height: 200px;
    }
}
