/*! Näh- und Stickarbeiten Website | MIT License */

/* Basis-Styles */
:root {
    --brand-color: #0066cc;
    --brand-color-light: #4d94ff;
    --brand-color-dark: #004d99;
    --text-color: #333;
    --background-color: #fff;
    --background-no-item: lightgray;
    --header-background-color: lightgray;
    --footer-background: lightgray;
    --border-color: #e0e0e0;
    --spacing-sm: 0.5rem;
    --spacing: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --border-radius: 4px;
    --container-max-width: 1200px;
}

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

html {
    font-size: 16px;
    line-height: 1.5;
    font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
}

body {
    background-color: var(--background-color);
}

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

a {
    color: var(--brand-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover, a:focus {
    color: var(--brand-color-dark);
    text-decoration: underline;
}

ul {
    list-style: none;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--spacing);
}

.container.static {
    hyphens: auto;
}

/* Header */
.main-header {
    background-color: var(--header-background-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: var(--spacing) 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing) 0;
}

.logo-title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing);
    width: 100%;
}

.logo-img {
    height: 50px;
    margin-right: var(--spacing);
}

.site-title {
    font-size: 1.5rem;
    color: var(--brand-color);
    font-weight: 600;
    margin: 0;
}

.no-item {
    padding-top:25px;
    padding-bottom: 25px;
    width: 100%;
    text-align: center;
    background: var(--background-no-item);
    font-weight: bold;
    color: var(--brand-color-dark);
    border: 1px solid var(--brand-color-dark);
    border-radius: 5px;
}

/* Hamburger Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 110;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--brand-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

nav {
    width: 100%;
}

nav ul {
    display: flex;
    gap: var(--spacing-lg);
    justify-content: center;
}

nav ul li a {
    color: var(--text-color);
    font-weight: 500;
    padding: var(--spacing-sm) 0;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--brand-color);
    transition: width 0.3s ease;
}

nav ul li a:hover::after,
nav ul li a:focus::after {
    width: 100%;
}

/* Main Content */
main {
    padding: var(--spacing-xl) 0;
    /* Add padding-bottom to account for footer on larger screens */
    padding-bottom: calc(var(--spacing-xl) + 150px);
}

section {
    margin-bottom: var(--spacing-xl);
}

h2 {
    font-size: 2rem;
    color: var(--brand-color);
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    padding: var(--spacing) 0;
}

.gallery-item {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.gallery-caption {
    padding: var(--spacing);
    text-align: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.gallery-caption.small {
    font-weight: normal;
    font-size: 0.9rem;
}

.gallery-description {
    margin-left: 5%;
    margin-right: 5%;
    margin-bottom: 5px;
    text-align: left;
    color: var(--brand-color-dark);
    font-weight: normal;
    font-size: 1rem;
    hyphens: auto;
}

.gallery-designer {
    display: flex;
    flex-wrap: wrap;
    margin-left: 20px;
    margin-right: 20px;
    margin-bottom: 15px;
}

.gallery-designer.label {
    margin-left: 0;
    color: var(--brand-color);
    font-weight: bold;
    margin-right: 5px;
}

.gallery-designer.value {
    margin-left: 0;
    color: var(--brand-color-dark);
    font-weight: normal;
    flex: 1;
}

/* E-Mail */
.e-mail:before {
    content: attr(data-website) "\0040" attr(data-user);
    unicode-bidi: bidi-override;
    direction: rtl;
}

h2.privacy  {
    text-align: left;
    font-size: 1.8rem;
}


/* Footer */
.main-footer {
    background-color: var(--footer-background);
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-sm) 0;
    position: fixed;
    bottom: 0;
    width: 100%
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
}

.footer-social h3 {
    font-size: 1.2rem;
    margin-bottom: var(--spacing);
    color: var(--brand-color);
}

.social-links {
    display: flex;
    gap: var(--spacing);
}

.social-links li a {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.social-links img {
    width: 24px;
    height: 24px;
}

.footer-links ul {
    display: flex;
    gap: var(--spacing-lg);
}

.footer-copyright {
    border-top: 1px solid var(--border-color);
    padding-top: var(--spacing);
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

/* Stile für Unterseiten wie Impressum und Datenschutz */
.page-content {
    padding: var(--spacing-xl) 0;
}

.content-wrapper {
    background-color: white;
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.content-wrapper h3 {
    color: var(--brand-color);
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
    font-size: 1.5rem;
}

.content-wrapper h3:first-child {
    margin-top: 0;
}

.content-wrapper h4 {
    margin-top: var(--spacing);
    margin-bottom: var(--spacing-sm);
    font-size: 1.2rem;
}

.content-wrapper p {
    margin-bottom: var(--spacing);
}

.content-wrapper ul,
.content-wrapper ol {
    margin-bottom: var(--spacing);
    padding-left: var(--spacing-lg);
}

.content-wrapper ul li,
.content-wrapper ol li {
    margin-bottom: var(--spacing-sm);
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    padding: var(--spacing-xl);
    box-sizing: border-box;
    overflow: auto;
}

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

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: var(--brand-color-light);
}

.lightbox-image {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    margin: 0 auto;
    border: 3px solid white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.lightbox-caption {
    color: white;
    margin-top: var(--spacing);
    font-size: 1.2rem;
    text-align: center;
}

.gallery-item img {
    cursor: pointer;
}

/* ====== LOGIN FORM STYLING ====== */
body.login-page {
    background-color: var(--background-color);
}

.login-container {
    max-width: 400px;
    margin: 80px auto;
    padding: 30px;
    border-radius: var(--border-radius);
    background-color: var(--header-background-color);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 1.8rem;
    color: var(--brand-color);
    margin-bottom: 5px;
}

.login-header p {
    color: var(--brand-color-dark);
}

.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.remember-me input {
    margin-right: 10px;
}

/* Base form elements */
.form-group {
    margin-bottom: 10px;;
}

.form-control {
    display: block;
    width: 100%;
    height: calc(2.25rem + 2px);
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--brand-color);
    background-color: var(--background-color);
    background-clip: padding-box;
    border: 1px solid var(--brand-color-dark);
    border-radius: var(--border-radius);
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.form-label {
    display: inline-block;
    margin-bottom: 0.5rem;
}

/* Form layout styling */
.form-group label {
    font-weight: 500;
}

.form-group small {
    color: var(--brand-color-light);
    font-size: 0.8rem;
    margin-top: 5px;
    display: block;
}

/* ====== BUTTON STYLING ====== */
.btn {
    display: inline-block;
    padding: 5px;
    font-weight: bold;
    font-size: 1.2rem;
    min-width: 150px;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out;
}

.btn-primary {
    color: var(--brand-color-light);
    background-color: var(--background-color);
    border-color: var(--brand-color-dark);
}

.btn-primary:hover {
    background-color: var(--brand-color-dark);
    border-color: var(--brand-color-dark);
}

.pagination-nav {
    margin-top: 2rem;
}

.pagination {
    display: flex;
    gap: 0.25rem;
    list-style: none;
    padding: 0;
}

.page-item {
    display: inline-block;
}

.page-link {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--brand-color-dark);
    color: #007bff;
    text-decoration: none;
    border-radius: 0.25rem;
    transition: background 0.2s;
}

.page-link:hover {
    background: #f1f1f1;
}

.page-item.active .page-link {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}


@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox.active {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s;
}

/* Helper classes */
.hidden,
[hidden] {
    display: none !important;
}

.visually-hidden {
    border: 0;
    clip: rect(0, 0, 0, 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
    clip: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    position: static;
    white-space: inherit;
    width: auto;
}

.invisible {
    visibility: hidden;
}

.clearfix::before,
.clearfix::after {
    content: "";
    display: table;
}

.clearfix::after {
    clear: both;
}

.footer-social-inline {
    display: flex;
    align-items: center;
    gap: var(--spacing);
    margin-top: 0;
}

.footer-social-inline h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--brand-color);
    white-space: nowrap;
}

.footer-social-inline .social-links {
    display: flex;
    gap: var(--spacing);
}

/* Responsive Styles */
@media only screen and (min-width: 768px) {
    .header-wrapper {
        flex-direction: row;
        justify-content: space-between;
    }

    .logo-title-container {
        margin-bottom: 0;
    }

    /* Hide burger menu on desktop */
    .menu-toggle {
        display: none;
    }

    /* Keep footer fixed on desktop */
    .main-footer {
        position: fixed;
    }

    /* Add padding for fixed footer */
    main {
        padding-bottom: calc(var(--spacing-xl) + 150px);
    }
}

@media only screen and (max-width: 767px) {
    /* Hamburger menu styles for mobile */
    .menu-toggle {
        display: flex;
        position: absolute;
        top: 20px;
        left: 20px;
    }

    .header-wrapper {
        flex-direction: column;
        position: relative;
    }

    .logo-title-container {
        justify-content: center;
        padding-left: 0;
    }

    nav {
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease;
    }

    nav.active {
        max-height: 300px;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        padding: var(--spacing) 0;
    }

    /* Footer is not fixed on mobile */
    .main-footer {
        position: static;
    }

    /* No need for extra padding on mobile since footer isn't fixed */
    main {
        padding-bottom: var(--spacing-xl);
    }

    .footer-content {
        flex-direction: column;
        gap: var(--spacing-lg);
    }

    .footer-links ul {
        justify-content: center;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media only screen and (max-width: 767px) {
    nav.pagination-nav {
        max-height: none !important;
        overflow: visible !important;
        display: block !important;
    }

    .pagination-wrapper {
        display: flex !important;
        justify-content: center !important;
        padding: 1rem 0;
        width: 100%;
        margin-top:-10%
    }

    .pagination {
        display: flex !important;
        flex-direction: row !important; /* <- das war's! */
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.4rem;
        padding: 0;
        margin: 0;
        width: 100%;
    }

    .page-item {
        display: inline-block;
    }

    .page-link {
        display: inline-block;
        padding: 0.5rem 0.75rem;
        font-size: 1rem;
        border: 1px solid var(--brand-color-dark);
        color: var(--brand-color);
        background-color: white;
        border-radius: 0.25rem;
        text-decoration: none;
        transition: background 0.3s ease;
    }

    .page-link:hover {
        background-color: var(--brand-color-light);
        color: white;
    }

    .page-item.active .page-link {
        background-color: var(--brand-color-dark);
        color: white;
    }
}


@media only screen and (max-width: 480px) {
    .footer-links ul {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing);
    }

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

/* Druck-Stile */
@media print {
    .main-header,
    .main-footer {
        display: none;
    }

    body {
        font-size: 12pt;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    a[href]::after {
        content: " (" attr(href) ")";
    }
}