/* KAGS Investment - Public Website Styles */

:root {
    --kags-red: #5c070e;
    --kags-dark-red: #3d0509;
    --kags-medium-red: #7a0a12;
    --kags-light-red: #8b0f1a;
    --kags-accent-red: #a01520;
    --primary-blue: #1e40af;
    --success-green: #059669;
    --warning-yellow: #d97706;
    --info-cyan: #0891b2;
    --dark-gray: #1f2937;
    --light-gray: #f8fafc;
}

/* Global Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1f2937;
}

/* Override Bootstrap colors */
.bg-kags-red {
    background: url('/images/Background1.jpg') no-repeat center center !important;
    background-size: cover !important;
    background-attachment: fixed !important;
    image-rendering: -webkit-optimize-contrast !important;
    image-rendering: crisp-edges !important;
    position: relative;
}

/* Enhanced navbar text protection */
.bg-kags-red::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(42, 4, 7, 0.4) 0%, 
        rgba(92, 7, 14, 0.3) 40%, 
        rgba(139, 15, 26, 0.2) 70%, 
        rgba(255, 255, 255, 0.1) 100%);
    z-index: 1;
}

/* Ensure navbar content stays above the background */
.bg-kags-red .container {
    position: relative;
    z-index: 2;
}

.text-primary {
    color: var(--kags-medium-red) !important;
}

.btn-primary {
    background-color: var(--kags-medium-red);
    border-color: var(--kags-medium-red);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--kags-accent-red);
    border-color: var(--kags-accent-red);
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--kags-medium-red);
    border-color: var(--kags-medium-red);
    font-weight: 600;
}

.btn-outline-primary:hover {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

/* Navigation */
.navbar {
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    min-height: 70px;
    display: flex;
    align-items: center;
}

/* Enhanced 3D shadow effect when navbar is over hero */
.hero-section .navbar,
.navbar.fixed-top {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 
                0 8px 40px rgba(0, 0, 0, 0.15),
                0 12px 60px rgba(0, 0, 0, 0.1);
}

/* Enhanced shadow effect for navbar on homepage when featured section is below */
.navbar.fixed-top {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 
                0 8px 40px rgba(0, 0, 0, 0.15),
                0 12px 60px rgba(0, 0, 0, 0.1);
}

/* Additional shadow when scrolled over featured section */
.navbar.fixed-top.scrolled-over-featured {
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4), 
                0 12px 50px rgba(0, 0, 0, 0.2),
                0 16px 70px rgba(0, 0, 0, 0.15);
}

.navbar .container {
    display: flex;
    align-items: flex-end;
    min-height: auto;
    justify-content: space-between;    
}

/* Navbar Logo Styling */
.navbar-logo {
    height: 100px;
    width: auto;
    max-width: 800px;
    object-fit: auto;
    align-self: center;    
    transition: all 0.3s ease;
}

.navbar-logo:hover {
    transform: scale(1.05);
}

/* Navbar Brand  controls the spacing of the Nav bar items to middle height */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white !important;
    text-decoration: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.3));
    align-self: flex-end; /* Changed from flex-end to center */
    margin-bottom: 0; /* Changed from 0.5rem to 0 */
}

.navbar-brand:hover {
    color: white !important;
    text-decoration: none;
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    color: white !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    height: auto !important;
    text-decoration: none !important;
}

.navbar-nav .nav-link i {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); 
}

.navbar-nav .nav-link span {
    font-size: 0.85rem;
    text-align: center;
    white-space: nowrap;
    display: block !important;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    text-decoration: none !important;
    transform: scale(1.25);
}

.navbar-nav .nav-link:hover i {
    color: white !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.navbar-nav .nav-link:hover span {
    color: white !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

/* Hero Section with Slideshow */
.hero-section {
    position: relative;
    min-height: 100vh;
    margin-top: -120px;
    padding-top: 120px;
    overflow: hidden;
}

.hero-slideshow {
    position: relative;
    width: 100%;
    height: 100vh;
}

.hero-slide {
    position: relative;
    width: 100%;
    height: 100vh;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slide .container {
    max-width: 90%;
    width: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(185, 28, 28, 0.075));
    z-index: 1;
}

.hero-overlay {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-content {
    animation: fadeInUp 1s ease-out;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-specs {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.spec-item {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spec-item i {
    color: #fbbf24;
}

.hero-stats {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 1s ease-out 0.3s both;
}

/* Seamless navbar to hero transition */
.hero-section.bg-kags-red {
    position: relative;
    border-top: none;
    margin-top: 0 !important;
}

.hero-section.bg-kags-red::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to bottom, 
        rgba(92, 7, 14, 0.8) 0%, 
        rgba(92, 7, 14, 1) 100%);
    z-index: -1;
}

/* Carousel Customization */
.carousel-control-prev,
.carousel-control-next {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.carousel-control-prev {
    left: 2rem;
}

.carousel-control-next {
    right: 2rem;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: rgba(255, 255, 255, 0.2);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 20px;
    height: 20px;
}

/* Custom Carousel Indicators */
.carousel-indicators {
    bottom: 2rem;
    margin-bottom: 0;
    justify-content: center;
    gap: 0.25rem;
}

.carousel-indicators button {
    width: 4px;
    height: 0.5px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 1px;
    border: none;
    margin: 0;
    transition: all 0.4s ease;
    text-indent: 0;
    opacity: 0.6;
    transform: scale(1);
}

.carousel-indicators button.active {
    background: rgba(255, 255, 255, 1);
    opacity: 1;
    transform: scale(1.5);
    width: 6px;
    height: 0.33px;
}

.carousel-indicators button:hover {
    background: rgba(255, 255, 255, 0.6);
    opacity: 0.9;
}

.indicator-text {
    display: none;
}

/* Carousel Fade Effect */
.carousel-fade .carousel-item {
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

.carousel-fade .carousel-item.active {
    opacity: 1;
}

/* Car Cards */
.car-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.car-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.car-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.car-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background-color: #f8f9fa;
    transition: transform 0.3s ease;
}

.car-card:hover .car-image img {
    transform: scale(1.05);
}

.placeholder-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
}

.car-badge {
    position: absolute;
    top: 15px;
    right: 15px;
}

.car-badge .badge {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
}

/* Custom status badge colors */
.bg-status-available {
    background-color: var(--success-green) !important;
    color: white !important;
}

.bg-status-under-offer {
    background-color: #6b7280 !important;
    color: white !important;
}

.bg-status-privately-owned {
    background-color: var(--primary-blue) !important;
    color: white !important;
}

.bg-status-coming-soon {
    background-color: #bbf7d0 !important;
    color: #065f46 !important;
}

.car-info {
    padding: 1.5rem;
}

.car-title {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark-gray);
}

.car-specs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.car-specs span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.car-price {
    margin-bottom: 1.5rem;
}

.car-actions {
    display: flex;
    gap: 0.5rem;
}

.car-actions .btn {
    flex: 1;
    font-size: 0.9rem;
    padding: 0.6rem;
}

/* Advantage Cards */
.advantage-card {
    padding: 2rem 1rem;
    height: 100%;
    transition: transform 0.3s ease;
}

.advantage-card:hover {
    transform: translateY(-5px);
}

.advantage-icon {
    margin-bottom: 1.5rem;
}

.advantage-card h5 {
    margin-bottom: 1rem;
    color: var(--dark-gray);
}

/* Contact Form */
.contact-form .form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 10px;
    padding: 0.8rem 1rem;
}

.contact-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.contact-form .form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(30, 64, 175, 0.25);
    color: white;
}

/* Contact Info */
.contact-info .bi {
    color: var(--primary-blue);
}

/* Social Links */
.social-links a {
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-blue) !important;
}

/* Search and Filter Section */
.search-section {
    background: var(--light-gray);
    padding: 1rem 0;
    margin-top: -20px;
    padding-top: calc(1rem + 20px);
}

.search-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Car Listing Grid */
.car-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Car Detail Page */
.car-detail-hero {
    background: var(--light-gray);
    padding: 2rem 0;
}

.car-gallery {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.car-gallery img {
    width: 100%;
    height: 400px;
    object-fit: contain;
    object-position: center;
    background-color: #f5f5f5;
    border-radius: 8px;
}

.car-specs-table {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.specs-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.specs-row:last-child {
    border-bottom: none;
}

.specs-label {
    font-weight: 600;
    color: var(--dark-gray);
}

.specs-value {
    color: #6b7280;
}

/* Loan Calculator Styles */
.loan-calculator {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.loan-calculator .form-label {
    font-weight: 600;
    color: var(--kags-medium-red);
    margin-bottom: 8px;
}

.loan-calculator .form-control {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.loan-calculator .form-control:focus {
    border-color: var(--kags-medium-red);
    box-shadow: 0 0 0 3px rgba(122, 10, 18, 0.1);
    outline: none;
}

.loan-calculator .input-group-text {
    background-color: var(--kags-medium-red);
    color: white;
    border: 2px solid var(--kags-medium-red);
    font-weight: 600;
}

.calculation-results {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.calculation-results .fw-bold {
    font-size: 18px;
    margin-top: 5px;
}

.calculation-results .text-primary {
    color: var(--kags-medium-red) !important;
    font-size: 22px !important;
}

.calculation-results .text-warning {
    color: var(--warning-yellow) !important;
}

.calculation-results .text-muted {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Highlight the loan calculator section */
.car-specs-table:has(.loan-calculator) {
    border: 2px solid var(--kags-medium-red);
    border-radius: 12px;
    padding: 20px;
    background: linear-gradient(135deg, #fef7f7 0%, #fef2f2 100%);
    box-shadow: 0 6px 12px rgba(122, 10, 18, 0.1);
}

.car-specs-table:has(.loan-calculator) h4 {
    color: var(--kags-medium-red);
    border-bottom: 2px solid var(--kags-medium-red);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Mobile navbar adjustments */
@media (max-width: 991.98px) {
    .navbar {
        min-height: 70px;
        padding: 1rem 0;
    }
    
    .navbar .container {
        min-height: 50px;
    }
    
    .navbar-nav .nav-link {
        height: auto !important;
        flex-direction: row !important;
        justify-content: flex-start !important;
        padding: 0.5rem 1rem !important;
    }
    
    .navbar-nav .nav-link i {
        margin-right: 0.5rem;
        margin-bottom: 0;
    }
    
    .hero-section {
        margin-top: -70px;
        padding-top: 70px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
        padding: 2rem 0;
    }
    
    .hero-stats {
        margin-top: 2rem;
    }
    
    .car-specs {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .car-actions {
        flex-direction: column;
    }
    
    .advantage-card {
        margin-bottom: 2rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-logo {
        height: 32px;
        margin-right: 8px;
    }
    
    .car-grid {
        grid-template-columns: 1fr;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.8rem;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-blue);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .contact-form,
    .social-links {
        display: none !important;
    }
    
    .car-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 24px;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
    animation: whatsappPulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    color: white;
    text-decoration: none;
}

.whatsapp-float:active {
    transform: scale(0.95);
}

@keyframes whatsappPulse {
    0% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    }
    50% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.6);
    }
    100% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    }
}

/* Responsive adjustments for WhatsApp button */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}
