:root {
    --primary-blue: #1a3a8f;
    --primary-red: #e63946;
    --primary-white: #ffffff;
    --light-blue: #457b9d;
    --light-gray: #f8f9fa;
    --dark-gray: #333333;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light-gray);
    color: var(--dark-gray);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0d2b6c 100%);
    color: var(--primary-white);
    padding: 20px 0;
    position: relative;
    overflow: hidden;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

/* صورة الشعار */
.logo-img {
    background-color: var(--primary-white);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 3px solid var(--primary-red);
    position: relative;
}

.logo-image {
    width: 80%;
    height: 80%;
    object-fit: contain;
    transition: var(--transition);
}

.logo-text h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.logo-text .tagline {
    font-size: 14px;
    opacity: 0.9;
    font-style: italic;  /* ← أضف هذا السطر هنا */
unicode-bidi: plaintext; /* هذا السطر مهم */
}

/* Language Switcher - Inside Header */
.language-switcher {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    padding: 6px;
    border-radius: 30px;
    box-shadow: var(--shadow);
    border: 2px solid var(--primary-blue);
    margin-left: auto;
}

.lang-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 20px;
    background: transparent;
    color: var(--primary-blue);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    font-size: 14px;
}

.lang-btn.active {
    background-color: var(--primary-blue);
    color: white;
}

.lang-btn:hover:not(.active) {
    background-color: rgba(26, 58, 143, 0.1);
}

.lang-btn .fi {
    font-size: 14px;
}

.lang-text {
    white-space: nowrap;
}

/* Hero Section */
.hero {
    padding: 80px 0;
    background: linear-gradient(to bottom, var(--primary-blue) 0%, #0d2b6c 100%);
    color: var(--primary-white);
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero h2 {
    font-size: 42px;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.highlight {
    color: var(--primary-red);
    font-weight: bold;
}

/* Cards Section */
.cards-section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 36px;
    color: var(--primary-blue);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 70%;
    height: 4px;
    background-color: var(--primary-red);
    bottom: -10px;
    left: 15%;
    border-radius: 2px;
}

.section-title p {
    font-size: 18px;
    color: var(--dark-gray);
    max-width: 600px;
    margin: 0 auto;
}

.cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.card {
    background-color: var(--primary-white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    flex: 1;
    min-width: 300px;
    max-width: 350px;
    position: relative;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.card-header {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-white);
    font-size: 60px;
    position: relative;
    overflow: hidden;
}

/* حاوية الصورة مع النص */
.image-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* صور الكروت */
.card-image {
    width: 140px;
    height: 140px;
    object-fit: contain;
    transition: var(--transition);
    z-index: 1;
}

.card:hover .card-image {
    transform: scale(1.1);
}

/* تأثير النص الظاهر عند التمرير للكروت العادية */
.image-text-overlay {
    position: absolute;
    background-color: rgba(26, 58, 143, 0.95);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 16px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-20px);
    transition: var(--transition);
    z-index: 2;
    white-space: nowrap;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid var(--primary-red);
}

/* وضع النص بجانب الصورة للكروت العادية */
.card-header .image-container:hover .image-text-overlay {
    opacity: 1;
    visibility: visible;
}

/* النصوص المزدوجة لكارت مصر */
.dual-text-overlay {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 2;
}

.text-item {
    background-color: rgba(255, 255, 255, 0.95);
    color: var(--primary-blue);
    padding: 12px 20px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid var(--primary-red);
    min-width: 220px;
}

.text-item:hover {
    background-color: var(--primary-red);
    color: white;
    transform: translateX(-5px);
}

.text-item:hover i {
    color: white;
}

.text-item i {
    color: var(--primary-red);
    font-size: 14px;
    transition: var(--transition);
}

/* السهام حسب اللغة */
.en-arrow {
    display: none;
}

.ar-arrow {
    display: inline-block;
}

.logo-img .image-text-overlay {
    background-color: rgba(230, 57, 70, 0.95);
    font-size: 12px;
    padding: 5px 10px;
    transform: translateY(10px);
    min-width: 100px;
}

.logo-img:hover .image-text-overlay {
    opacity: 1;
    visibility: visible;
    transform: translateY(40px);
}

.card-1 .card-header {
    background: linear-gradient(to right, var(--primary-blue) 0%, var(--light-blue) 100%);
}

.card-2 .card-header {
    background: linear-gradient(to right, var(--primary-red) 0%, #ff6b6b 100%);
}

.card-3 .card-header {
    background: linear-gradient(to right, #2a9d8f 0%, #1d6f5c 100%);
}

.card-body {
    padding: 25px;
    text-align: center;
}

.card-body h3 {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--primary-blue);
}

.card-body p {
    color: var(--dark-gray);
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.5;
}

/* أزرار موحدة للكروت */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: var(--primary-blue);
    color: var(--primary-white);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid var(--primary-blue);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    font-size: 16px;
    min-width: 160px;
}

.btn:hover {
    background-color: transparent;
    color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn i {
    font-size: 14px;
}

.btn-red {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
}

.btn-red:hover {
    color: var(--primary-red);
    background-color: transparent;
}

.btn-blue {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.btn-blue:hover {
    color: var(--primary-blue);
    background-color: transparent;
}

/* أزرار مصر */
.egypt-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.egypt-buttons .btn {
    width: 100%;
}

/* Footer */
footer {
    background-color: var(--primary-blue);
    color: var(--primary-white);
    padding: 40px 0 20px;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

/* صورة الشعار في الفوتر */
.footer-logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.footer-image-container {
    position: relative;
    margin-bottom: 15px;
}

.footer-logo-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    transition: var(--transition);
}

.footer-image-container .image-text-overlay {
    background-color: rgba(230, 57, 70, 0.95);
    font-size: 12px;
    padding: 5px 10px;
    transform: translateY(10px);
    min-width: 120px;
}

.footer-image-container:hover .image-text-overlay {
    opacity: 1;
    visibility: visible;
    transform: translateY(40px);
}

.footer-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-white);
}

.footer-logo span {
    color: var(--primary-red);
}

.footer-contact {
    margin-bottom: 20px;
}

.footer-contact p {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.footer-contact i {
    color: var(--primary-red);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--primary-white);
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--primary-red);
    transform: translateY(-3px);
}

.copyright {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    opacity: 0.8;
}

/* Animation for cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

/* Ripple effect animation */
@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* اللغة الإنجليزية - اتجاه من اليسار لليمين */
[dir="ltr"] body {
    text-align: left;
}

[dir="ltr"] .language-switcher {
    margin-left: 0;
    margin-right: auto;
}

[dir="ltr"] .section-title h2::after {
    left: 15%;
    right: auto;
}

[dir="ltr"] .card-header .image-container:hover .image-text-overlay {
    transform: translateX(20px);
}

[dir="ltr"] .text-item:hover {
    transform: translateX(5px);
}

[dir="ltr"] .logo-img:hover .image-text-overlay {
    transform: translateY(40px);
}

[dir="ltr"] .footer-image-container:hover .image-text-overlay {
    transform: translateY(40px);
}

[dir="ltr"] .en-arrow {
    display: inline-block;
}

[dir="ltr"] .ar-arrow {
    display: none;
}

/* وضع النص المزدوج لكارت مصر */
[dir="rtl"] .card-2 .image-container:hover .dual-text-overlay {
    opacity: 1;
    visibility: visible;
    right: 0;
    left: auto;
    transform: translateY(-50%) translateX(-80px);
}

[dir="rtl"] .card-header .image-container:hover .image-text-overlay {
    transform: translateX(-100px);
}

[dir="ltr"] .card-2 .image-container:hover .dual-text-overlay {
    opacity: 1;
    visibility: visible;
    left: 0;
    right: auto;
    transform: translateY(-50%) translateX(80px);
}

[dir="ltr"] .card-header .image-container:hover .image-text-overlay {
    transform: translateX(100px);
}

[dir="ltr"] .text-item {
    text-align: left;
}

[dir="rtl"] .text-item {
    text-align: right;
}

[dir="ltr"] .egypt-buttons {
    align-items: stretch;
}

[dir="rtl"] .egypt-buttons {
    align-items: stretch;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .cards-container {
        flex-direction: column;
        align-items: center;
    }
    
    .card {
        max-width: 450px;
        width: 100%;
    }
    
    .hero h2 {
        font-size: 36px;
    }
    
    .hero p {
        font-size: 18px;
    }
    
    [dir="rtl"] .card-header .image-container:hover .image-text-overlay {
        transform: translateX(-80px);
    }
    
    [dir="ltr"] .card-header .image-container:hover .image-text-overlay {
        transform: translateX(80px);
    }
    
    [dir="rtl"] .card-2 .image-container:hover .dual-text-overlay {
        transform: translateY(-50%) translateX(-60px);
    }
    
    [dir="ltr"] .card-2 .image-container:hover .dual-text-overlay {
        transform: translateY(-50%) translateX(60px);
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .logo {
        flex-direction: column;
        text-align: center;
    }
    
    .language-switcher {
        margin: 10px auto 0;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero h2 {
        font-size: 32px;
    }
    
    .cards-section {
        padding: 70px 0;
    }
    
    .section-title h2 {
        font-size: 30px;
    }
    
    [dir="rtl"] .card-header .image-container:hover .image-text-overlay {
        font-size: 14px;
        padding: 8px 16px;
        transform: translateX(-70px);
    }
    
    [dir="ltr"] .card-header .image-container:hover .image-text-overlay {
        font-size: 14px;
        padding: 8px 16px;
        transform: translateX(70px);
    }
    
    [dir="rtl"] .card-2 .image-container:hover .dual-text-overlay {
        transform: translateY(-50%) translateX(-50px);
    }
    
    [dir="ltr"] .card-2 .image-container:hover .dual-text-overlay {
        transform: translateY(-50%) translateX(50px);
    }
    
    .text-item {
        min-width: 200px;
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .lang-text {
        display: none;
    }
    
    .lang-btn {
        padding: 8px;
    }
    
    .lang-btn .fi {
        font-size: 16px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .hero h2 {
        font-size: 28px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .card {
        min-width: 100%;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .card-image {
        width: 120px;
        height: 120px;
    }
    
    [dir="rtl"] .card-header .image-container:hover .image-text-overlay {
        font-size: 12px;
        padding: 6px 12px;
        transform: translateX(-60px);
    }
    
    [dir="ltr"] .card-header .image-container:hover .image-text-overlay {
        font-size: 12px;
        padding: 6px 12px;
        transform: translateX(60px);
    }
    
    [dir="rtl"] .card-2 .image-container:hover .dual-text-overlay {
        transform: translateY(-50%) translateX(-40px);
    }
    
    [dir="ltr"] .card-2 .image-container:hover .dual-text-overlay {
        transform: translateY(-50%) translateX(40px);
    }
    
    .text-item {
        min-width: 180px;
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 14px;
        min-width: 140px;
    }
}