/* Arabic specific styles for FADHA Engineering Consultants */

body {
    font-family: 'Tajawal', sans-serif;
    /* Default font for Arabic content */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex-grow: 1;
}

.circular-graphic-placeholder {
    /* Tailwind's RTL support might handle this, but explicitly setting if needed */
    @apply w-28 h-28 lg:w-32 lg:h-32 rounded-full flex items-center justify-center border border-gray-200 bg-gray-50 text-blue-700 text-3xl;
}

/* Animation for scroll expand effect */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.98);
        /* Start slightly below, slightly scaled down, and invisible */
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        /* End at original position, full opacity, full scale */
    }
}

/* Define a scroll timeline for the main content area */
@scroll-timeline main-scroll-timeline {
    source: auto;
    /* The scrollable element itself (the body in this case, or a specific container) */
    orientation: block;
    /* Vertical scrolling */
    scroll-offsets: 0%;
    /* Animation starts at the top of the scroll container */
}

.current-page-link {
    color: #D77421 !important;
    /* Corporate Blue */
    font-weight: 800 !important;
    /* Bold */
}

/* Apply animation to cards based on scroll */
.animated-card {
    animation: fadeInUp linear forwards;
    /* Apply the animation */
    animation-timeline: view();
    /* Link to the element's visibility in the viewport */
    animation-range: entry 0% cover 30%;
    /* Animation starts when element enters, completes when 30% covered */
    /* Initial state for elements before they enter view */
    opacity: 0;
    transform: translateY(40px) scale(0.98);
}

/* Navbar Custom Styles */
.navbar {
    position: relative;
    /* Essential for z-index to work */
    z-index: 1000;
    /* Choose a high value, higher than any other overlapping element */

}

.navbar .dropdown summary::after {
    content: none !important;
    /* Hide DaisyUI's default arrow */
    display: none !important;
}

.btn-link-style {
    @apply btn btn-ghost normal-case text-gray-700 hover:text-blue-600 font-medium px-3;
}

/* --- Custom Styles for Language Dropdown --- */

/* Hide the default browser disclosure arrow for <details> elements */
details summary::-webkit-details-marker {
    display: none;
}

details summary::marker {
    /* For Firefox and other browsers */
    content: none;
    /* Some browsers respond to 'content: none' for ::marker */
    display: none;
}

.navbar .dropdown summary {
    /* Targeting more specifically to avoid global impact */
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* Adjust space between text and content if needed */
    /* No SVG arrow, so no rotation needed */
}

/* News Ticker Custom Styles for RTL */
/* Custom animation for the ticker */
@keyframes ticker-rtl {
    from {
        transform: translateX(-50%);
    }

    to {
        transform: translateX(50%);
    }
}

/* The ticker container and its content */
.ticker-container {
    overflow: hidden;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.ticker-content {
    display: inline-block;
    animation: ticker-rtl 40s linear infinite;
}

/* Pause the animation on hover */
.ticker-content:hover {
    animation-play-state: paused;
}

.ticker-item {
    display: inline-block;
    margin-right: 2rem;
}

.control-button {
    /* Corrected to match English HTML styling */
    @apply p-1 rounded-full bg-transparent text-white hover:bg-blue-700 border border-white focus:outline-none focus:ring-2 focus:ring-blue-400 transition-colors duration-200;
}

/* Welcome Section Custom Styles for RTL */
.welcome-section {
    background-image: url('../welcome_section.jpg');
    /* Corrected path relative to src/style/style_ar.css */
    background-size: cover;
    background-position: center;
    position: relative;
    color: white;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    /* Align content to the right for RTL */
    padding: 4rem 1rem;
    min-height: 60vh;
}

.welcome-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.welcome-content {
    position: relative;
    z-index: 2;
    max-width: 90%;
    text-align: right;
    /* Align text to the right for RTL */
}

@media (min-width: 768px) {
    .welcome-section {
        min-height: 70vh;
        padding: 6rem 2rem;
    }

    .welcome-content {
        max-width: 60%;
    }
}

@media (min-width: 1024px) {
    .welcome-section {
        min-height: 80vh;
        padding: 8rem 4rem;
    }

    .welcome-content {
        max-width: 50%;
    }
}

@media (min-width: 1024px) {

    /* This targets large screens (lg breakpoint in Tailwind) */
    .navbar-end>*:not(:last-child) {
        margin-left: 1rem;
        /* Equivalent to Tailwind's space-x-4 */
    }
}


/* About Section Custom Styles for RTL */
.about-section {
    background-image: url('../aboutus_section.jpg');
    /* Corrected path relative to src/style/style_ar.css */
    background-size: cover;
    background-position: center;
    position: relative;
    color: white;
    padding: 4rem 1rem;
    text-align: center;
    /* Keep center for overall section, individual elements can be right-aligned */
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    /* Darker overlay */
    z-index: 1;
}

.about-content {
    position: relative;
    text-align: right;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

/* Custom styles for the project cards and hover effect */
.project-card-container {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    cursor: pointer;
    aspect-ratio: 4/3;
    width: 100%;
    height: auto;
}

.project-card-container img {
    transition: transform 0.5s ease-in-out;
    border-radius: 0.5rem;
}

.project-card-container:hover img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
    color: white;
    padding: 1rem;
    text-align: right;
    transition: opacity 0.5s ease-in-out;
}

.btn-link-style {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 500;
    color: #4B5563;
    /* text-gray-700 */
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.btn-link-style:hover {
    background-color: #F3F4F6;
    /* bg-gray-100 */
    color: #1F2937;
    /* text-gray-900 */
}

.dropdown summary::after {
    /* Hide DaisyUI's default dropdown arrow */
    content: none;
}



/* Styling for the dialog content */
dialog {
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
    border: none;
    max-width: 50%;
    max-height: 70%;
}

.modal-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.close-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #fff;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.close-btn:hover {
    background-color: #f1f1f1;
}

/* تنسيقات إضافية للعرض التفاعلي */
.slider-container {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
}

.slides-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;
    display: flex;
    justify-content: center;
}

.slide img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}