/* Custom styles for cars rental website */

/* Body and general styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* Navigation styles */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Main content spacing */
.main-content {
    margin-top: 76px; /* Height of fixed navbar */
    min-height: calc(100vh - 76px);
}

/* Home page specific styles */
.home-page .hero-section {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%);
    color: white;
    padding: 100px 0;
    margin-top: -76px;
    padding-top: 176px;
    position: relative;
    overflow: hidden;
}

/* Абстрактный узор для hero-section */
.home-page .hero-section::before {
    content: ';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.06) 0%, transparent 50%),
        linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.03) 50%, transparent 70%),
        linear-gradient(-45deg, transparent 30%, rgba(255, 255, 255, 0.02) 50%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

/* Дополнительный слой узора */
.home-page .hero-section::after {
    content: ';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.02) 2px,
            rgba(255, 255, 255, 0.02) 4px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.015) 2px,
            rgba(255, 255, 255, 0.015) 4px
        );
    pointer-events: none;
    z-index: 1;
}

/* Убеждаемся, что контент находится поверх узора */
.home-page .hero-section .container {
    position: relative;
    z-index: 2;
}

/* Card styles */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

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

.card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* Button styles */
.btn-primary {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%);
    border: none;
    border-radius: 25px;
    padding: 10px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-outline-primary {
    border: 2px solid #343a40;
    color: #343a40;
    border-radius: 25px;
    padding: 8px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: #343a40;
    border-color: #343a40;
    transform: translateY(-2px);
}

/* Footer styles */
footer {
    background: #343a40 !important;
}

footer h5, footer h6 {
    color: #ffffff !important;
}

footer .text-muted {
    color: #adb5bd !important;
}

footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: #ffffff !important;
}

/* Social links */
.social-links a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #343a40 !important;
}

/* Contact page styles */
.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #343a40 0%, #495057 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

/* Form styles */
.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: #343a40;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Badge styles */
.badge {
    border-radius: 20px;
    padding: 8px 15px;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 80px 0;
        padding-top: 156px;
    }
    
    .card-img-top {
        height: 180px;
    }
    
    .main-content {
        margin-top: 70px;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Custom utilities */
.text-gradient {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%);
}

/* Car detail page styles */
.car-gallery img {
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.car-gallery img:hover {
    transform: scale(1.05);
}

/* Rental form styles */
.rental-form {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
}

/* Price display */
.price-display {
    font-size: 2rem;
    font-weight: 700;
    color: #28a745;
}

/* Status badges */
.status-pending {
    background-color: #ffc107;
    color: #000;
}

.status-confirmed {
    background-color: #17a2b8;
    color: #fff;
}

.status-active {
    background-color: #28a745;
    color: #fff;
}

.status-completed {
    background-color: #6c757d;
    color: #fff;
}

.status-cancelled {
    background-color: #dc3545;
    color: #fff;
}

/* Enhanced Social links */
.social-links a {
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    text-align: center;
    line-height: 40px;
    margin-right: 10px;
}

.social-links a:hover {
    background: #343a40;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.social-links a i {
    font-size: 1.2rem;
}

/* Large social links for contact page */
.social-links-large {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #6c757d;
    transition: all 0.3s ease;
    padding: 20px;
    border-radius: 15px;
    background: #f8f9fa;
    min-width: 120px;
}

.social-link:hover {
    color: #343a40;
    background: #e3f2fd;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.social-link i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #343a40;
}

.social-link span {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Specific colors for social networks */
.social-link[title="Facebook"]:hover i {
    color: #1877f2;
}

.social-link[title="Instagram"]:hover i {
    color: #e4405f;
}

.social-link[title="Telegram"]:hover i {
    color: #0088cc;
}

.social-link[title="WhatsApp"]:hover i {
    color: #25d366;
}

/* Force white color for footer headings */
footer .container h5,
footer .container h6,
footer h5.fw-bold,
footer h6.fw-bold {
    color: #ffffff !important;
}

/* Custom Breadcrumb Styles */
.custom-breadcrumb {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.custom-breadcrumb .breadcrumb-item {
    display: flex;
    align-items: center;
}

.custom-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #6c757d;
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0 10px;
}

.breadcrumb-link {
    color: #6c757d;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 5px;
}

.breadcrumb-link:hover {
    color: #343a40;
    background: #e9ecef;
    text-decoration: none;
}

.custom-breadcrumb .breadcrumb-item.active {
    color: #343a40;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.custom-breadcrumb .breadcrumb-item.active i {
    color: #343a40;
}

/* Price and badge fixes */
.text-dark {
    color: #343a40 !important;
}

.bg-dark {
    background-color: #343a40 !important;
}

/* Стили для навигации по галерее изображений */
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.gallery-nav-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.gallery-prev {
    left: 15px;
}

.gallery-next {
    right: 15px;
}

/* Стили для навигации в модальном окне */
.modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1055;
}

.modal-nav-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}

/* Скрытие стрелочек на мобильных устройствах */
@media (max-width: 768px) {
    .gallery-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .gallery-prev {
        left: 10px;
    }
    
    .gallery-next {
        right: 10px;
    }
    
    .modal-nav-btn {
        width: 50px;
        height: 50px;
        font-size: 16px;
    }
    
    .modal-prev {
        left: 15px;
    }
    
    .modal-next {
        right: 15px;
    }
}

/* Стили для навигации в карточках товаров */

.car-card .card-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 0;
}

.car-card:hover .card-nav-btn {
    opacity: 1;
}

.car-card .card-nav-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.car-card .card-prev {
    left: 10px;
}

.car-card .card-next {
    right: 10px;
}

/* Адаптивность для карточек */
@media (max-width: 768px) {
    .car-card .card-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
        opacity: 0.8;
    }
    
    .car-card .card-prev {
        left: 8px;
    }
    
    .car-card .card-next {
        right: 8px;
    }
}

@media (max-width: 576px) {
    .car-card .card-nav-btn {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .car-card .card-prev {
        left: 5px;
    }
    
    .car-card .card-next {
        right: 5px;
    }
}

/* Исправление выравнивания и размеров изображений в карточках */


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

/* Улучшенные стили для навигации в карточках */
.car-card .card-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 0;
}

.car-card:hover .card-nav-btn {
    opacity: 1;
}

.car-card .card-nav-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.car-card .card-prev {
    left: 10px;
}

.car-card .card-next {
    right: 10px;
}

/* Адаптивность для карточек */
@media (max-width: 768px) {

@media (max-width: 576px) {

/* Правильное центрирование и обрезка изображений в карточках */


.car-card:hover .car-image {
    transform: translate(-50%, -50%) scale(1.05);
}

/* Альтернативный способ - через flexbox */
.car-card .card-image-container.flex-method {
    display: flex;
    align-items: center;
    justify-content: center;
}

.car-card .card-image-container.flex-method .car-image {
    position: static;
    transform: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.car-card .card-image-container.flex-method:hover .car-image {
    transform: scale(1.05);
}

/* Адаптивность */
@media (max-width: 768px) {

@media (max-width: 576px) {

/* Самый надежный способ центрирования изображений */
.car-card .card-image-container {
    position: relative;
    overflow: hidden;
    height: 250px;
    width: 100%;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.car-card .car-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    display: block;
}

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

/* Адаптивность */
@media (max-width: 768px) {
    .car-card .card-image-container {
        height: 200px;
    }
}

@media (max-width: 576px) {
    .car-card .card-image-container {
        height: 180px;
    }
}

/* Исправление центрирования изображений на странице детального просмотра */
.main-image {
    position: relative;
    overflow: hidden;
    height: 400px;
    width: 100%;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    display: block;
}

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

/* Стили для миниатюр в галерее */
.thumbnail-gallery .thumbnail-image {
    width: 100%;
    height: 80px;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    border-radius: 8px;
}

.thumbnail-gallery .thumbnail-image:hover {
    transform: scale(1.1);
}

/* Стили для модального окна */
.modal-body img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
}

/* Адаптивность для страницы детального просмотра */
@media (max-width: 768px) {
    .main-image {
        height: 300px;
    }
    
    .thumbnail-gallery .thumbnail-image {
        height: 60px;
    }
}

@media (max-width: 576px) {
    .main-image {
        height: 250px;
    }
    
    .thumbnail-gallery .thumbnail-image {
        height: 50px;
    }
}

/* Override Bootstrap primary color to match project theme */
.bg-primary {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%) !important;
}

/* More specific rule to override Bootstrap CDN */
body .bg-primary, .container .bg-primary, .cta-section.bg-primary {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%) !important;
}

/* Hero buttons styles */
.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

/* Mobile styles for hero buttons */
@media (max-width: 768px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
}
