/* Custom CSS for Sri Sai Mobile Repairs V2 */
/* Corporate Professional Design */

/* ========================================
   CSS Variables
   ======================================== */
:root {
    --primary-dark: #102a43;
    --primary-medium: #334e68;
    --primary-light: #d9e2ec;
    --accent: #f59e0b;
    --success: #10b981;
    --text: #1e293b;
    --muted: #64748b;
}

/* ========================================
   Global Overrides
   ======================================== */
html {
    scroll-behavior: smooth;
}

/* Override Bootstrap carousel indicators */
.carousel-control-prev,
.carousel-control-next {
    width: auto;
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    display: none;
}

/* ========================================
   Floating Buttons Animation
   ======================================== */
.floating-btn {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 42, 67, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(16, 42, 67, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 42, 67, 0);
    }
}

.floating-btn:nth-child(2) {
    animation: pulse-green 2s infinite;
    animation-delay: 0.5s;
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* ========================================
   Form Focus Styles
   ======================================== */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15) !important;
}

/* ========================================
   Navbar Shadow on Scroll
   ======================================== */
#navbar.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ========================================
   Service Card Hover Effects
   ======================================== */
.service-card {
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(16, 42, 67, 0.1);
}

/* ========================================
   Brand Logo Fallback
   ======================================== */
.brand-fallback {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
}

/* ========================================
   Mobile Responsive Overrides
   ======================================== */
@media (max-width: 640px) {
    /* Hero section adjustments */
    h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }

    /* Service cards on mobile */
    .service-card {
        padding: 1rem;
    }

    /* Floating buttons - smaller on mobile */
    .floating-btn {
        width: 3rem !important;
        height: 3rem !important;
    }

    .floating-btn i {
        font-size: 1rem !important;
    }

    /* Trust signals wrap better */
    .trust-badge {
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    /* Carousel controls positioning */
    .carousel-control-prev,
    .carousel-control-next {
        display: none;
    }

    /* Stack contact cards */
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   AOS Animation Overrides
   ======================================== */
[data-aos] {
    pointer-events: auto !important;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ========================================
   Custom Scrollbar
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--primary-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-medium);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ========================================
   Form Status Messages
   ======================================== */
#form-status.success {
    background-color: #d1fae5;
    color: #065f46;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #10b981;
}

#form-status.error {
    background-color: #fee2e2;
    color: #991b1b;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #ef4444;
}

/* ========================================
   Link Underline Hover Effect
   ======================================== */
.nav-link-hover {
    position: relative;
}

.nav-link-hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.nav-link-hover:hover::after {
    width: 100%;
}

/* ========================================
   Button Loading State
   ======================================== */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 1rem;
    height: 1rem;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 0.5rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   Selection Color
   ======================================== */
::selection {
    background-color: var(--accent);
    color: white;
}

/* ========================================
   Image Lazy Load Placeholder
   ======================================== */
img[data-brand-img] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

img[data-brand-img].loaded {
    animation: none;
    background: transparent;
}
