/* Base Styles & Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #fdfdfd;
    color: #333;
    line-height: 1.6;
}

/* Color Palette */
:root {
    --primary-navy: #0d2a4a;
    --secondary-gold: #c2a661;
    --light-bg: #f8f9fa;
    --text-muted: #555;
}

/* Navigation Bar */
nav {
    background-color: white;
    color: var(--primary-navy);
    padding: 0.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-logo img {
    max-height: 100px;
    max-width: 90%;
    width: auto;
}

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

.nav-links a {
    color: var(--primary-navy);
    text-decoration: none;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--secondary-gold);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.95)), url('https://images.unsplash.com/photo-1454165804606-c3d57bc86b40?auto=format&fit=crop&q=80&w=2000') center/cover;
    color: var(--primary-navy);
    text-align: center;
    padding: 6rem 2rem;
    border-bottom: 6px solid var(--secondary-gold);
}

.hero-logo {
    max-width: 90%;
    width: 600px;
    height: auto;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 3.5rem;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.hero h2 {
    font-size: 1.3rem;
    color: var(--secondary-gold);
    font-weight: 400;
    letter-spacing: 4px;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.hero p {
    max-width: 700px;
    margin: 0 auto 2rem auto;
    font-size: 1.15rem;
    color: var(--text-muted);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    background-color: var(--secondary-gold);
    color: var(--primary-navy);
    padding: 14px 35px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    border-radius: 4px;
    transition: background-color 0.3s, transform 0.2s;
    border: none;
    cursor: pointer;
    min-width: 220px; /* Ensure consistent width on mobile */
}

.btn:hover {
    background-color: #d4b873;
    transform: scale(1.02);
}

.btn-outline {
    background-color: transparent;
    color: var(--secondary-gold);
    border: 2px solid var(--secondary-gold);
}

.btn-outline:hover {
    background-color: var(--secondary-gold);
    color: var(--primary-navy);
}

/* Common Section Styles */
section {
    padding: 5rem 5%;
}

section:nth-child(even) {
    background-color: var(--light-bg);
}

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

.section-title {
    color: var(--primary-navy);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    width: 60px;
    height: 3px;
    background-color: var(--secondary-gold);
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

/* About Section */
.about-content {
    display: flex;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.about-stats {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.stat-box {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    border-bottom: 4px solid var(--primary-navy);
}

.stat-number {
    font-size: 2.5rem;
    color: var(--secondary-gold);
    font-weight: bold;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: white;
    padding: 2rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-top: 4px solid var(--primary-navy);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-top-color: var(--secondary-gold);
}

.service-card h3,
.service-card h4 {
    color: var(--primary-navy);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.service-card-full {
    max-width: 1200px;
    margin: 0 auto 2.5rem auto;
}

.service-card-full h4, 
.service-card-full .service-subtitle {
    text-align: left;
}

.service-paragraph {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-top: 1rem;
    text-align: justify;
}

.services-main-title {
    text-align: left;
    font-size: 2.2rem;
    color: var(--primary-navy);
    margin-bottom: 2.5rem;
    position: relative;
    padding-left: 1.5rem;
    display: flex;
    align-items: center;
}

.services-main-title::after {
    content: '';
    position: absolute;
    left: 0;
    top: 10%;
    bottom: 10%;
    width: 5px;
    background: var(--secondary-gold);
    border-radius: 2px;
}

[dir="rtl"] .services-main-title {
    text-align: right;
    padding-left: 0;
    padding-right: 1.5rem;
}

[dir="rtl"] .services-main-title::after {
    left: auto;
    right: 0;
}

.service-subtitle {
    font-size: 0.9rem;
    color: var(--secondary-gold);
    text-align: center;
    font-weight: bold;
    margin-bottom: 1rem;
    text-transform: italic;
}

.info-card {
    background: var(--primary-navy) !important;
    color: white !important;
}

.info-card h4, .info-card h5 {
    color: var(--secondary-gold) !important;
}

.info-block {
    margin-top: 1.5rem;
}

.info-block h5 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.targets-text {
    font-size: 0.95rem;
    color: #eee;
    text-align: center;
}

.service-list {
    list-style: none;
    margin-top: 0.5rem;
}

.service-list li {
    margin-bottom: 0.8rem;
    color: var(--text-muted);
}

.service-list li::before {
    content: '✔ ';
    color: var(--secondary-gold);
    font-weight: bold;
    margin-right: 2px;
}

[dir="rtl"] .service-list li::before {
    margin-right: 0;
    margin-left: 2px;
}

/* Values Section */
.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.value-item h4 {
    color: var(--primary-navy);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.value-icon {
    font-size: 2.5rem;
    color: var(--secondary-gold);
    margin-bottom: 1rem;
}

/* Contact Section */
.contact-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
}

.contact-info h3 {
    color: var(--primary-navy);
    margin-bottom: 1.5rem;
}

.contact-info p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.contact-info strong {
    color: var(--primary-navy);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    gap: 1.5rem;
}

.form-group input {
    width: 100%;
}

input,
textarea {
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--secondary-gold);
}

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

/* Footer */
footer {
    background-color: white;
    color: var(--text-muted);
    border-top: 1px solid #eee;
    padding: 3rem 5% 1.5rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto 2rem auto;
    border-bottom: 1px solid #eee;
    padding-bottom: 2rem;
}

.footer-logo img {
    height: 120px;
    width: auto;
    margin-bottom: 1rem;
    display: block;
}

.footer-logo p {
    color: var(--secondary-gold);
}

.footer-bottom {
    text-align: center;
    font-size: 0.9rem;
}

/* Testimonials Carousel */
.testimonials-carousel {
    max-width: 1200px;
    margin: 0 auto;
}

.testimonials-stage {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.testimonials-stage.fade-out { opacity: 0; }
.testimonials-stage.fade-in  { opacity: 1; }

.testimonial-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    text-align: center;
    border-bottom: 3px solid var(--secondary-gold);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.testimonial-stars {
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.testimonial-text {
    font-style: italic;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.75;
    flex: 1;
}

.testimonial-author {
    color: var(--primary-navy);
    font-weight: bold;
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

/* Carousel Controls */
.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.carousel-btn {
    background: white;
    border: 2px solid var(--secondary-gold);
    color: var(--secondary-gold);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0;
}

.carousel-btn:hover {
    background: var(--secondary-gold);
    color: white;
    transform: scale(1.05);
}

.carousel-dots {
    display: flex;
    gap: 10px;
    align-items: center;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.carousel-dot.active {
    background: var(--secondary-gold);
    transform: scale(1.4);
}

.carousel-progress-wrap {
    max-width: 300px;
    margin: 1.8rem auto 0;
    height: 4px;
    background: #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
}

.carousel-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--secondary-gold), #d4b873);
    border-radius: 10px;
    transition: width 0.1s linear;
}

@media (max-width: 900px) {
    .testimonials-stage {
        grid-template-columns: 1fr;
    }
}

/* Responsive Design */
@media (max-width: 900px) {
    .nav-logo img {
        max-height: 70px;
        max-width: 90%;
    }

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

    .hero {
        padding: 4rem 1.5rem;
    }

    .about-content,
    .contact-container {
        flex-direction: column;
        grid-template-columns: 1fr;
    }

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

    .nav-links {
        display: none;
    }

    .form-group {
        flex-direction: column;
        gap: 1.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .contact-form {
        align-items: center;
    }

    .form-group,
    input,
    textarea {
        width: 100%;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* Language Switcher */
.lang-switcher {
    position: relative;
    display: inline-block;
    margin-left: 1.5rem;
}

.lang-btn {
    background: white;
    border: 2px solid var(--secondary-gold);
    padding: 5px 15px;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--primary-navy);
    transition: all 0.3s ease;
    min-width: 75px;
}

.lang-btn #current-lang-flag {
    font-size: 1.2rem;
}

.lang-btn #current-lang-code {
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
}

.lang-btn:hover,
.lang-btn:active {
    background-color: var(--secondary-gold);
    color: white;
}

.lang-btn:active {
    transform: scale(0.95);
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    z-index: 1001;
    min-width: 120px;
    margin-top: 5px;
}

.lang-dropdown.show {
    display: block;
}

.lang-option {
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.lang-option:hover {
    background-color: var(--light-bg);
    color: var(--primary-navy);
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

[dir="rtl"] .about-content,
[dir="rtl"] .contact-container {
    direction: rtl;
}

[dir="rtl"] .service-list li {
    padding-left: 0;
    padding-right: 1.5rem;
}

[dir="rtl"] .service-list li::before {
    left: auto;
    right: 0;
}

[dir="rtl"] .btn-outline {
    margin-left: 0;
}

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

[dir="rtl"] .lang-dropdown {
    right: auto;
    left: 0;
}

[dir="rtl"] .testimonial-card {
    text-align: right;
}

@media (max-width: 900px) {
    .lang-switcher {
        margin: 1rem 0;
    }
}

/* Partnerships Section */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.partner-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease;
    border-left: 3px solid var(--secondary-gold);
}

.partner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.partner-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.partner-card p {
    font-weight: 600;
    color: var(--primary-navy);
    font-size: 0.95rem;
}

@media (max-width: 900px) {
    .partners-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

/* Team Section */
#equipe {
    position: relative;
    background: linear-gradient(rgba(10, 25, 47, 0.65), rgba(10, 25, 47, 0.55)), url('team.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 8rem 0;
    color: white;
}

#equipe .section-title {
    color: white;
}

#equipe .section-title::after {
    background: var(--secondary-gold);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 2;
}

.team-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.team-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--secondary-gold);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.team-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: rgba(197, 168, 128, 0.1);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--secondary-gold);
}

.team-card h3 {
    color: var(--secondary-gold);
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.team-card p {
    color: #ddd;
    line-height: 1.6;
    font-size: 0.95rem;
}

[dir="rtl"] .team-card p {
    text-align: justify;
}

/* WhatsApp Button */
.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    background-color: #25d366;
    color: white !important;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 1rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.whatsapp-btn:hover {
    background-color: #128c7e;
    transform: translateY(-3px);
}

.whatsapp-btn span {
    margin-left: 0.5rem;
}

[dir="rtl"] .whatsapp-btn span {
    margin-left: 0;
    margin-right: 0.5rem;
}

/* Mobile Navigation - Refined Implementation */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--primary-navy);
    cursor: pointer;
    z-index: 2001;
    transition: all 0.3s ease;
}

@media (max-width: 1024px) {
    .mobile-menu-btn {
        display: block;
        position: absolute;
        right: 5%;
        top: 1.5rem;
    }

    [dir="rtl"] .mobile-menu-btn {
        right: auto;
        left: 5%;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 75%;
        max-width: 300px;
        height: 100vh;
        background: white;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start; /* Start from top */
        z-index: 2000;
        padding: 5rem 1.5rem 2rem; /* More space at top for close button */
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        overflow-y: auto; /* Scrollable if needed */
    }

    .nav-links.active {
        display: flex !important;
        transform: translateX(0);
    }

    .nav-links li {
        margin: 0; /* Remove margin */
        width: 100%;
        text-align: left;
    }

    .nav-links a {
        font-size: 1rem; /* Slightly smaller */
        font-weight: 500;
        display: block;
        padding: 0.6rem 0; /* Compact padding */
        width: 100%;
        border-bottom: 1px solid #f5f5f5;
    }
    
    [dir="rtl"] .nav-links {
        right: auto;
        left: 0;
        transform: translateX(-100%);
        align-items: flex-end;
        box-shadow: 10px 0 30px rgba(0,0,0,0.1);
    }
    
    [dir="rtl"] .nav-links li {
        text-align: right;
    }
    
    [dir="rtl"] .nav-links.active {
        transform: translateX(0);
    }

    .lang-switcher {
        margin-right: 3.5rem; /* Space for the mobile menu button */
        margin-left: 0;
    }
    
    [dir="rtl"] .lang-switcher {
        margin-left: 3.5rem;
        margin-right: 0;
    }
}
