/* Tailwind CSS Directives */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Custom Styles for AL-AZZAZI General Contracting */

/* Arabic Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&family=Tajawal:wght@300;400;500;700;900&display=swap');

/* Brand Colors */
:root {
    --primary-navy: #1F2A3D;
    --primary-turquoise: #5AC5B7;
    --turquoise-hover: #4aa89a;
    --navy-hover: #2a3a52;
}

/* RTL Support */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="ltr"] {
    direction: ltr;
    text-align: left;
}

/* Arabic Font Family */
body[dir="rtl"],
[dir="rtl"] * {
    font-family: 'Cairo', 'Tajawal', 'Segoe UI', Tahoma, Arial, sans-serif;
}

body[dir="ltr"],
[dir="ltr"] * {
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Hero Section */
.hero-section {
    position: relative;
}

.hero-overlay {
    background: linear-gradient(135deg, rgba(31, 42, 61, 0.9) 0%, rgba(31, 42, 61, 0.7) 100%);
}

.hero-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-fade-in-delay {
    animation: fadeIn 1s ease-out 0.3s both;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 1s ease-out 0.6s both;
}

/* Service Cards Hover Effect */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-detail-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-detail-card:hover {
    transform: translateY(-5px);
}

/* Project Cards */
.project-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.project-card img {
    transition: transform 0.5s ease;
}

.project-card:hover img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(31, 42, 61, 0.95), transparent);
    padding: 20px;
    color: white;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.project-card:hover .project-overlay {
    transform: translateY(0);
}

/* Filter Buttons */
.filter-btn {
    background: #f3f4f6;
    color: #374151;
    border: 2px solid transparent;
}

.filter-btn:hover {
    background: var(--primary-turquoise);
    color: white;
    border-color: var(--primary-turquoise);
}

.filter-btn.active {
    background: var(--primary-turquoise);
    color: white;
    border-color: var(--primary-turquoise);
}

/* Header Scroll Effect */
header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Testimonials */
.testimonial-slide {
    animation: fadeIn 0.5s ease-in;
}

/* Form Styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-turquoise);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-navy) 0%, #2a3a52 100%);
}

/* Loading Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading {
    animation: spin 1s linear infinite;
}

/* Modal Styles */
#project-modal {
    display: flex;
}

#project-modal.hidden {
    display: none;
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
}

/* Smooth Transitions */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-turquoise);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--turquoise-hover);
}

/* RTL Spacing Support */
[dir="rtl"] .space-x-8 > * + * {
    margin-right: 2rem;
    margin-left: 0;
}

[dir="ltr"] .space-x-8 > * + * {
    margin-left: 2rem;
    margin-right: 0;
}

[dir="rtl"] .space-x-4 > * + * {
    margin-right: 1rem;
    margin-left: 0;
}

[dir="ltr"] .space-x-4 > * + * {
    margin-left: 1rem;
    margin-right: 0;
}

[dir="rtl"] .space-x-3 > * + * {
    margin-right: 0.75rem;
    margin-left: 0;
}

[dir="ltr"] .space-x-3 > * + * {
    margin-left: 0.75rem;
    margin-right: 0;
}

[dir="rtl"] .space-x-2 > * + * {
    margin-right: 0.5rem;
    margin-left: 0;
}

[dir="ltr"] .space-x-2 > * + * {
    margin-left: 0.5rem;
    margin-right: 0;
}

/* RTL Text Alignment */
[dir="rtl"] {
    text-align: right;
}

[dir="ltr"] {
    text-align: left;
}

/* RTL/LTR Conditional Display */
.rtl\:hidden {
    display: none;
}

[dir="rtl"] .rtl\:hidden {
    display: none;
}

[dir="ltr"] .rtl\:hidden {
    display: block;
}

.ltr\:hidden {
    display: none;
}

[dir="ltr"] .ltr\:hidden {
    display: none;
}

[dir="rtl"] .ltr\:hidden {
    display: block;
}

/* RTL Flex Direction */
[dir="rtl"] .flex-row-reverse {
    flex-direction: row-reverse;
}

/* RTL Margin/Padding */
[dir="rtl"] .ml-2 {
    margin-left: 0;
    margin-right: 0.5rem;
}

[dir="rtl"] .mr-2 {
    margin-right: 0;
    margin-left: 0.5rem;
}

[dir="rtl"] .ml-4 {
    margin-left: 0;
    margin-right: 1rem;
}

[dir="rtl"] .mr-4 {
    margin-right: 0;
    margin-left: 1rem;
}

/* Font Awesome Icons Fix */
.fas, .fab, .far, .fal, .fad {
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.fab {
    font-family: "Font Awesome 6 Brands";
    font-weight: 400;
}

.far, .fal {
    font-family: "Font Awesome 6 Free";
    font-weight: 400;
}

.fad {
    font-family: "Font Awesome 6 Duotone";
    font-weight: 900;
}

/* Ensure icons have proper width and height */
i[class^="fa-"], i[class*=" fa-"] {
    display: inline-block;
    width: 1em;
    text-align: center;
    font-size: inherit;
}

/* Fix for icon containers */
.bg-\[#5AC5B7\] i,
div[class*="bg-\[#5AC5B7\]"] i {
    display: inline-block;
    width: auto;
    height: auto;
}

/* Ensure icons are visible */
i.fas, i.fab, i.far {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Print Styles */
@media print {
    header,
    footer,
    .no-print {
        display: none;
    }
}

