/* Modern Redesign Variables */
:root {
    --primary-color: #297da9;
    --primary-dark: #0f628e;
    --secondary-color: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --bg-light: #f8f9fa;
    --border-radius: 12px;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 15px 40px rgba(41, 125, 169, 0.15);
    --font-heading: "Cairo", "Helvetica Neue", Helvetica, Arial, sans-serif; /* Assuming Cairo for Arabic support or default sans */
    --transition: all 0.3s ease;
}

/* General Resets & Typography */
body {
    font-family: var(--font-heading);
    color: var(--text-main);
    background-color: #fff;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    color: #1a1a1a;
}

.section-padding {
    padding: 80px 0;
}

.text-primary {
    color: var(--primary-color) !important;
}

/* About Section Redesign */
.about-modern {
    background: #fff;
    position: relative;
}

.about-card {
    background: #fff;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    text-align: center;
    transition: var(--transition);
    margin-bottom: 30px;
    border: 1px solid #eee;
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.about-card .icon {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: inline-block;
}

.about-card h4 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

/* Services / Features Redesign */
.services-modern {
    background-color: var(--bg-light);
}

.service-card-modern {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    padding: 40px 30px;
    transition: var(--transition);
    height: 100%;
    position: relative;
    border-bottom: 3px solid transparent;
}

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

.service-icon {
    width: 70px;
    height: 70px;
    background: rgba(41, 125, 169, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: var(--primary-color);
    margin-bottom: 25px;
    transition: var(--transition);
}

.service-card-modern:hover .service-icon {
    background: var(--primary-color);
    color: #fff;
}

.service-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.service-desc {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.service-link {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.service-link i {
    margin-left: 5px;
    transition: var(--transition);
}

.service-link:hover i {
    transform: translateX(5px);
}


/* Section Headings */
.modern-section-title {
    margin-bottom: 60px;
    text-align: center;
}

.modern-section-title .sub-title {
    display: block;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.modern-section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 0;
}

/* Footer (Light Modification if needed, but keeping structure) */
/* Assuming footer is preserved or slightly tweaked via classes */

/* RTL Support */
html[dir="rtl"] .hero-modern {
    /* RTL adjustments */
    text-align: right;
}
html[dir="rtl"] .hero-bg-shape {
    left: -50px;
    right: auto;
}
html[dir="rtl"] .service-link i {
    margin-right: 5px;
    margin-left: 0;
}
html[dir="rtl"] .service-link:hover i {
    transform: translateX(-5px);
}

/* Modern Footer Overrides */
.main-footer {
    background-color: #1a1a1a;
    color: #b0b0b0;
    padding-top: 80px;
}
.main-footer .logo-widget .text {
    color: #b0b0b0;
    line-height: 1.8;
}
.main-footer .links-widget h5 {
    color: #fff;
    margin-bottom: 25px;
    font-size: 1.2rem;
}
.main-footer .links-widget li a {
    color: #b0b0b0;
    transition: var(--transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px 0;
    display: block;
}
.main-footer .links-widget li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
    border-bottom-color: var(--primary-color);
}
.footer-info-section {
    background-color: #111;
    border-top: 1px solid #333;
    padding: 40px 0;
    margin-top: 40px;
}
.footer-info-section .info-block .inner {
    border-right: 1px solid #333;
}
.footer-info-section .info-block:last-child .inner {
    border-right: none;
}
.footer-info-section .info-block .inner h6 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 15px;
}
.footer-info-section .info-block .inner .icon {
    font-size: 30px;
    color: var(--primary-color);
    margin-bottom: 15px;
}
.footer-bottom {
    background-color: #000;
    border-top: 1px solid #222;
    padding: 20px 0;
}
.subscribe-style-one {
    background-color: var(--primary-color);
    padding: 50px 0;
}
.subscribe-style-one h2 {
    color: #fff;
}
.subscribe-style-one .text {
    color: rgba(255, 255, 255, 0.8);
}

/* =========================================
   Modern Footer & Newsletter Redesign
   ========================================= */

/* Newsletter Section */
.newsletter-modern {
    background: linear-gradient(
        135deg,
        var(--primary-color) 0%,
        var(--primary-dark) 100%
    );
    position: relative;
    overflow: hidden;
}

/* Abstract overlay shape for newsletter */
.newsletter-modern::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    pointer-events: none;
}

.newsletter-content h2 {
    font-size: 2rem;
    font-weight: 700;
}

.newsletter-form .input-group {
    background: #fff;
    border-radius: 50px; /* Pill shape */
    padding: 5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.newsletter-form .form-control {
    border: none;
    border-radius: 50px 0 0 50px;
    padding-left: 25px;
    height: 50px;
    box-shadow: none;
}
.newsletter-form .form-control:focus {
    box-shadow: none;
    background: transparent;
}

.newsletter-form .input-group-append .btn {
    border-radius: 50px;
    padding: 0 30px;
    height: 50px;
    font-weight: 600;
    color: var(--primary-color);
    background: #fff; /* or a subtle light grey */
    border: none;
    transition: all 0.3s;
}

.newsletter-form .input-group-append .btn:hover {
    background: #f8f9fa;
    color: var(--primary-dark);
}

/* Main Footer Modern */
.footer-modern {
    background-color: #1a1a1a;
    color: #b0b0b0;
    padding: 80px 0 0;
    font-size: 0.95rem;
}

.footer-widget .logo-widget .footer-logo {
    max-width: 180px;
    filter: brightness(0) invert(1) opacity(0.8); /* Make existing logo white */
    margin-bottom: 20px;
    transition: all 0.3s;
}
.footer-widget .logo-widget:hover .footer-logo {
    filter: brightness(0) invert(1) opacity(1);
}

.footer-widget .widget-title {
    color: #fff;
    font-size: 1.25rem;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

.footer-widget .widget-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

/* Links List */
.link-list li {
    margin-bottom: 12px;
}
.link-list a {
    color: #b0b0b0;
    transition: all 0.3s;
    display: inline-block;
}
.link-list a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.read-more-link {
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}
.read-more-link:hover {
    color: var(--primary-color);
}

/* Contact List */
.contact-list li {
    position: relative;
    margin-bottom: 20px;
    padding-left: 45px; /* Increase for icon space */
}
.contact-list li .icon {
    position: absolute;
    left: 0;
    top: 5px; /* Align with first line of text */
    font-size: 24px;
    color: var(--primary-color);
}
.contact-list .text {
    line-height: 1.6;
    color: #b0b0b0;
}
.contact-list .text a {
    color: #fff;
    transition: var(--primary-color);
    display: block;
    font-weight: 600;
}
.contact-list .text small {
    display: block;
    font-size: 0.8em;
    opacity: 0.6;
    font-weight: 400;
}
.contact-list .text a:hover {
    color: var(--primary-color);
}

/* LTR Text Utility for Phone Numbers/Emails */
.ltr-text {
    direction: ltr;
    unicode-bidi: embed;
    text-align: left; /* Default for LTR */
}

/* Footer Bottom */
.footer-bottom {
    background-color: #111;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 25px 0;
    margin-top: 60px;
    font-size: 0.9rem;
}

.footer-bottom .copyright {
    color: rgba(255, 255, 255, 0.6);
}
.footer-bottom .developer-info {
    color: rgba(255, 255, 255, 0.6);
}

/* Floating Buttons */
.floating-buttons {
    position: fixed;
    bottom: 30px;
    right: 30px; /* Default LTR, will override for RTL */
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.float-btn {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 26px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.float-btn:hover {
    transform: scale(1.1);
    color: #fff;
}

.whatsapp-btn {
    background-color: #25d366;
}
.whatsapp-btn:hover {
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
}

.chat-btn {
    background-color: var(--primary-color);
}
.chat-btn:hover {
    box-shadow: 0 10px 25px rgba(41, 125, 169, 0.4);
}

/* RTL Overrides for Footer */
html[dir="rtl"] .newsletter-form .form-control {
    border-radius: 0 50px 50px 0;
    padding-right: 25px;
    padding-left: 0;
}
html[dir="rtl"] .newsletter-form .input-group-append .btn {
    border-radius: 50px 0 0 50px; /* Correct pill side */
}

html[dir="rtl"] .footer-widget .widget-title::after {
    left: auto;
    right: 0;
}

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

html[dir="rtl"] .contact-list li {
    padding-left: 0;
    padding-right: 45px;
}
html[dir="rtl"] .contact-list li .icon {
    left: auto;
    right: 0;
}

html[dir="rtl"] .ltr-text {
    text-align: right;
}

html[dir="rtl"] .floating-buttons {
    right: auto;
    left: 30px;
}
html[dir="rtl"] .read-more-link i {
    transform: rotate(180deg);
}

/* Responsive Edits */
@media (max-width: 768px) {
    .newsletter-modern {
        text-align: center;
    }
    .footer-widget {
        margin-bottom: 40px;
    }
    .footer-bottom {
        text-align: center;
    }
    .float-btn {
        width: 45px;
        height: 45px;
        font-size: 22px;
    }
}

/* Fix Floating Buttons */
.floating-buttons {
    right: auto !important;
    left: 30px !important; /* Force Left Side */
    z-index: 2147483647 !important; /* Max Z-Index */
    bottom: 40px !important;
}

/* Ensure icons are visible */
.floating-buttons .float-btn {
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Remove RTL override if it conflicts */
html[dir="rtl"] .floating-buttons {
    right: auto !important;
    left: 30px !important;
}

/* Team Section Redesign */
.team-modern-section {
    background-color: var(--bg-light);
}

.team-card-modern {
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    height: 100%;
    border: 1px solid #eee;
    text-align: center;
}

.team-card-modern:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.team-card-modern .image-box {
    position: relative;
    overflow: hidden;
    height: 300px;
}

.team-card-modern .image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.team-card-modern:hover .image-box img {
    transform: scale(1.1);
}

/* Social Overlay */
.team-card-modern .social-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(41, 125, 169, 0.85); /* Primary color with opacity */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
    transform: translateY(20px);
}

.team-card-modern:hover .social-overlay {
    opacity: 1;
    transform: translateY(0);
}

.team-card-modern .social-icons a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    background: #fff;
    color: var(--primary-color);
    border-radius: 50%;
    margin: 0 5px;
    text-align: center;
    transition: all 0.3s;
}

.team-card-modern .social-icons a:hover {
    background: #111;
    color: #fff;
    transform: rotate(360deg);
}

/* Content Box */
.team-card-modern .content-box {
    padding: 25px;
}

.team-card-modern .name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.team-card-modern .name a {
    color: #1a1a1a;
    transition: var(--transition);
}

.team-card-modern .name a:hover {
    color: var(--primary-color);
}

.team-card-modern .designation {
    display: block;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.team-card-modern .separator-line {
    width: 50px;
    height: 2px;
    background: #eee;
    margin: 0 auto 15px;
}

.team-card-modern .description {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* 'We Create Value' Section Redesign */
.value-creation-section {
    position: relative;
    background-color: #fff;
    overflow: hidden;
}

.value-creation-section .pattern-layer {
    position: absolute;
    right: 0;
    top: 0;
    width: 50%;
    height: 100%;
    background-repeat: no-repeat;
    background-position: right top;
    opacity: 0.05;
}

.value-feature-box {
    padding: 30px;
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05); /* Softer initial shadow */
    transition: var(--transition);
    border: 1px solid #f0f0f0;
    text-align: center;
    height: 100%;
}

.value-feature-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.value-feature-box .icon-box {
    width: 60px;
    height: 60px;
    background: rgba(41, 125, 169, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 20px;
    transition: var(--transition);
}

.value-feature-box:hover .icon-box {
    background: var(--primary-color);
    color: #fff;
}

/* Image Composition */
.composition-images {
    position: relative;
    height: 500px;
}

.composition-images .img-1 {
    position: absolute;
    top: 0;
    left: 0;
    width: 65%;
    z-index: 1;
}

.composition-images .img-2 {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60%;
    z-index: 2;
    border: 10px solid #fff; /* White border to separate overlapping images */
}

/* Experience Badge */
.experience-badge {
    position: absolute;
    bottom: 50px;
    left: 20px;
    background: var(--primary-color);
    color: #fff;
    padding: 20px 30px;
    border-radius: 10px 30px 10px 30px;
    text-align: center;
    z-index: 3;
    box-shadow: 0 15px 30px rgba(41, 125, 169, 0.4);
}

.experience-badge .count {
    font-size: 2.5rem;
    font-weight: 800;
    display: block;
    line-height: 1;
}

.experience-badge .text {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* RTL Fixes */
html[dir="rtl"] .separator-left {
    margin-right: 0;
    margin-left: auto; /* Aligns to right in RTL context effectively */
}
html[dir="rtl"] .value-feature-box {
    /* No align change needed as it's centered */
}

html[dir="rtl"] .composition-images .img-1 {
    left: auto;
    right: 0;
}

html[dir="rtl"] .composition-images .img-2 {
    right: auto;
    left: 0;
}

html[dir="rtl"] .experience-badge {
    left: auto;
    right: 20px;
}

/* Responsive */
@media (max-width: 991px) {
    .composition-images {
        height: auto;
        margin-top: 50px;
        text-align: center;
    }
    .composition-images .img-1,
    .composition-images .img-2 {
        position: relative;
        width: 100%;
        margin-bottom: 20px;
        border: none;
    }
    .experience-badge {
        position: static;
        display: inline-block;
        margin-top: 20px;
    }
}


/* Enhanced Newsletter Design */
.newsletter-wrapper {
    background: linear-gradient(135deg, #0f3d56 0%, #297da9 100%);
    border-radius: 20px;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    margin-top: 50px; /* Add space instead of overlap */
    z-index: 10;
}

.newsletter-modern {
    background: transparent; /* Remove section bg since wrapper has it */
    padding-top: 50px; /* Space for overlap if needed */
    padding-bottom: 50px;
}

.newsletter-wrapper .pattern-layer-one {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-repeat: repeat;
    background-position: center;
    opacity: 0.1;
}

/* .newsletter-content .icon-box span {
    font-size: 50px;
    color: rgba(255, 255, 255, 0.3);
}

.newsletter-form .input-group {
    transition: var(--transition);
}

.newsletter-form .input-group:hover,
.newsletter-form .input-group:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2) !important;
}

.newsletter-form .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    transition: var(--transition);
}

.newsletter-form .btn-primary:hover {
    background-color: var(--primary-dark);
    transform: scale(1.05);
} */

/* RTL Updates for newsletter form */

html[dir="rtl"] .newsletter-content {
    text-align: right;
}

html[dir="rtl"] .newsletter-form .input-group-prepend .input-group-text {
    padding-left: 0 !important;
    padding-right: 1rem !important;
}

html[dir="rtl"] .newsletter-form .form-control {
    padding-left: 0 !important;
    padding-right: 0.5rem !important;
}

html[dir="rtl"] .newsletter-form .input-group-append button {
    margin-left: 0.25rem !important; /* m-1 override */
    margin-right: 0 !important;
}

/* Enhanced Partners Section */
.partners-modern-section {
    background-color: #fff;
    border-top: 1px solid #eee;
}

.partner-heading {
    color: #999;
    font-size: 1.1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
}

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

.partner-item .image-box img {
    height: 80px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.5;
    transition: var(--transition);
}

.partner-item:hover .image-box img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* Improve Partners Section Visibility */
.partners-modern-section {
    padding: 60px 0;
    background-color: #fafafa; /* Slightly darker than white for contrast */
}

.partner-heading {
    color: var(--primary-dark); /* Use brand color instead of grey */
    font-size: 1.5rem; /* Larger font */
    font-weight: 700;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

.partner-heading::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin: 10px auto 0;
}

.partner-item {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); /* Card effect */
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px; /* Fixed height for consistency */
    transition: var(--transition);
}

.partner-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.partner-item .image-box img {
    height: auto;
    max-height: 70px; /* Constrain height */
    max-width: 100%;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.4s ease;
}

.partner-item:hover .image-box img {
    filter: none;
    opacity: 1;
    transform: scale(1.1);
}

/* Fix Owl Carousel Dots */
.sponsors-carousel .owl-dots {
    margin-top: 30px !important;
}
.sponsors-carousel .owl-dot span {
    background: #ccc !important;
    width: 10px !important;
    height: 10px !important;
    margin: 5px !important;
}
.sponsors-carousel .owl-dot.active span {
    background: var(--primary-color) !important;
    width: 12px !important;
    height: 12px !important;
}
