body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: url('img/20120.png') no-repeat center center fixed;
    background-size: cover;
    color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(26, 45, 64, 0.112);
    /* لون داكن + شفافية 80% */
    backdrop-filter: blur(6px);
    z-index: 1000;
    box-sizing: border-box;
}

.logo {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.logo img {
    width: 150px;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle span {
    height: 3px;
    width: 25px;
    background: white;
    margin: 4px 0;
    border-radius: 2px;
}

nav {
    display: flex;
    gap: 10px;
    align-items: center;
}

nav a {
    margin-left: 20px;
    color: #ccc;
    text-decoration: none;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
}

nav a.active {
    border-bottom: 2px solid #f87171;
    color: white;
}

nav a:hover {
    text-decoration: underline;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 20px 20px;
}

h1 {
    font-size: 36px;
    margin-bottom: 20px;
}

p {
    max-width: 600px;
    margin-bottom: 20px;
    color: #cccccc;
    font-size: 16px;
}

a.link {
    color: #8cd2ff;
    text-decoration: underline;
}

footer {
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    color: #ccc;
}

footer a {
    color: #ff00e6;
    text-decoration: none;
}

section {
    padding-top: 100px;
    padding-left: 40px;
    padding-right: 40px;
    padding-bottom: 40px;
}

.ai-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ff00e6, #2158ff);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    box-shadow: 0 0 10px rgb(0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
    z-index: 1000;
}

.ai-button:hover {
    transform: scale(1.1);
}

.ai-button img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.services-section {
    padding: 60px 20px;
    background: linear-gradient(to right, #e0f7fa, #ffffff);
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    color: #0d47a1;
    margin-bottom: 10px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 40px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    justify-items: center;
    align-items: stretch;
    /* مهم لتوحيد الارتفاع */
}

.service-card {
    background: rgb(255, 255, 255);
    border-radius: 20px;
    padding: 20px 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* يضمن توزيع العناصر */
    height: 100%;
    /* تأخذ كامل ارتفاع العمود */
    text-align: left;
    max-width: 320px;
    margin: auto;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.image-container {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #1976d2;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
}

.service-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-card h3 {
    margin-bottom: 8px;
    color: #0d47a1;
    font-size: 1.2rem;
}

.service-card p {
    color: #444;
    font-size: 0.85rem;
    line-height: 1.5;
}

.learn-more-btn {
    margin-top: auto;
    align-self: flex-end;
    /* الزر على اليمين */
    padding: 8px 16px;
    background-color: #1976d2;
    color: #fff;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.8rem;
    transition: background-color 0.3s ease;
}

.learn-more-btn:hover {
    background-color: #0d47a1;
}

.chat-container {
    width: 400px;
    max-width: 90%;
    background: white;
    border-radius: 15px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.chat-box {
    height: 400px;
    overflow-y: auto;
    padding: 20px;
    border-bottom: 1px solid #ddd;
}

.chat-message {
    margin: 10px 0;
    line-height: 1.5;
}

.user {
    text-align: right;
    color: #007bff;
}

.bot {
    text-align: left;
    color: #333;
}

.chat-input {
    display: flex;
    border-top: 1px solid #ddd;
}

input {
    flex: 1;
    padding: 15px;
    border: none;
    outline: none;
}

button {
    padding: 15px;
    background: #007bff;
    color: white;
    border: none;
    cursor: pointer;
}

button:hover {
    background: #0056b3;
}


/* Responsive Design */

@media (max-width: 600px) {
    .menu-toggle {
        display: flex;
    }
    nav {
        display: none;
        flex-direction: column;
        background-color: rgba(0, 0, 0, 0.9);
        position: absolute;
        top: 70px;
        right: 0;
        width: 200px;
        padding: 20px;
    }
    nav.show {
        display: flex;
    }
    nav a {
        margin: 10px 0;
    }
    .service-card {
        max-width: 100%;
        padding: 15px 12px;
    }
    .service-card h3 {
        font-size: 1rem;
    }
    .service-card p {
        font-size: 0.75rem;
    }
    .image-container {
        width: 70px;
        height: 70px;
    }
}