/* Copyright (c) 2026 Florentius Bohn. All Rights Reserved. The content of this website is protected by copyright and may not be reproduced without permission. */

/* CSS Reset and Custom Properties */
:root {
    --primary-color: #2c3e50; /* Dark Blue */
    --secondary-color: #ecf0f1; /* Light Gray */
    --accent-color: #e74c3c; /* Vibrant Red */
    --text-color: #ffffff;
    --background-color: #34495e; /* Darker Blue */
    --hover-bg: #c0392b; /* Darker Red */
    --dot-active: #e74c3c;
    --dot-inactive: #bdc3c7; /* Light Gray */
    --transition-fast: 0.3s;
    --transition-slow: 0.6s;
    --max-width: 1000px; /* Increased max-width for more spacious layout */
    --border-radius: 12px; /* Slightly larger border-radius for softer edges */
    --spacing-unit: 20px;
}

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

/* Font Face with better performance */
@font-face {
    font-family: 'century_schoolbookbold';
    src: url('schlbkb-webfont.woff2') format('woff2'),
         url('schlbkb-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Base Styles */
body, html {
    height: 100%;
    font-family: 'century_schoolbookbold', serif;
    background-image: url('bgSpeis.JPG');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.7; /* Slightly increased line height for readability */
    font-size: 16px; /* Base font size */
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition-fast) ease-in-out;
}

a:hover {
    color: var(--hover-bg);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
    border-radius: var(--border-radius);
    display: block; /* Prevents extra space below images */
}

/* Accessibility */
.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 Styles */
header {
    text-align: center;
    padding: calc(2 * var(--spacing-unit)) var(--spacing-unit);
    background: rgba(0, 0, 0, 0.7); /* Slightly darker overlay */
    margin-bottom: calc(2 * var(--spacing-unit));
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.page-title {
    font-size: 3.5rem; /* Larger title */
    color: var(--text-color);
    text-shadow: 3px 3px 6px rgba(0,0,0,0.6); /* More pronounced shadow */
    letter-spacing: 2px; /* Added letter spacing */
    margin-top: var(--spacing-unit);
}

.logo {
    max-width: 220px; /* Slightly larger logo */
    margin-bottom: var(--spacing-unit);
    transition: var(--transition-fast) ease-in-out;
}

.logo:hover {
    transform: scale(1.08); /* More pronounced hover effect */
}

/* Main Content */
main {
    padding: 0 var(--spacing-unit) 120px var(--spacing-unit); /* Padding bottom for navbar */
}

.events-section {
    max-width: var(--max-width);
    margin: 0 auto;
    background: rgba(44, 62, 80, 0.9); /* Slightly less transparent background */
    padding: calc(2 * var(--spacing-unit));
    border-radius: var(--border-radius);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4); /* Stronger shadow */
    display: grid; /* Using CSS Grid for better layout control */
    grid-template-columns: 1fr;
    gap: calc(2 * var(--spacing-unit));
}

/* Slideshow Styles */
.slideshow-container {
    position: relative;
    margin-bottom: var(--spacing-unit);
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.slide-image-wrapper {
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    position: relative;
    overflow: hidden;
    background-color: #000; /* Placeholder background */
}

.mySlides {
    display: none;
    position: relative; /* For text overlay */
}

.mySlides.active {
    display: block;
}

.slide-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures images cover the area without distortion */
    transition: transform var(--transition-slow) ease-in-out; /* Smooth transition for effects */
}

.mySlides.active .slide-image {
    transform: scale(1.03); /* Subtle zoom effect on active slide */
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: var(--spacing-unit);
    color: white;
    font-weight: bold;
    font-size: 24px; /* Larger arrows */
    transition: var(--transition-fast) ease-in-out;
    user-select: none;
    background-color: rgba(0,0,0,0.6); /* Slightly darker background */
    border: none; /* Remove default button border */
    z-index: 10; /* Ensure buttons are above images */
}

.next {
    right: 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.prev {
    left: 0;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.prev:hover, .next:hover {
    background-color: rgba(0,0,0,0.9); /* Darker on hover */
    transform: translateY(-50%) scale(1.1); /* Subtle scale effect */
}

.text {
    color: #f2f2f2;
    font-size: 1.2rem; /* Larger text */
    padding: calc(var(--spacing-unit) / 2) var(--spacing-unit);
    position: absolute;
    bottom: 0;
    width: 100%;
    text-align: center;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); /* Stronger gradient */
    font-weight: bold;
}

.numbertext {
    color: #f2f2f2;
    font-size: 0.9rem;
    padding: calc(var(--spacing-unit) / 2) var(--spacing-unit);
    position: absolute;
    top: 0;
    left: 0;
    background-color: rgba(0,0,0,0.6);
    border-radius: var(--border-radius) 0;
}

.slideshow-dots {
    text-align: center;
    margin-top: var(--spacing-unit);
}

.dot {
    cursor: pointer;
    height: 12px; /* Smaller dots */
    width: 12px;
    margin: 0 6px; /* Adjusted margin */
    background-color: var(--dot-inactive);
    border-radius: 50%;
    display: inline-block;
    transition: background-color var(--transition-fast) ease-in-out, transform var(--transition-fast) ease-in-out;
    border: none;
    outline: none; /* Remove default outline */
}

.dot.active, .dot:hover {
    background-color: var(--dot-active);
    transform: scale(1.2); /* Subtle scale effect on active/hover */
}

/* Fade animation */
.fade {
    animation-name: fade;
    animation-duration: 1.5s;
    animation-fill-mode: forwards; /* Keep the end state of the animation */
}

@keyframes fade {
    from {opacity: 0.6} /* Start with slightly more opacity */
    to {opacity: 1}
}

/* Event Details */
.event-details {
    display: grid; /* Use grid for event details */
    grid-template-columns: 1fr 1fr; /* Two columns */
    gap: calc(2 * var(--spacing-unit));
    align-items: start; /* Align items to the start of their grid area */
    margin-top: var(--spacing-unit);
}

.event-description {
    padding: var(--spacing-unit);
    background: rgba(0, 0, 0, 0.4); /* Slightly transparent background for text */
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.event-description h3 {
    color: var(--accent-color);
    font-size: 2.5rem; /* Larger heading */
    margin-bottom: var(--spacing-unit);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.event-description p {
    font-size: 1.15rem; /* Slightly larger paragraph text */
    color: var(--secondary-color); /* Lighter text color for contrast */
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    background-color: #000; /* Black background for video area */
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
}

/* Responsive Design */
@media (max-width: 900px) {
    .events-section {
        padding: var(--spacing-unit);
    }
    .event-details {
        grid-template-columns: 1fr; /* Stack columns on smaller screens */
    }
    .slide-image {
        height: 300px; /* Adjust height for smaller screens */
    }
    .page-title {
        font-size: 3rem;
    }
}

@media (max-width: 600px) {
    header {
        padding: var(--spacing-unit);
    }
    .page-title {
        font-size: 2.5rem;
    }
    .logo {
        max-width: 180px;
    }
    .prev, .next {
        padding: 12px;
        font-size: 20px;
    }
    .text {
        font-size: 1rem;
    }
    .event-description h3 {
        font-size: 2rem;
    }
    .event-description p {
        font-size: 1rem;
    }
    .slide-image {
        height: 250px;
    }
}

@media (max-width: 400px) {
    .page-title {
        font-size: 2rem;
    }
    .logo {
        max-width: 140px;
    }
    .prev, .next {
        padding: 8px;
        font-size: 18px;
    }
    .slide-image {
        height: 200px;
    }
}

/* Focus Styles for Accessibility */
*:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
    border-radius: var(--border-radius); /* Apply border-radius to focus outline */
}
