:root {
    --blue: #7161bb;
    --orange: #f97316;
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --dark-blue: #2c5282;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--white);
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Progress Bar */
.progress-container {
    width: 100%;
    height: 5px;
    background: #f1f1f1;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 90;
}

.progress-bar {
    height: 5px;
    background: var(--orange);
    width: 0%;
    transition: width 0.3s ease;
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--orange);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: none;
    z-index: 99;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-top:hover {
    background: var(--blue);
    transform: translateY(-3px);
}

/* Header */
header {
    background: linear-gradient(90deg, var(--blue) 0%, var(--dark-blue) 100%);
    padding: 0.2rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    width: 50px;
    height: auto;
    object-fit: contain;
}

.logo-text {
    color: var(--white);
    font-size: 1.3rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo-text:hover {
    color: var(--orange);
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    padding: 0.2rem 0;
    position: relative;
    display: flex;
    align-items: center;
}

.nav-links a i {
    margin-right: 5px;
    font-size: 0.9rem;
}

.translate-btn {
    background: var(--orange);
    color: var(--white);
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.translate-btn:hover {
    background: var(--white);
    color: var(--orange);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--orange);
    transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--orange);
}

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

.hamburger .line {
    width: 25px;
    height: 3px;
    background: var(--white);
    transition: all 0.3s ease;
}

.hamburger.active .line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

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

.hamburger.active .line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Hero Section - Fixed Background */
.hero {
    background: linear-gradient(rgba(113, 97, 187, 0.8), rgba(44, 82, 130, 0.9)), url('04 (3).jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--white);
    text-align: center;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    z-index: -1;
}

.hero-content {
    padding: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease 0.3s forwards;
    opacity: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.btn {
    display: inline-block;
    background: var(--orange);
    color: var(--white);
    padding: 0.7rem 1.8rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid var(--orange);
    cursor: pointer;
    margin-top: 1rem;
    animation: fadeInUp 1s ease 0.6s forwards;
    opacity: 0;
}

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

.btn-outline {
    background: transparent;
    border-color: var(--white);
    margin-left: 15px;
}

.btn-outline:hover {
    background: var(--white);
    color: var(--blue);
}

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

/* Page Content */
.page-content {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
    min-height: calc(100vh - 120px);
}

.page-content.active {
    display: block;
}

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

/* Sections Common Styles */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--blue);
    position: relative;
    font-size: 2.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--orange);
}

/* Grid Layouts */
.client-grid, 
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.services-grid, 
.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.service-card, 
.team-member, 
.testimonial-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
    border: 1px solid rgba(0,0,0,0.05);
}

.client-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: transparent;
    box-shadow: none;
    border: none;
}

/* About Us Section - 3 Columns */
.three-columns {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin: 3rem auto 0;
    max-width: 1200px;
}

.column {
    flex: 1;
    min-width: 0;
    position: relative;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.column-header {
    background: var(--blue);
    color: white;
    padding: 1.2rem;
    text-align: center;
    flex-shrink: 0;
}

.column-header h3 {
    margin: 0;
    font-size: 1.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.column-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.arabic-text {
    text-align: right;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    direction: rtl;
    flex-grow: 1;
}

.english-text {
    text-align: left;
    color: #555;
    font-style: italic;
    line-height: 1.6;
    border-top: 1px dashed #ddd;
    padding-top: 1rem;
    direction: ltr;
    margin-top: auto;
}

/* Column Separators */
.column:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -1rem;
    top: 50%;
    transform: translateY(-50%);
    height: 70%;
    width: 1px;
    background: rgba(113, 97, 187, 0.2);
}

/* Services Section */
.service-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 2rem;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.card-icon {
    background: rgba(113, 97, 187, 0.1);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--blue);
    font-size: 2rem;
}

.service-link {
    color: var(--orange);
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    margin-top: 15px;
    transition: all 0.3s;
}

.service-link:hover {
    color: var(--blue);
    transform: translateX(5px);
}

/* Service Details Modal */
.service-details-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.service-details-container.active {
    opacity: 1;
    visibility: visible;
}

.service-detail {
    display: none;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    background: white;
    border-radius: 10px;
    padding: 2rem;
    position: relative;
}

.service-detail.active {
    display: block;
}

.detail-content {
    position: relative;
}

.close-detail {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #777;
    transition: all 0.3s;
}

.close-detail:hover {
    color: var(--orange);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

.detail-text h3 {
    color: var(--blue);
    margin-bottom: 1rem;
}

.detail-text ul {
    margin: 1.5rem 0;
    padding-left: 1rem;
}

.detail-text li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1.5rem;
}

.detail-text li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background: var(--orange);
    border-radius: 50%;
}

.detail-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Nested Lists in Service Details */
.service-detail ul ul {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

.service-detail li li::before {
    content: '○';
    color: var(--orange);
    background: none;
    width: auto;
    height: auto;
    top: 0;
    left: 0;
}

.service-detail li li li::before {
    content: '▪';
}

/* Clients Section */
.client-section {
    padding: 5rem 0;
    background-color: var(--light-gray);
}

.client-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

.client-logo-container {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: none;
    transition: all 0.3s ease;
    padding: 10px;
}

.client-card:hover .client-logo-container {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.client-logo {
    width: 100%;
    height: auto;
    object-fit: contain;
    margin: 0;
    filter: grayscale(100%);
    transition: all 0.3s;
}

.client-card:hover .client-logo {
    filter: grayscale(0%);
}

.client-name {
    margin-top: 0;
    color: var(--blue);
    font-weight: 600;
}

/* Team Section */
.team-section {
    padding: 5rem 0;
    background-color: var(--light-gray);
}

.team-member {
    text-align: center;
    padding: 2rem;
}

.member-photo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    overflow: hidden;
    border: 3px solid var(--orange);
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-name {
    color: var(--blue);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.member-position {
    color: var(--orange);
    font-weight: 500;
    margin-bottom: 1rem;
}

.member-bio {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.member-contact {
    margin-bottom: 1.5rem;
    text-align: right;
}

.member-contact p {
    margin-bottom: 0.5rem;
    color: #555;
    font-size: 0.9rem;
}

.member-contact i {
    color: var(--orange);
    margin-right: 8px;
}

.member-social {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.member-social a {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.member-social a:hover {
    background: var(--orange);
    transform: translateY(-3px);
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--blue);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(113, 97, 187, 0.1);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-submit {
    text-align: center;
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--blue);
    padding: 1rem;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    transform: translateY(-150%);
    transition: all 0.3s ease;
    z-index: 99;
}

.mobile-nav.active {
    transform: translateY(0);
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem;
    display: block;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s;
}

.mobile-nav-links a:hover {
    color: var(--orange);
    padding-right: 10px;
}

.mobile-nav-links .translate-btn {
    width: 100%;
    justify-content: center;
    margin-top: 1rem;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .nav-links {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .services-grid, 
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Three Columns Layout */
    .three-columns {
        flex-direction: column;
        gap: 1.5rem;
        max-width: 600px;
    }
    
    .column {
        width: 100%;
    }
    
    .column:not(:last-child)::after {
        content: none;
    }
    
    .column-header h3 {
        white-space: normal;
    }
}

@media (max-width: 768px) {
    .logo-text {
        font-size: 1.2rem;
    }
    
    .logo-img {
        width: 40px;
        height: 40px;
    }
    
    .hero {
        min-height: 80vh;
        background-attachment: scroll;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .services-grid, 
    .client-grid,
    .team-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .member-photo {
        width: 100px;
        height: 100px;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-image {
        order: -1;
    }
    
    .member-contact {
        text-align: center;
    }
    
    /* Three Columns Layout */
    .column:not(:last-child) {
        margin-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    .logo-container {
        gap: 0.5rem;
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    .hero {
        min-height: 70vh;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .btn-outline {
        margin-left: 0;
    }
    
    .contact-form {
        padding: 1rem;
    }
    
    .member-photo {
        width: 80px;
        height: 80px;
    }
    
    /* Three Columns Layout */
    .column {
        min-width: 100%;
    }
    
    .arabic-text, .english-text {
        font-size: 0.95rem;
    }
}