/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
    overflow-x: hidden;
}

:root {
    --primary-color: #1a4d7a;
    --primary-dark: #0f3a5a;
    --primary-light: #2d6ba3;
    --accent-color: #ff6b35;
    --accent-dark: #e55a2b;
    --text-dark: #1a1a1a;
    --text-light: #666;
    --text-lighter: #999;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

* {
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    transition: var(--transition);
}

body[dir="rtl"] {
    direction: rtl;
    font-family: 'Inter', 'Segoe UI', Tahoma, Arial, sans-serif;
}

body[dir="rtl"] .navbar .container {
    flex-direction: row-reverse;
}

body[dir="rtl"] .nav-menu {
    flex-direction: row-reverse;
}

body[dir="rtl"] .nav-menu a::after {
    left: auto;
    right: 0;
}

body[dir="rtl"] .lang-switcher {
    margin-right: 0;
    margin-left: 1rem;
}

body[dir="rtl"] .contact-item:hover {
    transform: translateX(-5px);
}

body[dir="rtl"] .footer-content {
    flex-direction: row-reverse;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-brand h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: 2px;
}

.nav-brand span {
    font-size: 0.7rem;
    color: var(--text-light);
    font-weight: 500;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a:hover::after {
    width: 100%;
}

.lang-switcher {
    display: flex;
    align-items: center;
    margin-right: 1rem;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    color: var(--primary-color);
}

.lang-btn:hover {
    background: var(--primary-color);
    color: white;
}

.lang-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.lang-text {
    font-size: 0.9rem;
    font-weight: 700;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 200vh;
    overflow: hidden;
    margin: 0;
    padding: 0;
    background: #28588C;
}

/* Remove backgrounds/borders/shadows from any logo containers */
.hero-logo,
.logo-box,
.hero-logo-wrap,
.hero-logo-section .hero-logo {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 0 !important;
}

/* Logo Section - First View (100vh) */
.hero-logo-section {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Use mainlogobackground image as background with solid color fallback */
    background-color: #28588C;
    background-image: url('mainlogobackground.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 10;
    transition: opacity 1s cubic-bezier(0.23, 1, 0.32, 1), 
                transform 1s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: opacity, transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    overflow: hidden;
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
}

.hero-logo-section::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background-image: url('background.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.8s ease;
    will-change: opacity;
    margin: 0;
    padding: 0;
    border: none;
}

.hero-logo-section.blending::before {
    opacity: 0.7;
}

.hero-logo {
    display: block;
    padding: 0 !important;
    margin: 0 auto;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    animation: logoFadeIn 1.2s cubic-bezier(0.23, 1, 0.32, 1);
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1),
                opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.hero-logo img {
    max-width: 1000px;
    width: 90%;
    max-width: min(1000px, 90vw);
    height: auto;
    display: block;
    margin: 0 auto;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    filter: none !important;
    object-fit: contain;
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1),
                opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

@keyframes logoFadeIn {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Background Section - Reveals on Scroll */
.hero-background-section {
    position: relative;
    top: 100vh;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    opacity: 0;
    transform: translateY(0);
    transition: opacity 1s cubic-bezier(0.23, 1, 0.32, 1),
                transform 1s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: opacity, transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
}

.hero-background-section.visible {
    opacity: 1;
}

.hero-background {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background-image: url('background.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 1;
    will-change: transform;
    margin: 0;
    padding: 0;
    border: none;
}

.hero-background::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    /* Match logo's dark blue color scheme for seamless blend */
    background: linear-gradient(to bottom, 
        rgba(10, 45, 71, 0.55) 0%, 
        rgba(15, 58, 90, 0.45) 20%,
        rgba(26, 77, 122, 0.5) 40%,
        rgba(30, 85, 136, 0.55) 60%,
        rgba(26, 77, 122, 0.6) 80%,
        rgba(15, 58, 90, 0.7) 100%);
    margin: 0;
    padding: 0;
    border: none;
}

.hero-overlay {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(circle at 30% 50%, rgba(255, 107, 53, 0.12) 0%, transparent 60%);
    z-index: 2;
    transition: opacity 1.5s ease;
    margin: 0;
    padding: 0;
    border: none;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 2rem;
    width: 100%;
    animation: fadeInUp 1s ease 0.5s both;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    opacity: 0.95;
    letter-spacing: 2px;
}

.hero-divider {
    font-size: 2rem;
    margin: 1.5rem 0;
    opacity: 0.8;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.8;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

.scroll-indicator {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 11;
    transition: opacity 0.5s ease;
}

.scroll-indicator span {
    display: block;
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 25px;
    position: relative;
}

.scroll-indicator span::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0%, 100% {
        opacity: 1;
        top: 10px;
    }
    50% {
        opacity: 0.3;
        top: 30px;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Styles */
.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-divider {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin: 1rem 0;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-top: 1rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* About Section */
.about-section {
    background: var(--bg-white);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Vision & Mission Section */
.vision-mission-section {
    background: var(--bg-light);
}

.vm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.vm-card {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

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

.vm-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.vm-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.vm-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-light);
}

/* Services Section */
.services-section {
    background: var(--bg-white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    border-top: 4px solid var(--accent-color);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-top-color: var(--primary-color);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
}

.service-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-light);
}

/* Why Choose Us Section */
.why-choose-section {
    background: var(--bg-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-item {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

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

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
}

.feature-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-light);
}

/* Quality Section */
.quality-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.quality-card {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.quality-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.quality-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.quality-text {
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0.95;
}

/* Contact Section */
.contact-section {
    background: var(--bg-white);
}

.contact-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 15px;
    transition: var(--transition);
}

.contact-item:hover {
    background: white;
    box-shadow: var(--shadow);
    transform: translateX(5px);
}

.contact-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.contact-details h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.contact-details p {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
}

.contact-details a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.contact-details a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Ensure phone number displays LTR so '+' stays at start in RTL */
.phone-ltr {
    direction: ltr;
    unicode-bidi: bidi-override;
}

/* Footer */
.footer {
    background: var(--primary-dark);
    color: white;
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-brand h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
    letter-spacing: 2px;
}

.footer-brand p {
    font-size: 0.85rem;
    opacity: 0.8;
}

.footer-text {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lang-switcher {
        margin-right: 0.5rem;
    }

    .lang-btn {
        padding: 0.4rem 0.8rem;
    }

    .lang-icon {
        width: 20px;
        height: 20px;
    }

    .lang-text {
        font-size: 0.8rem;
    }

    .hero-logo img {
        max-width: 750px;
        width: 85%;
    }

    .hero-content {
        padding: 1.5rem;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    body[dir="rtl"] .nav-menu {
        left: auto;
        right: -100%;
    }

    body[dir="rtl"] .nav-menu.active {
        right: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .vm-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-logo img {
        max-width: 650px;
        width: 80%;
    }

    .hero-content {
        padding: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section {
        padding: 3rem 0;
    }

    .vm-card,
    .service-card,
    .feature-item {
        padding: 1.5rem;
    }

    .lang-btn {
        padding: 0.3rem 0.6rem;
    }

    .lang-icon {
        width: 18px;
        height: 18px;
    }

    .lang-text {
        font-size: 0.75rem;
    }
}
