/* Ultimate Fixes for Saudi Theme - Final solution for all visual issues */

/* Force Saudi theme colors on all elements */
* {
    box-sizing: border-box;
}

/* Override Bootstrap and other framework styles */
.navbar {
    background: white !important;
    box-shadow: 0 2px 10px rgba(27, 77, 62, 0.1) !important;
    border: none !important;
    padding: 1rem 0 !important;
}

.navbar-brand {
    color: #1B4D3E !important;
    font-weight: 700 !important;
    font-size: 1.5rem !important;
}

.navbar-nav .nav-link {
    color: #2E2E2E !important;
    font-weight: 500 !important;
    margin: 0 0.5rem !important;
    transition: color 0.3s ease !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #1B4D3E !important;
}

/* Force button styles */
button, .btn {
    border-radius: 50px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    border: none !important;
}

.btn-primary {
    background: #1B4D3E !important;
    color: white !important;
    border-color: #1B4D3E !important;
}

.btn-primary:hover {
    background: #143D31 !important;
    border-color: #143D31 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(27, 77, 62, 0.3) !important;
}

.btn-secondary {
    background: #B6935A !important;
    color: white !important;
    border-color: #B6935A !important;
}

.btn-secondary:hover {
    background: #a67c52 !important;
    border-color: #a67c52 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(182, 147, 90, 0.3) !important;
}

/* Force form styles */
.form-control {
    border-radius: 0.5rem !important;
    border: 1px solid #d1d5db !important;
    padding: 0.75rem 1rem !important;
    transition: all 0.3s ease !important;
}

.form-control:focus {
    border-color: #1B4D3E !important;
    box-shadow: 0 0 0 0.2rem rgba(27, 77, 62, 0.25) !important;
}

/* Force card styles */
.card {
    border-radius: 1rem !important;
    border: 1px solid #f3f4f6 !important;
    box-shadow: 0 10px 25px rgba(27, 77, 62, 0.1) !important;
    transition: all 0.3s ease !important;
}

.card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 20px 40px rgba(27, 77, 62, 0.15) !important;
}

/* Force footer styles */
footer {
    background: #1B4D3E !important;
    color: white !important;
    padding: 3rem 0 1rem !important;
}

/* Force hero section styles */
.hero,
.banner,
.jumbotron {
    background: linear-gradient(135deg, #1B4D3E 0%, #B6935A 100%) !important;
    color: white !important;
    padding: 4rem 0 !important;
}

/* Force text colors */
.text-primary {
    color: #1B4D3E !important;
}

.text-secondary {
    color: #B6935A !important;
}

.text-accent {
    color: #E4C590 !important;
}

/* Force background colors */
.bg-primary {
    background-color: #1B4D3E !important;
}

.bg-secondary {
    background-color: #B6935A !important;
}

.bg-accent {
    background-color: #E4C590 !important;
}

.bg-light {
    background-color: #F9F7F2 !important;
}

/* Force font families */
body {
    font-family: 'Tajawal', 'Noto Kufi Arabic', sans-serif !important;
}

html[lang="en"] body {
    font-family: 'Poppins', 'Roboto', sans-serif !important;
}

/* Force RTL support */
[dir="rtl"] {
    direction: rtl !important;
    text-align: right !important;
}

[dir="ltr"] {
    direction: ltr !important;
    text-align: left !important;
}

/* Hide problematic elements */
.header-placeholder,
.frontend-static-header-login-fronter,
.old-navbar,
.old-footer {
    display: none !important;
}

/* Force search tabs styling */
.search-tab {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    border: none !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 0.75rem !important;
    margin: 0 0.25rem !important;
    transition: all 0.3s ease !important;
}

.search-tab.active {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #1B4D3E !important;
}

.search-tab:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* Force home section background */
.home-section {
    background: linear-gradient(135deg, #1B4D3E 0%, #B6935A 100%) !important;
    color: white !important;
}

/* Force container max-width */
.container,
.container-fluid {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 1rem !important;
}

/* Force responsive grid */
.row {
    margin: 0 -0.5rem !important;
}

.col,
[class*="col-"] {
    padding: 0 0.5rem !important;
}

/* Force spacing */
.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.py-4 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

/* Force shadow styles */
.shadow {
    box-shadow: 0 10px 25px rgba(27, 77, 62, 0.1) !important;
}

.shadow-lg {
    box-shadow: 0 20px 40px rgba(27, 77, 62, 0.15) !important;
}

/* Force border radius */
.rounded {
    border-radius: 0.5rem !important;
}

.rounded-lg {
    border-radius: 0.75rem !important;
}

.rounded-xl {
    border-radius: 1rem !important;
}

/* Force transition effects */
* {
    transition: all 0.3s ease !important;
}

/* Force focus styles */
button:focus,
.btn:focus,
.form-control:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(27, 77, 62, 0.25) !important;
}

/* Force hover effects */
button:hover,
.btn:hover {
    transform: translateY(-2px) !important;
}

.card:hover {
    transform: translateY(-5px) !important;
}

/* Force text selection */
::selection {
    background: rgba(27, 77, 62, 0.2) !important;
    color: #1B4D3E !important;
}

/* Force scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #1B4D3E;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #143D31;
}

/* Force loading states */
.loading {
    opacity: 0.6 !important;
    pointer-events: none !important;
}

/* Force disabled states */
button:disabled,
.btn:disabled,
input:disabled,
textarea:disabled,
select:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

/* Force mobile responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 0.5rem !important;
    }
    
    .navbar-nav {
        text-align: center !important;
    }
    
    .navbar-nav .nav-link {
        margin: 0.25rem 0 !important;
    }
    
    .btn {
        width: 100% !important;
        margin-bottom: 0.5rem !important;
    }
    
    .card {
        margin-bottom: 1rem !important;
    }
}

/* Force print styles */
@media print {
    .navbar,
    .footer,
    button,
    .btn {
        display: none !important;
    }
    
    body {
        color: black !important;
        background: white !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
}

/* Final override - Make sure everything follows Saudi theme */
.saudi-theme * {
    font-family: inherit !important;
}

.saudi-theme .navbar {
    background: white !important;
}

.saudi-theme .hero {
    background: linear-gradient(135deg, #1B4D3E 0%, #B6935A 100%) !important;
}

.saudi-theme .btn-primary {
    background: #1B4D3E !important;
}

.saudi-theme .text-primary {
    color: #1B4D3E !important;
}