:root {
    --primary: #0097a7;
    /* Teal */
    --primary-dark: #006064;
    --secondary: #80deea;
    --accent: #ff4081;
    --light: #e0f7fa;
    --white: #ffffff;
    --text: #37474f;
    --gray: #90a4ae;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Almarai', sans-serif;
    color: var(--text);
    background-color: #f5fcfd;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.med-header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    font-size: 2.5rem;
    color: var(--primary);
}

.logo-area h1 {
    font-size: 1.5rem;
    color: var(--primary-dark);
    line-height: 1.2;
}

.sub-logo {
    font-size: 0.9rem;
    color: var(--gray);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-toggle {
    background: var(--light);
    color: var(--primary-dark);
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.menu-toggle:hover {
    background: var(--secondary);
    color: var(--primary);
}

.lang-toggle {
    background: var(--light);
    color: var(--primary-dark);
    border: none;
    padding: 8px 16px;
    border-radius: 50px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
}

.lang-toggle:hover {
    background: var(--secondary);
}

/* Hero */
.hero-med {
    background: var(--white);
    padding: 80px 0;
    background-image: url('https://images.unsplash.com/photo-1538108149393-fbbd81895907?q=95&w=2560&auto=format&fit=crop&dpr=2');
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 600px;
    display: flex;
    align-items: center;
    position: relative;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform;
}

.hero-med::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.4));
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-text {
    max-width: 600px;
    background: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.hero-badge {
    background-color: var(--light);
    color: var(--primary-dark);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 20px;
}

.hero-text h2 {
    font-size: 3rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
    line-height: 1.3;
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 30px;
}

.btn-primary {
    display: inline-block;
    background-color: var(--primary);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 151, 167, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-outline {
    display: inline-block;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 10px 28px;
    border-radius: 5px;
    font-weight: bold;
    margin-right: 15px;
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* Sections */
.section-med {
    padding: 80px 0;
}

.section-head {
    text-align: center;
    margin-bottom: 60px;
}

.section-head h2 {
    color: var(--primary-dark);
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.section-head p {
    color: var(--gray);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.dept-card {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    transition: 0.3s;
    border: 1px solid #eee;
}

.dept-card:hover {
    border-color: var(--secondary);
    box-shadow: 0 10px 30px rgba(0, 151, 167, 0.1);
    transform: translateY(-5px);
}

.icon-box {
    width: 80px;
    height: 80px;
    background-color: var(--light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 2rem;
    color: var(--primary);
}

.dept-card h3 {
    margin-bottom: 15px;
    color: var(--primary-dark);
}

/* Showcase */
.showcase {
    background-color: var(--white);
    padding: 80px 0;
}

.showcase-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.showcase-img {
    width: 100%;
    height: auto;
}

.showcase-img img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    display: block;
    object-fit: cover;
}

.showcase-info h2 {
    color: var(--primary-dark);
    font-size: 2.2rem;
    margin-bottom: 30px;
}

.check-list {
    list-style: none;
}

.check-list li {
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.check-list i {
    color: var(--primary);
    background: var(--light);
    padding: 5px;
    border-radius: 50%;
    font-size: 0.8rem;
}

/* Contact */
.contact-bg {
    background-color: #f5fcfd;
}

.contact-wrapper {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.contact-card {
    background: var(--white);
    padding: 30px 50px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    min-width: 250px;
}

.contact-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.contact-card h4 {
    margin-bottom: 15px;
    color: var(--primary-dark);
}

.map-link {
    color: var(--primary);
    font-weight: bold;
    text-decoration: underline;
}

.email-link {
    color: var(--primary);
    font-weight: bold;
    text-decoration: none;
}

.email-link:hover {
    text-decoration: underline;
}

.map-frame {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Footer */
footer {
    background-color: var(--primary-dark);
    color: var(--white);
    text-align: center;
    padding: 25px 0;
}

/* Sidebar */
.sidebar-overlay {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1998;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 0;
    right: -350px;
    width: 300px;
    height: 100vh;
    background: var(--white);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1999;
    transition: 0.3s;
    overflow-y: auto;
}

.sidebar.active {
    right: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: var(--light);
}

.sidebar-header h3 {
    color: var(--primary-dark);
    font-size: 1.2rem;
    margin: 0;
}

.sidebar-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text);
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.sidebar-close:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

.sidebar-nav a {
    padding: 15px 20px;
    color: var(--text);
    font-weight: 700;
    font-size: 1.1rem;
    transition: 0.3s;
    border-right: 3px solid transparent;
}

.sidebar-nav a:hover {
    background: var(--light);
    color: var(--primary);
    border-right-color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .header-flex {
        flex-direction: row;
        gap: 15px;
    }

    .hero-med {
        text-align: center;
        padding: 50px 0;
    }

    .hero-text {
        margin: 0 auto;
    }

    .showcase-grid {
        grid-template-columns: 1fr;
    }

    .showcase-img {
        order: -1;
    }

    .header-actions {
        flex-direction: column;
    }
}

/* RTL Specifics */
html[dir="rtl"] .btn-outline {
    margin-right: 0;
    margin-left: 15px;
}