/* Custom CSS for Yardim Immoservice Website */
/* Extends Tailwind CSS with custom animations and components */

/* ==================== HEADER STYLES ==================== */

/* Header scroll behavior */
#header {
    transition: all 0.3s ease;
}

/* Header scrolled styles - nur für helle Hintergründe */
#header.header-scrolled:not(.header-dark) .logo-link {
    color: #1f2937 !important;
}

#header.header-scrolled:not(.header-dark) .nav-link {
    color: #1f2937 !important;
}

#header.header-scrolled:not(.header-dark) .nav-link:hover {
    color: #b8860b !important;
}

#header.header-scrolled:not(.header-dark) .mobile-menu-btn {
    color: #1f2937 !important;
}

#header.header-scrolled:not(.header-dark) .material-icons {
    color: #1f2937 !important;
}

/* Header auf dunklen Hintergründen - Logo und Navigation bleiben weiß */
#header.header-dark .logo-link,
#header.header-scrolled.header-dark .logo-link {
    color: white !important;
}

#header.header-dark .nav-link,
#header.header-scrolled.header-dark .nav-link {
    color: white !important;
}

#header.header-dark .nav-link:hover,
#header.header-scrolled.header-dark .nav-link:hover {
    color: #b8860b !important;
}

#header.header-dark .mobile-menu-btn,
#header.header-scrolled.header-dark .mobile-menu-btn {
    color: white !important;
}

#header.header-dark .material-icons,
#header.header-scrolled.header-dark .material-icons {
    color: white !important;
}

/* ==================== CUSTOM ANIMATIONS ==================== */

/* Fade-in animation */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== GOOGLE MAPS STYLES ==================== */

/* Map container enhancements */
#mapContainer {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#mapContainer:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

/* Map placeholder styling */
#mapPlaceholder {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    transition: all 0.3s ease;
}

#mapPlaceholder:hover {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
}

/* Map loading animation */
#loadMaps {
    position: relative;
    overflow: hidden;
}

#loadMaps:hover {
    transform: translateY(-1px);
}

#loadMaps:active {
    transform: translateY(0);
}

/* Map iframe enhancements */
#googleMap {
    transition: opacity 0.5s ease-in-out;
    filter: grayscale(0%);
}

#googleMap:hover {
    filter: grayscale(0%) contrast(1.05);
}

/* Address info card */
.address-info-card {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Loading spinner for map */
.map-loading {
    position: relative;
}

.map-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #374151;
    border-radius: 50%;
    animation: mapSpin 1s linear infinite;
}

@keyframes mapSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive map adjustments */
@media (max-width: 768px) {
    #mapContainer {
        height: 300px;
    }
    
    #mapPlaceholder .text-center {
        padding: 1rem;
    }
    
    #loadMaps {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
}

/* Float animation for hero elements */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Pulse animation for buttons */
@keyframes pulse-custom {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse-custom:hover {
    animation: pulse-custom 0.5s ease-in-out;
}

/* Gradient text animation */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-text {
    background: linear-gradient(-45deg, #1a1a1a, #374151, #b8860b, #1a1a1a);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
}

/* Smooth reveal animations */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ==================== CUSTOM COMPONENTS ==================== */

/* Enhanced card hover effects */
.card-hover {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ==================== CORPORATE COLOR CLASSES ==================== */

/* Primary Colors - Black/Anthracite */
.bg-primary {
    background-color: #1a1a1a;
}

.bg-primary-light {
    background-color: #2d2d2d;
}

.bg-anthracite {
    background-color: #374151;
}

.bg-anthracite-light {
    background-color: #4b5563;
}

.bg-anthracite-dark {
    background-color: #1f2937;
}

/* Dark Gold Accent Colors */
.bg-gold-accent {
    background-color: #b8860b;
}

.bg-gold-accent-light {
    background-color: #daa520;
}

.bg-gold-accent-dark {
    background-color: #8b6914;
}

/* Text Colors */
.text-primary {
    color: #1a1a1a;
}

.text-anthracite {
    color: #374151;
}

.text-anthracite-light {
    color: #6b7280;
}

.text-gold-accent {
    color: #b8860b;
}

.text-gold-accent-light {
    color: #daa520;
}

.text-gold-accent-dark {
    color: #8b6914;
}

/* Border Colors */
.border-primary {
    border-color: #1a1a1a;
}

.border-anthracite {
    border-color: #374151;
}

.border-gold-accent {
    border-color: #b8860b;
}

/* Professional Gradient Classes */
.bg-gradient-primary {
    background: linear-gradient(135deg, #1a1a1a 0%, #374151 100%);
}

.bg-gradient-anthracite {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
}

.bg-gradient-accent {
    background: linear-gradient(135deg, #b8860b 0%, #8b6914 100%);
}

/* Hover States */
.hover\:bg-primary:hover {
    background-color: #1a1a1a;
}

.hover\:bg-anthracite:hover {
    background-color: #374151;
}

.hover\:bg-gold-accent:hover {
    background-color: #b8860b;
}

.hover\:text-gold-accent:hover {
    color: #b8860b;
}

.hover\:border-gold-accent:hover {
    border-color: #b8860b;
}

/* Focus States */
.focus\:ring-gold-accent:focus {
    --tw-ring-color: #b8860b;
}

.focus\:border-gold-accent:focus {
    border-color: #b8860b;
}

/* Button enhancements */
.btn-primary {
    background: linear-gradient(135deg, #1a1a1a 0%, #374151 100%);
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-accent {
    background: linear-gradient(135deg, #b8860b 0%, #8b6914 100%);
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    border: 2px solid #374151;
    background: transparent;
    color: #374151;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #374151;
    color: white;
    transform: translateY(-2px);
}

.btn-outline-accent {
    border: 2px solid #b8860b;
    background: transparent;
    color: #b8860b;
    transition: all 0.3s ease;
}

.btn-outline-accent:hover {
    background: #b8860b;
    color: white;
    transform: translateY(-2px);
}

/* ==================== FORM ENHANCEMENTS ==================== */

/* Multi-step form */
.form-step {
    display: none;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.5s ease;
}

.form-step.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

/* Step indicators */
.step {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #E5E7EB;
    color: #6B7280;
    font-weight: 600;
    transition: all 0.3s ease;
}

.step.active {
    background: #b8860b;
    color: white;
    transform: scale(1.1);
}

.step.completed {
    background: #10B981;
    color: white;
}

.step::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    width: 100px;
    height: 2px;
    background: #E5E7EB;
    transform: translateY(-50%);
    z-index: -1;
}

.step:last-child::after {
    display: none;
}

.step.completed::after {
    background: #10B981;
}

/* Progress bar */
.progress-bar {
    height: 4px;
    background: #b8860b;
    transition: width 0.5s ease;
    border-radius: 2px;
}

/* File upload area */
.file-upload-area {
    border: 2px dashed #D1D5DB;
    transition: all 0.3s ease;
    position: relative;
}

.file-upload-area:hover {
    border-color: #b8860b;
    background-color: #F8FAFC;
}

.file-upload-area.dragover {
    border-color: #b8860b;
    background-color: #f9fafb;
    transform: scale(1.02);
}

/* Input focus enhancements */
.form-input {
    transition: all 0.3s ease;
    border: 1px solid #D1D5DB;
}

.form-input:focus {
    border-color: #b8860b;
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.1);
    outline: none;
}

.form-input:invalid {
    border-color: #EF4444;
}

/* ==================== IMAGE ENHANCEMENTS ==================== */

/* Image gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.gallery-thumbnail {
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.gallery-thumbnail:hover {
    transform: scale(1.05);
    border-color: #b8860b;
}

.gallery-thumbnail.active {
    border-color: #b8860b;
    transform: scale(1.05);
}

/* Image modal */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.image-modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
}

/* ==================== RESPONSIVE ENHANCEMENTS ==================== */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Mobile menu animation */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-menu.open {
    transform: translateX(0);
}

/* Header scroll effect */
.header-scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* ==================== LOADING STATES ==================== */

/* Loading spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-spinner {
    animation: spin 1s linear infinite;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ==================== UTILITY CLASSES ==================== */

/* Text shadows */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.text-shadow-lg {
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Glassmorphism effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Already updated above */

.bg-gradient-secondary {
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
}

/* Interactive elements */
.interactive:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease;
}

.interactive:active {
    transform: translateY(0);
}

/* ==================== PRINT STYLES ==================== */

@media print {
    .no-print {
        display: none !important;
    }
    
    .print-break {
        page-break-after: always;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
}

/* ==================== ACCESSIBILITY ENHANCEMENTS ==================== */

/* Focus indicators */
.focus-visible:focus {
    outline: 2px solid #b8860b;
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid;
    }
    
    .btn-primary {
        border: 2px solid;
    }
}

/* ==================== DARK MODE SUPPORT ==================== */

@media (prefers-color-scheme: dark) {
    .dark-mode-auto {
        background-color: #1F2937;
        color: #F9FAFB;
    }
    
    .dark-mode-auto .card {
        background-color: #374151;
        border-color: #4B5563;
    }
    
    .dark-mode-auto .form-input {
        background-color: #374151;
        border-color: #4B5563;
        color: #F9FAFB;
    }
}

/* ==================== CUSTOM SCROLLBAR ==================== */

/* Webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* Firefox */
html {
    scrollbar-width: thin;
    scrollbar-color: #CBD5E1 #F1F5F9;
}

/* ==================== RESPONSIVE TYPOGRAPHY ==================== */

/* Fluid typography */
.text-fluid-sm {
    font-size: clamp(0.875rem, 2vw, 1rem);
}

.text-fluid-base {
    font-size: clamp(1rem, 2.5vw, 1.125rem);
}

.text-fluid-lg {
    font-size: clamp(1.125rem, 3vw, 1.25rem);
}

.text-fluid-xl {
    font-size: clamp(1.25rem, 4vw, 1.5rem);
}

.text-fluid-2xl {
    font-size: clamp(1.5rem, 5vw, 2rem);
}

.text-fluid-3xl {
    font-size: clamp(1.875rem, 6vw, 2.5rem);
}

/* ==================== PERFORMANCE OPTIMIZATIONS ==================== */

/* GPU acceleration for animations */
.gpu-accelerated {
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

/* Optimize font loading */
.font-display-swap {
    font-display: swap;
}

/* ==================== COMPONENT VARIANTS ==================== */

/* Success state */
.success-state {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
}

/* Error state */
.error-state {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: white;
}

/* Warning state */
.warning-state {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
}

/* Info state */
.info-state {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    color: white;
}