/**
 * Single Vehicle Template Styles
 * Modernes Card-basiertes Design für Fahrzeug-Detailseiten
 */

/* ==============================
   SITE CONTENT BACKGROUND
   ============================== */

/* Hintergrundfarbe für Fahrzeugseiten */
.single-fahrzeug #site-content,
.single-fahrzeug .site-content,
.single-fahrzeug main {
    background-color: #f8fafc; /* Sehr helles Grau */
}

/* Alternative: Wenn die Seite einen anderen Container hat */
.single-fahrzeug body {
    background-color: #f8fafc;
}

/* ==============================
   THEME COLOR OVERRIDES - MINIMAL
   ============================== */

/* Professionelle, minimalistische Farben */
.text-primary {
    color: #374151 !important; /* Dunkles Grau statt Rot */
}

.bg-primary {
    background-color: #f8fafc !important; /* Sehr helles Grau */
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
    color: #374151 !important;
}

/* Primärer Button */
.btn-primary {
    background-color: #dc2626 !important; /* aus --primary-color */
    border-color: #dc2626 !important;
    color: #ffffff !important; /* aus --white */
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #b91c1c !important; /* Hover-Farbe aus CSS1 */
    border-color: #b91c1c !important;
    color: #ffffff !important;
}

/* Outline Primary Button */
.btn-outline-primary {
    color: #dc2626 !important; /* aus --primary-color */
    border-color: #dc2626 !important;
    background-color: transparent !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
}

.btn-secondary {
  background-color: transparent;
  color: #1f2937;
  border-color: #1f2937;
}

.btn-secondary:hover {
  background-color: #1f2937;
  color: #ffffff;
  text-decoration: none;
  border-color: #1f2937;
}

/* ==============================
   HERO SECTION STYLING
   ============================== */

.section {
    padding: 60px 0;
}

.section.bg-gradient-primary {
    background: #f9fafb; /* Sehr subtiles Overlay */
    position: relative;
    overflow: hidden;
}

.section.bg-gradient-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f9fafb; /* Sehr subtiles Overlay */
    z-index: 1;
}

.section.bg-gradient-primary .container {
    position: relative;
    z-index: 2;
}

.section-custom {
  padding: 0px !important; /* überschreibt nur das Padding */
}

.min-vh-50 {
    min-height: 50vh;
}

.vehicle-hero-content h2 {
    color: #1f2937; /* Dunkles Grau für den Titel */
    text-shadow: none; /* Kein Schatten */
    margin-bottom: 2rem;
}

/* Vehicle Attributes Styling */




/* Hero Cards Styling */
.hero-cards {
    margin-top: 2rem;
}

.hero-cards .card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    transition: all 0.3s ease;
    height: 100%;
}

.hero-cards .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero-cards .card-body {
    padding: 1.5rem;
    text-align: center;
}

.hero-cards .card-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.hero-cards .card-text {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Price Display */
.price-display {
    margin-top: 2rem;
}

.price-display .card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 20px;
    overflow: hidden;
}

.price-display .display-3 {
    color: #1f2937; /* Dunkles Grau statt Rot */
    font-weight: 700;
}

/* ==============================
   MAIN CONTENT CARDS
   ============================== */

.section .card {
    border: none;

    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}


.section .card-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%); /* Sanfte Grautöne */
    border: none;
    border-bottom: 1px solid #e2e8f0;
    padding: 1.5rem 2rem;
    position: relative;
    overflow: hidden;
    color: #1f2937; /* Dunkler Text */
}

.section .card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.section .card-header:hover::before {
    left: 100%;
}

.section .card-header.bg-primary {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #1f2937;
}

.section .card-header.bg-secondary {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #374151;
}

.section .card-header.bg-success {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #166534;
}

.section .card-header.bg-warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    color: #92400e;
}

.section .card-title {
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.section .card-title i {
    margin-right: 0.75rem;
    font-size: 1.2em;
}

.section .card-body {
    padding: 2rem;
}

/* Vehicle Image Styling - Card */
.vehicle-image-card {
  flex: 0 0 622.33px;   /* feste Basisbreite */
  max-width: auto;  /* nicht breiter als 622.33px */
}

.vehicle-image-card .card.shadow-sm {
    box-shadow: none !important;
}

/* Vehicle Image Styling */
.vehicle-main-gallery {
    position: relative;
    max-width: 621.33px; /* Exakte Bildbreite */
    margin: 0 auto; /* Zentriert die Galerie */
}

.main-gallery-container {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    width: auto; /* Exakte Bildbreite */
    height: 466px; /* Exakte Bildhöhe */
    margin: 0 auto; /* Zentriert den Container */
}

.main-gallery-image {
    border-radius: 0;
    transition: transform 0.3s ease;
    width: 621.33px; /* Exakte Bildbreite */
    height: 466px; /* Exakte Bildhöhe */
    object-fit: contain; /* Bild passt ohne Cropping */
    background-color: #f8f9fa; /* Hintergrund falls Bild kleiner ist */
}



/* Gallery Navigation */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    opacity: 0;
}

.main-gallery-container:hover .gallery-nav {
    opacity: 1;
}

.gallery-nav:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.gallery-prev {
    left: 15px;
}

.gallery-next {
    right: 15px;
}

/* Gallery Counter */
.gallery-counter {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 10;
}

/* Fullscreen Button */
.gallery-fullscreen {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    opacity: 0;
}

.main-gallery-container:hover .gallery-fullscreen {
    opacity: 1;
}

.gallery-fullscreen:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* Thumbnail Navigation */
.gallery-thumbnails {
    background: #f8f9fa;
    border-radius: 0 0 15px 15px;
}

.thumbnail-container {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #6b7280 #f1f1f1;
}

.thumbnail-container::-webkit-scrollbar {
    height: 6px;
}

.thumbnail-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.thumbnail-container::-webkit-scrollbar-thumb {
    background: #6b7280;
    border-radius: 3px;
}

.gallery-thumbnail {
    border: 3px solid transparent;
    border-radius: 8px;
    transition: all 0.3s ease;
    opacity: 0.7;
    cursor: pointer;
    flex-shrink: 0;
}

.gallery-thumbnail:hover {
    opacity: 1;
    transform: scale(1.05);
}

.gallery-thumbnail.active {
    border-color: #374151;
    opacity: 1;
    box-shadow: 0 0 10px rgba(55, 65, 81, 0.3);
}

/* Gallery Modal */
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-modal.active {
    display: flex;
    opacity: 1;
}

.gallery-modal-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

.gallery-modal-image {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.gallery-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.gallery-modal-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.gallery-modal-nav.gallery-modal-prev {
    left: 30px;
}

.gallery-modal-nav.gallery-modal-next {
    right: 30px;
}

.gallery-modal-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.gallery-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.gallery-modal-info {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
}

.gallery-modal-counter {
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 500;
    margin-bottom: 10px;
    backdrop-filter: blur(10px);
}

.gallery-modal-title {
    font-size: 1.2rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Detail Items in Description */
.detail-item {
    transition: all 0.3s ease;
}

.detail-item:hover {
    background: #f8fafc !important;
    border-color: #374151;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(55, 65, 81, 0.15);
}

.placeholder-image {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    border-radius: 0;
}

/* Technical Specs Styling */
.tech-specs-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s ease;
}

.tech-specs-item:last-child {
    border-bottom: none;
}

.tech-specs-item:hover {
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.tech-specs-item i {
    width: 20px;
    color: #6b7280;
    margin-right: 1rem;
    flex-shrink: 0;
}

.tech-specs-item .flex-grow-1 small {
    color: #6c757d;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tech-specs-item strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Quick Contact Actions */
.quick-contact .btn {
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.quick-contact .btn-primary {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    border: none;
    color: white;
}

.quick-contact .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(55, 65, 81, 0.3);
}

.quick-contact .btn-outline-primary {
    border-color: #374151;
    color: #374151;
}

.quick-contact .btn-outline-primary:hover {
    background: #374151;
    border-color: #374151;
    color: white;
    transform: translateY(-2px);
}

.quick-contact .btn-success {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border: none;
    color: white;
}

.quick-contact .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.3);
}

/* Contact Info Styling */
.contact-info {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.contact-info h6 {
    color: #374151;
    margin-bottom: 1rem;
    font-weight: 700;
}

.contact-info .d-flex {
    padding: 0.4rem 0;
}

/* ==============================
   CONTACT SECTION
   ============================== */

.section-dark {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.section-dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="0.5" fill="rgba(255,255,255,0.03)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    z-index: 1;
}

.section-dark .container {
    position: relative;
    z-index: 2;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #000000;
}

.section-subtitle {
    font-size: 1.2rem;
    color: rgba(0, 0, 0, 0.8);
    max-width: 600px;
    margin: 0 auto;
}

/* Contact Form Styling */
.vehicle-contact-form {
    background: white;
    border-radius: 0 0 15px 15px;
}

.vehicle-contact-form .form-label {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.vehicle-contact-form .form-label i {
    color: #6b7280;
}

.vehicle-contact-form .form-control,
.vehicle-contact-form .form-select {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.vehicle-contact-form .form-control:focus,
.vehicle-contact-form .form-select:focus {
    border-color: #374151;
    box-shadow: 0 0 0 0.2rem rgba(55, 65, 81, 0.1);
    background: white;
}

.vehicle-contact-form .btn-primary {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    color: white;
}

.vehicle-contact-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(55, 65, 81, 0.3);
}

/* ==============================
   RELATED VEHICLES SECTION
   ============================== */

.section.bg-light {
    background-color: white !important;
}

.vehicle-preview-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

.vehicle-preview-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.vehicle-preview-card .card-img-container {
    position: relative;
    overflow: hidden;
}

.vehicle-preview-card .card-img-top {
    transition: transform 0.3s ease;
}

.vehicle-preview-card:hover .card-img-top {
    transform: scale(1.05);
}

.vehicle-preview-card .card-body {
    padding: 1.5rem;
}

.vehicle-preview-card .card-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.vehicle-preview-card .btn {
    border-radius: 10px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* ==============================
   RESPONSIVE DESIGN
   ============================== */

@media (max-width: 576px) {
    .vehicle-hero-content h2 {
        font-size: 1.8rem;
    }
    
    .hero-cards .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 1rem;
    }
    
    .section .card-body {
        padding: 1.5rem;
    }
    
    .section .card-header {
        padding: 1rem 1.5rem;
    }
}

/* ==============================
   LOADING ANIMATIONS
   ============================== */

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.fade-in.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.slide-up {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease;
}

.slide-up.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Gallery specific animations */
.gallery-thumbnail {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-gallery-image {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Hover animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.gallery-fullscreen:hover {
    animation: pulse 0.6s ease-in-out;
}

/* Loading spinner for images */
.gallery-loading {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #374151;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==============================
   ACCESSIBILITY & FOCUS STATES
   ============================== */

.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid #374151;
    outline-offset: 2px;
}

.card:focus-within {
    box-shadow: 0 0 0 2px rgba(55, 65, 81, 0.2);
}

/* ==============================
   PRINT STYLES
   ============================== */

@media print {
    .section.bg-gradient-primary {
        background: white !important;
    }
    .section-dark {
        background: white !important;
        color: black !important;
    }
    
    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
    
    .btn {
        display: none;
    }
}
