/* Custom CSS for Flexi Spitex */

/* Scroll animations */
.scroll-fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Card hover effects */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Gradient backgrounds */
.gradient-primary {
    background: linear-gradient(135deg, #2d5aa0 0%, #4c8af0 100%);
}

.gradient-secondary {
    background: linear-gradient(135deg, #4caf50 0%, #8bc34a 100%);
}

.gradient-accent {
    background: linear-gradient(135deg, #ff9800 0%, #ffb74d 100%);
}

/* Custom button styles */
.btn-primary {
    background-color: #2d5aa0;
    color: white;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #1e3d6f;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(45, 90, 160, 0.2);
}

.btn-secondary {
    background-color: #4caf50;
    color: white;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #388e3c;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(76, 175, 80, 0.2);
}

/* Section spacing */
.section-padding {
    padding-top: 80px;
    padding-bottom: 80px;
}

/* Hero section */
.hero {
    background: linear-gradient(rgba(46, 67, 100, 0.452), rgba(45, 89, 160, 0.356)), url('../images/pflege-zuerich.png') center/cover no-repeat;
    min-height: 80vh;
    display: flex;
    align-items: center;
    color: white;
}

/* Individual hero backgrounds for each page */
.hero.index-bg {
    background: linear-gradient(rgba(45, 89, 160, 0.349), rgba(45, 89, 160, 0.473)), url('../images/eincremen-spitex-zürich-lachen.jpg') center/cover no-repeat;
}

.hero.galerie-bg {
    background: linear-gradient(rgba(45, 89, 160, 0.349), rgba(45, 89, 160, 0.473)), url('../images/unterstützung-spitex-triemli-zürich.jpg') center/cover no-repeat;
}

/* Hero video background (Galerie) */
.hero-with-video {
    position: relative;
    overflow: hidden;
}

.hero-with-video .hero-video {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-with-video .hero-video__media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* keep the existing gradient overlay on top of the video */
.hero-with-video::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(rgba(45, 89, 160, 0.349), rgba(45, 89, 160, 0.473));
}

.hero-with-video .hero-content {
    position: relative;
    z-index: 2;
}

/* Fallback: if video cannot load, keep existing background-image */
.hero-with-video {
    background-color: #1e3d6f;
}

@media (prefers-reduced-motion: reduce) {
    .hero-with-video .hero-video {
        display: none;
    }
}

.hero.karriere-bg {
    background: linear-gradient(rgba(45, 89, 160, 0.349), rgba(45, 89, 160, 0.473)), url('../images/pflege-schweiz.png') center/cover no-repeat;
}

.hero.kontakt-bg {
    background: linear-gradient(rgba(45, 89, 160, 0.349), rgba(45, 89, 160, 0.473)), url('../images/kontakt.png') center/cover no-repeat;
}

.hero.leistung-bg {
    background: linear-gradient(rgba(45, 89, 160, 0.349), rgba(45, 89, 160, 0.473)), url('../images/pflege-schweiz.png') center/cover no-repeat;
}

.hero.tarife-bg {
    background: linear-gradient(rgba(45, 89, 160, 0.349), rgba(45, 89, 160, 0.473)), url('../images/spitex-tarife.png') center/cover no-repeat;
}

.hero.ueber-bg {
    background: linear-gradient(rgba(45, 89, 160, 0.349), rgba(45, 89, 160, 0.473)), url('../images/flexispitex-team.jpg') center/cover no-repeat;
}

/* Feature icons */
.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
}

/* Pricing cards */
.pricing-card {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.pricing-card.featured {
    border: 2px solid #2d5aa0;
    transform: scale(1.05);
}

/* Form styles */
.form-input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 16px;
    transition: border 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #2d5aa0;
    box-shadow: 0 0 0 3px rgba(45, 90, 160, 0.1);
}

/* Scroll progress bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(to right, #2d5aa0, #4caf50);
    z-index: 100;
    transition: width 0.1s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .section-padding {
        padding-top: 60px;
        padding-bottom: 60px;
    }
    
    .hero {
        min-height: 60vh;
    }
    
    .pricing-card.featured {
        transform: scale(1);
    }
}

/* Animation for numbers */
@keyframes countUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.count-up {
    animation: countUp 1s ease forwards;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #2d5aa0;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1e3d6f;
}

/* Accordion styles */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-content.active {
    max-height: 500px;
}

.accordion-header .fa-chevron-down {
    transition: transform 0.3s ease;
}

.accordion-header.active .fa-chevron-down {
    transform: rotate(180deg);
}

/* Image placeholders */
.image-placeholder {
    background: linear-gradient(45deg, #f0f0f0 25%, #e0e0e0 25%, #e0e0e0 50%, #f0f0f0 50%, #f0f0f0 75%, #e0e0e0 75%);
    background-size: 40px 40px;
    animation: placeholder-shimmer 2s linear infinite;
}

@keyframes placeholder-shimmer {
    0% { background-position: -40px 0; }
    100% { background-position: 40px 0; }
}

/* Gallery Styles */
.gallery-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gallery-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.gallery-filter-btn.active {
    background-color: #2d5aa0;
    color: white;
}

.gallery-item {
    display: block;
}

.gallery-item.hidden {
    display: none;
}

.gallery-image {
    position: relative;
    overflow: hidden;
}

.gallery-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 50%);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.gallery-card:hover .gallery-image::after {
    opacity: 0.9;
}

.lightbox-btn {
    transition: color 0.2s ease;
}

/* Team card effects */
.team-card:hover .image-placeholder {
    animation: placeholder-shimmer 1s linear infinite;
}

/* Team avatars ("Über uns" page) */
.team-card .team-avatar {
    transform: translateX(-50%) translateY(42%);
}

.team-card .team-avatar img {
    object-position: center 18%;
}

.team-card .team-body {
    padding-top: 92px;
}

/* Video container */
.video-container {
    position: relative;
}

.play-btn {
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.play-btn:hover {
    transform: scale(1.15);
    background-color: rgba(255, 255, 255, 0.3);
}

/* Timeline enhancements */
.timeline-item {
    position: relative;
}

/* Counter animation enhancement */
.counter {
    font-variant-numeric: tabular-nums;
}

/* Modern shadow effects */
.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #2d5aa0, #4caf50);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hover effects for team cards */
.team-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

/* Responsive gallery */
@media (max-width: 768px) {
    .gallery-grid {
        gap: 4px;
    }
    
    .gallery-card:hover {
        transform: translateY(-5px);
    }
}

/* Lightbox modal */
#lightboxModal {
    opacity: 0;
    transition: opacity 0.3s ease;
}

#lightboxModal:not(.hidden) {
    opacity: 1;
}

/* Smooth transitions */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

/* Cookie banner */
.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 9999;
    background: rgba(17, 24, 39, 0.98);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.cookie-banner__inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
}

.cookie-banner__title {
    font-weight: 700;
    font-size: 16px;
    margin: 0 0 6px 0;
}

.cookie-banner__desc {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.45;
}

.cookie-banner__desc a {
    color: #93c5fd;
    text-decoration: underline;
}

.cookie-banner__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-btn {
    border: none;
    cursor: pointer;
    font-weight: 700;
    border-radius: 999px;
    padding: 10px 14px;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.cookie-btn:active {
    transform: translateY(1px);
}

.cookie-btn--primary {
    background: #2563eb;
    color: #fff;
}

.cookie-btn--primary:hover {
    background: #1d4ed8;
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.25);
}

.cookie-btn--secondary {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.cookie-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.18);
}

.cookie-banner--hide {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Click captcha */
.captcha-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.captcha-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 2px solid rgba(45, 90, 160, 0.12);
    border-radius: 16px;
    padding: 10px;
    cursor: pointer;
    transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.captcha-card:hover {
    transform: translateY(-1px);
    border-color: rgba(45, 90, 160, 0.25);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
}

.captcha-card--selected {
    border-color: #2d5aa0;
    box-shadow: 0 0 0 4px rgba(45, 90, 160, 0.14);
}

.captcha-card svg {
    width: 84px;
    height: 84px;
}

@media (max-width: 420px) {
    .captcha-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .cookie-banner {
        left: 24px;
        right: 24px;
        bottom: 24px;
    }
    .cookie-banner__inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
        padding: 18px 20px;
    }
    .cookie-banner__text {
        max-width: 70ch;
    }
}
