/* Custom CSS for KDK Alarabiya Website */

:root {
    --primary-color: #293165;
    --secondary-color: #1a6939;
    --light-bg: #f8f9fa;
    --dark-text: #333;
    --light-text: #666;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    margin: 0 auto 2rem;
    border-radius: 2px;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-weight: 700;
    color: var(--primary-color) !important;
    text-decoration: none;
}

.navbar-brand img {
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    margin-left: 0.75rem;
}

.navbar-brand:hover img {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}

.navbar-brand span {
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 700;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    padding: 0.5rem 0;
    box-shadow: 0 4px 30px rgba(0,0,0,0.15);
}

.navbar.scrolled .navbar-brand img {
    height: 38px;
    transition: all 0.3s ease;
}

.navbar.scrolled .navbar-brand span {
    font-size: 1.2rem;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white !important;
}

.navbar-nav .nav-link {
    color: var(--primary-color) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--secondary-color) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background: var(--secondary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 100%;
}

.language-toggle .btn {
    border-radius: 20px;
    font-size: 0.9rem;
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}

.language-toggle .btn:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Hero Video Background */
.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0.3;
}

.hero-video-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/hero-bg.jpg') center/cover;
    opacity: 0.1;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/hero-bg.jpg') center/cover;
    opacity: 0.1;
    z-index: 1;
    display: none; /* Hide since we're using video */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg, 
        rgba(41, 49, 101, 0.8) 0%, 
        rgba(26, 105, 57, 0.6) 100%
    );
    z-index: 2;
}

.hero-section .container {
    position: relative;
    z-index: 3;
}

/* Hero Content Styling */
.hero-content {
    position: relative;
    z-index: 4;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-section .lead {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons .btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    border-radius: 30px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.btn-primary:hover {
    background: transparent;
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26, 105, 57, 0.4);
}

.btn-outline-light:hover {
    background: white;
    color: var(--primary-color) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,255,255,0.3);
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.scroll-down a {
    font-size: 2rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* About Section */
#about {
    padding: 100px 0;
}

.about-content h3 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.feature-item {
    padding: 1.5rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    text-align: center;
}

.feature-item:hover {
    background: var(--light-bg);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.feature-item i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-item h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.about-image img {
    border-radius: 15px;
    transition: all 0.3s ease;
}

.about-image:hover img {
    transform: scale(1.05);
}

/* Services Section */
#services {
    padding: 100px 0;
}

.service-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #eee;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1;
}

.service-card:hover::before {
    left: 0;
    opacity: 0.05;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.service-icon {
    position: relative;
    z-index: 2;
}

.service-icon i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon i {
    color: var(--secondary-color);
    transform: scale(1.1);
}

.service-card h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.service-card p {
    color: var(--light-text);
    position: relative;
    z-index: 2;
}

/* Projects Section */
/* Projects section removed */

/* Clients Section */
#clients {
    padding: 100px 0;
}

.clients-slider {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.client-logo {
    flex: 0 0 150px;
    text-align: center;
    opacity: 0.6;
    transition: all 0.3s ease;
    filter: grayscale(100%);
}

.client-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.1);
}

.client-logo img {
    max-width: 100%;
    height: 80px;
    object-fit: contain;
}

.stat-card {
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.stat-icon i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: var(--light-text);
    font-weight: 500;
}

/* Contact Section */
#contact {
    padding: 100px 0;
}

.contact-form {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.form-control {
    border: 2px solid #eee;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(41, 49, 101, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.contact-info-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.contact-info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.contact-icon i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-info-card h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: white;
}

.footer-brand h4 {
    color: white;
}

.footer-brand img {
    transition: all 0.3s ease;
    filter: brightness(1.1) drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    margin-left: 0.75rem;
}

.footer-brand:hover img {
    transform: scale(1.05);
    filter: brightness(1.2) drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.footer-links {
    list-style: none;
    padding: 0;
}

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

.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: white;
    padding-right: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

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

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

/* Modal Styles */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.modal-header {
    background: var(--primary-color);
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-header .btn-close {
    filter: invert(1);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section .lead {
        font-size: 1.1rem;
    }
    
    /* Optimize video for mobile */
    .hero-video {
        opacity: 0.2;
    }
    
    .hero-overlay {
        background: linear-gradient(
            135deg, 
            rgba(41, 49, 101, 0.85) 0%, 
            rgba(26, 105, 57, 0.7) 100%
        );
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .clients-slider {
        justify-content: center;
    }
    
    .client-logo {
        flex: 0 0 120px;
    }
    
    .contact-form {
        padding: 2rem 1.5rem;
    }
    
    .back-to-top {
        bottom: 20px;
        left: 20px;
        width: 45px;
        height: 45px;
    }
    
    .navbar-brand img {
        height: 35px !important;
    }
    
    .footer-brand img {
        height: 40px !important;
    }
    
    .navbar-toggler {
        border-color: var(--primary-color) !important;
    }
    
    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23293165' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 0 15px;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    /* Further optimize video for small screens */
    .hero-video {
        opacity: 0.15;
    }
    
    .hero-overlay {
        background: linear-gradient(
            135deg, 
            rgba(41, 49, 101, 0.9) 0%, 
            rgba(26, 105, 57, 0.8) 100%
        );
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .service-card,
    .contact-info-card {
        padding: 2rem 1.5rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .navbar-brand img {
        height: 30px !important;
    }
    
    .footer-brand img {
        height: 35px !important;
    }
    
    .navbar-brand span {
        font-size: 1rem;
    }
}

/* RTL Support */
[dir="rtl"] .navbar-nav .nav-link::after {
    right: 50%;
    left: auto;
    transform: translateX(50%);
}

[dir="rtl"] .footer-links a:hover {
    padding-right: 0;
    padding-left: 5px;
}

[dir="rtl"] .back-to-top {
    left: auto;
    right: 30px;
}

@media (max-width: 768px) {
    [dir="rtl"] .back-to-top {
        right: 20px;
        left: auto;
    }
}

/* Language Toggle Styles */
.language-toggle {
    display: flex;
    align-items: center;
}

/* Project Filter Animation - removed */

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success Message */
.alert-success {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
    border-radius: 10px;
}

/* Error Message */
.alert-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
    border-radius: 10px;
}

/* Floating Contact Buttons */
.floating-contacts {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.floating-btn:hover {
    transform: scale(1.1);
    color: white;
    text-decoration: none;
}

.whatsapp-btn {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.whatsapp-btn:hover {
    background: linear-gradient(135deg, #128C7E, #25D366);
}



@keyframes pulse {
    0% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    }
    100% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
}

/* Responsive adjustments for floating buttons */
@media (max-width: 768px) {
    .floating-contacts {
        bottom: 90px;
        right: 20px;
    }
    
    .floating-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}