/* style.css - Unified styles for entire application */
@charset "utf-8";

/* Reset and Base Styles */
html {
  box-sizing: border-box;
}

*, ::before, ::after {
  box-sizing: inherit;
}

body {
  margin: 0 auto;
  padding: 0;
  font-family: Calibri;
  color: #000000;
}

body > * {
  color: #000000;
  padding: 1em;
  margin: 1em 0;
}

/* NAVBAR STYLING - ORIGINAL STYLES */
.navbar {
  position: relative;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  background-color: #5c0e2e;
  color: #fff;
  font-family: Century;
  font-size: 16pt;
  
}

.nav-links a {
  color: #f2f2f2;
 
}

/* LOGO */
.logo img {
  width: 280px;
  height: 100px;
}

/* NAVBAR MENU */
.menu {
  display: flex;
  gap: 1em;
  font-size: 18px;
  
}

.menu li:hover {
  background-color: #ddd;
  border-radius: 5px;
  transition: 0.3s ease;
}

.menu li {
  list-style-type: none;
  padding: 5px 14px;
}

/* DROPDOWN MENU */
.services {
  position: relative;
}

.dropdown {
  background-color: #5c0e2e;
  padding: 1em 0;
  position: absolute;
  display: none;
  border-radius: 14px;
  top: 35px;
  z-index: 1001;
 
}

.dropdown li + li {
  margin-top: 10px;
}

.dropdown li {
  padding: 0.5em 0.5em;
  width: 8em;
  text-align: center;
}

.dropdown li:hover {
  background-color: #f2f2f2;
}

.services:hover .dropdown {
  display: block;
}

/* RESPONSIVE NAVBAR MENU STARTS */
input[type=checkbox] {
  display: none;
}

.hamburger {
  display: none;
  font-size: 24px;
  user-select: none;
  color: white;
}

/* Grid layout for larger screens */
@media (min-width: 30em) {
  body {
    color: #000000;
    display: grid;
    grid-template-columns: repeat(14, 1fr);
    gap: 0 2em;
  }

  /* Apply consistent width to ALL main content blocks */
  .navbar, .header, .filters, .timeline-container, 
  .material-container, .abschnitt, .artikel, .news, 
  .gallery-container {
    grid-column: 3 / 13;
  }
  
  .footer {
    grid-column: 3 / 13; 
    padding-left: calc(2/14 * 100%);
    padding-right: calc(2/14 * 100%);
  }
}

/* Header Styles */
.header {
    background: #5c0e2e;
    color: white;
    padding: 30px;
    text-align: center;
}

.back-link {
    color: white;
    text-decoration: none;
    margin-bottom: 15px;
    display: inline-block;
    font-size: 1.1rem;
}

.back-link:hover {
    text-decoration: underline;
}

/* Material Container */
.material-container {
    max-width: 1200px;
    margin: 20px auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Material Header */
.material-header {
    background: #5c0e2e;
    color: white;
    padding: 30px;
    text-align: center;
}

.material-title {
    margin: 0;
    font-size: 2.2rem;
    color: white;
}

.material-subtitle {
    margin: 10px 0 0 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Category Badge */
.category-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    margin: 5px;
    color: white;
}

/* Main Content Layout */
.main-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    padding: 40px;
}

.content-left {
    flex: 2;
    min-width: 300px;
}

.content-right {
    flex: 1;
    min-width: 350px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 30px;
    height: fit-content;
}

/* Content Sections */
.content-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #cecac8;
}

.content-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.content-section h2 {
    font-size: 1.8rem;
    color: #8d000085;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eaeaea;
}

.content-section h3 {
    font-size: 1.5rem;
    color: #8d000085;
    margin: 25px 0 15px;
}

.content-section p {
    margin-bottom: 15px;
    font-size: 1.05rem;
    color: #777;
    line-height: 1.6;
}

/* Material Details Grid */
.material-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 25px 0;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-weight: bold;
    color: #5c0e2e;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.detail-value {
    color: #333;
    font-size: 1rem;
}

/* Download Section */
.download-section {
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 30px 0;
}

.download-btn {
    display: inline-block;
    background: #8d000085;
    color: white;
    padding: 15px 30px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: background 0.3s;
}

.download-btn:hover {
    background: #5c0e2e;
}

/* Gallery Styles */
.gallery-section {
    margin-bottom: 30px;
}

.gallery-section h2 {
    font-size: 1.8rem;
    color: #8d000085;
    margin-bottom: 25px;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid #eaeaea;
}

.gallery-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.gallery-item {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.gallery-item.main-image {
    border: 3px solid #5c0e2e;
}

.gallery-image {
    width: 100%;
    height: 250px;
    object-fit: contain;
    background: #f8f9fa;
    cursor: pointer;
    transition: opacity 0.3s ease;
    padding: 10px;
}

.gallery-image:hover {
    opacity: 0.9;
}

.gallery-caption {
    padding: 15px 20px;
    text-align: center;
    border-top: 1px solid #eaeaea;
}

.gallery-caption-text {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.4;
    margin: 0;
    font-style: italic;
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1002;
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    display: block;
    margin: auto;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    background: none;
    border: none;
}

.lightbox-close:hover {
    color: #ccc;
}

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    color: #fff;
    font-size: 16px;
    padding: 10px;
    background: rgba(0,0,0,0.7);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Index Page Specific Styles */
.filters {
    background: #2c3e50;
    color: white;
    padding: 20px;
    margin-bottom: 20px;
}

.filters form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}

.filters label {
    font-weight: 600;
    margin-right: 5px;
    white-space: nowrap;
    color: #f2f2f2;
}

.filters select, .filters button {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-family: Calibri;
}

.filters select {
    background-color: white;
    color: #333;
    min-width: 180px;
    border: 1px solid #cecac8;
}

.filters button {
    background-color: #8d000085;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
    font-weight: bold;
}

.filters button:hover {
    background-color: #5c0e2e;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Main Category Rows */
.main-category-row {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    overflow: hidden;
}

.main-category-header {
    background: #34495e;
    color: white;
    padding: 15px 20px;
    font-size: 1.4rem;
    font-weight: bold;
}

/* Materials Grid */
.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    padding: 20px;
}

/* Material Cards */
.material-card {
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e9ecef;
}

.material-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.material-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.material-content {
    padding: 15px;
}

.material-title {
    font-size: 1.1rem;
    color: #5c0e2e;
    margin-bottom: 8px;
    line-height: 1.3;
}

.material-meta {
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.material-description {
    color: #333;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 10px;
}

.material-link {
    display: inline-block;
    background: #8d000085;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
}

.material-link:hover {
    background: #5c0e2e;
}

.no-image {
    width: 100%;
    height: 160px;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

/* Active Filters */
.active-filters {
    background: #e8f4fd;
    padding: 15px;
    margin: 15px 0;
    border-radius: 5px;
    border-left: 4px solid #3498db;
}

.active-filters h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.filter-tag {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    margin: 5px;
    font-size: 0.9rem;
}

.clear-filters {
    background: #e74c3c;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    margin-left: 10px;
}

.clear-filters:hover {
    background: #c0392b;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #5c0e2e;
        flex-direction: column;
        display: none;
    }

    #checkbox_toggle:checked ~ .nav-links {
        display: flex;
    }

    .menu {
        flex-direction: column;
        width: 100%;
    }

    .dropdown {
        position: static;
        display: none;
        width: 100%;
    }

    .services:hover .dropdown {
        display: none;
    }

    .main-content {
        flex-direction: column;
        padding: 20px;
        gap: 30px;
    }

    .content-left,
    .content-right {
        flex: none;
        width: 100%;
        min-width: 100%;
    }

    .gallery-image {
        height: 200px;
    }

    .material-details-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .material-title {
        font-size: 1.8rem;
    }

    .content-section {
        padding: 0;
        margin-bottom: 30px;
    }

    .filters form {
        flex-direction: column;
        align-items: stretch;
    }

    .filters select, .filters button {
        width: 100%;
    }

    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }

    .materials-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 15px;
    }

    .main-category-header {
        padding: 12px 15px;
        font-size: 1.2rem;
    }

    .timeline-container {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .material-content {
        padding: 12px;
    }

    .material-title {
        font-size: 1rem;
    }
}

/* Active Filters Section */
.active-filters {
    background: #e8f4fd;
    padding: 15px;
    margin: 15px 0;
    border-radius: 5px;
    border-left: 4px solid #3498db;
    grid-column: 3 / 13;
}

.active-filters h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.filter-tag {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    margin: 5px;
    font-size: 0.9rem;
    line-height: 1.3;
}

.clear-filters {
    background: #e74c3c;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    margin-left: 10px;
    font-size: 0.9rem;
}

.clear-filters:hover {
    background: #c0392b;
}

/* Responsive Design for Active Filters */
@media (max-width: 768px) {
    .active-filters {
        grid-column: 1 / -1; /* Full width on mobile */
        margin: 15px 10px; /* Add some side margin */
        padding: 12px;
    }
    
    .active-filters h4 {
        font-size: 1rem;
        text-align: center;
    }
    
    .filter-tag {
        display: block; /* Stack vertically on mobile */
        margin: 8px auto; /* Center align */
        text-align: center;
        width: fit-content;
        max-width: 100%;
        word-break: break-word;
    }
    
    .clear-filters {
        display: block;
        margin: 15px auto 0 auto;
        text-align: center;
        width: fit-content;
    }
}

@media (max-width: 480px) {
    .active-filters {
        padding: 10px;
        margin: 10px 5px;
    }
    
    .filter-tag {
        font-size: 0.8rem;
        padding: 4px 8px;
        margin: 5px auto;
    }
    
    .active-filters h4 {
        font-size: 0.95rem;
        margin-bottom: 8px;
    }
}