/**
 * Seniorenhaus Lohne - Custom Style Sheet
 * Author: Frontend Expert / UX Designer
 */

/* ==========================================================================
   1. Design Variables & Global Rules
   ========================================================================== */
:root {
    --color-navy: #0F1929;
    --color-navy-muted: rgba(15, 25, 41, 0.8);
    --color-cream-bg: #F6F1ED;
    --color-cream-sticky: #f7f5e7;
    --color-accent: #F27253;
    --color-light-gray: #F4F0EC;

    --font-primary: 'Fira Sans', sans-serif;
    --transition-smooth: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    --transition-fast: all 0.2s ease;
}

.bg-accent {
    background-color: var(--color-accent) !important;
}

body {
    font-family: var(--font-primary) !important;
    background-color: var(--color-cream-bg);
    color: #333333;
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

/* Helper Utilities */
.font-weight-light {
    font-weight: 300 !important;
}

.font-weight-regular {
    font-weight: 400 !important;
}

.font-weight-medium {
    font-weight: 500 !important;
}

.font-weight-semibold {
    font-weight: 600 !important;
}

.font-weight-bold {
    font-weight: 700 !important;
}

.font-weight-extrabold {
    font-weight: 800 !important;
}

strong,
b {
    font-weight: 800 !important;
}

.text-navy {
    color: var(--color-navy) !important;
}

.text-navy-muted {
    color: var(--color-navy-muted) !important;
}

.text-accent {
    color: var(--color-accent) !important;
}

.bg-light-warm {
    background-color: var(--color-cream-bg) !important;
}

.bg-navy {
    background-color: var(--color-navy) !important;
}

.bg-light-cream {
    background-color: #FAF8F6 !important;
}

.section-padding {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
}

/* ==========================================================================
   2. Header & Navigation Styles
   ========================================================================== */
.main-header {
    background-color: var(--color-navy);
    border-bottom: 1px solid rgba(244, 240, 236, 0.1);
    transition: var(--transition-smooth);
    z-index: 1030;
}

.header-logo {
    max-height: 80px;
    /* Larger logo size */
    width: auto;
    transition: var(--transition-smooth);
}

.main-header.scrolled {
    background-color: var(--color-navy);
    /* Navigation stays dark navy blue */
    backdrop-filter: none;
    border-bottom: 1px solid rgba(244, 240, 236, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Header Text colors matching scroll state */
.main-header .nav-link {
    font-family: var(--font-primary);
    font-weight: 600;
    /* Bolder menu text */
    font-size: 1.6rem;
    /* Larger font size */
    color: var(--color-light-gray);
    padding: 8px 18px !important;
    position: relative;
    transition: var(--transition-smooth);
    display: inline-block;
}

.main-header.scrolled .nav-link {
    color: var(--color-light-gray);
    /* Keep links light gray */
}

/* Link active states and grow on hover */
.main-header .nav-link:hover {
    color: var(--color-accent) !important;
    transform: scale(1.12);
    /* Grows on hover, no underline */
}

.main-header .nav-link.active-link {
    color: var(--color-accent) !important;
    transform: scale(1.06);
}

.main-header.scrolled .nav-link:hover {
    color: var(--color-accent) !important;
}

/* Career Button */
.btn-career {
    font-family: var(--font-primary);
    font-size: 1.6rem;
    padding: 6px 18px !important;
    color: var(--color-navy) !important;
    background-color: var(--color-cream-bg);
    border: 1px solid var(--color-cream-bg);
    border-radius: 100px !important;
    /* Rounded corners (pill shape) */
    font-weight: 600;
    display: inline-block;
    transition: var(--transition-smooth);
}

.btn-career:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: white !important;
    transform: translateY(-2px) scale(1.06);
    /* Grows on hover */
    box-shadow: 0 4px 10px rgba(242, 114, 83, 0.2);
}

.main-header.scrolled .btn-career {
    background-color: var(--color-cream-bg);
    border-color: var(--color-cream-bg);
    color: var(--color-navy) !important;
    border-radius: 100px !important;
    /* Rounded corners (pill shape) */
}

.main-header.scrolled .btn-career:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: white !important;
    box-shadow: 0 4px 10px rgba(242, 114, 83, 0.2);
}

/* Mobile Toggler Hamburger styling */
.toggler-icon {
    display: block;
    width: 26px;
    height: 2px;
    background-color: var(--color-light-gray);
    margin-bottom: 6px;
    transition: var(--transition-smooth);
}

.toggler-icon:last-child {
    margin-bottom: 0;
}

.main-header.scrolled .toggler-icon {
    background-color: var(--color-light-gray);
}

/* Remove default focus outline/border/shadow from mobile toggler when clicked */
.navbar-toggler:focus,
.navbar-toggler:active,
.navbar-toggler:focus,
.navbar-toggler:active {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* Hamburger active animation */
#navbarToggler[aria-expanded="true"] .top-bar {
    transform: rotate(45deg) translate(6px, 6px);
}

#navbarToggler[aria-expanded="true"] .middle-bar {
    opacity: 0;
}

#navbarToggler[aria-expanded="true"] .bottom-bar {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ==========================================================================
   3. Hero Section Styles
   ========================================================================== */
.hero-section {
    position: relative;
    min-height: 85vh;
    background-image: url('../imgs/backgrounds/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 25, 41, 0.15);
    /* Overlay for copy contrast */
    z-index: 1;
}

.hero-title {
    font-size: 5.5rem;
    /* Larger Hero title font */
    line-height: 1.2;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

.hero-title,
.hero-title span {
    color: var(--color-navy) !important;
}

.hero-title strong.text-navy {
    text-shadow: none;
    /* No shadow for navy blue subtext */
}

/* Scroll indicator button animation */
.btn-hero-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--color-navy);
    /* Dark background matching original */
    border: 2px solid var(--color-navy);
    color: white;
    transition: var(--transition-smooth);
    animation: bounceIndicator 2.5s infinite;
}

.btn-hero-circle:hover {
    background-color: #3f444b;
    border-color: #3f444b;
    transform: scale(1.1);
}

.chevron-down-icon {
    display: inline-block;
    width: 35px;
    height: 35px;
    border-right: 4px solid white;
    border-bottom: 4px solid white;
    transform: rotate(45deg) translate(-6px, -6px);
}

@keyframes bounceIndicator {
    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* ==========================================================================
   4. Services (Leistungen)
   ========================================================================== */
.hover-zoom {
    transition: var(--transition-smooth);
}

.hover-zoom:hover {
    transform: scale(1.04);
}

.service-card-wrapper {
    background-color: white;
    border: 1px solid rgba(15, 25, 41, 0.08);
    box-shadow: 0 10px 30px rgba(15, 25, 41, 0.04) !important;
    border-radius: 0;
    overflow: hidden;
}

.service-card-wrapper .img-wrapper img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.service-content-block h3 {
    position: relative;
    padding-bottom: 12px;
}

.service-content-block h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--color-accent);
    border-radius: 0;
    /* Square indicator corner */
}

.custom-list-ticks {
    list-style: none;
}

.tick-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 8px;
    /* Small bullet square size */
    height: 8px;
    border-radius: 0;
    /* Square tick boxes */
    background-color: var(--color-accent);
    /* Coral bullet */
    color: transparent;
    flex-shrink: 0;
    margin-top: 8px;
    /* Alignment with line */
}

/* ==========================================================================
   5. Team Cards
   ========================================================================== */
.team-card {
    transition: var(--transition-smooth);
}

.avatar-wrap {
    width: 180px;
    /* Correct proportion size */
    height: 180px;
    border: 5px solid white;
    border-radius: 50% !important;
    /* Circular avatars match Soll-Zustand */
}

.team-contact-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.team-contact-link:hover {
    transform: scale(1.18);
    opacity: 0.85;
}

.icon-svg-lg {
    width: 28px;
    height: 28px;
}

/* ==========================================================================
   6. Kontakt, Steckbrief, & Map Section
   ========================================================================== */
.steckbrief-card-wrapper {
    background-color: white;
    border: 1px solid rgba(15, 25, 41, 0.08);
    box-shadow: 0 10px 30px rgba(15, 25, 41, 0.04) !important;
    border-radius: 0;
    overflow: hidden;
    border-left: 5px solid var(--color-accent);
}

.steckbrief-card-wrapper .img-wrapper img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.border-accent-subtle {
    border-bottom-color: rgba(242, 114, 83, 0.2) !important;
}

.map-container {
    height: 400px;
    position: relative;
    border: 5px solid white;
}

.map-iframe {
    width: 100%;
    height: 100%;
}

.contact-details-bar {
    border-top: none;
    transition: var(--transition-smooth);
}

.contact-details-bar address,
.contact-details-bar address span,
.contact-details-bar address strong {
    color: #000000 !important;
}

.contact-details-bar:hover {
    box-shadow: 0 10px 25px rgba(15, 25, 41, 0.05) !important;
}

.contact-bar-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.contact-bar-link:hover {
    transform: scale(1.18);
}

/* ==========================================================================
   7. Gallery Section
   ========================================================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px !important;
}

.gallery-item {
    cursor: pointer;
    aspect-ratio: 4 / 3;
    position: relative;
    overflow: hidden;
}

.gallery-item>img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 25, 41, 0.7);
    opacity: 0;
    transition: var(--transition-smooth);
}

.gallery-item:hover>img {
    transform: scale(1.08);
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.zoom-icon {
    width: 50px;
    height: 50px;
    transform: scale(0.7);
    opacity: 0.85;
    transition: var(--transition-smooth);
}

.gallery-item:hover .zoom-icon {
    transform: scale(1);
    opacity: 1;
}

/* ==========================================================================
   8. Footer Section
   ========================================================================== */
.back-to-top-footer-wrap {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -100%);
    z-index: 10;
}

.btn-back-to-top-footer {
    display: inline-block;
    background-color: var(--color-navy);
    color: white;
    text-decoration: none;
    padding: 8px 35px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 180px 180px 0 0;
    /* Rounded top, flat bottom */
    border: none;
    transition: var(--transition-smooth);
}

.footer-section {
    background-color: var(--color-navy);
    padding: 35px 0 35px 0;
    position: relative;
}

.footer-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
}

.copyright-text {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: max-content;
    white-space: nowrap;
}

.footer-link {
    transition: var(--transition-fast);
}

.footer-link:hover {
    color: var(--color-accent) !important;
    text-decoration: underline !important;
}

/* ==========================================================================
   9. Custom Image Lightbox
   ========================================================================== */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 25, 41, 0.96);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox-overlay.active {
    display: flex;
}

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

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 0;
    /* Square lightbox image */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    object-fit: contain;
    transform: scale(0.95);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.lightbox-overlay.active .lightbox-image {
    transform: scale(1);
    opacity: 1;
}

.lightbox-caption {
    color: var(--color-light-gray);
    margin-top: 15px;
    font-size: 1.1rem;
    font-weight: 500;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 45px;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.lightbox-close:hover {
    color: var(--color-accent);
    transform: scale(1.1);
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 35px;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.05);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.lightbox-arrow:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* ==========================================================================
   10. Scroll & Entrance Animations
   ========================================================================== */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.fade-in-up {
    transform: translateY(30px);
}

.fade-in-left {
    transform: translateX(-40px);
}

.fade-in-right {
    transform: translateX(40px);
}

/* When observed */
.animate-on-scroll.visible {
    opacity: 1;
    transform: translate(0) !important;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-400 {
    transition-delay: 0.4s;
}

.delay-600 {
    transition-delay: 0.6s;
}

/* ==========================================================================
   11. Custom Modals (Impressum & Datenschutz)
   ========================================================================== */
.custom-modal-content {
    background-color: var(--color-cream-bg);
    border: 2px solid var(--color-navy);
    border-radius: 0 !important;
    box-shadow: 0 15px 40px rgba(15, 25, 41, 0.3);
}

.custom-modal-header {
    background-color: var(--color-navy);
    color: white;
    border-bottom: 3px solid var(--color-accent);
    border-radius: 0 !important;
    padding: 1.5rem;
}

.custom-modal-header .modal-title {
    font-weight: 700;
    letter-spacing: 0.5px;
}

.custom-modal-header .btn-close {
    opacity: 0.8;
    transition: var(--transition-fast);
    border-radius: 0 !important;
}

.custom-modal-header .btn-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.custom-modal-body {
    padding: 2rem;
    max-height: 65vh;
    overflow-y: auto;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #333333;
}

/* Custom Scrollbar for Modal Body */
.custom-modal-body::-webkit-scrollbar {
    width: 6px;
}

.custom-modal-body::-webkit-scrollbar-track {
    background: rgba(15, 25, 41, 0.03);
}

.custom-modal-body::-webkit-scrollbar-thumb {
    background: var(--color-navy-muted);
}

.custom-modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--color-navy);
}

.custom-modal-body h4 {
    color: var(--color-navy);
    font-weight: 700;
    margin-top: 1.8rem;
    margin-bottom: 0.8rem;
    border-bottom: 1px solid rgba(15, 25, 41, 0.08);
    padding-bottom: 0.4rem;
}

.custom-modal-body h4:first-of-type {
    margin-top: 0;
}

.custom-modal-body p {
    margin-bottom: 1.2rem;
}

.custom-modal-body strong,
.custom-modal-body b {
    color: var(--color-navy);
}

.custom-modal-body a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-fast);
}

.custom-modal-body a:hover {
    color: var(--color-navy);
    text-decoration: underline;
}

.custom-modal-body ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.custom-modal-body ul li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.6rem;
}

.custom-modal-body ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.65rem;
    width: 6px;
    height: 6px;
    background-color: var(--color-accent);
}

.custom-modal-body hr {
    border-color: rgba(15, 25, 41, 0.1);
    margin: 2rem 0;
    opacity: 1;
}

.custom-modal-footer {
    background-color: var(--color-navy);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 !important;
    padding: 1.2rem 2rem;
}

.custom-modal-btn {
    background-color: var(--color-accent) !important;
    color: white !important;
    border: 2px solid var(--color-accent) !important;
    border-radius: 0 !important;
    font-weight: 600;
    padding: 8px 24px;
    letter-spacing: 0.5px;
    transition: var(--transition-smooth) !important;
}

.custom-modal-btn:hover {
    background-color: white !important;
    border-color: white !important;
    color: var(--color-navy) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

.footer-link:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* ==========================================================================
   12. Responsive Styles (Media Queries)
   ========================================================================== */

/* Viewports <= 991px (Mobile Navigation, Collapse and Grid adjustments) */
@media (max-width: 991px) {
    .btn-career {
        margin-top: 12px;
        text-align: center;
        display: block;
        width: 100%;
    }

    .navbar-collapse {
        background-color: var(--color-navy);
        padding: 20px;
        border-radius: 12px;
        margin-top: 15px;
        border: 1px solid rgba(255, 255, 255, 0.05);
    }

    .main-header.scrolled .navbar-collapse {
        background-color: var(--color-navy);
        border: 1px solid rgba(255, 255, 255, 0.05);
    }

    .main-header .nav-link {
        padding: 12px 16px !important;
    }

    .hero-title {
        font-size: 3.8rem;
    }

    .service-card-wrapper .img-wrapper {
        height: 320px !important;
        width: 100%;
    }

    .steckbrief-card-wrapper .img-wrapper {
        height: 320px !important;
        width: 100%;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px !important;
    }
}

/* Viewports <= 768px (Section Paddings & Lightbox Scaling) */
@media (max-width: 768px) {
    .section-padding {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .footer-container {
        flex-direction: column;
        justify-content: center;
        gap: 15px;
    }

    .copyright-text {
        position: static;
        transform: none;
        white-space: normal;
        margin-bottom: 10px;
    }

    .lightbox-arrow {
        width: 44px;
        height: 44px;
        font-size: 24px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }
}

/* Viewports <= 576px (Small mobile Hero and Gallery Grid) */
@media (max-width: 576px) {
    .hero-title {
        font-size: 2.6rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 8px !important;
    }
}