/* Custom Styles for Dadricks Autos */

:root {
    --snow: #FCF7F8;
    --madder: #A31621;
}

/* Floating Navbar */
#navbar.navbar-transparent {
    background: transparent;
}

#navbar.navbar-scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12);
}

#navbar.navbar-transparent .navbar-link {
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

#navbar.navbar-transparent .navbar-link:hover {
    color: #f87171;
}

#navbar.navbar-scrolled .navbar-link {
    color: #374151;
    text-shadow: none;
}

#navbar.navbar-scrolled .navbar-link:hover {
    color: #A31621;
}

/* Active nav link */
#navbar.navbar-transparent .navbar-active {
    color: #ffffff;
    border-bottom: 2px solid #ffffff;
    padding-bottom: 2px;
}

#navbar.navbar-scrolled .navbar-active {
    color: #A31621;
    border-bottom: 2px solid #A31621;
    padding-bottom: 2px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--snow);
}

/* Keep decorative and animated elements inside the mobile viewport. */
html,
body {
    max-width: 100%;
    overflow-x: clip;
}

img,
video,
svg {
    max-width: 100%;
}

/* Allow long contact details to wrap instead of widening the page. */
a,
p,
span {
    overflow-wrap: anywhere;
}

@supports not (overflow: clip) {
    html,
    body {
        overflow-x: hidden;
    }
}

/* Page Loader */
#page-loader {
    position: fixed;
    inset: 0;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#page-loader.loader-hidden {
    opacity: 0;
    visibility: hidden;
}

body:has(#page-loader:not(.loader-hidden)) {
    overflow: hidden;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.loader-logo {
    height: 80px;
    width: auto;
    animation: loaderPulse 1.2s ease-in-out infinite;
}

.loader-bar {
    width: 160px;
    height: 4px;
    background: #f1f1f1;
    border-radius: 999px;
    overflow: hidden;
}

.loader-bar-fill {
    height: 100%;
    width: 0%;
    background: #A31621;
    border-radius: 999px;
    animation: loaderProgress 1.8s ease-in-out forwards;
}

@keyframes loaderPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.06); opacity: 0.85; }
}

@keyframes loaderProgress {
    0% { width: 0%; }
    60% { width: 75%; }
    100% { width: 100%; }
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--madder);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #82121a;
}

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

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Hover effects */
.hover-lift {
    transition: transform 0.3s ease, shadow 0.3s ease;
}

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