/* 
 * HYBRID BOOTSTRAP + CUSTOM CSS APPROACH
 * Bootstrap handles: Grid system, basic components, responsive utilities
 * Custom CSS handles: Brand colors, specific animations, unique styling
 */

/* Custom Brand Colors and Variables */
:root {
    --brand-primary: #007bff;
    --brand-primary-dark: #0056b3;
    --brand-secondary: #6c757d;
    --brand-success: #28a745;
    --brand-dark: #2c3e50;
    --brand-light: #f8f9fa;
}

/* Top Header Bar Styling */
.top-header {
    font-size: 0.875rem;
    border-bottom: 1px solid #e9ecef;
    z-index: 1040; /* Higher than main header */
}

.top-header a:hover {
    color: var(--brand-primary) !important;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    color: #6c757d;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.social-icon:hover {
    background: var(--brand-primary);
    color: white;
    transform: translateY(-2px);
}

/* Reset and Base Styles - Keep minimal since Bootstrap handles most */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Custom Button Styling to Override Bootstrap */
.cta-button, .btn-primary {
    background: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cta-button:hover, .btn-primary:hover {
    background: var(--brand-primary-dark) !important;
    border-color: var(--brand-primary-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Main Header positioning */
.main-header {
    position: fixed;
    top: 44px; /* Position below the top header bar */
    left: 0;
    right: 0;
    z-index: 1030;
}

@media (max-width: 768px) {
    .main-header {
        position: fixed;
        top: 0; /* Reset to top on mobile since top header is hidden */
        z-index: 1030;
    }
}

/* Hero Section Custom Styling */
.hero {
    background: linear-gradient(135deg, var(--brand-light) 0%, #e9ecef 100%);
    margin-top: 120px; /* Account for Bootstrap navbar height + top header */
}

.hero-text h1 {
    color: var(--brand-dark);
    line-height: 1.2;
}

.hero-text h3 {
    color: var(--brand-primary);
}

/* Navigation Dropdown Styling */
.navbar .dropdown-menu {
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    margin-top: 0;
    display: none;
}

.navbar .dropdown-item {
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.navbar .dropdown-item:hover {
    background-color: var(--brand-primary);
    color: white;
}

.navbar .dropdown-toggle::after {
    margin-left: 0.5rem;
}

/* Dropdown Hover Functionality */
.navbar .dropdown:hover .dropdown-menu,
.navbar .dropdown-menu:hover {
    display: block !important;
}

.navbar .dropdown:hover .dropdown-menu {
    animation: fadeInUp 0.3s ease-in-out;
}

/* Remove gap between dropdown trigger and menu */
.navbar .dropdown-toggle {
    padding-bottom: 0.5rem;
}

.navbar .dropdown-menu {
    top: 100%;
    left: 0;
    margin-top: 0;
    padding-top: 0.5rem;
}

/* Extend hover area to prevent gaps */
.navbar .dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 0.5rem;
    background: transparent;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Service Card Hover Effects */
.service-card {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--brand-primary);
}

a .service-card .card-title,
a .service-card .card-text {
    color: inherit;
}

a:hover .service-card .card-title {
    color: var(--brand-primary);
}

.feature {
    font-weight: 500;
    color: var(--brand-success);
}

/* Google Reviews Badge in Hero */
.google-reviews-badge {
    transition: all 0.3s ease;
}

.google-reviews-badge:hover {
    transform: translateY(-2px);
}

.google-reviews-badge .stars {
    display: flex;
    align-items: center;
    gap: 2px;
}

.star-gradient {
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 50%, #ff8c00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.3rem !important;
    filter: drop-shadow(0 1px 2px rgba(255, 140, 0, 0.3));
    transition: all 0.3s ease;
}

.google-reviews-badge:hover .star-gradient {
    transform: scale(1.1);
    filter: drop-shadow(0 2px 4px rgba(255, 140, 0, 0.5));
}

.google-reviews-badge img {
    transition: transform 0.3s ease;
}

.google-reviews-badge:hover img {
    transform: scale(1.1);
}

/* Service Cards Custom Enhancement */
.service-card {
    background: var(--brand-light);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.service-card:hover {
    background: #ffffff;
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1) !important;
    border-color: var(--brand-primary);
}

.service-card .card-title {
    color: var(--brand-dark);
    font-weight: 600;
}

.service-card .bi {
    transition: transform 0.3s ease;
}

.service-card:hover .bi {
    transform: scale(1.1);
}

/* Contact Section Enhancements */
.contact-details a:hover {
    color: var(--brand-primary-dark) !important;
}

/* Trusted by Community Section */
.trusted-community {
    background: #fff;
}

.trust-indicator {
    transition: transform 0.3s ease;
}

.trust-indicator:hover {
    transform: translateY(-5px);
}

.trust-indicator .bi {
    transition: transform 0.3s ease, color 0.3s ease;
}

.trust-indicator:hover .bi {
    transform: scale(1.1);
    color: var(--brand-primary-dark) !important;
}

/* Owner Section Styling */
.owner-image-container {
    position: relative;
}

.owner-photo {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 4px solid var(--brand-primary) !important;
}

.owner-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 123, 255, 0.2) !important;
}

.owner-info h3 {
    color: var(--brand-dark);
    position: relative;
}

.owner-info h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--brand-primary);
    border-radius: 2px;
}

.owner-info .d-flex {
    transition: transform 0.2s ease;
}

.owner-info .d-flex:hover {
    transform: translateX(5px);
}

.owner-info .bi-check-circle-fill {
    transition: transform 0.2s ease;
}

.owner-info .d-flex:hover .bi-check-circle-fill {
    transform: scale(1.1);
}

.testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid transparent;
}

.testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: var(--brand-primary);
}

.testimonial-card blockquote p {
    font-style: italic;
    position: relative;
}

.testimonial-card blockquote p::before {
    content: '"';
    font-size: 2rem;
    color: var(--brand-primary);
    position: absolute;
    left: -15px;
    top: -5px;
    font-family: serif;
}

.testimonial-card blockquote p::after {
    content: '"';
    font-size: 2rem;
    color: var(--brand-primary);
    font-family: serif;
}

.testimonial-avatar .bi-person-circle {
    transition: color 0.3s ease;
}

.testimonial-card:hover .testimonial-avatar .bi-person-circle {
    color: var(--brand-primary-dark) !important;
}

/* Google Reviews specific styling */
.testimonial-avatar img {
    border: 2px solid var(--brand-light);
    transition: border-color 0.3s ease;
}

.testimonial-card:hover .testimonial-avatar img {
    border-color: var(--brand-primary);
}

/* Loading spinner in testimonials */
#testimonials-container .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Custom Animation Classes */
.fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom spacing utilities to supplement Bootstrap */
.py-6 {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
}

/* Enhanced navbar styling */
.navbar-brand img {
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .hero {
        margin-top: 56px; /* Smaller navbar on mobile without top header */
    }
    
    .hero-text h1 {
        font-size: 2.5rem !important;
    }
    
    /* Hide top header on mobile */
    .top-header {
        display: none !important;
    }
    
    /* Hide stuff on mobile */
    .hero-image,
    /* .service-image, */
    .recent-projects .card img,
    .why-choose-us img,
    .contact-info img,
    .services-list,
    .trust-indicator,
    .service-nav
    {
        display: none !important;
    }
    
    /* Keep owner photo visible but smaller on mobile */
    .owner-photo {
        width: 180px !important;
        height: 180px !important;
    }
    
    /* Center owner section on mobile */
    .owner-info {
        text-align: center;
    }
    
    .owner-info h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    /* Ensure hero section takes full width when image is hidden */
    .hero .row {
        justify-content: center;
    }
    
    .hero .col-lg-6 {
        text-align: center;
    }
    
    /* Center Google reviews badge on mobile */
    .google-reviews-badge {
        margin: 0 auto !important;
    }
    
    /* Adjust why-choose-us section layout when image is hidden */
    .why-choose-us .row {
        justify-content: center;
    }
}

/* Loading states and performance */
.img-fluid {
    transition: opacity 0.3s ease;
}

/* Reviews Carousel Styling */
.reviews-section {
    max-width: 1000px;
    margin: 0 auto;
}

#reviewsCarousel {
    position: relative;
}

#reviewsCarousel .carousel-item {
    padding: 0 15px;
}

#reviewsCarousel .carousel-control-prev,
#reviewsCarousel .carousel-control-next {
    width: 50px;
    height: 50px;
    background-color: var(--brand-primary);
    border-radius: 50%;
    opacity: 0.8;
    transition: all 0.3s ease;
    top: 50%;
    transform: translateY(-50%);
}

#reviewsCarousel .carousel-control-prev {
    left: -70px;
}

#reviewsCarousel .carousel-control-next {
    right: -70px;
}

#reviewsCarousel .carousel-control-prev:hover,
#reviewsCarousel .carousel-control-next:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

#reviewsCarousel .carousel-control-prev-icon,
#reviewsCarousel .carousel-control-next-icon {
    background-size: 20px 20px;
}

/* Reviews carousel responsive */
@media (max-width: 768px) {
    #reviewsCarousel .carousel-control-prev {
        left: -30px;
    }
    
    #reviewsCarousel .carousel-control-next {
        right: -30px;
    }
    
    #reviewsCarousel .carousel-control-prev,
    #reviewsCarousel .carousel-control-next {
        width: 40px;
        height: 40px;
    }
}

/* Social media buttons custom styling */
.btn-outline-primary {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.btn-outline-primary:hover {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

/* Contact Form Enhancements */
.contact-form {
    margin-top: 76px; /* Account for fixed navbar */
}

.form-control:focus, .form-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-control-lg, .form-select-lg {
    padding: 0.75rem 1rem;
}

.form-label {
    color: var(--brand-dark);
    margin-bottom: 0.5rem;
}

/* Confirmation Page Styling */
.confirmation {
    margin-top: 76px;
}

.confirmation .card {
    border-radius: 1rem;
}

.confirmation .bi-check-circle-fill {
    animation: checkmarkBounce 0.6s ease-in-out;
}

@keyframes checkmarkBounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Trust indicators animation */
.trust-indicators .bi {
    transition: transform 0.3s ease;
}

.trust-indicators .p-3:hover .bi {
    transform: scale(1.1);
}

/* Form validation styling */
.was-validated .form-control:valid {
    border-color: var(--brand-success);
}

.was-validated .form-control:invalid {
    border-color: #dc3545;
}

/* Project cards hover effect */
.recent-projects .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recent-projects .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

/* Services Page Specific Styles */
.services-hero {
    background: linear-gradient(135deg, var(--brand-light) 0%, #e9ecef 100%);
    margin-top: 76px;
}

.service-nav {
    border-bottom: 1px solid #e9ecef;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
}

.service-navigation .btn {
    transition: all 0.3s ease;
    border-radius: 25px;
    font-weight: 500;
}

.service-navigation .btn.active,
.service-navigation .btn:hover {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.service-section {
    scroll-margin-top: 140px; /* Account for sticky nav */
}

.service-content .display-6 {
    color: var(--brand-dark);
    line-height: 1.2;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* Animation removed per user request */
/* .feature-item:hover {
    transform: translateX(5px);
} */

.feature-item i {
    font-size: 1.2rem;
}

.process-section {
    margin-top: 4rem;
    padding: 3rem 0;
    background: rgba(248, 249, 250, 0.5);
    border-radius: 1rem;
}

/* Mobile responsive process section */
@media (max-width: 768px) {
    .process-section {
        margin-top: 2rem;
        padding: 1.5rem 0;
    }
}

.process-step {
    position: relative;
    padding: 2rem 1rem;
    transition: transform 0.3s ease;
}

/* Mobile responsive process steps */
@media (max-width: 768px) {
    .process-step {
        padding: 1rem 0.5rem;
    }
}

.process-step:hover {
    transform: translateY(-10px);
}

.process-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    transition: transform 0.3s ease;
}

.process-step:hover .process-number {
    transform: scale(1.1);
}

.feature-card {
    background: white;
    border-radius: 1rem;
    border: 1px solid #e9ecef;
    height: 100%;
}

.feature-card:hover {
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    border-color: var(--brand-primary);
}

.feature-card:hover i {
    color: var(--brand-primary-dark) !important;
}

.why-choose-us {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.cta-section {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%) !important;
}

.cta-section .btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255,255,255,0.3);
}

.cta-section .btn-outline-light:hover {
    background-color: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

/* Service Images */
.service-image img {
    transition: transform 0.3s ease;
}

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

/* Back to Top Button */
#backToTop {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

#backToTop:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Animation Keyframes */
@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Mobile optimizations for services page */
@media (max-width: 768px) {
    .services-hero {
        margin-top: 56px;
    }
    
    .service-nav {
        top: 56px !important;
    }
    
    .service-section {
        scroll-margin-top: 120px;
    }
    
    .service-navigation .d-flex {
        flex-direction: column;
        gap: 0.5rem !important;
    }
    
    .service-navigation .btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
    
    .process-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .feature-card {
        margin-bottom: 1rem;
    }
    
    .display-6 {
        font-size: 2rem !important;
    }
    
    .cta-section .d-flex {
        flex-direction: column !important;
        gap: 1rem !important;
    }
}

/* Service Areas Map Styling */
.service-areas-map {
    margin: 3rem 0;
}

.map-container {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

#serviceMap {
    z-index: 1;
    border-radius: 1rem;
}

/* Image tag styles for indicating photo source */
.service-image,
.company-car-image {
    position: relative;
}

.image-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.image-tag.genuine {
    background-color: #28a745;
    color: white;
}

.image-tag.stock {
    background-color: #ffc107;
    color: #212529;
}

/* Mobile responsive image tags */
@media (max-width: 768px) {
    .image-tag {
        font-size: 0.65rem;
        padding: 3px 6px;
        top: 8px;
        left: 8px;
    }
}

/* Custom map popup styling */
.leaflet-popup-content-wrapper {
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.leaflet-popup-content {
    margin: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Mobile optimizations for map */
@media (max-width: 768px) {
    .service-areas-map {
        margin: 2rem 0;
    }
    
    #serviceMap {
        height: 350px !important;
        border-radius: 0.5rem;
    }
    
    .map-container {
        border-radius: 0.5rem;
    }
}

/* Lighter placeholder text for better UX */
.form-control::placeholder,
.form-select::placeholder {
    color: #adb5bd !important;
    opacity: 0.8;
}

.form-control::-webkit-input-placeholder {
    color: #adb5bd !important;
    opacity: 0.8;
}

.form-control::-moz-placeholder {
    color: #adb5bd !important;
    opacity: 0.8;
}

.form-control:-ms-input-placeholder {
    color: #adb5bd !important;
    opacity: 0.8;
}
