/* ========================================
   Grundschule Leopoldshafen - Stylesheet
   Modern, verspielt, barrierefrei
   ======================================== */

/* CSS Custom Properties (Design Tokens) */
:root {
    /* Colors */
    --color-primary: #4A90A4;
    --color-primary-dark: #3A7A8E;
    --color-primary-light: #6BB5C9;
    --color-secondary: #E8956E;
    --color-secondary-dark: #D47A52;
    --color-secondary-light: #F5B89A;
    --color-accent: #F5C842;
    --color-accent-dark: #E0B030;

    --color-success: #4CAF50;
    --color-warning: #FF9800;
    --color-error: #F44336;
    --color-info: #2196F3;

    --color-text: #333333;
    --color-text-light: #666666;
    --color-text-muted: #999999;
    --color-bg: #FFFFFF;
    --color-bg-light: #F8F9FA;
    --color-bg-dark: #E9ECEF;
    --color-border: #DEE2E6;

    /* Typography */
    --font-heading: 'Fredoka', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;

    /* Z-index layers */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal-backdrop: 300;
    --z-modal: 400;
    --z-tooltip: 500;
    --z-toast: 600;
    --z-editor: 700;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   Reset & Base Styles
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-text);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-dark);
}

a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

button:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

ul, ol {
    list-style: none;
}

address {
    font-style: normal;
}

/* ========================================
   Utility Classes
   ======================================== */
.hidden { display: none !important; }
.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;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    font-family: var(--font-heading);
    font-size: var(--text-base);
    font-weight: 500;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.98);
}

.btn-sm {
    padding: var(--space-xs) var(--space-md);
    font-size: var(--text-sm);
}

.btn-lg {
    padding: var(--space-md) var(--space-xl);
    font-size: var(--text-lg);
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    color: white;
}

.btn-secondary {
    background: white;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--color-error), #C62828);
    color: white;
}

.btn-danger:hover {
    opacity: 0.9;
}

/* ========================================
   Form Elements
   ======================================== */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 500;
    color: var(--color-text);
}

.form-group small {
    display: block;
    margin-top: var(--space-xs);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group input[type="url"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: var(--space-md);
    font-family: inherit;
    font-size: var(--text-base);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(74, 144, 164, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--color-primary);
}

.form-error {
    color: var(--color-error);
    font-size: var(--text-sm);
    margin-top: var(--space-sm);
}

.form-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
    margin-top: var(--space-xl);
}

/* ========================================
   Cookie Banner
   ======================================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: var(--z-modal);
    padding: var(--space-lg);
    animation: slideUp var(--transition-slow) ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
}

.cookie-content p {
    flex: 1;
    min-width: 300px;
}

.cookie-buttons {
    display: flex;
    gap: var(--space-md);
}

/* ========================================
   Header & Navigation
   ======================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: var(--shadow-md);
    z-index: var(--z-sticky);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-lg);
    max-width: 1400px;
    margin: 0 auto;
}

.logo-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.nav-list {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    background: var(--color-bg-light);
    color: var(--color-primary);
}

/* Dropdown */
.has-dropdown > .nav-link::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: var(--space-xs);
    vertical-align: middle;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform var(--transition-fast);
}

.has-dropdown:hover > .nav-link::after {
    transform: rotate(180deg);
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: var(--space-sm);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-base);
    z-index: var(--z-dropdown);
}

.dropdown-right {
    left: auto;
    right: 0;
}

.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown li a {
    display: block;
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-sm);
    color: var(--color-text);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.dropdown li a:hover {
    background: var(--color-bg-light);
    color: var(--color-primary);
    padding-left: var(--space-lg);
}

/* Search Toggle */
.search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    color: var(--color-text);
    transition: all var(--transition-fast);
}

.search-toggle:hover {
    background: var(--color-bg-light);
    color: var(--color-primary);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    position: relative;
    z-index: calc(var(--z-modal) + 1);
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    position: relative;
    transition: background var(--transition-fast);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    transition: all var(--transition-fast);
}

.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }

.mobile-menu-toggle.active .hamburger {
    background: transparent;
}

.mobile-menu-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.mobile-menu-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    bottom: 0;
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-modal-backdrop);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-container {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 400px;
    background: white;
    z-index: var(--z-modal);
    transform: translateX(100%);
    transition: transform var(--transition-slow);
    overflow-y: auto;
    padding: var(--space-xl);
}

.mobile-nav-overlay.active .mobile-nav-container {
    transform: translateX(0);
}

.mobile-nav-close {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    color: var(--color-text);
    transition: all var(--transition-fast);
}

.mobile-nav-close:hover {
    background: var(--color-bg-light);
    color: var(--color-primary);
}

.mobile-nav {
    padding-top: var(--space-3xl);
}

.mobile-nav-item {
    border-bottom: 1px solid var(--color-border);
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) 0;
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: 500;
    color: var(--color-text);
}

.mobile-nav-link:hover {
    color: var(--color-primary);
}

.mobile-nav-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    transition: transform var(--transition-fast);
}

.mobile-nav-toggle.active {
    transform: rotate(180deg);
}

.mobile-dropdown {
    display: none;
    padding: var(--space-sm) 0 var(--space-md) var(--space-lg);
}

.mobile-dropdown.active {
    display: block;
}

.mobile-dropdown a {
    display: block;
    padding: var(--space-sm) 0;
    color: var(--color-text-light);
    font-size: var(--text-base);
}

.mobile-dropdown a:hover {
    color: var(--color-primary);
}

/* Mobile Nav List Styles */
.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-item {
    border-bottom: 1px solid var(--color-border);
}

.mobile-nav-item:last-child {
    border-bottom: none;
}

.mobile-nav-item > a,
.mobile-nav-item > .mobile-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) 0;
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: 500;
    color: var(--color-text);
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
}

.mobile-nav-item > a:hover,
.mobile-nav-item > .mobile-nav-toggle:hover {
    color: var(--color-primary);
}

.mobile-nav-toggle .toggle-icon {
    font-size: var(--text-xl);
    font-weight: 300;
    transition: transform var(--transition-fast);
}

.mobile-nav-item.has-submenu.open .toggle-icon {
    transform: rotate(45deg);
}

.mobile-submenu {
    display: none;
    list-style: none;
    padding: 0 0 var(--space-md) var(--space-lg);
    margin: 0;
}

.mobile-nav-item.has-submenu.open .mobile-submenu {
    display: block;
}

.mobile-submenu li {
    padding: 0;
}

.mobile-submenu a {
    display: block;
    padding: var(--space-sm) 0;
    color: var(--color-text-light);
    font-size: var(--text-base);
    font-family: var(--font-body);
}

.mobile-submenu a:hover {
    color: var(--color-primary);
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.98);
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-container {
    width: 100%;
    max-width: 600px;
    padding: 0 var(--space-lg);
}

.search-close {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    color: var(--color-text);
    transition: all var(--transition-fast);
}

.search-close:hover {
    background: var(--color-bg-light);
    color: var(--color-primary);
}

.search-input-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: var(--space-lg);
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
}

.search-input {
    width: 100%;
    padding: var(--space-lg) var(--space-lg) var(--space-lg) 60px;
    font-size: var(--text-xl);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-2xl);
    transition: all var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(74, 144, 164, 0.2);
}

.search-results {
    margin-top: var(--space-xl);
    max-height: 50vh;
    overflow-y: auto;
}

.search-hint {
    text-align: center;
    color: var(--color-text-muted);
}

.search-result-item {
    display: block;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
}

.search-result-item:hover {
    background: var(--color-bg-light);
}

.search-result-title {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-xs);
}

.search-result-path {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.search-result-excerpt {
    font-size: var(--text-sm);
    color: var(--color-text-light);
    margin-top: var(--space-xs);
}

.search-result-excerpt mark {
    background: var(--color-accent);
    color: var(--color-text);
    padding: 0 2px;
    border-radius: 2px;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(74, 144, 164, 0.85) 0%,
        rgba(58, 122, 142, 0.9) 100%
    );
}

.hero-content {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
    max-width: 900px;
}

.hero-logo {
    max-width: 500px;
    width: 100%;
    height: auto;
    margin: 0 auto var(--space-xl);
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.2));
}

.hero-tagline {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    color: white;
    margin-bottom: var(--space-sm);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-quote-author {
    font-size: var(--text-base);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-2xl);
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    justify-content: center;
}

.hero-buttons .btn-secondary {
    background: rgba(255, 255, 255, 0.95);
    border-color: transparent;
}

.hero-buttons .btn-secondary:hover {
    background: white;
    color: var(--color-primary-dark);
    transform: translateY(-2px);
}

.scroll-indicator {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    color: white;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.animate-fade-in-delay {
    opacity: 0;
    animation: fadeIn 0.6s ease 0.2s forwards;
}

.animate-fade-in-delay-2 {
    opacity: 0;
    animation: fadeIn 0.6s ease 0.4s forwards;
}

.animate-fade-in-delay-3 {
    opacity: 0;
    animation: fadeIn 0.6s ease 0.6s forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Main Content & Sections
   ======================================== */
.main-content {
    min-height: 100vh;
}

.section {
    padding: var(--space-3xl) 0;
}

.section:nth-child(even) {
    background: var(--color-bg-light);
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
    font-size: var(--text-3xl);
    text-align: center;
}

.title-icon {
    font-size: var(--text-4xl);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-3xl) var(--space-xl);
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.empty-state.small {
    padding: var(--space-xl);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
    opacity: 0.8;
}

.empty-state p {
    color: var(--color-text-light);
    margin-bottom: var(--space-lg);
    font-size: var(--text-lg);
}

/* Grids */
.notices-grid,
.news-grid,
.downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
}

.calendar-preview {
    max-width: 800px;
    margin: 0 auto;
}

/* Cards */
.card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all var(--transition-base);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: var(--space-lg);
}

.card-title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-sm);
}

.card-meta {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

.card-text {
    color: var(--color-text-light);
}

/* External Links */
.external-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    max-width: 800px;
    margin: 0 auto;
}

.external-link-card {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg);
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.external-link-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.external-link-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.external-link-content {
    flex: 1;
}

.external-link-content h3 {
    font-size: var(--text-lg);
    color: var(--color-text);
    margin-bottom: var(--space-xs);
}

.external-link-content p {
    font-size: var(--text-sm);
    color: var(--color-text-light);
}

.external-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    flex-shrink: 0;
}

/* ========================================
   Footer
   ======================================== */
.main-footer {
    background: var(--color-text);
    color: white;
    padding: var(--space-3xl) 0 var(--space-lg);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-col h4 {
    color: white;
    font-size: var(--text-lg);
    margin-bottom: var(--space-lg);
}

.footer-col p,
.footer-col address p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--space-sm);
}

.footer-col a {
    color: rgba(255, 255, 255, 0.8);
    transition: color var(--transition-fast);
}

.footer-col a:hover {
    color: white;
}

.footer-col ul li {
    margin-bottom: var(--space-sm);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--text-sm);
}

.admin-login-btn {
    color: rgba(255, 255, 255, 0.4);
    font-size: var(--text-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.admin-login-btn:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
}

/* ========================================
   Modals
   ======================================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform var(--transition-base);
    box-shadow: var(--shadow-xl);
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-sm .modal-content {
    max-width: 400px;
}

.modal-lg .modal-content,
.modal-content.modal-lg {
    max-width: 700px;
}

.modal-close {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    color: var(--color-text-muted);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--color-bg-light);
    color: var(--color-text);
}

.modal-content h2 {
    margin-bottom: var(--space-xl);
    padding-right: var(--space-2xl);
}

/* Help Modal */
.help-content {
    max-height: 60vh;
    overflow-y: auto;
}

.help-section {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.help-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.help-section h3 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-sm);
}

.help-section p,
.help-section ul {
    color: var(--color-text-light);
}

.help-section ul {
    padding-left: var(--space-xl);
    list-style: disc;
}

.help-section li {
    margin-bottom: var(--space-xs);
}

/* ========================================
   Editor Sidebar
   ======================================== */
.editor-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 320px;
    background: white;
    box-shadow: var(--shadow-xl);
    z-index: var(--z-editor);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform var(--transition-slow);
}

.editor-sidebar.active {
    transform: translateX(0);
}

.editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg-light);
}

.editor-header h3 {
    font-size: var(--text-lg);
}

.editor-actions {
    display: flex;
    gap: var(--space-xs);
}

.editor-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    color: var(--color-text);
    transition: all var(--transition-fast);
}

.editor-btn:hover {
    background: var(--color-bg-dark);
    color: var(--color-primary);
}

.editor-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.editor-tabs {
    display: flex;
    border-bottom: 1px solid var(--color-border);
}

.editor-tab {
    flex: 1;
    padding: var(--space-md) var(--space-sm);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-muted);
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
}

.editor-tab:hover {
    color: var(--color-text);
    background: var(--color-bg-light);
}

.editor-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.editor-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-lg);
}

.editor-panel {
    display: none;
}

.editor-panel.active {
    display: block;
}

.editor-hint {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background: var(--color-bg-light);
    border-radius: var(--radius-md);
}

/* Blocks List */
.blocks-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

.block-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-md);
    background: var(--color-bg-light);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    cursor: grab;
    transition: all var(--transition-fast);
}

.block-item:hover {
    background: white;
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.block-item:active {
    cursor: grabbing;
}

.block-icon {
    font-size: 1.5rem;
}

.block-name {
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--color-text);
    text-align: center;
}

/* Pages List */
.pages-actions {
    margin-bottom: var(--space-lg);
}

.pages-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.page-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md);
    background: var(--color-bg-light);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.page-item:hover {
    background: var(--color-bg-dark);
}

.page-item-info {
    flex: 1;
    min-width: 0;
}

.page-item-title {
    font-weight: 500;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-item-slug {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

.page-item-actions {
    display: flex;
    gap: var(--space-xs);
}

.page-item-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    transition: all var(--transition-fast);
}

.page-item-btn:hover {
    background: white;
    color: var(--color-primary);
}

.page-item-btn.delete:hover {
    color: var(--color-error);
}

/* Media Grid */
.media-actions {
    margin-bottom: var(--space-md);
}

.media-search {
    margin-bottom: var(--space-lg);
}

.media-search input {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

.media-item {
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.media-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

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

/* Settings */
.settings-group {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.settings-group:last-child {
    border-bottom: none;
}

.settings-group h4 {
    font-size: var(--text-base);
    margin-bottom: var(--space-md);
}

/* Editor Footer */
.editor-footer {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-lg);
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-light);
}

.editor-footer .btn {
    width: 100%;
}

/* ========================================
   Editor Toolbar (floating)
   ======================================== */
.editor-toolbar {
    position: fixed;
    display: none;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs);
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: var(--z-tooltip);
}

.editor-toolbar.active {
    display: flex;
}

.toolbar-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: var(--text-sm);
    transition: all var(--transition-fast);
}

.toolbar-btn:hover {
    background: var(--color-bg-light);
    color: var(--color-primary);
}

.toolbar-btn[data-action="delete"]:hover {
    color: var(--color-error);
}

.toolbar-divider {
    width: 1px;
    height: 24px;
    background: var(--color-border);
    margin: 0 var(--space-xs);
}

/* ========================================
   Editable Elements
   ======================================== */
.editable {
    position: relative;
    transition: outline var(--transition-fast);
}

/* Editable cursor only in editor mode */
.editor-active .editable {
    cursor: pointer;
}

/* Dashed outline only in editor mode */
.editor-active .editable:hover {
    outline: 2px dashed var(--color-primary);
    outline-offset: 4px;
}

.editor-active .editable.editing {
    outline: 2px solid var(--color-primary);
    outline-offset: 4px;
}

.editable-block {
    position: relative;
}

/* Dashed border only in editor mode */
.editor-active .editable-block:hover::after {
    content: '';
    position: absolute;
    inset: -8px;
    border: 2px dashed var(--color-primary);
    border-radius: var(--radius-md);
    pointer-events: none;
}

.editor-active .editable-block.selected::after {
    content: '';
    position: absolute;
    inset: -8px;
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-md);
    pointer-events: none;
    background: rgba(74, 144, 164, 0.05);
}

/* Drop Zone */
.drop-zone {
    min-height: 100px;
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    transition: all var(--transition-fast);
}

.drop-zone.drag-over {
    border-color: var(--color-primary);
    background: rgba(74, 144, 164, 0.1);
    color: var(--color-primary);
}

/* Dragging state */
.editable-block.dragging {
    opacity: 0.5;
    transform: scale(0.98);
}

/* Block Controls */
.block-controls {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: none;
    gap: 0.25rem;
    background: white;
    padding: 0.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 100;
}

.editor-active .editable-block:hover .block-controls,
.editor-active .editable-block.selected .block-controls {
    display: flex;
}

.block-ctrl-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.block-ctrl-btn:hover {
    background: var(--color-bg-light);
}

.block-ctrl-btn.move-btn {
    cursor: grab;
}

.block-ctrl-btn.move-btn:active {
    cursor: grabbing;
}

.block-ctrl-btn.delete-btn:hover {
    background: #FEE2E2;
    color: var(--color-error);
}

.block-ctrl-btn.duplicate-btn:hover {
    background: #E0F2FE;
    color: var(--color-info);
}

/* Feature Card Block */
.feature-card {
    position: relative;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(74, 144, 164, 0.4);
}

.feature-emoji {
    transition: transform var(--transition-fast);
}

.feature-card:hover .feature-emoji {
    transform: scale(1.1);
}

/* Placeholder Block - Flexible spacer */
.block-placeholder {
    display: inline-block;
    width: 25%;
    vertical-align: top;
    box-sizing: border-box;
}

/* Inline editable blocks (placeholders) */
.editable-block.inline-block,
.editable-block[data-block-type="placeholder"] {
    display: inline-block;
    vertical-align: top;
}

/* Button block */
.block-button-wrapper {
    text-align: center;
    margin: 0.5rem 0;
}

.block-button {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background 0.15s;
}

.editor-active .block-button {
    cursor: move;
    border: 1px dashed transparent;
}

.editor-active .block-button:hover {
    background: rgba(74, 144, 164, 0.1);
    border-color: rgba(74, 144, 164, 0.3);
}

.block-button.dragging-position {
    background: rgba(74, 144, 164, 0.15);
    border-color: var(--color-primary);
    cursor: ew-resize !important;
}

.block-button .btn {
    cursor: pointer;
}

.editable-block[data-block-type="placeholder"] {
    display: inline-block;
    width: 25%;
    vertical-align: top;
}

/* In editor mode - show placeholder outline */
.editor-active .editable-block[data-block-type="placeholder"] {
    min-height: 50px;
    background: rgba(200, 200, 200, 0.1);
    border: 1px dashed rgba(150, 150, 150, 0.4);
}

.editor-active .editable-block[data-block-type="placeholder"]:hover {
    border-color: var(--color-primary);
    background: rgba(74, 144, 164, 0.1);
}

/* Ensure editable blocks have relative positioning for controls */
.editor-active .editable-block {
    position: relative;
}

/* ========================================
   Toast Notifications
   ======================================== */
.toast-container {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    z-index: var(--z-toast);
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    animation: slideInRight var(--transition-base) ease;
    max-width: 400px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left: 4px solid var(--color-success);
}

.toast.error {
    border-left: 4px solid var(--color-error);
}

.toast.warning {
    border-left: 4px solid var(--color-warning);
}

.toast.info {
    border-left: 4px solid var(--color-info);
}

.toast-icon {
    font-size: 1.5rem;
}

.toast-message {
    flex: 1;
}

.toast-close {
    padding: var(--space-sm);
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.toast-close:hover {
    color: var(--color-text);
}

/* ========================================
   Page Templates
   ======================================== */
/* Standard Page */
.page-header {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    padding: calc(80px + var(--space-3xl)) var(--space-lg) var(--space-3xl);
    text-align: center;
}

.page-header h1 {
    color: white;
    margin-bottom: var(--space-md);
}

.page-header .breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.8);
}

.page-header .breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
}

.page-header .breadcrumb a:hover {
    color: white;
}

.page-content {
    padding: var(--space-3xl) 0;
}

/* A-Z Page */
.az-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.az-section {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
}

.az-letter {
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    color: var(--color-primary);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-bg-dark);
}

.az-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.az-link {
    display: block;
    padding: var(--space-sm);
    color: var(--color-text);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.az-link:hover {
    background: var(--color-bg-light);
    color: var(--color-primary);
    padding-left: var(--space-md);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .nav-list {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .editor-sidebar {
        width: 280px;
    }
}

@media (max-width: 768px) {
    :root {
        --text-4xl: 2rem;
        --text-3xl: 1.5rem;
        --text-2xl: 1.25rem;
    }

    .header-container {
        padding: var(--space-sm) var(--space-md);
    }

    .logo {
        height: 40px;
    }

    .hero-content {
        padding: var(--space-xl) var(--space-md);
    }

    .hero-logo {
        max-width: 300px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }

    .section {
        padding: var(--space-2xl) 0;
    }

    .container {
        padding: 0 var(--space-md);
    }

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

    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }

    .modal-content {
        padding: var(--space-lg);
    }

    .editor-sidebar {
        width: 100%;
    }

    .toast-container {
        left: var(--space-md);
        right: var(--space-md);
        bottom: var(--space-md);
    }

    .toast {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    .notices-grid,
    .news-grid,
    .downloads-grid {
        grid-template-columns: 1fr;
    }

    .blocks-list {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .main-header,
    .main-footer,
    .cookie-banner,
    .editor-sidebar,
    .editor-toolbar,
    .search-overlay,
    .mobile-nav-overlay,
    .modal {
        display: none !important;
    }

    .main-content {
        padding-top: 0;
    }

    .hero {
        min-height: auto;
        padding: var(--space-xl);
    }

    .hero-overlay {
        background: none;
    }

    .hero-content {
        color: var(--color-text);
    }
}

/* ========================================
   Editor Mode Body Class
   ======================================== */
body.editor-active {
    padding-left: 320px;
}

body.editor-active .main-header {
    left: 320px;
}

@media (max-width: 1024px) {
    body.editor-active {
        padding-left: 0;
    }

    body.editor-active .main-header {
        left: 0;
    }
}
