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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%);
    min-height: 100vh;
    color: #333;
}

/* Header */
.main-header {
    background: url('/css/akureyri_banner.jpg') center center / cover no-repeat;
    padding: 40px 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-content {
    position: relative;
    width: 100%;
}

.header-content h1 {
    font-size: 48px;
    color: white;
    margin-bottom: 10px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

.admin-login-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(67, 160, 71, 0.3);
    z-index: 100;
}

.admin-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 160, 71, 0.4);
}

.subtitle {
    font-size: 20px;
    color: white;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

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

/* Back Navigation */
.back-nav {
    margin-bottom: 20px;
}

.back-link {
    display: inline-block;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    background: rgba(255,255,255,0.2);
    border-radius: 25px;
    transition: all 0.3s;
}

.back-link:hover {
    background: rgba(255,255,255,0.3);
    transform: translateX(-5px);
}

/* School Selection Grid */
.school-selection {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.school-selection h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 32px;
    color: #333;
}

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

.school-card {
    background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%);
    color: white;
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.school-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.school-card.collective {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.school-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.school-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 20px;
    background: white;
    padding: 10px;
    border-radius: 10px;
}

.school-card h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.school-card p {
    font-size: 14px;
    opacity: 0.9;
}

/* Semester Filter */
.semester-filter {
    background: rgba(255,255,255,0.95);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.semester-filter h3 {
    margin-bottom: 15px;
    color: #333;
}

.filter-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    color: #43a047;
    background: white;
    border: 2px solid #43a047;
    font-weight: 600;
    transition: all 0.3s;
}

.filter-btn:hover {
    background: #43a047;
    color: white;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: #43a047;
    color: white;
}

/* Intro Text */
.intro-text {
    background: white;
    padding: 30px 40px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    line-height: 1.8;
    color: #333;
    font-size: 15px;
}

.intro-text p {
    margin-bottom: 15px;
}

.intro-text h2 {
    font-size: 24px;
    color: #43a047;
    margin-top: 25px;
    margin-bottom: 15px;
}

.intro-text h3 {
    font-size: 20px;
    color: #43a047;
    margin-top: 20px;
    margin-bottom: 12px;
}

.intro-text h4 {
    font-size: 18px;
    color: #43a047;
    margin-top: 15px;
    margin-bottom: 10px;
}

.intro-text ul,
.intro-text ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.intro-text li {
    margin-bottom: 8px;
}

.intro-text a {
    color: #43a047;
    text-decoration: underline;
}

.intro-text a:hover {
    color: #66bb6a;
}

.intro-text strong {
    font-weight: 600;
}

.intro-text em {
    font-style: italic;
}

/* Subjects Grid */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.subject-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.subject-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.subject-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.subject-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
}

.subject-info {
    padding: 20px;
}

.subject-info h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 10px;
}

.semester-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.semester-badge.spring {
    background: #c8e6c9;
    color: #2e7d32;
}

.semester-badge.fall {
    background: #ffe0b2;
    color: #e65100;
}

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

.modal-content {
    background: white;
    margin: 0 auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideDown 0.3s ease;
    overflow-y: auto;
    position: relative;
}

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

.close {
    color: white;
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    background: rgba(0,0,0,0.5);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.3s;
}

.close:hover {
    background: rgba(0,0,0,0.8);
    transform: rotate(90deg);
}

.modal-title {
    background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%);
    color: white;
    padding: 30px;
    margin: 0;
    font-size: 28px;
    text-align: center;
}

.modal-image {
    width: 100%;
    max-height: 250px;
    object-fit: contain;
    background: #f5f5f5;
}

.modal-body {
    padding-bottom: 20px;
}

.modal-section {
    padding: 25px 30px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-section:last-child {
    border-bottom: none;
    padding-bottom: 30px;
}

.modal-section h4 {
    color: #43a047;
    margin-bottom: 10px;
    font-size: 18px;
}

.modal-section p {
    line-height: 1.6;
    color: #555;
}

/* Info Boxes with fun colors */
.info-box {
    padding: 15px 20px;
    margin: 15px 30px;
    border-radius: 12px;
    border-left: 5px solid;
    background: #f8f9fa;
}

.location-box {
    border-left-color: #43a047;
    background: linear-gradient(to right, #e8f5e9, #f8f9fa);
}

.students-box {
    border-left-color: #f5576c;
    background: linear-gradient(to right, #fce4ec, #f8f9fa);
}

.schedule-box {
    border-left-color: #ffa726;
    background: linear-gradient(to right, #fff3e0, #f8f9fa);
}

.teacher-box {
    border-left-color: #66bb6a;
    background: linear-gradient(to right, #e8f5e9, #f8f9fa);
}

.info-box strong {
    color: #333;
    display: block;
    margin-bottom: 5px;
}

/* No subjects message */
.no-subjects {
    background: white;
    padding: 60px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.no-subjects p {
    font-size: 20px;
    color: #666;
}

/* Footer */
.main-footer {
    background: rgba(255,255,255,0.95);
    padding: 20px;
    text-align: center;
    margin-top: 60px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}

.main-footer p {
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content h1 {
        font-size: 32px;
        padding-right: 100px;
    }

    .admin-login-btn {
        font-size: 12px;
        padding: 8px 16px;
        right: 10px;
    }

    .subtitle {
        font-size: 16px;
    }

    .school-selection {
        padding: 20px;
    }

    .school-selection h2 {
        font-size: 24px;
    }

    .school-grid {
        grid-template-columns: 1fr;
    }

    .subjects-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 20px auto;
        width: 95%;
    }

    .modal-title {
        font-size: 22px;
        padding: 20px;
    }

    .modal-section,
    .info-box {
        padding: 15px 20px;
        margin: 10px 15px;
    }

    .filter-buttons {
        flex-direction: column;
    }

    .filter-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .subject-image,
    .subject-placeholder {
        height: 150px;
    }

    .close {
        right: 10px;
        top: 10px;
        width: 35px;
        height: 35px;
        font-size: 28px;
    }
}
