* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Arial, Helvetica, sans-serif;
    margin: 0;
    background: #f4f6f9;
    color: #333;
    line-height: 1.6;
    position: relative;
}

/* Hero Section */
.hero-section {
    background-image: url('images/home.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    padding: 100px 20px;
    min-height: 500px;
    display: flex;
    align-items: center;
}

.hero-section .container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 40px;
    max-width: 1100px;
    margin: 0 auto;
}

/* Section Background */
.section-bg {
    background-color: #f8f9fa;
    padding: 60px 0;
}

/* Header */
header {
    background: linear-gradient(90deg, #0a1f44, #0d6efd);
    color: #fff;
    padding: 20px 40px;
    position: relative;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.logo-container {
    margin-bottom: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.language-switcher {
    display: flex;
    align-items: center;
}

.lang-btn {
    background: #0d6efd;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

.lang-btn:hover {
    background: #0b5ed7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4);
}

.logo {
    max-width: 200px;
    height: auto;
    display: block;
}

header h1 {
    margin: 10px 0 0 0;
    font-size: 1.8em;
}

header p {
    margin: 5px 0 15px;
}

nav a {
    color: #fff;
    margin-left: 20px;
    margin-right: 0;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background 0.3s;
}

body.rtl nav a {
    margin-left: 0;
    margin-right: 20px;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

/* Sections */
.container {
    max-width: 1100px;
    margin: auto;
    padding: 60px 20px;
}

section {
    margin-bottom: 0;
    padding: 60px 0;
}

section:first-of-type {
    padding-top: 0;
}

h2 {
    color: #0a1f44;
    margin-bottom: 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    background: #0d6efd;
    color: #fff;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
}

.btn:hover {
    background: #0b5ed7;
}

/* Services Cards */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.card {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.card h3 {
    color: #0d6efd;
    margin-top: 0;
}

/* Contact Info */
.contact-info {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    max-width: 600px;
    margin: 0 auto;
}

.contact-info p {
    font-size: 1.1em;
    margin: 15px 0;
}

/* Partners Section */
#partners {
    text-align: center;
}

#partners h2 {
    text-align: left;
}

body.rtl #partners h2 {
    text-align: right;
}

/* Social Media Buttons */
.social-media-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-btn img {
    max-width: 32px;
    max-height: 32px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* RTL Support for Social Buttons */
body.rtl .header-right {
    flex-direction: row-reverse;
}

.partners-intro {
    font-size: 1.1em;
    margin-bottom: 40px;
    color: #666;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.partner-logo {
    background: #fff;
    padding: 30px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    border: 2px solid transparent;
}

.partner-logo:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: #0d6efd;
}

.partner-logo img {
    max-width: 150px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s;
}

.partner-logo:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

.partner-name {
    font-size: 1.3em;
    font-weight: bold;
    color: #0a1f44;
    text-align: center;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.partner-logo:hover .partner-name {
    color: #0d6efd;
}

/* RTL Support */
body.rtl {
    direction: rtl;
    text-align: right;
}

body.rtl .hero-section .container,
body.rtl .container {
    text-align: right;
}

body.rtl .contact-info {
    text-align: right;
}

body.rtl #partners {
    text-align: center;
}

/* Footer */
footer {
    background: #0a1f44;
    color: #fff;
    text-align: center;
    padding: 20px;
    margin-top: 0;
}

/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
    /* Header Mobile */
    header {
        padding: 15px 20px;
    }
    
    .header-top {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .logo {
        max-width: 150px;
    }
    
    .header-right {
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .social-btn img {
        max-width: 28px;
        max-height: 28px;
    }
    
    .lang-btn {
        padding: 8px 16px;
        font-size: 0.85em;
    }
    
    header p {
        font-size: 0.9em;
        margin: 8px 0 10px;
    }
    
    /* Navigation Mobile */
    nav {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }
    
    nav a {
        margin-left: 0;
        margin-right: 0;
        padding: 8px 12px;
        font-size: 0.9em;
    }
    
    body.rtl nav a {
        margin-right: 0;
    }
    
    /* Hero Section Mobile */
    .hero-section {
        padding: 60px 15px;
        min-height: 400px;
        background-attachment: scroll;
    }
    
    .hero-section .container {
        padding: 25px 20px;
    }
    
    .hero-section h1 {
        font-size: 1.5em;
    }
    
    .hero-section h2 {
        font-size: 1.2em;
    }
    
    .hero-section p {
        font-size: 0.95em;
    }
    
    /* Container Mobile */
    .container {
        padding: 40px 15px;
    }
    
    section {
        padding: 40px 0;
    }
    
    h2 {
        font-size: 1.6em;
    }
    
    /* Services Grid Mobile */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .card {
        padding: 20px;
    }
    
    .card h3 {
        font-size: 1.1em;
    }
    
    /* Partners Grid Mobile */
    .partners-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 15px;
        margin-top: 30px;
    }
    
    .partner-logo {
        padding: 20px 15px;
        min-height: 120px;
    }
    
    .partner-logo img {
        max-width: 120px;
        max-height: 80px;
    }
    
    .partners-intro {
        font-size: 1em;
        margin-bottom: 30px;
    }
    
    /* Contact Info Mobile */
    .contact-info {
        padding: 20px;
    }
    
    .contact-info p {
        font-size: 1em;
        margin: 12px 0;
    }
    
    /* Buttons Mobile */
    .btn {
        padding: 10px 20px;
        font-size: 0.95em;
    }
}

@media screen and (max-width: 480px) {
    /* Extra Small Mobile */
    header {
        padding: 12px 15px;
    }
    
    .logo {
        max-width: 120px;
    }
    
    .social-btn {
        padding: 6px;
    }
    
    .social-btn img {
        max-width: 24px;
        max-height: 24px;
    }
    
    .lang-btn {
        padding: 6px 12px;
        font-size: 0.8em;
    }
    
    header p {
        font-size: 0.85em;
    }
    
    nav a {
        padding: 6px 10px;
        font-size: 0.85em;
    }
    
    .hero-section {
        padding: 40px 10px;
        min-height: 350px;
    }
    
    .hero-section .container {
        padding: 20px 15px;
    }
    
    .hero-section h1 {
        font-size: 1.3em;
    }
    
    .hero-section h2 {
        font-size: 1.1em;
    }
    
    .container {
        padding: 30px 10px;
    }
    
    h2 {
        font-size: 1.4em;
    }
    
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .partner-logo {
        padding: 15px 10px;
        min-height: 100px;
    }
    
    .partner-logo img {
        max-width: 100px;
        max-height: 70px;
    }
    
    .card {
        padding: 15px;
    }
    
    .contact-info {
        padding: 15px;
    }
}
