:root {
    /* Root Variables */
    --primary-color: #2563eb;
    --secondary-color: #ffc107;
    --success-color: #16a34a;
    --danger-color: #dc2626;
    --warning-color: #ea580c;
    --info-color: #0ea5e9;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;
}

/* Base Styles */
html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Prevent horizontal overflow */
.container,
.container-fluid {
    overflow-x: hidden;
}

/* Allow overflow for navbar to show dropdown */
.navbar .container,
.navbar .container-fluid {
    overflow: visible !important;
}

.row {
    margin-left: 0;
    margin-right: 0;
}

/* Navbar Sticky Fix for Mobile */
.navbar.sticky-top {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    width: 100%;
    overflow: visible;
}

.navbar-collapse {
    background: inherit;
}

@media (max-width: 991.98px) {
    .navbar.sticky-top .navbar-collapse {
        background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
        margin: 0 -1rem;
        padding: 0 1rem;
    }
}

/* Decorative Circles Responsive Sizing */
@media (max-width: 768px) {
    .position-absolute.top-0.start-0.translate-middle.rounded-circle {
        width: 130px !important;
        height: 130px !important;
    }

    .position-absolute.bottom-0.end-0.translate-middle.rounded-circle {
        width: 60px !important;
        height: 60px !important;
    }
}

/* Hero Slider Modern Overlay */
.carousel-item {
    position: relative;
}

.carousel-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            rgba(30, 64, 175, 0.5) 0%,
            rgba(37, 99, 235, 0.4) 40%,
            rgba(255, 193, 7, 0.15) 70%,
            rgba(14, 165, 233, 0.3) 100%);
    z-index: 1;
}

.carousel-caption {
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 10 !important;
}

main {
    flex: 1;
}

/* Accent Color Usage - Strategic Highlights */
.badge.bg-warning,
.btn-warning {
    background-color: var(--secondary-color) !important;
    color: #000 !important;
}

.text-warning {
    color: var(--secondary-color) !important;
}

.border-warning {
    border-color: var(--secondary-color) !important;
}

/* Icon Accents - Subtle Yellow Highlights */
.icon-accent {
    color: var(--secondary-color);
}

.hover-accent:hover {
    color: var(--secondary-color) !important;
    transition: color 0.2s ease;
}

/* Price and Important Info Highlights */
.price-highlight {
    color: var(--secondary-color);
    font-weight: 700;
}

/* Footer */
.footer {
    background-color: #0f172a;
    /* Darker, more premium blue-gray */
    color: #94a3b8;
    padding-top: 5rem;
    padding-bottom: 2rem;
    margin-top: auto;
    /* Ensure it stays at bottom if flex fails */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer h5 {
    color: #f8fafc;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
}

.footer p {
    line-height: 1.8;
}

.footer a {
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
}

.footer a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer ul li {
    margin-bottom: 0.75rem;
}

/* Footer optimization for medium screens (1024px laptops) */
@media (min-width: 992px) and (max-width: 1199px) {
    .footer {
        padding-top: 2.5rem;
    }

    .footer h5 {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }

    .footer .small,
    .footer p,
    .footer a,
    .footer li {
        font-size: 0.8rem;
    }

    .footer ul li {
        margin-bottom: 0.5rem;
    }
}

.social-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    margin-right: 0.75rem;
    transition: all 0.3s ease;
    color: #cbd5e1;
}

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

.footer-input {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.75rem 1rem;
}

.footer-input:focus {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    color: white;
    box-shadow: none;
}

.footer-input::placeholder {
    color: #64748b;
}

/* Mobile Horizontal Scroll */
@media (max-width: 768px) {
    .mobile-scroll-container {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 1.5rem;
        margin-right: -1.5rem;
        /* Offset container padding */
        padding-right: 1.5rem;
        /* Add padding for last item */
        -webkit-overflow-scrolling: touch;
    }

    .mobile-scroll-container::-webkit-scrollbar {
        display: none;
    }

    .mobile-scroll-container .col-lg-4,
    .mobile-scroll-container .col-md-6 {
        flex: 0 0 85%;
        max-width: 85%;
        scroll-snap-align: center;
        margin-right: 1rem;
    }

    /* Center the first item if needed or adjust margins */
    .mobile-scroll-container .col-lg-4:first-child,
    .mobile-scroll-container .col-md-6:first-child {
        margin-left: 0.5rem;
    }
}

/* Form Styling (Static) */
.form-floating .form-control,
.form-floating .form-select {
    border: 1px solid #dee2e6;
    background-color: #fff;
}

.form-floating .form-control:focus,
.form-floating .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.1);
}

/* Button Styling */
#talepForm button[type="submit"] {
    font-weight: 600;
    letter-spacing: 0.5px;
}

#talepForm button[type="submit"]:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Hero Slider */
.hero-img {
    height: 400px;
    object-fit: cover;
    filter: brightness(0.7);
    width: 100%;
}

.carousel-item {
    height: 400px;
    background-color: #000;
}

/* Animations */
.animate-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

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

/* Sidebar Navigation Icons */
.nav-link i {
    width: 24px;
    text-align: center;
}

/* Dropdown Menu Z-Index Fix */
.navbar .dropdown-menu {
    z-index: 9999 !important;
    position: absolute !important;
}

.navbar-nav .dropdown {
    position: relative;
    z-index: 9998 !important;
}

.dropdown-menu.show {
    z-index: 9999 !important;
}