/* =====================================================
   Sophie-Mereau-Gymnasium Adlersberg
   Hauptstylesheet - Vollständige CSS-Datei
   ===================================================== */

/* =====================================================
   ROOT VARIABLES & RESET
   ===================================================== */

:root {
    --primary-color: #1a365d;
    --primary-dark: #0f2848;
    --primary-light: #2c5282;
    --secondary-color: #f8f9fa;
    --accent-color: #e2e8f0;
    --success-color: #48bb78;
    --warning-color: #ed8936;
    --danger-color: #e53e3e;
    --text-color: #2d3748;
    --text-light: #718096;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 3px 6px rgba(0,0,0,0.15), 0 2px 4px rgba(0,0,0,0.12);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.15), 0 3px 6px rgba(0,0,0,0.10);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: #ffffff;
    min-width: 320px;
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

/* =====================================================
   ACCESSIBILITY
   ===================================================== */

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =====================================================
   HEADER & NAVIGATION
   ===================================================== */

header {
    background: white;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 9999;
    box-shadow: var(--shadow-sm);
    max-width: 100vw;
    overflow: visible;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);  /* NEUE ZEILE */
    will-change: transform;  /* NEUE ZEILE für bessere Performance */
}
/* Top Bar */
.top-bar {
    background: var(--primary-dark);
    color: white;
    font-size: 0.875rem;
    padding: 8px 0;
    position: relative;
    z-index: 10000;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.top-bar-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.top-bar-links a {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.top-bar-links a:hover {
    opacity: 1;
}

/* Main Header */
.main-header {
    padding: 15px 0;
    background: white;
    position: relative;
    z-index: 10000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
    flex-shrink: 1;
}

.logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    flex-shrink: 0;
}

.school-info {
    min-width: 0;
}

.school-info h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2px;
    word-wrap: break-word;
    hyphens: auto;
}

.school-info p {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Header Right Section */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Search Bar */
.header-search {
    position: relative;
    width: 100%;
    max-width: 300px;
    min-width: 200px;
}

.search-input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 2px solid var(--accent-color);
    border-radius: 25px;
    font-size: 0.875rem;
    transition: var(--transition);
    box-sizing: border-box;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 8px;
}

/* Main Navigation */
.main-nav {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 50%, var(--primary-dark) 100%);
    position: sticky;
    top: 0;
    z-index: 10000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    overflow: visible;
    position: relative;
    z-index: 10001;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 10002;
}

.nav-item {
    position: relative;
    z-index: 10003;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 20px 18px;
    display: block;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: white;
    transform: translateX(-50%);
    transition: width 0.3s;
}

.nav-link:hover::after,
.nav-item.active .nav-link::after {
    width: 80%;
}

/* Mega Menu */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 600px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    border-radius: 0 0 8px 8px;
    z-index: 10004;
    pointer-events: none;
}

.nav-item:hover {
    z-index: 10005;
}

.nav-item:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    z-index: 10006;
}

.mega-menu-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 30px;
    gap: 30px;
}

.mega-menu-column h3 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
}

.mega-menu-links {
    list-style: none;
}

.mega-menu-links li {
    margin-bottom: 10px;
}

.mega-menu-links a {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    transition: var(--transition);
}

.mega-menu-links a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.mega-menu-links i {
    font-size: 0.875rem;
    color: var(--primary-light);
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    z-index: 10000;
    position: relative;
}

.action-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.action-btn:hover {
    background: white;
    color: var(--primary-color);
}

/* Mobile Menu Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
    z-index: 10001;
    position: relative;
}

.mobile-close {
    display: none;
}

/* Mobile Menu Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 9998;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* =====================================================
   HERO SECTION
   ===================================================== */

.hero {
    margin-top: 145px;
    position: relative;
    height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100vw;
    z-index: 1;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(26, 54, 93, 0.7), rgba(15, 40, 72, 0.8));
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 900px;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 10px;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    animation: fadeInUp 1s ease-out 0.2s;
    animation-fill-mode: both;
    word-wrap: break-word;
    hyphens: auto;
}

.hero-description {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 0.95;
    animation: fadeInUp 1s ease-out 0.4s;
    animation-fill-mode: both;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.6s;
    animation-fill-mode: both;
}

/* =====================================================
   BUTTONS
   ===================================================== */

.btn {
    padding: 15px 35px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    min-width: 0;
    box-sizing: border-box;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

/* =====================================================
   QUICK STATS BAR
   ===================================================== */

.quick-stats {
    background: var(--primary-color);
    padding: 30px 0;
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-item {
    color: white;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    display: block;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.85;
}

/* =====================================================
   SECTION STYLES
   ===================================================== */

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-subtitle {
    color: var(--primary-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.875rem;
    margin-bottom: 10px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.section-description {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* =====================================================
   WELCOME SECTION
   ===================================================== */

.welcome {
    padding: 80px 0;
    background: linear-gradient(to bottom, white, var(--secondary-color));
    position: relative;
    z-index: 5;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 60px;
}

.feature-card {
    background: white;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary-light), var(--primary-color));
    transform: scaleX(0);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 2rem;
    color: white;
}

.feature-title {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature-description {
    color: var(--text-light);
    line-height: 1.7;
}

/* =====================================================
   NEWS & ANNOUNCEMENTS SECTION
   ===================================================== */

.news-section {
    padding: 80px 0;
    background: white;
}

.news-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
}

.latest-news h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.news-grid {
    display: grid;
    gap: 25px;
}

.news-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 25px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.news-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.news-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.news-content {
    padding: 20px;
}

.news-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
    font-size: 0.875rem;
    color: var(--text-light);
}

.news-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-category {
    background: var(--primary-light);
    color: white;
    padding: 3px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.news-title {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    line-height: 1.4;
}

.news-excerpt {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 15px;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s;
}

.read-more:hover {
    gap: 10px;
}

/* Announcements Sidebar */
.announcements {
    background: var(--secondary-color);
    padding: 30px;
    border-radius: 12px;
}

.announcements h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.announcement-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--accent-color);
}

.announcement-item:last-child {
    border-bottom: none;
}

.announcement-date {
    font-size: 0.875rem;
    color: var(--warning-color);
    font-weight: 600;
    margin-bottom: 8px;
}

.announcement-title {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 5px;
}

.announcement-text {
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* =====================================================
   EVENTS CALENDAR SECTION
   ===================================================== */

.events-section {
    padding: 80px 0;
    background: var(--secondary-color);
}

.events-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
    align-items: start;
}

.calendar-widget {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow-md);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-month {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
}

.calendar-nav {
    display: flex;
    gap: 10px;
}

.calendar-nav button {
    background: none;
    border: 1px solid var(--accent-color);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.calendar-nav button:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    text-align: center;
}

.calendar-day-header {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-light);
    padding: 10px 0;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.calendar-day:hover {
    background: var(--accent-color);
}

.calendar-day.has-event {
    font-weight: 600;
    color: var(--primary-color);
}

.calendar-day.has-event::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    background: var(--warning-color);
    border-radius: 50%;
}

.calendar-day.today {
    background: var(--primary-color);
    color: white;
}

/* Upcoming Events */
.upcoming-events h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.event-list {
    display: grid;
    gap: 20px;
}

.event-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow-sm);
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    align-items: center;
    transition: var(--transition);
}

.event-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.event-date-box {
    background: var(--primary-color);
    color: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    min-width: 70px;
}

.event-date-day {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}

.event-date-month {
    font-size: 0.875rem;
    text-transform: uppercase;
}

.event-details h4 {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 5px;
}

.event-time {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 5px;
}

.event-location {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-light);
    font-size: 0.875rem;
}

.event-action {
    text-align: right;
}

.event-tag {
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 10px;
    display: inline-block;
}

/* =====================================================
   INTERACTIVE PORTAL SECTION
   ===================================================== */

.portal-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    position: relative;
    overflow: hidden;
}

.portal-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 20s infinite ease-in-out;
}

.portal-content {
    position: relative;
    z-index: 1;
}

.portal-header {
    text-align: center;
    color: white;
    margin-bottom: 50px;
}

.portal-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.portal-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.portal-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    color: white;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.portal-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.portal-card:hover::before {
    width: 300px;
    height: 300px;
}

.portal-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.portal-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.portal-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.portal-desc {
    font-size: 0.875rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* =====================================================
   SCHOOL LIFE GALLERY
   ===================================================== */

.gallery-section {
    padding: 80px 0;
    background: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 50px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    height: 250px;
}

.gallery-item:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
    height: 520px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-category {
    color: var(--warning-color);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.gallery-title {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
}

/* =====================================================
   PARTNERS & CERTIFICATIONS
   ===================================================== */

.partners-section {
    padding: 60px 0;
    background: var(--secondary-color);
}

.partners-slider {
    position: relative;
    overflow: hidden;
    margin-top: 40px;
}

.partners-track {
    display: flex;
    gap: 60px;
    animation: scroll 30s linear infinite;
}

.partner-logo {
    flex: 0 0 auto;
    width: 150px;
    height: 80px;
    background: white;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.partner-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: var(--transition);
}

.partner-logo:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* =====================================================
   FOOTER
   ===================================================== */

footer {
    background: var(--primary-dark);
    color: white;
    padding-top: 60px;
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.footer-brand p {
    opacity: 0.8;
    line-height: 1.7;
    margin-bottom: 25px;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-link:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-column h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    position: relative;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 2px;
    background: white;
}

.footer-links {
    list-style: none;
    margin-top: 30px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-contact {
    margin-top: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.8);
}

.contact-item i {
    margin-top: 3px;
    color: white;
}

.footer-bottom {
    padding: 25px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom-links {
    display: flex;
    gap: 30px;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-bottom-links a:hover {
    color: white;
}

/* =====================================================
   BACK TO TOP BUTTON
   ===================================================== */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    border: none;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    background: var(--primary-light);
}

/* =====================================================
   LOADING ANIMATION
   ===================================================== */

.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s, visibility 0.5s;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    width: 100px;
    margin-bottom: 20px;
    animation: pulse 1.5s infinite;
}

.loader-bar {
    width: 200px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
    overflow: hidden;
}

.loader-progress {
    height: 100%;
    background: var(--primary-color);
    width: 0;
    animation: load 2s ease-out forwards;
}

/* =====================================================
   LIGHTBOX
   ===================================================== */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.lightbox-content img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.3s;
}

.lightbox-close:hover {
    transform: scale(1.2);
}

.lightbox-caption {
    color: white;
    text-align: center;
    margin-top: 20px;
    font-size: 1.2rem;
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 3px solid var(--primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

input.error,
textarea.error {
    border-color: var(--danger-color) !important;
}

.nav-item.focus .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* =====================================================
   ANIMATIONS
   ===================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.95);
    }
}

@keyframes load {
    to {
        width: 100%;
    }
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
    }
    to { 
        opacity: 1; 
    }
}

@keyframes spin {
    to { 
        transform: translate(-50%, -50%) rotate(360deg); 
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 1000px;
    }
}

/* =====================================================
   FOCUS STYLES
   ===================================================== */

a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid var(--primary-light);
    outline-offset: 2px;
}

/* =====================================================
   RESPONSIVE DESIGN - TABLET (1024px)
   ===================================================== */

@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }

    .header-search {
        max-width: 250px;
        min-width: 180px;
    }

    .nav-menu {
        flex-wrap: wrap;
    }

    .mega-menu {
        min-width: 400px;
        max-width: calc(100vw - 40px);
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
        z-index: 10004;
    }

    .nav-item:hover .mega-menu {
        transform: translateX(-50%) translateY(0);
        z-index: 10006;
    }

    .mega-menu-content {
        grid-template-columns: repeat(2, 1fr);
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .news-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .events-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .portal-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .gallery-item:nth-child(1) {
        grid-column: span 2;
        grid-row: span 1;
        height: 300px;
    }

    .footer-main {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* =====================================================
   RESPONSIVE DESIGN - MOBILE (768px)
   ===================================================== */

@media (max-width: 768px) {
    html, body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .container {
        padding: 0 15px;
        max-width: 100%;
    }

    .top-bar {
        display: none;
    }

    .main-header {
        padding: 10px 0;
    }

    .header-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        position: relative;
    }

    .logo-section {
        justify-content: flex-start;
        margin-bottom: 0;
        flex: 1;
        min-width: 0;
    }

    .school-info h1 {
        font-size: 1.1rem;
        text-align: left;
        margin-bottom: 2px;
    }

    .school-info p {
        text-align: left;
        font-size: 0.8rem;
    }

    .logo {
        width: 50px;
        height: 50px;
    }

    .header-right {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
    }

    .header-search {
        flex: 1;
        max-width: none;
        min-width: 0;
    }

    /* Mobile Hamburger Menu */
    .mobile-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        position: relative;
        background: var(--primary-color);
        border: none;
        width: 45px;
        height: 45px;
        border-radius: 8px;
        cursor: pointer;
        padding: 0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        transition: all 0.3s ease;
        z-index: 10002;
    }

    .mobile-toggle:hover {
        background: var(--primary-light);
        transform: scale(1.05);
    }

    .mobile-toggle:active {
        transform: scale(0.95);
    }

    .hamburger {
        position: relative;
        width: 24px;
        height: 18px;
        margin: 0 auto;
    }

    .hamburger span {
        position: absolute;
        left: 0;
        width: 100%;
        height: 3px;
        background: white;
        border-radius: 2px;
        transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }

    .hamburger span:nth-child(1) {
        top: 0;
    }

    .hamburger span:nth-child(2) {
        top: 50%;
        transform: translateY(-50%);
    }

    .hamburger span:nth-child(3) {
        bottom: 0;
    }

    .mobile-toggle.active .hamburger span:nth-child(1) {
        top: 50%;
        transform: translateY(-50%) rotate(45deg);
    }

    .mobile-toggle.active .hamburger span:nth-child(2) {
        opacity: 0;
        transform: translateX(20px);
    }

    .mobile-toggle.active .hamburger span:nth-child(3) {
        bottom: 50%;
        transform: translateY(50%) rotate(-45deg);
    }

    .mobile-overlay {
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(5px);
    }

    .quick-actions {
        display: none;
    }

    /* Mobile Navigation Menu */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 350px;
        height: 100vh;
        background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary-color) 100%);
        flex-direction: column;
        padding: 80px 0 20px;
        transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        overflow-y: auto;
        overflow-x: hidden;
        z-index: 10000;
        box-shadow: -5px 0 20px rgba(0,0,0,0.3);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu * {
        max-width: 100%;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-link {
        padding: 18px 25px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 1.05rem;
        color: white;
        position: relative;
    }

    .nav-link::after {
        display: none;
    }

    .nav-link i {
        transition: transform 0.3s ease;
        font-size: 0.9rem;
    }

    .nav-item.active .nav-link i {
        transform: rotate(180deg);
    }

    .mega-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(0, 0, 0, 0.2);
        display: none;
        min-width: 100%;
        max-width: 100%;
        border-radius: 0;
        margin: 0;
        padding: 0;
        z-index: auto;
    }

    .nav-item.active .mega-menu {
        display: block;
        animation: slideDown 0.3s ease;
    }

   .mega-menu-content {
    grid-template-columns: 1fr;
    padding: 10px 20px 10px 10px;
    gap: 15px;
}

   .mega-menu-column {
    padding: 10px 5px 10px 0;
}

    .mega-menu-column h3 {
        font-size: 0.95rem;
        margin-bottom: 12px;
        padding-bottom: 8px;
        color: rgba(255, 255, 255, 0.9);
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

.mega-menu-links {
    padding-left: 0;
    padding-right: 10px;
}

.mega-menu-links li {
    margin-bottom: 0;
}

.mega-menu-links a {
    padding: 10px 15px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    transition: all 0.2s ease;
    display: block;
}

    .mega-menu-links a:hover {
        color: white;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 6px;
        padding-left: 12px;
    }

    .mega-menu-links i {
        color: rgba(255, 255, 255, 0.6);
        font-size: 0.8rem;
    }

    .nav-menu::-webkit-scrollbar {
        width: 6px;
    }

    .nav-menu::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
    }

    .nav-menu::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);
        border-radius: 3px;
    }

    .nav-menu::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.5);
    }

    .hero {
        margin-top: 120px;
        height: 500px;
        padding: 0 15px;
    }

    .hero-content {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 15px;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-description {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        padding: 12px 25px;
        justify-content: center;
    }

    .welcome {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 15px;
    }

    .section-description {
        font-size: 1.1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        text-align: center;
    }

    .stat-number {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-top: 40px;
    }

    .feature-card {
        padding: 30px 20px;
    }

    .news-section {
        padding: 60px 0;
    }

    .news-card {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .news-image {
        height: 200px;
    }

    .news-content {
        padding: 20px;
    }

    .news-meta {
        flex-wrap: wrap;
        gap: 10px;
    }

    .announcements {
        padding: 25px 20px;
        margin-top: 30px;
    }

    .events-section {
        padding: 60px 0;
    }

    .events-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .calendar-widget {
        padding: 20px;
    }

    .event-card {
        grid-template-columns: auto 1fr;
        gap: 15px;
        padding: 20px;
    }

    .event-action {
        grid-column: 1 / -1;
        text-align: left;
        margin-top: 10px;
    }

    .portal-section {
        padding: 60px 0;
    }

    .portal-header h2 {
        font-size: 2rem;
    }

    .portal-header p {
        font-size: 1.1rem;
    }

    .portal-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .portal-card {
        padding: 25px 20px;
    }

    .gallery-section {
        padding: 60px 0;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .gallery-item,
    .gallery-item:nth-child(1) {
        height: 250px;
        grid-column: span 1;
        grid-row: span 1;
    }

    .partners-section {
        padding: 40px 0;
    }

    .partners-track {
        gap: 30px;
    }

    .partner-logo {
        width: 120px;
        height: 60px;
    }

    footer {
        padding-top: 40px;
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-brand {
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-column {
        text-align: center;
    }

    .footer-links {
        margin-top: 20px;
    }

    .footer-contact {
        margin-top: 20px;
    }

    .contact-item {
        justify-content: center;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .footer-bottom-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* =====================================================
   RESPONSIVE DESIGN - SMALL MOBILE (480px)
   ===================================================== */

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .nav-menu {
        width: 90%;
        max-width: none;
        padding: 60px 15px 15px;
    }

    .mega-menu-content {
        padding: 10px;
    }

    .feature-card,
    .news-card,
    .event-card,
    .feature-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* =====================================================
   END OF STYLESHEET
   ===================================================== */
    .portal-card {
        margin: 0 5px;
    }

    .news-content,
    .announcements,
    .calendar-widget {
        padding: 15px;
    }

    .footer-main {
        gap: 25px;
    }
}

/* =====================================================
   LANDSCAPE MOBILE ORIENTATION
   ===================================================== */

@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        height: 400px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .nav-menu {
        height: 100vh;
        padding-top: 60px;
    }
}

/* =====================================================
   VERY WIDE SCREENS (1400px+)
   ===================================================== */

@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
        padding: 0 40px;
    }

    .mega-menu {
        min-width: 700px;
    }
}

/* =====================================================
   DESKTOP: MEGA-MENU LINKS NICHT ANKLICKBAR
   ===================================================== */

@media (min-width: 769px) {
    .nav-item:has(.mega-menu) .nav-link {
        cursor: default;
        pointer-events: auto;
    }

    .nav-item .mega-menu ~ .nav-link {
        cursor: default;
    }

    .nav-item:not(:has(.mega-menu)) .nav-link {
        cursor: pointer;
    }

    .mega-menu-links a {
        cursor: pointer;
        pointer-events: auto;
    }

    .nav-item.clicked .mega-menu {
        display: none !important;
    }

    .nav-item:hover .mega-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
        z-index: 10006;
    }
}

/* =====================================================
   ACCESSIBILITY - HIGH CONTRAST MODE
   ===================================================== */

@media (prefers-contrast: high) {
    :root {
        --primary-color: #000033;
        --text-color: #000000;
        --shadow-sm: 0 1px 3px rgba(0,0,0,0.5);
        --shadow-md: 0 3px 6px rgba(0,0,0,0.5);
        --shadow-lg: 0 10px 20px rgba(0,0,0,0.5);
    }
}

/* =====================================================
   ACCESSIBILITY - REDUCED MOTION
   ===================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =====================================================
   PRINT STYLES
   ===================================================== */

@media print {
    .no-print,
    header,
    .hero,
    .portal-section,
    .gallery-section,
    footer,
    .back-to-top,
    .mobile-overlay {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: black;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    a {
        text-decoration: none;
        color: black;
    }

    .news-card,
    .event-card,