/**
 * Stadtfinder Plus CSS - Exakte Nachbildung mit modernen Listing-Karten
 * Dateipfad: /public/css/style.css
 * 
 * Basierend auf dem offiziellen Styleguide
 */

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Farben aus Styleguide */
    --primary-blue: hsl(214 84% 56%);
    --accent-green: hsl(142 76% 36%);
    --error-red: #dc2626;
    --warning-orange: #f59e0b;
    --warning-orange-light: #fbbf24;
    --success-green: #10b981;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #fff;
    
    /* Schatten aus Styleguide */
    --shadow-sm: 0 1px 2px rgb(0 0 0 / .05);
    --shadow-md: 0 4px 6px rgb(0 0 0 / .1);
    --shadow-lg: 0 10px 15px rgb(0 0 0 / .1);
    --shadow-elegant: 0 10px 20px rgba(0,0,0,.15);
    
    /* Border-Radius aus Styleguide */
    --radius-sm: .25rem;
    --radius-md: .5rem;
    --radius-lg: .75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
}

html {
    font-size: 16px; /* 1rem = 16px */
}

body {
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-size: .875rem; /* 14px - Standard-Fließtext */
    line-height: 1.6;
    color: #374151;
    background-color: #f9fafb;
}

/* Container */
.container {
    max-width: 1400px; /* XL Breakpoint */
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
    width: 100%;
}

.header-top .container {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Typography aus Styleguide */
h1 { font-size: 3rem; font-weight: 700; line-height: 1.2; } /* 48px */
h2 { font-size: 1.875rem; font-weight: 600; line-height: 1.3; } /* 30px */
h3 { font-size: 1.5rem; font-weight: 600; line-height: 1.3; } /* 24px */
h4 { font-size: 1.25rem; font-weight: 600; line-height: 1.4; } /* 20px */

.hero-text { font-size: 3.75rem; font-weight: 700; } /* 60px - Sehr großer Hero-Text */
.large-text { font-size: 1.125rem; } /* 18px - Absätze */
.small-text { font-size: .75rem; } /* 12px - Kleiner Text */

/* Links */
a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    filter: brightness(110%);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .75rem 1.5rem;
    font-size: .875rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    filter: brightness(110%);
    transform: translateY(-1px);
}

.btn-primary {
    background-color: var(--primary-blue);
    color: var(--white);
}

.btn-success {
    background-color: var(--accent-green);
    color: var(--white);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-blue);
    border: 1px solid var(--primary-blue);
}

.btn-outline:hover {
    background-color: var(--primary-blue);
    color: var(--white);
}

.btn-white {
    background-color: var(--white);
    color: var(--primary-blue);
    box-shadow: var(--shadow-md);
}

/* Small Button Variants */
.btn-primary-small,
.btn-outline-small {
    padding: .5rem 1rem;
    font-size: .875rem;
}

.btn-primary-small {
    background-color: var(--primary-blue);
    color: var(--white);
    border: none;
}

.btn-outline-small {
    background-color: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-outline-small:hover {
    background-color: var(--gray-50);
    border-color: var(--gray-400);
}

/* Header */
.main-header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-top {
    padding: 1rem 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    flex-shrink: 0;
}

.logo a {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: inherit;
}

.logo-icon {
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--primary-blue);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    font-size: 1.25rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
}

.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.main-nav a {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: #4b5563;
    font-weight: 500;
    padding: .5rem 0;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-blue);
}

.main-nav i {
    font-size: 1rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-shrink: 0;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-700);
    cursor: pointer;
    padding: .5rem;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    color: #333;
    padding: 5rem 0;
    background-color: #fff;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('../images/berlin-CnjhKRN7.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.1;
    z-index: 1;
}

.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    width: 100%;
}

.hero-subtitle {
    font-size: 1rem;
    opacity: 0.7;
    margin-bottom: 1rem;
    color: #666;
}

.hero-title {
    font-size: 3.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #333;
    text-shadow: none;
}

.hero-description {
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
    opacity: 0.8;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: #666;
}

/* Search Form in Hero */
.hero-section .search-form {
    margin-bottom: 4rem;
}

/* Stats in Hero Section */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 3;
}

.hero-section .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: transparent;
    padding: 1.5rem;
    color: #333;
}

.hero-section .stat-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.hero-section .stat-icon.blue { color: var(--primary-blue); }
.hero-section .stat-icon.green { color: var(--accent-green); }
.hero-section .stat-icon.orange { color: var(--warning-orange); }

.hero-section .stat-content {
    text-align: center;
}

.hero-section .stat-content h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    line-height: 1;
    margin: 0 0 0.5rem 0;
}

.hero-section .stat-content p {
    font-size: 1rem;
    color: #666;
    margin: 0;
}

/* Search Form */
.search-form {
    background-color: var(--white);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-elegant);
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 3;
}

.search-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr auto auto;
    gap: 1rem;
    align-items: end;
}

.search-field {
    position: relative;
}

.search-label {
    display: block;
    font-size: .75rem;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: .25rem;
}

.search-input {
    width: 100%;
    padding: .75rem 1rem .75rem 2.5rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: .875rem;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-icon {
    position: absolute;
    left: .75rem;
    bottom: .75rem;
    color: var(--gray-400);
    pointer-events: none;
}

.search-select {
    width: 100%;
    padding: .75rem 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: .875rem;
    background-color: var(--white);
    cursor: pointer;
}

.search-btn {
    padding: .75rem 1.5rem;
    font-size: .875rem;
    font-weight: 600;
}

/* Sections */
.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.875rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--gray-400);
}

/* Cities Grid */
.cities-grid {
    display: grid;
    gap: 1.5rem;
}

/* Responsive Grid */
@media (min-width: 640px) {
    .cities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .cities-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.city-card {
    background-color: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.city-card:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-elegant);
}

.city-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.city-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.city-card:hover .city-image img {
    transform: scale(1.05);
}

.city-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.8));
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: 1.5rem;
}

.city-name {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.city-location {
    color: rgba(255, 255, 255, 0.8);
    font-size: .875rem;
    margin: .25rem 0 0 0;
}

.city-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 1rem;
}

.city-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.city-stat-icon {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.city-stat-icon.blue { color: var(--primary-blue); }
.city-stat-icon.green { color: var(--accent-green); }
.city-stat-icon.orange { color: var(--warning-orange); }

.city-stat-number {
    font-weight: 700;
    margin-bottom: .25rem;
    font-size: 1.125rem;
    line-height: 1;
}

.city-stat-number.blue { color: var(--primary-blue); }
.city-stat-number.green { color: var(--accent-green); }
.city-stat-number.orange { color: var(--warning-orange); }

.city-stat-label {
    font-size: .75rem;
    color: var(--gray-400);
}

/* Featured Listings - Modern Card Style */
.featured-section {
    background-color: var(--gray-50);
}

.listings-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .listings-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 1200px;
        margin: 0 auto;
    }
}

@media (min-width: 1400px) {
    .listings-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 1400px;
    }
}

/* Modern Listing Card */
.modern-listing-card {
    background-color: var(--white);
    border: 2px solid transparent;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    gap: 1.5rem;
    height: 100%;
}

.modern-listing-card:hover {
    border-color: var(--success-green);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.listing-image-small {
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.listing-image-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.listing-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    min-width: 0; /* Prevents overflow issues */
}

.listing-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
}

.listing-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.premium-badge {
    background-color: var(--success-green);
    color: var(--white);
    font-size: .75rem;
    font-weight: 500;
    padding: .25rem .5rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.distance-badge {
    color: var(--gray-500);
    font-size: .875rem;
    display: flex;
    align-items: center;
    gap: .25rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.listing-category {
    color: var(--gray-500);
    font-size: .875rem;
    margin: 0;
}

.listing-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.rating-wrapper {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.rating-stars {
    display: flex;
    gap: 2px;
}

.rating-stars i {
    color: var(--warning-orange-light);
    font-size: .875rem;
}

.rating-text {
    color: var(--gray-600);
    font-size: .875rem;
}

.open-status {
    color: var(--success-green);
    font-size: .875rem;
    display: flex;
    align-items: center;
    gap: .25rem;
}

.listing-details {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--gray-600);
    font-size: .875rem;
}

.detail-item i {
    color: var(--gray-400);
    width: 1rem;
}

.detail-item a {
    color: var(--primary-blue);
}

.listing-buttons {
    display: flex;
    gap: .75rem;
    margin-top: auto;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #1e40af 100%);
    color: var(--white);
    text-align: center;
}

.cta-title {
    font-size: 1.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.cta-description {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
.main-footer {
    background-color: #111827;
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    gap: 2rem;
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
}

.footer-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    font-size: .875rem;
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
    padding-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: .875rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.footer-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

/* Utilities */
.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }

/* Trending Badge */
.trending-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--white);
    color: var(--gray-700);
    padding: .5rem 1rem;
    border-radius: var(--radius-full);
    font-size: .875rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    box-shadow: var(--shadow-sm);
}

/* Responsive Utilities */
@media (max-width: 1024px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        box-shadow: var(--shadow-md);
        padding: 1rem 0;
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 0 1rem;
    }
    
    .main-nav a {
        padding: .75rem 1rem;
        display: flex;
        border-bottom: 1px solid var(--gray-100);
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .header-actions .btn-outline {
        display: none;
    }
}

@media (max-width: 768px) {
    .listings-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 639px) {
    .hero-title {
        font-size: 2.25rem;
    }
    
    .search-inputs {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-section .stat-item {
        align-items: center;
    }
    
    .hero-section .stat-icon {
        font-size: 3rem;
    }
    
    .header-actions {
        gap: .5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .modern-listing-card {
        flex-direction: column;
    }
    
    .listing-image-small {
        width: 100%;
        height: 200px;
    }
    
    .listing-header {
        flex-direction: column;
        gap: .5rem;
    }
    
    .listing-meta {
        flex-direction: column;
        align-items: start;
        gap: .5rem;
    }
}