/**
 * layout.css
 *
 * Einheitliches Layout-System für alle Seiten
 * - Standardisierte Content-Breiten
 * - Einheitliche Hero-Sections
 * - Konsistente Spacing-System
 */

/* =============================================================================
   CONTENT CONTAINER SYSTEM
   ============================================================================= */

/**
 * Standard Container-Breiten (Bootstrap Override für Konsistenz)
 */
.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

.container-narrow {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

.container-wide {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

/* Responsive Padding */
@media (min-width: 768px) {
    .container,
    .container-narrow,
    .container-wide {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (min-width: 1200px) {
    .container,
    .container-narrow,
    .container-wide {
        padding-left: 30px;
        padding-right: 30px;
    }
}

/* =============================================================================
   BREADCRUMB SECTION
   ============================================================================= */

.breadcrumb-section {
    background-color: #f8f9fa;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb {
    margin-bottom: 0;
    background: transparent;
    padding: 0;
    font-size: 0.9rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #6c757d;
}

.breadcrumb-item a {
    color: #aed136;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
    color: #9bc42a;
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* =============================================================================
   UNIFIED HERO SECTION
   ============================================================================= */

/**
 * Standard Hero für Unterseiten
 * Verwendung: <section class="hero-standard">
 */
.hero-standard {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-standard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/assets/images/hero-pattern.svg') repeat;
    opacity: 0.03;
    pointer-events: none;
}

.hero-standard .container {
    position: relative;
    z-index: 1;
}

.hero-standard__content {
    max-width: 800px;
}

.hero-standard h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-standard .lead {
    font-size: 1.25rem;
    color: #555;
    margin-bottom: 0;
    line-height: 1.6;
}

/* Hero mit Bild (2-spaltig) */
.hero-standard--with-image {
    padding: 5rem 0;
}

.hero-standard--with-image .row {
    align-items: center;
}

.hero-standard__image {
    position: relative;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.hero-standard__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hero Compact (für Formulare, Impressum, etc.) */
.hero-compact {
    background-color: #f8f9fa;
    padding: 3rem 0;
    border-bottom: 1px solid #e9ecef;
}

.hero-compact h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
}

.hero-compact .lead {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 0;
}

/* =============================================================================
   HOMEPAGE HERO (Special)
   ============================================================================= */

/**
 * Die Homepage hat einen eigenen Hero mit Suchformular
 * Bleibt separat, da funktional unterschiedlich
 */
.hero-new {
    background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%);
    color: #ffffff;
    padding: 6rem 0 8rem 0;
    position: relative;
    overflow: hidden;
}

.hero-new::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(174, 209, 54, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(174, 209, 54, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-new__wrapper {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.hero-new__title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-new__subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
}

.hero-new__search {
    background: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* =============================================================================
   SECTION SPACING
   ============================================================================= */

/**
 * Standardisiertes Spacing-System
 */
.section {
    padding: 5rem 0;
}

.section--sm {
    padding: 3rem 0;
}

.section--lg {
    padding: 7rem 0;
}

.section--xl {
    padding: 10rem 0;
}

/* Responsive Spacing */
@media (max-width: 768px) {
    .section {
        padding: 3rem 0;
    }

    .section--sm {
        padding: 2rem 0;
    }

    .section--lg {
        padding: 4rem 0;
    }

    .section--xl {
        padding: 5rem 0;
    }
}

/* =============================================================================
   CONTENT SECTIONS
   ============================================================================= */

/**
 * Standard Content-Abschnitt mit optionalem Hintergrund
 */
.content-section {
    padding: 5rem 0;
}

.content-section--gray {
    background-color: #f8f9fa;
}

.content-section--white {
    background-color: #ffffff;
}

.content-section__header {
    text-align: center;
    margin-bottom: 4rem;
}

.content-section__title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.content-section__subtitle {
    font-size: 1.25rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
}

/* =============================================================================
   CARDS & PANELS
   ============================================================================= */

/**
 * Einheitliche Card-Styles
 */
.card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.card--elevated {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.card--elevated:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* =============================================================================
   FORM LAYOUTS
   ============================================================================= */

/**
 * Zentrierte Formulare (für Kontakt, Anfragen, etc.)
 */
.form-wrapper {
    max-width: 700px;
    margin: 0 auto;
}

.form-wrapper--wide {
    max-width: 900px;
}

.form-wrapper--narrow {
    max-width: 500px;
}

/* =============================================================================
   PAGE-SPECIFIC CONTAINERS
   ============================================================================= */

/**
 * Detail-Seiten (Fahrzeug, etc.)
 */
.page-detail {
    padding: 3rem 0;
}

.page-detail__main {
    margin-bottom: 3rem;
}

.page-detail__sidebar {
    position: sticky;
    top: 100px;
}

/**
 * Liste-Seiten (Fahrzeugsuche, etc.)
 */
.page-listing {
    padding: 3rem 0;
}

.page-listing__filters {
    margin-bottom: 2rem;
}

.page-listing__results {
    margin-top: 2rem;
}

/**
 * Text-Seiten (Impressum, Datenschutz, etc.)
 */
.page-text {
    padding: 4rem 0;
}

.page-text .container {
    max-width: 900px;
}

.page-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.page-text h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.page-text p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* =============================================================================
   RESPONSIVE UTILITIES
   ============================================================================= */

@media (max-width: 1200px) {
    .hero-standard h1 {
        font-size: 2.25rem;
    }

    .hero-new__title {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .hero-standard {
        padding: 3rem 0;
    }

    .hero-standard h1 {
        font-size: 2rem;
    }

    .hero-standard .lead {
        font-size: 1.1rem;
    }

    .hero-new {
        padding: 4rem 0 5rem 0;
    }

    .hero-new__title {
        font-size: 2rem;
    }

    .hero-new__subtitle {
        font-size: 1rem;
    }

    .hero-new__search {
        padding: 1.5rem;
    }

    .hero-standard__image {
        height: 300px;
        margin-top: 2rem;
    }

    .content-section__title {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-standard h1 {
        font-size: 1.75rem;
    }

    .hero-new__title {
        font-size: 1.75rem;
    }

    .content-section {
        padding: 3rem 0;
    }
}

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

/* Spacing */
.mt-section { margin-top: 5rem; }
.mb-section { margin-bottom: 5rem; }
.pt-section { padding-top: 5rem; }
.pb-section { padding-bottom: 5rem; }

@media (max-width: 768px) {
    .mt-section { margin-top: 3rem; }
    .mb-section { margin-bottom: 3rem; }
    .pt-section { padding-top: 3rem; }
    .pb-section { padding-bottom: 3rem; }
}

/* Backgrounds */
.bg-pattern {
    position: relative;
    overflow: hidden;
}

.bg-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/assets/images/pattern.svg') repeat;
    opacity: 0.03;
    pointer-events: none;
}

/* Text Utilities */
.text-accent {
    color: #aed136 !important;
}

.text-muted-light {
    color: #999 !important;
}

/* Dividers */
.divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #e9ecef, transparent);
    margin: 3rem 0;
}

.divider--vertical {
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, #e9ecef, transparent);
}
