/* General Styles & Color Variables */
:root {
    /* Main color palette - updated with more modern shades */
    --primary-red: #E53935;
    --light-red: #E57373;
    --dark-red: #C62828;
    --accent-teal: #26A69A;
    --accent-teal-light: #80CBC4;

    --white: #ffffff;
    --off-white: #fafafa;
    --light-gray: #f0f0f0;
    --medium-gray: #e0e0e0;
    --dark-gray: #333333;
    --medium-dark-gray: #555555;
    --text-dark: #212121;

    /* Text colors */
    --text-primary: var(--text-dark);
    --text-secondary: #424242;
    --text-on-red: var(--white);
    --text-accent: var(--primary-red);
    --text-on-light-red: var(--white);
    --text-on-teal: var(--white);

    /* Layout */
    --header-height: 80px;
    --footer-height: 60px;
    --border-radius: 12px;
    --border-radius-small: 8px;
    --box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    --box-shadow-light: 0 2px 10px rgba(0, 0, 0, 0.05);
    --transition-speed: 0.3s;
    --spacing-small: 12px;
    --spacing-medium: 24px;
    --spacing-large: 40px;
    --spacing-xlarge: 60px;
}

/* Hide content until translations are loaded */
body:not(.translations-loaded) [data-translate],
body:not(.translations-loaded) [data-translate-html],
body:not(.translations-loaded) [data-translate-attr-content] {
    visibility: hidden;
}

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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.8;
    letter-spacing: 0.01em;
    color: var(--text-primary);
    background-color: var(--off-white);
    padding-top: var(--header-height);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Container for centering content */
.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--spacing-medium);
}

/* Typography */
h1, h2, h3 {
    color: var(--primary-red);
    margin-bottom: 0.75em;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.01em;
}

h1 {
    font-size: 2.8rem;
}

h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1.5em;
    position: relative;
    padding-bottom: 0.5em;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--light-red);
    border-radius: 2px;
}

p {
    margin-bottom: 1.2em;
    color: var(--text-secondary);
}

strong {
    color: var(--text-primary);
    font-weight: 600;
}

a {
    color: var(--dark-red);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

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

/* Main Content Layout */
main {
    flex-grow: 1;
    padding-top: var(--spacing-xlarge);
}

section {
    padding: var(--spacing-xlarge) 0;
    margin-bottom: var(--spacing-large);
    border-radius: var(--border-radius);
    background-color: var(--white);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* Default section background */
.cat-info,
.gallery {
    background-color: var(--white);
}

/* Contact section background */
.contact-info {
    background-color: var(--light-red);
    color: var(--text-on-light-red);
    text-align: center;
    padding: 40px 20px;
}

.contact-info h2 {
    color: var(--white);
}

.contact-info h2::after {
    background-color: var(--white);
}

.contact-info p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 25px;
    color: var(--text-on-light-red);
}

.contact-info .accent {
    color: var(--white);
    font-weight: 600;
}

.contact-info .icon-padding {
    color: var(--white);
}

.contact-info strong {
    color: var(--white);
    font-weight: 600;
    margin-right: 5px;
}

/* Icon padding helper */
.icon-padding {
    margin-right: 8px;
    color: var(--primary-red);
    width: 1.2em;
    text-align: center;
}

/* Language transition effect */
.lang-transition {
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

/* Navigation link styles */
.nav-link {
    text-decoration: none;
    font-weight: 600;
    background-color: var(--white);
    color: var(--primary-red);
    padding: 8px 18px;
    border-radius: var(--border-radius);
    border: 2px solid var(--primary-red);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: inline-block;
    transition: color var(--transition-speed) ease, 
                background-color var(--transition-speed) ease, 
                border-color var(--transition-speed) ease, 
                transform var(--transition-speed) ease, 
                box-shadow var(--transition-speed) ease;
}

.nav-link:hover {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
    color: var(--white);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Logo link styles */
.logo-link {
    text-decoration: none;
    color: inherit;
}

.logo-link:hover {
    text-decoration: none;
    color: inherit;
}

.logo-link h1 {
    margin-bottom: 0;
}

/* Cat Info Section */
.cat-info {
    padding-top: 60px;
    margin-bottom: 40px;
    min-height: 500px; /* Reserve space to prevent layout shift */
}

.cat-info .info-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
    align-items: start;
    margin-bottom: 30px;
    min-height: 400px; /* Reserve vertical space */
}

.cat-info .main-photo {
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    height: auto;
    max-width: 500px;
    border: 4px solid var(--white);
    display: block;
    aspect-ratio: 5/4; /* Match image dimensions 500/400 */
    object-fit: cover;
    max-height: 450px;
}

.cat-info .main-photo:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.cat-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cat-info ul li {
    padding: 12px 0;
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    align-items: center;
    font-size: 1rem;
    transition: background-color var(--transition-speed) ease;
}

.cat-info ul li:last-child {
    border-bottom: none;
}

.cat-info ul li:hover {
    background-color: #fdfdfd;
}

.cat-info ul li strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Spacer for proper spacing in flexbox */
.spacer {
    display: inline-block;
    width: 10px;
}

.dynamic-content {
    display: inline-block;
}

.cat-info .description {
    margin-top: 20px;
    padding: 20px;
    background-color: var(--light-gray);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-red);
}

.cat-info .description p {
    margin-bottom: 0;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Gallery Section */
.gallery {
    margin-bottom: 40px;
    min-height: 300px; /* Reserve space to prevent layout shift */
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 30px;
    min-height: 250px; /* Reserve vertical space */
}

.gallery-grid img {
    border-radius: var(--border-radius);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
    width: 100%;
    height: auto;
    aspect-ratio: 6/5; /* Match image dimensions 300/250 */
    object-fit: cover;
    display: block;
    cursor: pointer;
    border: 3px solid var(--white);
}

/* Applying random tilt */
.gallery-grid img:nth-child(4n+1) { transform: rotate(-2deg); }
.gallery-grid img:nth-child(4n+2) { transform: rotate(1.5deg); }
.gallery-grid img:nth-child(4n+3) { transform: rotate(2.5deg); }
.gallery-grid img:nth-child(4n+4) { transform: rotate(-1deg); }

.gallery-grid img:hover {
    transform: scale(1.08) rotate(0deg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 10;
    position: relative;
    filter: brightness(1.05);
}

/* Contact buttons */
.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.contact-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    background-color: var(--white);
    color: var(--primary-red);
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid var(--primary-red);
    transition: background-color var(--transition-speed) ease, 
                color var(--transition-speed) ease, 
                transform var(--transition-speed) ease, 
                border-color var(--transition-speed) ease;
}

.contact-button:hover {
    background-color: var(--primary-red);
    color: var(--white);
    transform: translateY(-3px);
    text-decoration: none;
    border-color: var(--primary-red);
}

.contact-button i {
    margin-right: 8px;
}

.contact-info p:last-of-type {
    margin-top: 30px;
    font-style: italic;
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    transform: translateZ(0); /* Force hardware acceleration */
    will-change: opacity; /* Hint to browser for optimization */
}

.lightbox.visible {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    margin: auto;
    display: block;
    object-fit: contain;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
    border: 3px solid var(--white);
    border-radius: 4px;
    animation: zoom 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform: translateZ(0); /* Force hardware acceleration */
    will-change: transform, opacity; /* Hint to browser for optimization */
    transition: opacity 0.3s ease, filter 0.3s ease;
}

@keyframes zoom {
    from {transform: scale(0.95); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

.close-button {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--light-gray);
    font-size: 40px;
    font-weight: bold;
    transition: color 0.2s;
    cursor: pointer;
    z-index: 10000;
}

.close-button:hover,
.close-button:focus {
    color: var(--white);
    text-decoration: none;
}

/* Mobile improvements for lightbox */
@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95%;
        max-height: 80%;
    }
    
    .close-button {
        top: 15px;
        right: 15px;
        font-size: 35px;
    }
}

@media (max-width: 480px) {
    .lightbox-content {
        max-width: 98%;
        max-height: 75%;
        border-width: 2px;
    }
    
    .close-button {
        top: 10px;
        right: 10px;
        font-size: 30px;
    }
}

/* Animation for sections */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Timeline Section */
.timeline-section {
    background-color: var(--white);
    padding: 60px 0;
    overflow-x: hidden;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 30px auto;
    padding: 40px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background-color: var(--light-gray);
    border-radius: 2px;
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    width: calc(50% - 40px);
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    cursor: pointer;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 20px;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: calc(50% + 40px);
    padding-left: 20px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    top: 5px;
    width: 24px;
    height: 24px;
    background-color: var(--white);
    border: 4px solid var(--primary-red);
    border-radius: 50%;
    z-index: 1;
    transform: translateX(-50%); 
}

.timeline-item:nth-child(odd) .timeline-dot {
    left: calc(100% + 40px);
    right: auto;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -40px;
    right: auto;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 15px;
    width: 0;
    height: 0;
    border-style: solid;
    z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-content::before {
    right: -10px;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent var(--off-white);
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -10px;
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--off-white) transparent transparent;
}

.timeline-content {
    position: relative;
    background-color: var(--off-white);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: 1px solid var(--light-gray);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.timeline-content:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

/* Timeline collapse/expand styling */
.timeline-header {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
}

.timeline-header::after {
    content: '';
    position: absolute;
    bottom: -12px;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--primary-red);
    border-bottom: 2px solid var(--primary-red);
    transition: transform 0.3s ease;
}

/* Position arrow on the right for left-side (odd) items */
.timeline-item:nth-child(odd) .timeline-header::after {
    right: 0;
    transform: rotate(45deg);
}

/* Position arrow on the left for right-side (even) items */
.timeline-item:nth-child(even) .timeline-header::after {
    left: 0;
    transform: rotate(45deg);
}

/* Rotate arrow for expanded state */
.timeline-item:not(.collapsed) .timeline-header::after {
    transform: rotate(-135deg);
}

.timeline-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), padding-top 0.3s ease;
    padding-top: 0;
    margin-top: 20px; /* Add space for the arrow */
}

.timeline-item:not(.collapsed) .timeline-body {
    /* max-height is now set dynamically via JavaScript */
    padding-top: 12px;
    overflow: visible; /* Allow content to be fully visible when fully expanded */
}

.timeline-content h3 {
    margin-top: 0;
    margin-bottom: 0.5em;
    color: var(--primary-red);
    font-size: 1.3rem;
}

.timeline-item:nth-child(odd) .timeline-content h3 {
    text-align: right;
}
.timeline-item:nth-child(even) .timeline-content h3 {
    text-align: left;
}

.timeline-date {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5em;
    font-weight: 600;
}

.timeline-item:nth-child(odd) .timeline-date {
    text-align: right;
}
.timeline-item:nth-child(even) .timeline-date {
    text-align: left;
}

.timeline-content p {
    margin-bottom: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.timeline-item:nth-child(odd) .timeline-content p {
    text-align: right;
}
.timeline-item:nth-child(even) .timeline-content p {
    text-align: left;
}

/* Contact Form Styles */
.contact-form-container {
    margin-top: 40px;
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

.contact-form-container h3 {
    color: var(--white);
    text-align: center;
    margin-bottom: 1.5em;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    color: var(--text-primary);
    background-color: var(--white);
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.2);
}

/* Invalid input styling */
.form-group input.invalid,
.form-group textarea.invalid {
    border-color: #d32f2f;
    background-color: rgba(211, 47, 47, 0.05);
}

.form-group input.invalid:focus,
.form-group textarea.invalid:focus {
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.2);
}

/* Only show validation styling when user has interacted with field */
.form-group input:invalid:not(:focus):not(:placeholder-shown) {
    background-color: rgba(211, 47, 47, 0.05);
}

.form-group textarea {
    width: 100%;
    min-height: 150px;
    padding: 12px 15px;
    resize: vertical;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-primary);
    background-color: var(--white);
}

.form-submit-button {
    background-color: var(--primary-red);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    padding: 12px 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color var(--transition-speed) ease;
    display: block;
    width: 100%;
    margin-top: 10px;
}

.form-submit-button:hover {
    background-color: var(--dark-red);
}

#form-status {
    margin-top: 15px;
    text-align: center;
    font-weight: 600;
    min-height: 1.2em;
}

#form-status.success {
    color: #2E7D32;
    background-color: #E8F5E9;
    padding: 10px;
    border-radius: var(--border-radius);
}

#form-status.error {
    color: var(--dark-red);
    background-color: #FFEBEE;
    padding: 10px;
    border-radius: var(--border-radius);
}

/* Accessibility focus styles */
.nav-link:focus {
    outline: 2px solid var(--primary-red);
    outline-offset: 2px;
}

.contact-button:focus {
    background-color: var(--primary-red);
    color: var(--white);
    transform: translateY(-3px);
    text-decoration: none;
    border-color: var(--primary-red);
    outline: none;
}

.gallery-grid img:focus {
    outline: 3px solid var(--primary-red);
    outline-offset: 3px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.timeline-content:focus-within {
    outline: 2px solid var(--primary-red);
    outline-offset: 2px;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

footer .footer-links a:focus {
    color: var(--white); 
    text-decoration: none;
    outline: 1px dotted var(--white);
    outline-offset: 2px;
}

footer .language-switcher .lang-link:focus {
    text-decoration: none;
    outline: 1px dotted var(--white);
    outline-offset: 1px;
}

footer .language-switcher .lang-link.active:focus {
    color: var(--primary-red);
}

.cookie-btn:focus {
   outline-offset: 1px;
   outline: 2px solid var(--white);
}

.accept-btn:focus {
    background-color: var(--dark-red);
}

.reject-btn:focus {
    background-color: var(--dark-gray);
    color: var(--white);
}

/* Responsive styles */
@media (max-width: 768px) {
    :root {
        --header-height: auto;
    }
    
    body {
        padding-top: 80px;
    }
    
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.7rem; margin-bottom: 1em; }
    
    main {
        padding-top: 20px;
        padding-bottom: 40px;
    }
    
    section { padding: 30px 0; }
    .container { width: 95%; }
    
    .cat-info .info-container {
        grid-template-columns: 1fr;
    }
    
    .cat-info .main-photo {
        max-height: 350px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .gallery-grid img {
        height: 180px;
    }
    
    .contact-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-button {
        width: 80%;
        max-width: 300px;
    }
    
    /* Timeline responsive */
    .timeline::before {
        left: 18px !important;
        transform: translateX(0) !important;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 60px;
        padding-right: 0;
        left: 0 !important;
        text-align: left !important;
    }
    
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0;
        padding-left: 60px;
        padding-right: 0;
        text-align: left;
    }
    
    .timeline-dot {
        left: 18px !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        margin-left: 0 !important;
    }
    
    .timeline-content::before {
        display: none;
    }
    
    .timeline-item:nth-child(odd) .timeline-content h3,
    .timeline-item:nth-child(even) .timeline-content h3,
    .timeline-item:nth-child(odd) .timeline-date,
    .timeline-item:nth-child(even) .timeline-date,
    .timeline-item:nth-child(odd) .timeline-content p,
    .timeline-item:nth-child(even) .timeline-content p {
        text-align: left;
    }
    
    .timeline-item:nth-child(odd) .timeline-header::after,
    .timeline-item:nth-child(even) .timeline-header::after {
        right: 0;
        left: auto;
    }
    
    .timeline-item:not(.collapsed) .timeline-header::after {
        transform: rotate(-135deg);
    }
    
    .form-submit-button {
        margin-left: auto;
        margin-right: auto;
        width: 80%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    
    .gallery-grid {
        grid-template-columns: repeat(1, 1fr);
    }
    
    .gallery-grid img {
        height: 220px;
    }
    
    .contact-button {
        width: 90%;
    }
    
    /* Timeline smallest screens */
    .timeline::before {
        left: 13px !important;
    }
    
    .timeline-item,
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        padding-left: 45px;
    }
    
    .timeline-dot {
        left: 13px !important;
        width: 20px !important;
        height: 20px !important;
    }
    
    .timeline-content h3 { font-size: 1.1rem; }
    .timeline-date { font-size: 0.8rem; }
    .timeline-content p { font-size: 0.9rem; }
    
    .timeline-item:nth-child(odd) .timeline-header::after,
    .timeline-item:nth-child(even) .timeline-header::after {
        right: 0;
        left: auto;
    }
    
    .timeline-item:not(.collapsed) .timeline-header::after {
        transform: rotate(-135deg);
    }
    
    .form-submit-button {
        margin-left: auto;
        margin-right: auto;
        width: 90%;
    }
}

/* 404 Page Styles */
.error-section {
    text-align: center;
    padding: 60px 0;
    min-height: calc(100vh - var(--header-height) - var(--footer-height));
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-section h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-red);
}

.error-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.error-actions {
    margin-top: 2rem;
}

.error-actions .nav-link {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1.1rem;
}

/* Form labels and text in the contact section */
.contact-form-container h3,
.contact-form-container label,
.form-group label {
    color: var(--white);
}

.contact-form-container a,
.cookie-banner a {
    color: var(--white);
    text-decoration: underline;
}

/* Content section styling (for privacy policy, cookies, impressum) */
.content-section {
    background-color: var(--white);
    padding: 40px 0;
}

.content-section ul {
    padding-left: 40px; /* Proper indentation for list items */
    margin-bottom: 20px;
}

.content-section ul li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.content-section h3 {
    margin-top: 30px;
    color: var(--primary-red);
}

/* Lightbox enhancements for progressive loading */
.lightbox.loading .lightbox-content {
    opacity: 0.6;
    filter: blur(2px);
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.lightbox.preview-loaded .lightbox-content {
    opacity: 0.8;
    filter: blur(1px);
}

.lightbox.full-loaded .lightbox-content {
    opacity: 1;
    filter: blur(0);
}

/* Add fade transition between image qualities */
.lightbox-content {
    transition: opacity 0.3s ease, filter 0.3s ease;
}

/* Lightbox Styling */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.visible {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

/* Loading indicator for lightbox */
.lightbox-modal.loading .lightbox-content::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    margin-left: -20px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    animation: spin 1s linear infinite;
    z-index: 10;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
}

/* Download Page Styles - Enhanced */
.download-section {
    padding: 60px 0;
    background-color: var(--off-white);
}

.pdf-container {
    display: flex;
    background: linear-gradient(to bottom right, var(--white), var(--off-white));
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 40px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pdf-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.pdf-preview {
    flex: 1;
    position: relative;
    min-height: 400px;
    overflow: hidden;
    border-right: 1px solid var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--white);
}

.pdf-preview a {
    display: block;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-preview img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.4s ease;
    border-radius: 3px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.pdf-preview:hover img {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.zoom-indicator {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--white);
    padding: 10px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    opacity: 0.8;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.zoom-indicator i {
    margin-right: 8px;
    font-size: 1rem;
}

.pdf-preview:hover .zoom-indicator {
    opacity: 1;
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pdf-info {
    flex: 1;
    padding: 40px;
    background-color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pdf-info h3 {
    color: var(--primary-red);
    margin-bottom: 20px;
    font-size: 1.8rem;
    position: relative;
    padding-bottom: 12px;
}

.pdf-info h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--light-red);
    border-radius: 2px;
}

.pdf-info p {
    margin-bottom: 25px;
    font-size: 1.05rem;
    line-height: 1.6;
}

.pdf-details {
    display: flex;
    flex-wrap: wrap;
    margin: 25px 0;
    gap: 20px;
    background-color: var(--light-gray);
    padding: 20px;
    border-radius: var(--border-radius);
}

.pdf-detail {
    display: flex;
    align-items: center;
    margin-right: 25px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.pdf-detail i {
    margin-right: 10px;
    color: var(--primary-red);
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.download-button {
    display: inline-flex;
    align-items: center;
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    color: var(--white);
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 15px;
    box-shadow: 0 6px 15px rgba(229, 57, 53, 0.3);
}

.download-button:hover {
    background: linear-gradient(135deg, var(--dark-red) 0%, var(--primary-red) 100%);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(229, 57, 53, 0.4);
    text-decoration: none;
}

.download-button i {
    margin-right: 10px;
    font-size: 1.1rem;
}

.download-instructions {
    background-color: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.download-instructions h3 {
    margin-bottom: 25px;
    color: var(--primary-red);
    font-size: 1.5rem;
    position: relative;
    padding-bottom: 12px;
    text-align: center;
}

.download-instructions h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--light-red);
    border-radius: 2px;
}

.download-instructions ol {
    padding-left: 20px;
    counter-reset: item;
    list-style: none;
}

.download-instructions li {
    margin-bottom: 15px;
    color: var(--text-secondary);
    position: relative;
    padding-left: 35px;
    counter-increment: item;
    font-size: 1.05rem;
    line-height: 1.6;
}

.download-instructions li::before {
    content: counter(item);
    background-color: var(--primary-red);
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 0;
    top: 5px;
}

/* Lightbox Styles for PDF Preview */
#flyer-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    backdrop-filter: blur(5px);
}

#flyer-lightbox.active {
    opacity: 1;
    visibility: visible;
}

#flyer-lightbox .lightbox-content {
    background-color: var(--white);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: lightboxFadeIn 0.4s ease forwards;
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    border-bottom: 1px solid var(--medium-gray);
    background-color: var(--light-gray);
}

.lightbox-header h3 {
    margin-bottom: 0;
    font-size: 1.3rem;
    color: var(--dark-gray);
}

.lightbox-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--medium-dark-gray);
    transition: color 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.lightbox-close:hover {
    color: var(--primary-red);
    background-color: rgba(0, 0, 0, 0.05);
    transform: rotate(90deg);
}

.lightbox-body {
    padding: 30px;
    overflow-y: auto;
    text-align: center;
    flex-grow: 1;
    background-color: var(--off-white);
}

.lightbox-body img {
    max-width: 100%;
    max-height: 65vh;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

.lightbox-footer {
    padding: 18px 25px;
    border-top: 1px solid var(--medium-gray);
    text-align: right;
    background-color: var(--light-gray);
}

.no-scroll {
    overflow: hidden;
}

/* Media queries for download page responsiveness */
@media (max-width: 768px) {
    .pdf-container {
        flex-direction: column;
    }

    .pdf-preview {
        min-height: 300px;
        border-right: none;
        border-bottom: 1px solid var(--light-gray);
    }

    .pdf-info {
        padding: 30px;
    }

    .download-instructions {
        padding: 30px;
    }
    
    .pdf-info h3, .download-instructions h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .pdf-details {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }

    .pdf-detail {
        margin-right: 0;
    }

    .download-button {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }

    .lightbox-header h3 {
        font-size: 1.1rem;
    }
    
    .pdf-info {
        padding: 25px;
    }
    
    .download-instructions {
        padding: 25px;
    }
    
    .pdf-info h3, .download-instructions h3 {
        font-size: 1.3rem;
    }
    
    .lightbox-body {
        padding: 20px;
    }
}

/* Blog Page Styles - Enhanced Colors */
.blog-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f2f3 100%);
}

/* Pinned Post */
.blog-pinned-post {
    background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid var(--primary-red);
    overflow: hidden;
    position: relative;
}

.blog-pinned-post::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle at top right, rgba(229, 57, 53, 0.05) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.blog-pinned-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.blog-pinned-header {
    padding: 25px 30px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: linear-gradient(to right, rgba(229, 57, 53, 0.03) 0%, transparent 100%);
    position: relative;
    z-index: 1;
}

.blog-pinned-header h3 {
    margin: 0;
    color: var(--primary-red);
    font-size: 1.6rem;
    background: linear-gradient(90deg, var(--primary-red) 0%, var(--dark-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.blog-pinned-content {
    padding: 25px 30px 30px;
    position: relative;
    z-index: 1;
}

.blog-pinned-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 25px;
    color: var(--text-secondary);
}

.blog-badge {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(229, 57, 53, 0.3);
}

/* Money Summary */
.blog-money-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.04) 100%);
    border-radius: var(--border-radius);
    padding: 25px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.blog-money-item {
    text-align: center;
    padding: 25px 20px;
    background-color: var(--white);
    border-radius: var(--border-radius-small);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.blog-money-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-red) 0%, var(--dark-red) 100%);
    opacity: 0.7;
}

.blog-money-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

.blog-money-item h4 {
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.blog-money-amount {
    display: block;
    background: linear-gradient(90deg, var(--primary-red) 0%, var(--dark-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    font-size: 1.8rem;
    font-weight: 700;
}

/* Blog Posts */
.blog-posts {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.blog-post {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    position: relative;
}

.blog-post.visible {
    opacity: 1;
    transform: translateY(0);
}

.blog-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.blog-post-header {
    padding: 20px 25px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: linear-gradient(to right, #f7f7f7 0%, #f0f0f0 100%);
}

.blog-post-header h3 {
    margin: 0 0 10px;
    color: var(--text-primary);
    font-size: 1.3rem;
}

.blog-post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.blog-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
}

.blog-date::before {
    content: '\f073';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 5px;
    color: var(--primary-red);
}

.blog-post-content {
    padding: 25px;
}

.blog-post-content p {
    margin-bottom: 20px;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Blog Expenses */
.blog-expenses {
    background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 100%);
    border-radius: var(--border-radius-small);
    padding: 20px;
    margin-top: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.blog-expenses h4 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.1rem;
    position: relative;
    padding-bottom: 10px;
}

.blog-expenses h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-red) 0%, var(--dark-red) 100%);
    border-radius: 2px;
}

.blog-expenses ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-expenses li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
    align-items: center;
}

.blog-expenses li:last-child {
    border-bottom: none;
}

.expense-description {
    flex: 1;
    color: var(--text-secondary);
}

.expense-amount {
    font-weight: 600;
    background: linear-gradient(90deg, var(--primary-red) 0%, var(--dark-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    margin-left: 15px;
    padding: 4px 10px;
    border-radius: 4px;
    background-color: rgba(229, 57, 53, 0.05);
}

/* Blog Post Pinned */
.blog-post-pinned {
    border-left: 4px solid var(--primary-red);
    background: linear-gradient(to right, rgba(229, 57, 53, 0.02) 0%, rgba(255, 255, 255, 1) 50%);
}

.blog-post-pinned .blog-post-header {
    background: linear-gradient(to right, rgba(229, 57, 53, 0.05) 0%, rgba(240, 240, 240, 0.5) 100%);
}

/* Responsive styles for blog */
@media (max-width: 768px) {
    .blog-money-summary {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .blog-pinned-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .blog-pinned-header h3 {
        margin-bottom: 10px;
    }
    
    .blog-pinned-content, 
    .blog-pinned-header {
        padding: 20px;
    }
    
    /* Fix for expenses list on mobile */
    .blog-expenses li {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 0;
    }
    
    .expense-description {
        width: 100%;
        margin-bottom: 5px;
        font-size: 0.95rem;
    }
    
    .expense-amount {
        align-self: flex-start;
        margin-left: 0;
        margin-top: 5px;
    }
}

@media (max-width: 480px) {
    .blog-pinned-post,
    .blog-post {
        border-radius: 10px;
    }
    
    .blog-pinned-header h3 {
        font-size: 1.3rem;
    }
    
    .blog-post-header h3 {
        font-size: 1.1rem;
    }
    
    .blog-money-amount {
        font-size: 1.5rem;
    }
    
    .blog-expenses {
        padding: 15px;
    }
    
    /* Additional mobile-specific styling for expenses */
    .expense-description {
        font-size: 0.9rem;
    }
    
    .expense-amount {
        font-size: 0.95rem;
        padding: 3px 8px;
    }
}