/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    line-height: 1.6;
    color: #262F6F;
    background-color: white;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Language Specific Styles */
.content-ar {
    display: none;
    font-family: 'Segoe UI', 'Traditional Arabic', Arial, sans-serif;
}

body.ar .content-en {
    display: none;
}

body.ar .content-ar {
    display: block;
    direction: rtl;
}

/* Header & Navigation */
header {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo {
    height: 45px;
    flex-shrink: 0;
}

.logo img {
    height: 100%;
    width: auto;
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
    justify-content: flex-end;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    text-decoration: none;
    color: #262F6F;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s;
    padding: 0.5rem 0;
    display: inline-block;
}

.nav-link:hover {
    color: #EE2C37;
}

#langBtn {
    background: #262F6F;
    color: white;
    border: none;
    padding: 0.7rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    min-width: 85px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

#langBtn::before {
    content: '🌐';
    font-size: 1rem;
    opacity: 0.9;
}

#langBtn:hover {
    background: #EE2C37;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(238, 44, 55, 0.2);
}

/* RTL Adjustments */
body.ar .nav-wrapper {
    flex-direction: row-reverse;
}

body.ar .nav-container {
    justify-content: flex-start;
}

body.ar .nav-links {
    flex-direction: row-reverse;
}

body.ar #langBtn::before {
    order: 1;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    nav {
        padding: 1rem 2rem;
    }
    
    .nav-links {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 0.8rem 1.5rem;
    }

    .nav-wrapper {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .nav-container {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.95rem;
    }

    #langBtn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    nav {
        padding: 0.8rem 1rem;
    }

    .nav-wrapper {
        justify-content: center;
        text-align: center;
    }

    .nav-container {
        justify-content: center;
    }

    .nav-links {
        justify-content: center;
        width: 100%;
    }

    #langBtn {
        margin: 0 auto;
    }
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #262F6F, #1a2152);
    color: white;
    text-align: center;
    padding: 6rem 2rem 3rem;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero .slogan {
    font-size: 1.4rem;
    color: #EE2C37;
    font-weight: 500;
}

/* About Section */
.about {
    padding: 5rem 0;
    background-color: white;
    position: relative;
    z-index: 2;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.text-content {
    padding: 2rem;
}

.text-content h2 {
    font-size: 2rem;
    color: #262F6F;
    margin-bottom: 1.5rem;
    position: relative;
}

.text-content h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #EE2C37;
    margin-top: 0.5rem;
}

.text-content p {
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    color: #555;
    line-height: 1.8;
}

.image-content {
    position: relative;
    width: 100%;
    height: 400px;
}

.slideshow-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 100%;
}

.about-image {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(38, 47, 111, 0.2);
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.active {
    opacity: 1;
}

/* RTL Specific Adjustments */
body.ar .text-content {
    text-align: right;
}

body.ar .text-content h2::after {
    margin-right: 0;
}

/* Responsive Design */
@media (max-width: 968px) {
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .image-content {
        order: -1;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero .slogan {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .lang-switch {
        position: absolute;
        top: 1rem;
        right: 1rem;
    }
    
    body.ar .lang-switch {
        left: 1rem;
        right: auto;
    }
    
    .hero {
        padding: 5rem 1rem 2rem;
    }
    
    .text-content {
        padding: 1rem;
    }
}

/* Products Section */
.products {
    padding: 5rem 0;
    background-color: #f8f9fa;
}

.products h2 {
    text-align: center;
    color: #262F6F;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

/* Tabs Navigation */
.tabs-container {
    max-width: 1400px;
    margin: 0 auto;
}

.tabs-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.tab-btn {
    background: white;
    border: 2px solid #262F6F;
    color: #262F6F;
    padding: 1rem 2rem;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px;
    min-width: 180px;
}

.tab-btn:hover {
    background: #262F6F;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(38, 47, 111, 0.15);
}

.tab-btn.active {
    background: #262F6F;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(38, 47, 111, 0.15);
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 1rem;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(38, 47, 111, 0.12);
}

.product-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-bottom: 2px solid #EE2C37;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.product-info {
    padding: 1rem;
}

.product-info h3 {
    color: #262F6F;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.product-info p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

/* RTL Adjustments */
body.ar .product-info {
    text-align: right;
}

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

/* Responsive Design */
@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .tabs-nav {
        flex-direction: column;
        gap: 0.5rem;
    }

    .tab-btn {
        width: 100%;
        min-width: auto;
        padding: 0.8rem;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .products h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .product-image {
        height: 280px;
    }
}



/* Solutions Section */
.solutions {
    padding: 4rem 0;
    background: #f8f9fa;
}

.solution-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.solution-item {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(38, 47, 111, 0.1);
    transition: all 0.3s ease;
    border-top: 3px solid #262F6F;
}

.solution-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(38, 47, 111, 0.15);
    border-top-color: #EE2C37;
}

.solution-item h3 {
    color: #262F6F;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.solution-item p {
    color: #555;
    line-height: 1.6;
}

/* RTL Solutions Adjustments */
body.ar .solution-item {
    text-align: right;
}

@media (max-width: 768px) {
    .solutions {
        padding: 3rem 0;
    }

    .solution-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .solution-item {
        padding: 1.5rem;
    }

    .solution-item h3 {
        font-size: 1.3rem;
    }
}

/* Contact Section */
.contact {
    background-color: #ffffff;
    padding: 4rem 5%;
    text-align: center;
}

.contact h2 {
    color: #262F6F;
    margin-bottom: 2rem;
}

.contact-info {
    max-width: 500px;
    margin: 0 auto;
}

.contact-info p {
    margin-bottom: 1rem;
    color: #262F6F;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
    padding: 1rem;
    flex-wrap: wrap;
}

.pagination button {
    background: white;
    border: 1px solid #262F6F;
    color: #262F6F;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    border-radius: 4px;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin: 0 2px;
}

.pagination button.prev,
.pagination button.next {
    min-width: 70px;
    font-weight: 500;
}

.pagination button:hover:not(:disabled) {
    background: #262F6F;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(38, 47, 111, 0.2);
}

.pagination button.active {
    background: #262F6F;
    color: white;
    font-weight: bold;
}

.pagination button:disabled {
    background: #f0f0f0;
    border-color: #ddd;
    color: #999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* RTL Adjustments for Pagination */
body.ar .pagination {
    flex-direction: row-reverse;
}

body.ar .pagination button {
    font-family: 'Cairo', sans-serif;
}

/* Responsive Pagination */
@media (max-width: 768px) {
    .pagination {
        gap: 0.3rem;
    }

    .pagination button {
        padding: 0.4rem;
        min-width: 35px;
        height: 35px;
        font-size: 0.85rem;
    }

    .pagination button.prev,
    .pagination button.next {
        min-width: 60px;
    }
}

@media (max-width: 480px) {
    .pagination {
        gap: 0.2rem;
    }

    .pagination button {
        padding: 0.3rem;
        min-width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .pagination button.prev,
    .pagination button.next {
        min-width: 50px;
    }

    /* Show only essential page numbers on mobile */
    .pagination button:not(.active):not(.prev):not(.next) {
        display: none;
    }

    /* Show some page numbers around the active page */
    .pagination button.active,
    .pagination button.active + button,
    .pagination button:nth-child(2) {
        display: flex;
    }
}

/* Footer */
footer {
    background-color: #262F6F;
    color: white;
    text-align: center;
    padding: 1rem;
}
