body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #4a4a4a;
    background-color: #f5f5eb;
    direction: ltr;
    transition: all 0.3s ease;
}

body.ar {
    direction: rtl;
}

.hero {
    background: linear-gradient(rgba(42, 111, 111, 0.7), rgba(42, 105, 172, 0.7));
    color: #ffffff;
    padding: 2rem 4rem;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    min-height: 400px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/bacheader1.webp') no-repeat center center; /* Replace 'bg1.jpg' with your first photo path or URL */
    background-size: cover;
    animation: slideLeft 10s linear infinite;
    z-index: -1;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/bacheader2.webp') no-repeat center center; /* Replace 'bg2.jpg' with your second photo path or URL */
    background-size: cover;
    animation: slideRight 10s linear infinite 1s;
    z-index: -2;
}

@keyframes slideLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes slideRight {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

header.sticky .header-container {
    padding: 1rem 2rem;
    background: #2a6f6f;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo {
    flex-shrink: 0;
}

.logo img {
    max-width: 70px;
    height: auto;
    border-radius: 5px;
    padding: 5px;
    transition: all 0.3s ease;
}

header.sticky .logo img {
    max-width: 120px;
    padding: 3px;
}

.navbar {
    flex-grow: 1;
    margin: 0 2rem;
}

.navbar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.navbar ul li {
    margin-left: 2.5rem;
}

.navbar ul li a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.25rem;
    transition: color 0.3s, transform 0.2s;
}

header.sticky .navbar ul li a {
    font-size: 1rem;
}

.navbar ul li a:hover {
    color: #e8e8a6;
    transform: scale(1.1);
}

.language-switch {
    display: flex;
    gap: 1rem;
}

.lang-toggle {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    padding: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #2a6f6f;
}

.lang-toggle.active,
.lang-toggle:hover {
    background: #a9c12e;
    color: #ffffff;
    transform: scale(1.1);
}

.lang-toggle span {
    display: inline-block;
    width: 24px;
    height: 24px;
    background-size: cover;
}

.lang-toggle .fi-gb {
    background-image: url('https://flagicons.lipis.dev/flags/4x3/gb.svg');
}

.lang-toggle .fi-eg {
    background-image: url('https://flagicons.lipis.dev/flags/4x3/eg.svg');
}

header.sticky .language-switch .lang-toggle {
    font-size: 0.875rem;
    padding: 0.25rem;
    width: 35px;
    height: 35px;
}

.language-switch .lang-toggle:focus {
    outline: none;
    box-shadow: 0 0 5px rgba(169, 193, 46, 0.5);
}

.hero-text {
    text-align: center;
    padding: 2rem 0;
    transition: padding 0.3s ease;
}

header.sticky .hero-text {
    padding: 1rem 0;
}

.hero-text .hero-title-img {
    max-width: 400px;
    height: auto;
    margin: 0 auto 0.625rem;
    transition: max-width 0.3s ease;
}

header.sticky .hero-text .hero-title-img {
    max-width: 250px;
}

.hero-text h2 {
    font-size: 1.75rem;
    margin: 0.625rem 0;
    color: #e0e7ff;
    font-weight: 400;
    transition: font-size 0.3s ease;
}

header.sticky .hero-text h2 {
    font-size: 1.125rem;
}

.hero-text p {
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
    transition: font-size 0.3s ease;
}

header.sticky .hero-text p {
    font-size: 0.875rem;
}

.container {
    padding: 2.5rem 1.25rem;
    max-width: 1100px;
    margin: 0 auto;
}

h2 {
    text-align: center;
    margin-bottom: 1.875rem;
    color: #2a6f6f;
    font-size: 2rem;
    text-transform: uppercase;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -0.625rem;
    left: 50%;
    transform: translateX(-50%);
    width: 3.125rem;
    height: 0.1875rem;
    /* background: #a9c12e; */
    transition: width 0.3s ease;
}

h2:hover::after {
    width: 4.375rem;
}

.about {
    position: relative;
    overflow: hidden;
    padding: 2.5rem 1.25rem;
    background: #ffffff;
    border-radius: 0.625rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.about .about-overlay {
    background: linear-gradient(rgba(42, 111, 111, 0.7), rgba(42, 105, 172, 0.7)), url('https://via.placeholder.com/1200x600?text=Factory+Background');
    background-size: cover;
    background-position: center;
    border-radius: 0.625rem;
    padding: 1.875rem;
    animation: fadeIn 1.5s ease-out;
}

.about .about-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.about-sections {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.about-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.25rem;
    border-radius: 0.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-section:hover {
    transform: translateY(-0.3125rem);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.about h3 {
    color: #ffffff;
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 0.625rem;
    position: relative;
}

.about h3::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.3125rem;
    width: 1.875rem;
    height: 0.125rem;
    /* background: #a9c12e; */
}

.about p {
    font-size: 1rem;
    text-align: justify;
    color: #e0e7ff;
    margin-bottom: 0;
    line-height: 1.6;
}

.about .video-container {
    margin: 1.25rem auto;
    max-width: 800px;
    position: relative;
}

.about .video-container video {
    width: 100%;
    border-radius: 0.625rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.about .video-container video:hover {
    transform: scale(1.02);
}

.about .video-container::before {
    content: '\f04b';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 2.5rem;
    opacity: 0.8;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.about .video-container.playing::before {
    display: none;
}

.about .video-container:hover::before {
    opacity: 1;
}

.about .video-caption {
    font-size: 0.875rem;
    color: #d1d5db;
    text-align: center;
    margin-top: 0.625rem;
}

.products {
    background: #ffffff;
    padding: 1.25rem;
    border-radius: 0.625rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
    margin-top: 1.25rem;
    animation: fadeInUp 1.5s ease-out;
}

.product-card {
    background: #f5f5eb;
    border: 1px solid #e5e7eb;
    padding: 1rem;
    text-align: center;
    border-radius: 0.625rem;
    transition: all 0.3s ease;
    height: 100%;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0.3125rem;
    margin-bottom: 0.625rem;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.product-card:hover img {
    transform: scale(1.1);
    filter: brightness(1.2);
}

.product-card h3 {
    color: #2a6f6f;
    margin: 0 0 0.625rem;
    font-size: 1.125rem;
    transition: color 0.3s ease;
}

.product-card p {
    font-size: 0.875rem;
    color: #4a4a4a;
    flex-grow: 1;
    transition: color 0.3s ease;
}

.product-card:hover h3,
.product-card:hover p {
    color: #a9c12e;
}

.product-card:hover {
    transform: translateY(-0.3125rem);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.5s ease-out;
}

.modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    padding: 1.25rem;
    border: 1px solid #e5e7eb;
    width: 80%;
    max-width: 600px;
    border-radius: 0.625rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: slideIn 0.5s ease-out;
}

.modal-content img {
    width: 100%;
    height: auto;
    border-radius: 0.3125rem;
    margin-bottom: 0.9375rem;
    transition: transform 0.3s ease;
}

.modal-content img:hover {
    transform: scale(1.05);
}

.modal-details {
    text-align: center;
}

.modal-details h3 {
    color: #2a6f6f;
    margin: 0 0 0.625rem;
    font-size: 1.5rem;
}

.modal-details p {
    font-size: 1rem;
    color: #4a4a4a;
}

.close {
    color: #9ca3af;
    float: right;
    font-size: 1.75rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: #ef4444;
    text-decoration: none;
    transform: rotate(90deg);
}

.supported-by {
    background: #ffffff;
    padding: 1.25rem;
    border-radius: 0.625rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin: 2.5rem 0;
}

.logo-grid {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.logo-grid img {
    max-width: 100px;
    height: auto;
    transition: transform 0.3s ease;
}

.logo-grid img:hover {
    transform: scale(1.1);
}

.contact {
    background: #ffffff;
    padding: 1.25rem;
    border-radius: 0.625rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.contact p {
    text-align: center;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.contact p:hover {
    transform: translateY(-0.3125rem);
}

.contact p i {
    margin-right: 0.625rem;
    color: #2a6f6f;
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

.contact p a {
    color: #2a6f6f;
    text-decoration: none;
    margin: 0 0.3125rem;
    transition: color 0.3s ease;
}

.contact p a:hover {
    color: #a9c12e;
    text-decoration: underline;
}

.contact p span {
    color: #4a4a4a;
}

footer {
    color: #003d80;
    text-align: center;
    padding: 5px;
    margin-top: 40px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    max-width: 330px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.footer-section p {
    margin: 0.3125rem 0;
    display: flex;
    align-items: center;
    transition: opacity 0.3s ease;
}

.footer-section p:hover {
    opacity: 0.8;
}

.footer-section i {
    margin-right: 0.625rem;
    color: #e8e8a6;
    font-size: 1.125rem;
    transition: transform 0.3s ease;
}

.footer-section a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 0.625rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #e8e8a6;
    transform: scale(1.1);
}

@media (min-width: 426px) {
    .hero {
        min-height: 300px;
        padding: 1.5rem;
    }
    .header-container {
        padding: 0.7rem;
    }
    .logo img {
        max-width: 70px;
    }
    .navbar ul li {
        margin-left: 0.7rem;
        font-size: 1rem;
    }
    .language-switch {
        gap: 0.5rem;
    }
    .lang-toggle {
        width: 35px;
        height: 35px;
        padding: 0.2rem;
    }
    .hero-text .hero-title-img {
        max-width: 250px;
    }
    .hero-text h2 {
        font-size: 1.5rem;
    }
    .hero-text p {
        font-size: 1rem;
    }
    .about-sections {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .about-section {
        flex: 1;
        min-width: 40%;
    }
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .values-grid {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .value-card {
        flex: 1;
        min-width: 30%;
    }
    .logo-grid {
        gap: 0.8rem;
    }
    .logo-grid img {
        max-width: 100px;
    }
    .footer-container {
        flex-direction: row;
        justify-content: center;
        max-width: 300px;
    }
    .footer-section {
        flex: 1;
        min-width: 100px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.fade-in {
    opacity: 0;
    transition: opacity 1s ease-out;
}

.fade-in.visible {
    opacity: 1;
}

@media (max-width: 425px) {
    .hero {
        padding: 1rem;
        min-height: 250px;
    }
    .header-container {
        flex-direction: row;
        align-items: center;
        padding: 0.5rem;
        margin-bottom: 1rem;
        justify-content: flex-start; /* Align logo and navbar to the left */
    }
    .logo img {
        max-width: 50px;
        padding: 3px;
    }
    header.sticky .logo img {
        max-width: 80px;
    }
    .navbar {
        margin: 0 0.1rem;
        width: auto;
    }
    .navbar ul {
        flex-direction: row;
        align-items: center;
    }
    .navbar ul li {
        margin: 0 0.2rem;
    }
    .navbar ul li a {
        font-size: 0.8rem;
    }
    header.sticky .navbar ul li a {
        font-size: 0.8rem;
    }
    .language-switch {
        margin-top: 0;
        margin-left: auto; /* Push language switch to the right */
    }
    .lang-toggle {
        width: 30px;
        height: 30px;
        padding: 0.2rem;
    }
    header.sticky .language-switch .lang-toggle {
        width: 25px;
        height: 25px;
    }
    .hero-text {
        padding: 1rem 0;
    }
    .hero-text .hero-title-img {
        max-width: 200px;
    }
    .hero-text h2 {
        font-size: 1.25rem;
    }
    header.sticky .hero-text h2 {
        font-size: 1rem;
    }
    .hero-text p {
        font-size: 0.9rem;
        max-width: 90%;
    }
    header.sticky .hero-text p {
        font-size: 0.75rem;
    }
    .container {
        padding: 1rem 0.625rem;
    }
    h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    h2::after {
        width: 2rem;
        height: 0.125rem;
        bottom: -0.25rem;
    }
    h2:hover::after {
        width: 2.5rem;
    }
    .about {
        padding: 1rem 0.625rem;
    }
    .about .about-overlay {
        padding: 1rem;
    }
    .about-sections {
        gap: 1rem;
    }
    .about-section {
        padding: 1rem;
    }
    .about h3 {
        font-size: 1.2rem;
    }
    .about p {
        font-size: 0.9rem;
    }
    .about .video-container {
        margin: 1rem auto;
        max-width: 100%;
    }
    .about .video-container video {
        border-radius: 0.5rem;
    }
    .about .video-container::before {
        font-size: 2rem;
    }
    .about .video-caption {
        font-size: 0.75rem;
    }
    .products {
        padding: 1rem 0.625rem;
    }
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
        margin-top: 1rem;
    }
    .product-card {
        padding: 0.75rem;
    }
    .product-card img {
        height: 120px;
    }
    .product-card h3 {
        font-size: 1rem;
    }
    .product-card p {
        font-size: 0.8rem;
    }
    .modal-content {
        margin: 10% auto;
        width: 90%;
        padding: 1rem;
    }
    .modal-content img {
        margin-bottom: 0.5rem;
    }
    .modal-details h3 {
        font-size: 1.2rem;
    }
    .modal-details p {
        font-size: 0.9rem;
    }
    .close {
        font-size: 1.5rem;
    }
    .supported-by {
        padding: 1rem 0.625rem;
        margin: 2rem 0;
    }
    .logo-grid {
        gap: 0.5rem;
    }
    .logo-grid img {
        max-width: 80px;
    }
    .contact {
        padding: 1rem 0.625rem;
    }
    .contact p {
        margin-bottom: 0.75rem;
    }
    .contact p i {
        font-size: 1rem;
    }
    .contact p a {
        margin: 0 0.25rem;
    }
    footer {
        padding: 5px 0;
        margin-top: 20px;
    }
    .footer-container {
        flex-direction: column;
        max-width: 100%;
        gap: 0.5rem;
        padding: 0 0.625rem;
    }
    .footer-section {
        min-width: 100%;
        text-align: center;
    }
    .footer-section p {
        margin: 0.25rem 0;
    }
    .footer-section i {
        font-size: 1rem;
    }
    .footer-section a {
        margin: 0 0.25rem;
    }
}