/* ====================================
   Custom Styles for Immobilien Agentur
   ==================================== */

/* Base Styles */
* {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #F7F8FA;
}

::-webkit-scrollbar-thumb {
    background: #1B2B4B;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2D4A7C;
}

/* Button Styles */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background-color: #1B2B4B;
    color: white;
    font-weight: 600;
    font-size: 15px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(27, 43, 75, 0.25);
}

.btn-primary:hover {
    background-color: #2563EB;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background-color: transparent;
    color: #1B2B4B;
    font-weight: 600;
    font-size: 15px;
    border: 2px solid #1B2B4B;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary:hover {
    background-color: #1B2B4B;
    color: white;
}

.btn-gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background: linear-gradient(90deg, #B8860B, #D4AF37);
    color: white;
    font-weight: 600;
    font-size: 15px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(184, 134, 11, 0.3);
}

.btn-gold:hover {
    filter: brightness(1.1);
    box-shadow: 0 6px 20px rgba(184, 134, 11, 0.4);
}

/* Navigation Link Underline Effect */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #2563EB;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Header Shadow on Scroll */
#header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Property Card Image Hover */
.property-card:hover img {
    transform: scale(1.05);
}

/* Wishlist Button Active State */
.wishlist-btn.active svg {
    fill: #EF4444;
    color: #EF4444;
}

/* Range Slider Custom Styles */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #E2E8F0;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid #1B2B4B;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid #1B2B4B;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

input[type="range"].accent-gold::-webkit-slider-thumb {
    border-color: #B8860B;
}

input[type="range"].accent-gold::-moz-range-thumb {
    border-color: #B8860B;
}

/* Term Button Active State */
.term-btn.active {
    background-color: #1B2B4B;
    border-color: #1B2B4B;
    color: white;
}

/* Form Input Focus States */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Checkbox Custom Styles */
input[type="checkbox"] {
    accent-color: #1B2B4B;
}

/* Swiper Customization */
.testimonial-swiper {
    padding-bottom: 60px !important;
}

.swiper-button-prev,
.swiper-button-next {
    color: #1B2B4B !important;
    background: white;
    width: 48px !important;
    height: 48px !important;
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.swiper-button-prev::after,
.swiper-button-next::after {
    font-size: 18px !important;
    font-weight: bold;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    background: #1B2B4B;
    color: white !important;
}

.swiper-pagination-bullet {
    background: #1B2B4B !important;
    opacity: 0.3;
    width: 10px;
    height: 10px;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: #B8860B !important;
}

/* Modal Styles */
.modal {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    transform: translate(-50%, -50%) scale(0.95);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: translate(-50%, -50%) scale(1);
}

/* Cookie Banner Animation */
#cookie-banner.show {
    transform: translateY(0);
}

/* Back to Top Button */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* Stat Number Animation */
.stat-number {
    display: inline-block;
}

/* Prose Styles for Modal Content */
.prose h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.prose p {
    margin-bottom: 1rem;
    color: #64748B;
    line-height: 1.7;
}

.prose ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    list-style-type: disc;
}

.prose li {
    margin-bottom: 0.5rem;
    color: #64748B;
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    .btn-primary,
    .btn-secondary,
    .btn-gold {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .swiper-button-prev,
    .swiper-button-next {
        display: none !important;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Focus Visible for Accessibility */
*:focus-visible {
    outline: 2px solid #2563EB;
    outline-offset: 2px;
}

/* Selection Color */
::selection {
    background-color: #1B2B4B;
    color: white;
}

/* Print Styles */
@media print {
    header,
    footer,
    #cookie-banner,
    #back-to-top,
    .modal {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        color: black;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
