/**
 * City Gallery - Site Header Widget Styles
 */

/* Header Styles */
.city-gallery-site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    background: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, padding, box-shadow;
}

/* Sticky Header - Shrunk State */
.city-gallery-site-header.sticky-shrunk {
    padding: 10px 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Body Offset für Fixed Header */
body {
    padding-top: 120px; /* Initial header height */
    transition: padding-top 0.3s ease;
}

body.header-shrunk {
    padding-top: 80px; /* Shrunk header height */
}

.city-gallery-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.city-gallery-header-logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.city-gallery-header-logo a {
    display: inline-block;
    line-height: 0;
}

.city-gallery-header-logo img {
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Logo Shrink Effect */
.city-gallery-site-header.sticky-shrunk .city-gallery-header-logo img {
    max-height: 50px;
    width: auto;
    height: auto;
}

/* Hauptmenü */
.city-gallery-main-menu {
    flex: 1;
    display: flex;
    justify-content: center;
    margin: 0 20px;
}

.city-gallery-main-menu ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
}

.city-gallery-main-menu ul li {
    margin: 0;
    padding: 0;
}

.city-gallery-main-menu ul li a {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: #F78C25; /* Orange wie im Screenshot */
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Menu Items Shrink Effect */
.city-gallery-site-header.sticky-shrunk .city-gallery-main-menu ul li a {
    padding: 8px 15px;
    font-size: 15px;
}

.city-gallery-main-menu ul li a:hover,
.city-gallery-main-menu ul li.current-menu-item a {
    color: #E67B14; /* Dunkleres Orange für Hover */
}

/* Responsives Menü */
.city-gallery-menu-mobile {
    display: none !important;
}

/* Hamburger Button - standardmäßig versteckt */
.city-gallery-menu-button {
    display: none;
}

/* Menü-Steuerung für Bildschirmgrößen */
@media screen and (max-width: 768px) {
    .city-gallery-main-menu {
        display: none !important;
    }

    .city-gallery-menu-button {
        display: flex !important;
    }
}

/* Social Media Icons */
.city-gallery-header-social {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 0 0 auto;
}

.city-gallery-header-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.city-gallery-header-social-link:hover {
    transform: translateY(-2px);
}

.city-gallery-header-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.city-gallery-header-social-icon i,
.city-gallery-header-social-icon svg {
    color: #333333;
    fill: #333333;
    font-size: 20px;
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}

.city-gallery-header-social-link:hover .city-gallery-header-social-icon i,
.city-gallery-header-social-link:hover .city-gallery-header-social-icon svg {
    color: #F78C25;
    fill: #F78C25;
}

/* Hamburger Menu Icon */
.city-gallery-menu-button {
    position: relative;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 1002; /* Höher als Dialog */
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.city-gallery-menu-button:hover {
    background-color: rgba(247, 140, 37, 0.1);
}

.city-gallery-hamburger-icon {
    width: 24px;
    height: 20px;
    position: relative;
}

.city-gallery-hamburger-icon span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background-color: #333333; /* Schwarz statt Orange */
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}

/* Hamburger-Icon Positionen */
.city-gallery-hamburger-icon span:nth-child(1) {
    top: 0;
}

.city-gallery-hamburger-icon span:nth-child(2) {
    top: 8px;
}

.city-gallery-hamburger-icon span:nth-child(3) {
    top: 16px;
}

/* Animation für das Hamburger-Icon wenn Dialog geöffnet ist */
.city-gallery-menu-button.active .city-gallery-hamburger-icon span:nth-child(1) {
    top: 8px;
    transform: rotate(45deg);
}

.city-gallery-menu-button.active .city-gallery-hamburger-icon span:nth-child(2) {
    opacity: 0;
    transform: rotate(45deg);
}

.city-gallery-menu-button.active .city-gallery-hamburger-icon span:nth-child(3) {
    top: 8px;
    transform: rotate(-45deg);
}

body.city-gallery-dialog-open .city-gallery-hamburger-icon span:nth-child(1) {
    top: 8px;
    transform: rotate(45deg);
}

body.city-gallery-dialog-open .city-gallery-hamburger-icon span:nth-child(2) {
    opacity: 0;
}

body.city-gallery-dialog-open .city-gallery-hamburger-icon span:nth-child(3) {
    top: 8px;
    transform: rotate(-45deg);
}

/* Dialog */
.city-gallery-dialog {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    height: 100vh;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    z-index: 1001; /* Höher als Sticky Header */
    padding: 0;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.city-gallery-dialog.show {
    transform: translateX(0);
}

/* Dialog Header mit Logo */
.city-gallery-dialog-header {
    background: linear-gradient(135deg, #264189 0%, #1a2f6b 100%);
    padding: 30px 25px;
    text-align: center;
    position: relative;
    box-shadow: 0 2px 10px rgba(38, 65, 137, 0.2);
}

.city-gallery-dialog-logo {
    max-height: 60px;
    width: auto;
    margin-bottom: 15px;
    filter: brightness(0) invert(1); /* Logo weiß machen */
}

.city-gallery-dialog-brand {
    color: #ffffff;
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.9;
}

.city-gallery-dialog-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #ffffff;
    cursor: pointer;
    z-index: 2;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.city-gallery-dialog-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.city-gallery-dialog-title {
    font-size: 28px;
    font-weight: 700;
    margin: 30px 25px 20px 25px;
    text-align: left;
    line-height: 1.2;
    font-family: var(--custom-font-headings, 'CeraPro', sans-serif);
}

/* Theme-Style: Erster Teil schwarz, zweiter Teil orange */
.city-gallery-dialog-title-blue {
    color: #333333;
    font-weight: 700;
}

.city-gallery-dialog-title-orange {
    color: #F78C25;
    font-weight: 700;
}

.city-gallery-dialog-content {
    padding: 20px 25px 30px;
    display: flex;
    flex-direction: column;
}

.city-gallery-dialog-item {
    color: #333333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 15px 20px;
    margin-bottom: 8px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: block;
    font-family: var(--custom-font-family, 'CeraPro', sans-serif);
}

.city-gallery-dialog-item:hover {
    background: linear-gradient(135deg, #F78C25, #FFD200) !important;
    color: #ffffff !important;
    transform: translateX(8px);
    box-shadow: 0 4px 15px rgba(247, 140, 37, 0.3);
    border-color: #F78C25;
}

/* Dialog Animation Stagger Effect */
.city-gallery-dialog.show .city-gallery-dialog-item {
    animation: slideInFromRight 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    opacity: 0;
    transform: translateX(20px);
}

.city-gallery-dialog.show .city-gallery-dialog-item:nth-child(1) { animation-delay: 0.1s; }
.city-gallery-dialog.show .city-gallery-dialog-item:nth-child(2) { animation-delay: 0.15s; }
.city-gallery-dialog.show .city-gallery-dialog-item:nth-child(3) { animation-delay: 0.2s; }
.city-gallery-dialog.show .city-gallery-dialog-item:nth-child(4) { animation-delay: 0.25s; }
.city-gallery-dialog.show .city-gallery-dialog-item:nth-child(5) { animation-delay: 0.3s; }
.city-gallery-dialog.show .city-gallery-dialog-item:nth-child(6) { animation-delay: 0.35s; }

@keyframes slideInFromRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Dialog Header Animation */
.city-gallery-dialog.show .city-gallery-dialog-header {
    animation: fadeInDown 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

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

.city-gallery-dialog-separator {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(38, 65, 137, 0.2), transparent);
    margin: 20px 0;
    width: 100%;
}

/* Dialog Social Icons */
.city-gallery-dialog-social {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.city-gallery-dialog-social-title {
    font-size: 14px;
    font-weight: 600;
    color: #666666;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.city-gallery-dialog-social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.city-gallery-dialog-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    color: #666666;
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.city-gallery-dialog-social-icon:hover {
    background: linear-gradient(135deg, #F78C25, #FFD200);
    color: #ffffff;
    border-color: #F78C25;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(247, 140, 37, 0.3);
}

.city-gallery-dialog-social-icon i,
.city-gallery-dialog-social-icon svg {
    width: 18px;
    height: 18px;
}

/* Dialog Overlay */
.city-gallery-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, rgba(38, 65, 137, 0.4), rgba(0, 0, 0, 0.6));
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.city-gallery-dialog-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Dialog Scroll-Styling */
.city-gallery-dialog::-webkit-scrollbar {
    width: 6px;
}

.city-gallery-dialog::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.city-gallery-dialog::-webkit-scrollbar-thumb {
    background: rgba(38, 65, 137, 0.3);
    border-radius: 3px;
}

.city-gallery-dialog::-webkit-scrollbar-thumb:hover {
    background: rgba(38, 65, 137, 0.5);
}

/* Body Class when Dialog is Open */
body.city-gallery-dialog-open {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 1024px) {
    .city-gallery-header-inner {
        flex-wrap: wrap;
    }

    .city-gallery-main-menu ul li a {
        font-size: 15px;
        padding: 8px 10px;
    }

    .city-gallery-header-logo img {
        max-height: 70px;
        width: auto;
        height: auto;
    }

    .city-gallery-site-header.sticky-shrunk .city-gallery-header-logo img {
        max-height: 45px;
        width: auto;
        height: auto;
    }

    /* Angepasste Body-Offsets für Tablet */
    body {
        padding-top: 100px;
    }

    body.header-shrunk {
        padding-top: 70px;
    }
}

@media (max-width: 768px) {
    .city-gallery-header-inner {
        justify-content: space-between;
    }

    .city-gallery-main-menu {
        display: none !important; /* Hauptmenü bei kleineren Auflösungen ausblenden */
    }

    .city-gallery-menu-mobile {
        display: block; /* Mobiles Menü anzeigen */
    }

    /* Mobile Dialog Anpassungen */
    .city-gallery-dialog {
        width: 320px;
        max-width: 90vw;
    }

    .city-gallery-dialog-header {
        padding: 25px 20px;
    }

    .city-gallery-dialog-logo {
        max-height: 45px;
        margin-bottom: 10px;
    }

    .city-gallery-dialog-brand {
        font-size: 12px;
    }

    .city-gallery-dialog-title {
        font-size: 20px;
        margin: 25px 20px 8px 20px;
    }

    .city-gallery-dialog-content {
        padding: 15px 20px 25px;
    }

    .city-gallery-dialog-item {
        font-size: 15px;
        padding: 12px 16px;
        margin-bottom: 6px;
    }

    .city-gallery-dialog-close {
        width: 28px;
        height: 28px;
        font-size: 16px;
        top: 15px;
        right: 15px;
    }

    /* Mobile Social Icons */
    .city-gallery-dialog-social-icons {
        gap: 12px;
    }

    .city-gallery-dialog-social-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .city-gallery-dialog-social-title {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .city-gallery-header-logo img {
        max-height: 50px;
        width: auto;
        height: auto;
    }

    .city-gallery-site-header.sticky-shrunk .city-gallery-header-logo img {
        max-height: 35px;
        width: auto;
        height: auto;
    }

    .city-gallery-header-social {
        gap: 10px;
    }

    .city-gallery-header-social-icon i,
    .city-gallery-header-social-icon svg {
        font-size: 18px;
        width: 18px;
        height: 18px;
    }

    /* Mobile Body-Offsets */
    body {
        padding-top: 80px;
    }

    body.header-shrunk {
        padding-top: 60px;
    }

    /* Mobile Sticky Header Anpassungen */
    .city-gallery-site-header {
        padding: 12px 0;
    }

    .city-gallery-site-header.sticky-shrunk {
        padding: 8px 0;
    }
}