/* ========================================
   ObvioTrans Auto - Global Styles
   ======================================== */

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

/* Hero Gradient */
.hero-gradient {
    background: linear-gradient(135deg, #051024 0%, #0a1d3d 100%);
}

/* Page Header Gradient */
.page-header-gradient {
    background: linear-gradient(135deg, #051024 0%, #0a1d3d 100%);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #051024 0%, #0a1d3d 100%);
}

/* Card Hover Effect */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(5, 16, 36, 0.25);
}

/* Primary Button */
.btn-primary {
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(227, 27, 35, 0.4);
}

/* Secondary Button */
.btn-secondary {
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    transform: scale(1.02);
}

/* Section Title Underline */
.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: #E31B23;
    margin-top: 16px;
}

.section-title-center::after {
    margin-left: auto;
    margin-right: auto;
}

/* WhatsApp Floating Button Animation */
.whatsapp-float {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.1); 
    }
}

/* Form Focus States */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #E31B23;
    box-shadow: 0 0 0 3px rgba(227, 27, 35, 0.1);
}

/* Navigation Active State */
.nav-active {
    color: #E31B23;
    font-weight: 600;
}

/* Image Overlay */
.image-overlay {
    position: relative;
}

.image-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(5, 16, 36, 0.9), transparent);
}

/* Loading Animation */
.loading {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Scroll Animation */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Filter Buttons */
.filter-btn {
    transition: all 0.3s ease;
}

.filter-btn.active {
    background-color: #E31B23;
    color: white;
}

.filter-btn:not(.active):hover {
    background-color: #051024;
    color: white;
}

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

.service-card:hover {
    background-color: rgba(227, 27, 35, 0.05);
    border-color: #E31B23;
}

/* Timeline */
.timeline-item::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 0;
    width: 16px;
    height: 16px;
    background-color: #E31B23;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 0 0 4px rgba(227, 27, 35, 0.2);
}

/* Responsive Typography */
@media (max-width: 640px) {
    .font-display {
        font-size: 0.9em;
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: #B0B3B5;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #051024;
}

/* Print Styles */
@media print {
    .whatsapp-float,
    header,
    footer {
        display: none !important;
    }
}

/* ========================================
   RTL Support (Arabic)
   ======================================== */

/* Base RTL */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .text-left {
    text-align: right;
}

[dir="rtl"] .text-right {
    text-align: left;
}

/* Flex direction */
[dir="rtl"] .flex-row {
    flex-direction: row-reverse;
}

[dir="rtl"] .space-x-2 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-x-reverse: 1;
}

[dir="rtl"] .space-x-3 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-x-reverse: 1;
}

[dir="rtl"] .space-x-4 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-x-reverse: 1;
}

[dir="rtl"] .space-x-6 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-x-reverse: 1;
}

[dir="rtl"] .space-x-8 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-x-reverse: 1;
}

/* Margins */
[dir="rtl"] .ml-2 { margin-left: 0; margin-right: 0.5rem; }
[dir="rtl"] .ml-3 { margin-left: 0; margin-right: 0.75rem; }
[dir="rtl"] .ml-4 { margin-left: 0; margin-right: 1rem; }
[dir="rtl"] .ml-5 { margin-left: 0; margin-right: 1.25rem; }
[dir="rtl"] .mr-2 { margin-right: 0; margin-left: 0.5rem; }
[dir="rtl"] .mr-3 { margin-right: 0; margin-left: 0.75rem; }
[dir="rtl"] .mr-4 { margin-right: 0; margin-left: 1rem; }
[dir="rtl"] .mr-5 { margin-right: 0; margin-left: 1.25rem; }

/* Padding */
[dir="rtl"] .pl-6 { padding-left: 0; padding-right: 1.5rem; }
[dir="rtl"] .pl-12 { padding-left: 0; padding-right: 3rem; }
[dir="rtl"] .pr-6 { padding-right: 0; padding-left: 1.5rem; }
[dir="rtl"] .pr-12 { padding-right: 0; padding-left: 3rem; }

/* Positioning */
[dir="rtl"] .left-0 { left: auto; right: 0; }
[dir="rtl"] .right-0 { right: auto; left: 0; }
[dir="rtl"] .left-6 { left: auto; right: 1.5rem; }
[dir="rtl"] .right-6 { right: auto; left: 1.5rem; }
[dir="rtl"] .-left-6 { left: auto; right: -1.5rem; }
[dir="rtl"] .-right-6 { right: auto; left: -1.5rem; }
[dir="rtl"] .-left-8 { left: auto; right: -2rem; }
[dir="rtl"] .-right-8 { right: auto; left: -2rem; }

/* Border radius */
[dir="rtl"] .rounded-l-lg { border-radius: 0 0.5rem 0.5rem 0; }
[dir="rtl"] .rounded-r-lg { border-radius: 0.5rem 0 0 0.5rem; }

/* Section title underline */
[dir="rtl"] .section-title::after {
    margin-right: 0;
}

/* Navigation icons */
[dir="rtl"] .group-hover\\:translate-x-2:hover {
    transform: translateX(-0.5rem);
}

/* WhatsApp button position */
[dir="rtl"] .whatsapp-float {
    right: auto;
    left: 1.5rem;
}

/* Timeline RTL */
[dir="rtl"] .timeline-item::before {
    left: auto;
    right: -30px;
}

/* Language Selector */
.lang-selector {
    position: relative;
}

.lang-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.lang-btn:hover {
    background-color: rgba(227, 27, 35, 0.1);
}

.lang-btn.active {
    background-color: #E31B23;
    color: white;
}

/* Language dropdown */
.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: 0.5rem;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
}

[dir="rtl"] .lang-dropdown {
    right: auto;
    left: 0;
}

.lang-selector:hover .lang-dropdown,
.lang-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.lang-dropdown a:hover {
    background-color: #F8F9FA;
}

.lang-dropdown a.active {
    background-color: #E31B23;
    color: white;
}

/* Navigation Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: 0.5rem;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
    margin-top: 0.5rem;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

[dir="rtl"] .nav-dropdown-menu {
    left: auto;
    right: 0;
}
