:root {
    --primary-blue: #2563eb;
    --primary-gray: #64748b;
    --primary-dark-blue: #1e40af;
    --accent-silver: #94a3b8;
    --light-gray: #f8f9fa;
    --white: #ffffff;
    --text-dark: #333333;
    --primary-black: #1e293b;
}

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

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;900&display=swap');

body {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    direction: rtl;
}

body[dir="ltr"] {
    direction: ltr;
}

/* Navigation */
.navbar {
    background: var(--white) !important;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.navbar-brand img {
    height: 50px;
    width: auto;
}

.navbar-brand-text {
    display: flex;
    flex-direction: column;
}

.navbar-brand-text .brand-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin: 0;
    line-height: 1.2;
}

.navbar-brand-text .brand-subtitle {
    font-size: 0.85rem;
    color: var(--primary-gray);
    margin: 0;
    line-height: 1.2;
}

.navbar-nav .nav-link {
    color: var(--primary-blue) !important;
    font-weight: 500;
    margin: 0 10px;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 12px !important;
    border-radius: 5px;
}

.navbar-nav .nav-link:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-dark-blue) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-blue);
    transition: width 0.3s ease;
}

.navbar-toggler {
    border-color: var(--primary-blue);
}

.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='rgba%2837, 99, 235, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

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

.navbar-toggler {
    border-color: var(--white);
}

.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='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Language Switcher */
.lang-switcher {
    display: inline-flex;
    gap: 10px;
    margin-left: 20px;
}

.lang-switcher button {
    background: transparent;
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 5px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.lang-switcher button:hover,
.lang-switcher button.active {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: var(--white);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-dark-blue) 0%, var(--primary-gray) 100%);
    color: var(--white);
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%232563eb" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

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

.hero-section .highlight {
    color: var(--primary-blue);
}

.hero-section p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Sections */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 20px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-black);
    margin-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-gray));
    border-radius: 2px;
}

body[dir="ltr"] .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

/* About Section */
.about-section {
    background: var(--light-gray);
}

.about-card {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    transition: all 0.3s ease;
    height: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
    transition: left 0.5s ease;
}

.about-card:hover::before {
    left: 100%;
}

.about-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.2);
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-gray));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.4s ease;
    animation: iconFloat 3s ease-in-out infinite;
}

.icon-wrapper::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-gray));
    opacity: 0.3;
    animation: iconPulse 2s ease-in-out infinite;
}

.icon-wrapper i {
    font-size: 2rem;
    color: var(--white);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.about-card:hover .icon-wrapper {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
}

.about-card:hover .icon-wrapper i {
    transform: scale(1.2);
}

.about-card h3 {
    color: var(--primary-blue);
    margin-bottom: 15px;
    font-size: 1.8rem;
    transition: color 0.3s ease;
}

.about-card:hover h3 {
    color: var(--primary-dark-blue);
}

.about-card h3::before {
    display: none;
}

.about-card p {
    color: var(--text-dark);
    line-height: 1.8;
}

/* Partners Section */
.partners-section {
    background: var(--white);
}

.partner-card {
    text-align: center;
    padding: 20px;
    background: var(--light-gray);
    border-radius: 10px;
    transition: all 0.3s ease;
    margin-bottom: 30px;
}

.partner-card:hover {
    background: var(--white);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

.partner-card img {
    max-width: 100%;
    height: 150px;
    object-fit: contain;
    margin-bottom: 15px;
}

/* Products Section */
.products-section {
    background: var(--light-gray);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.product-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.product-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: var(--light-gray);
}

.product-card .product-name {
    padding: 15px 20px;
    text-align: center;
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 1rem;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.4;
    word-wrap: break-word;
}

/* Contact Section */
.contact-section {
    background: var(--white);
}

.contact-info {
    background: var(--light-gray);
    padding: 40px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.contact-info h3 {
    color: var(--primary-blue);
    margin-bottom: 25px;
    font-size: 1.8rem;
}

.contact-info .info-item {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.contact-info .info-item i {
    color: var(--primary-blue);
    font-size: 1.5rem;
    margin-top: 5px;
}

.contact-info .info-item .info-text {
    flex: 1;
}

.contact-info .info-item .info-text strong {
    color: var(--primary-black);
    display: block;
    margin-bottom: 5px;
}

.contact-info .info-item .info-text a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info .info-item .info-text a:hover {
    color: var(--primary-blue);
}

.map-container {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    height: 400px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Contact Form */
.contact-form-wrapper {
    background: var(--light-gray);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.contact-form-wrapper h3 {
    color: var(--primary-blue);
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.contact-form-wrapper .form-subtitle {
    color: var(--primary-gray);
    margin-bottom: 30px;
    font-size: 1rem;
}

.contact-form-wrapper .form-label {
    color: var(--primary-black);
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-form-wrapper .form-label i {
    color: var(--primary-blue);
    font-size: 1rem;
}

.contact-form-wrapper .form-control {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Tajawal', sans-serif;
}

.contact-form-wrapper .form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
    outline: none;
}

.contact-form-wrapper textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

#formMessage {
    padding: 12px;
    border-radius: 5px;
    display: none;
}

#formMessage.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

#formMessage.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

@media (max-width: 768px) {
    .contact-form-wrapper {
        padding: 25px;
        margin-top: 30px;
    }
    
    .contact-form-wrapper h3 {
        font-size: 1.5rem;
    }
    
    .map-container {
        margin-top: 20px;
    }
}

/* Footer */
.footer {
    background: var(--primary-black);
    color: var(--white);
    padding: 40px 0 20px;
    text-align: center;
}

.footer-content {
    margin-bottom: 30px;
}

.footer h4 {
    color: var(--primary-blue);
    margin-bottom: 20px;
}

.footer p {
    opacity: 0.8;
    margin-bottom: 10px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    margin-top: 20px;
}

/* Buttons */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-gray));
    border: none;
    color: var(--white);
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    color: var(--white);
}

/* Icon Animations */
@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.3);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .lang-switcher {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .about-card {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .icon-wrapper {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }
    
    .icon-wrapper i {
        font-size: 1.5rem;
    }
    
    .about-card h3 {
        font-size: 1.5rem;
    }
    
    .navbar-brand {
        flex-direction: row;
        gap: 10px;
    }
    
    .navbar-brand img {
        height: 40px;
    }
    
    .navbar-brand-text .brand-name {
        font-size: 1rem;
    }
    
    .navbar-brand-text .brand-subtitle {
        font-size: 0.75rem;
    }
    
    .navbar {
        padding: 0.5rem 0;
    }
    
    .section {
        padding: 50px 0;
    }
    
    .stats-section {
        padding: 40px 0;
    }
    
    .stats-item .stat-number {
        font-size: 2rem;
    }
    
    .stats-item .stat-label {
        font-size: 1rem;
    }
    
    .contact-info {
        padding: 25px;
        margin-bottom: 20px;
    }
    
    .map-container {
        height: 300px;
    }
    
    .product-card {
        margin-bottom: 15px;
    }
    
    .partner-card {
        margin-bottom: 20px;
    }
    
    .partner-card img {
        height: 120px;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 1.5rem;
    }
    
    .hero-section p {
        font-size: 0.9rem;
    }
    
    .section-title h2 {
        font-size: 1.75rem;
    }
    
    .about-card {
        padding: 15px;
    }
    
    .icon-wrapper {
        width: 50px;
        height: 50px;
    }
    
    .icon-wrapper i {
        font-size: 1.2rem;
    }
    
    .about-card h3 {
        font-size: 1.3rem;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stats-item .stat-number {
        font-size: 1.5rem;
    }
    
    .stats-item .stat-label {
        font-size: 0.9rem;
    }
    
    .btn-primary-custom {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .carousel-caption h2 {
        font-size: 1.5rem !important;
    }
    
    .carousel-caption p {
        font-size: 0.9rem !important;
    }
    
    .navbar-brand {
        flex-direction: row;
        gap: 8px;
    }
    
    .navbar-brand img {
        height: 35px;
    }
    
    .navbar-brand-text .brand-name {
        font-size: 0.9rem;
    }
    
    .navbar-brand-text .brand-subtitle {
        font-size: 0.7rem;
    }
}

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

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

/* Touch-friendly improvements for mobile */
@media (max-width: 768px) {
    .nav-link,
    .btn-primary-custom,
    .lang-switcher button {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .product-card {
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(37, 99, 235, 0.2);
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        touch-action: manipulation;
    }
}

/* Slider Section */
.slider-section {
    position: relative;
    overflow: hidden;
    height: 500px;
    margin-top: 76px;
}

.slider-section .carousel-item {
    height: 500px;
}

.slider-section .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.slider-section .carousel-caption {
    bottom: 50%;
    transform: translateY(50%);
    text-align: center;
}

.slider-section .carousel-caption h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
}

.slider-section .carousel-caption p {
    font-size: 1.3rem;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.8);
}

.slider-section .carousel-control-prev,
.slider-section .carousel-control-next {
    width: 50px;
    height: 50px;
    background: rgba(37, 99, 235, 0.5);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.slider-section .carousel-control-prev:hover,
.slider-section .carousel-control-next:hover {
    background: rgba(37, 99, 235, 0.9);
    opacity: 1;
}

.slider-section .carousel-control-prev {
    right: 20px;
    left: auto;
}

.slider-section .carousel-control-next {
    left: 20px;
    right: auto;
}

.slider-section .carousel-indicators {
    bottom: 20px;
}

.slider-section .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--white);
    opacity: 0.5;
    margin: 0 5px;
}

.slider-section .carousel-indicators button.active {
    background: var(--primary-blue);
    opacity: 1;
}

@media (max-width: 768px) {
    .slider-section {
        height: 400px;
        margin-top: 56px;
    }
    
    .slider-section .carousel-item {
        height: 400px;
    }
    
    .slider-section .carousel-caption {
        bottom: 30%;
        padding: 15px;
    }
    
    .slider-section .carousel-caption h2 {
        font-size: 1.75rem;
        margin-bottom: 10px;
    }
    
    .slider-section .carousel-caption p {
        font-size: 0.95rem;
        margin-bottom: 10px;
    }
    
    .slider-section .carousel-control-prev,
    .slider-section .carousel-control-next {
        width: 40px;
        height: 40px;
    }
    
    .slider-section .carousel-control-prev {
        right: 10px;
    }
    
    .slider-section .carousel-control-next {
        left: 10px;
    }
}

@media (max-width: 576px) {
    .slider-section {
        height: 300px;
        margin-top: 56px;
    }
    
    .slider-section .carousel-item {
        height: 300px;
    }
    
    .slider-section .carousel-caption {
        bottom: 20%;
        padding: 10px;
    }
    
    .slider-section .carousel-caption h2 {
        font-size: 1.3rem;
        margin-bottom: 8px;
    }
    
    .slider-section .carousel-caption p {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }
    
    .slider-section .carousel-control-prev,
    .slider-section .carousel-control-next {
        width: 35px;
        height: 35px;
    }
    
    .slider-section .carousel-indicators {
        bottom: 10px;
    }
    
    .slider-section .carousel-indicators button {
        width: 8px;
        height: 8px;
        margin: 0 3px;
    }
}

/* Stats Section */
.stats-section {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-gray));
    color: var(--white);
    padding: 60px 0;
}

.stats-item {
    text-align: center;
    padding: 20px;
}

.stats-item .stat-number {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 10px;
    display: block;
}

.stats-item .stat-label {
    font-size: 1.2rem;
    opacity: 0.9;
}

