/* ====== BASE RESETS & TYPOGRAPHY ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

:root {
    --primary-color: #DBC1AC;
    --accent-color: #FFE566;
    --text-color: #1A1A1A;
}

body {
    background-color: #FAF7EF;
}

/* ====== MODAL ====== */
body.loading {
    overflow: hidden;
}
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.modal.active { display: flex; }
.modal-content {
    background-color: #FAF7EF;
    padding: 2rem;
    border-radius: 38px;
    width: 400px;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.modal-content h2 {
    font-size: 1.8rem;
    color: #5C4033;
    margin-bottom: 1.5rem;
}
.modal-content select {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1.5rem;
    border: 1px solid #5C4033;
    border-radius: 38px;
    background-color: #FAF7EF;
    color: #5C4033;
    font-size: 1rem;
    font-weight: 450;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.modal-content select:hover { background-color: #D2B48C; }
.modal-content button {
    background-color: #5C4033;
    color: #fff;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 38px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.3s ease;
}
.modal-content button:hover { transform: translateY(-2px); }

/* ====== NAVBAR ====== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: #FAF7EF;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-wrap: wrap;
}
.nav-links {
    display: flex;
    margin-left: 125px;
    gap: 5rem;
}
#language-switcher {
    padding: 4px;
    border-radius: 38px;
    border: 1px solid #5C4033;
    background-color: #FAF7EF;
    color: #5C4033;
    font-size: 16px;
    font-weight: 450;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
#language-switcher:hover {
    background-color: #D2B48C;
    transform: translateY(-2px);
}
.nav-links a {
    text-decoration: none;
    color: black;
    font-weight: 450;
    font-size: 18px;
}
.contact-btn {
    background-color: #5C4033;
    color: #fff;
    padding: 0.5rem 1.5rem;
    font-weight: 450;
    font-size: 18px;
    border-radius: 38px;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* ====== HERO ====== */
.hero {
    text-align: center;
}
.hero h1 {
    font-size: 3rem;
    max-width: 900px;
    margin: 0 auto 1.5rem;
    line-height: 1.2;
    word-wrap: break-word;
}
.hero p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 1.5rem;
    word-wrap: break-word;
}
.btn {
    display: inline-block;
    background-color: #5C4033;
    color: #fff;
    font-weight: 500;
    padding: 0.8rem 2rem;
    border-radius: 2rem;
    text-decoration: none;
    transition: transform 0.3s ease;
}
.btn:hover { transform: translateY(-2px); }

/* ====== STATS SECTION ====== */
.stats-section {
    display: flex;
    justify-content: space-evenly;
    padding: 1rem 4%;
    gap: 20px;
}
.stats-container {
    display: grid;
    grid-template-columns: repeat(5, 0.5fr);
    gap: 0.5rem;
    width: 100%;
}
#statstart, #statend {
    border-radius: 38px;
    width: 260px;
    height: 350px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
    transition: transform 0.3s ease;
}
#statstart {
    margin-right: 50px;
    background-image: url('images/imageai.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: transparent;
}
#statend {
    background-color: #D2B48C;
    color: #fff;
    padding: 80px 30px 20px 30px;
    font-size: 25px;
    text-align: left;
}
#stat1 {
    padding: 2px;
    border-radius: 38px;
    width: 190px;
    height: 265px;
    margin-top: 90px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #D2B48C;
    color: #fff;
    transition: transform 0.3s ease;
}
#statc {
    padding: 2px;
    border-radius: 38px;
    width: 196px;
    height: 188px;
    margin-top: 170px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #fff;
    color: #111;
    transition: transform 0.3s ease;
}
.stat-card:hover { transform: translateY(-5px); }
.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

/* ====== SERVICES SECTION ====== */
.services-section {
    padding: 40px 80px 40px 130px;
    background-color: #EADDCA;
    transition: transform 0.3s ease;
}
.services-section h2 {
    font-size: 2.5rem;
    color: #5C4033;
    margin: 0 auto 3rem auto;
    max-width: 700px;
    padding: 20px 0;
    text-align: center;
    word-break: break-word;
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
}
.service-card {
    background: #D2B48C;
    height: 300px;
    width: 360px;
    padding: 20px;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: left; /* changed from center to left */
}
.service-card:hover { transform: translateY(-5px); }
.service-card h3 {
    font-size: 26px;
    font-weight: 550;
    color: #5C4033;
    padding-bottom: 20px; /* changed from 30px to 10px */
    word-wrap: break-word;
}
.service-card p {
    font-size: 16px;
    font-weight: 500;
    word-wrap: break-word;
}
.serv-content { padding-top: 15px; /* changed from 60px to 10px */ }
.serv-icons {
    display: flex;
    justify-content: flex-start; /* changed from space-between to flex-start */
    align-items: center;
    width: 100%;
    transition: transform 0.3s ease;
    margin-bottom: 0; /* optional: remove extra space if any */
}
svg { transition: transform 0.3s ease; }
svg:hover { transform: translateY(-5px); }

/* ====== CTA SECTION ====== */
.cta-section {
    text-align: center;
    padding: 3rem 5%;
    padding-bottom: 20px;
}
.cta-section h2 { padding-bottom: 10px; word-wrap: break-word; }
.cta-section h3 { padding: 10px 0px 10px 0px; word-wrap: break-word; }
.cta-section p { padding-bottom: 5px; text-align: center; word-wrap: break-word; }
.cta-section #ctap { padding-bottom: 10px; text-align: center; }
.cta-section > * { margin-left: auto; margin-right: auto; }

/* ====== FOOTER ====== */
.footer {
    background-color: #FFE566;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: #5C4033;
    padding: 3rem 5% 1rem;
}
.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}
.footer-section h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: #5C4033;
}
.footer-logo {
    height: 60px;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-radius: 10px;
}
.about p { margin-bottom: 1.5rem; line-height: 1.6; }
.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}
.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: #5C4033;
    border-radius: 50%;
    transition: transform 0.3s ease, background-color 0.3s;
}
.social-icon:hover {
    transform: translateY(-5px);
    background-color: #5C4033;
}
.social-icon svg { width: 20px; height: 20px; }
.social-icon:hover svg { fill: #5C4033; }
.links ul { list-style: none; }
.links li { margin-bottom: 0.8rem; }
.links a, .footer-bottom-links a {
    color: #5C4033;
    text-decoration: none;
    transition: color 0.3s, transform 0.3s;
    display: inline-block;
}
.links a:hover, .footer-bottom-links a:hover {
    color: #5C4033;
    transform: translateX(5px);
}
.contact p {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.5rem;
}
.contact svg { min-width: 20px; }
.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(250, 247, 239, 0.2);
    padding-top: 1.5rem;
}
.footer-bottom p { font-size: 0.9rem; }
.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}
.footer-bottom-links a { font-size: 0.9rem; }

/* ====== FAQ SECTION ====== */
.faq-section {
    padding: 48px 16px;
    background: #FAF7EF;
}
.faq-title {
    font-size: 2rem;
    font-weight: 700;
    color: #5C4033;
    text-align: center;
    margin-bottom: 32px;
}
.faq-list {
    max-width: 700px;
    margin: 0 auto;
}
.faq-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(92,64,51,0.07);
    margin-bottom: 18px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.faq-item.open {
    box-shadow: 0 4px 16px rgba(92,64,51,0.13);
}
.faq-question {
    width: 100%;
    text-align: left;
    padding: 20px 24px;
    font-size: 1.1rem;
    font-weight: 500;
    color: #5C4033;
    background: none;
    border: none;
    outline: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
}
.faq-question:hover {
    background: #fff;
}
.faq-answer {
    display: none;
    padding: 0 24px 20px 24px;
    color: #111;
    font-size: 1rem;
}
.faq-item.open .faq-answer {
    display: block;
}
.faq-arrow {
    font-size: 1.2em;
    transition: transform 0.2s;
}
.faq-item.open .faq-arrow {
    transform: rotate(180deg);
}

/* ====== RTL SUPPORT ====== */
body[dir="rtl"] .navbar { flex-direction: row-reverse; }
body[dir="rtl"] .nav-links { flex-direction: row-reverse; }
body[dir="rtl"] .hero,
body[dir="rtl"] .services-section,
body[dir="rtl"] .benefits-section,
body[dir="rtl"] .cta-section { text-align: center; }
body[dir="rtl"] .services-grid,
body[dir="rtl"] .benefits-grid { direction: rtl; }
body[dir="rtl"] .serv-icons { flex-direction: row-reverse; }
body[dir="rtl"] .service-card,
body[dir="rtl"] .benefit-card { text-align: right; }
body[dir="rtl"] .stats-container { direction: rtl; }
.bold-text { font-weight: bold; }

/* ====== RESPONSIVE DESIGN ====== */
@media (max-width: 1200px) {
    .stats-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 2rem;
        width: 100%;
        justify-items: center;
        align-items: stretch;
    }
    #statstart, #statend, #stat1, #statc {
        width: 100%;
        max-width: 350px;
        margin: 0;
        padding: 32px 16px;
        font-size: 1.1rem;
    }
}
@media (max-width: 900px) {
    html, body { width: 100%; overflow-x: hidden; }
    .hero, .stats-section, .services-section, .benefits-section, .cta-section, .footer {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
        width: 100%;
        max-width: 1200px;
        box-sizing: border-box;
    }
    .services-grid, .benefits-grid, .footer-container {
        margin: 0 auto;
        justify-items: center;
        align-items: center;
        width: 100%;
        box-sizing: border-box;
    }
    .service-card, .benefit-card {
        margin: 0 auto;
        width: 100%;
        max-width: 350px;
        box-sizing: border-box;
    }
    .services-section, .benefits-section, .cta-section, .footer {
        padding-left: 10px;
        padding-right: 10px;
    }
    .services-grid, .benefits-grid, .footer-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0;
    }
    .nav-links { margin-left: 0; gap: 2rem; }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    #language-switcher { display: none; }
    .hero h1 { font-size: 2rem; }
    .stats-section { flex-direction: column; padding: 30px; }
    .services-grid { padding: 15px; }
    .services-section { padding: 60px 20px 20px 20px; }
    .services-section h2 { text-align: center; }
    #language-switcher {
        width: 100%;
        max-width: 200px;
        margin: 0.5rem auto;
    }
    body[dir="rtl"] .services-section h2,
    body[dir="rtl"] .benefits-section h2,
    body[dir="rtl"] .cta-section h2 { text-align: center; }
}
@media (max-width: 600px) {
    #language-switcher { display: none; }
    .modal-content { width: 95%; padding: 1rem; }
    .modal-content h2 { font-size: 1.2rem; margin-bottom: 1rem; }
    .modal-content select { padding: 0.5rem; font-size: 0.8rem; }
    .modal-content button { padding: 0.5rem 1.2rem; font-size: 0.8rem; }
    .stats-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
    }
    #stat1, #statc, #statstart, #statend {
        width: 100%;
        margin: 10px 0 0 0;
    }
    .services-section h2 { font-size: 2.5rem; padding: 12px; text-align: center; }
    .services-grid { padding: 15px; }
    .services-section { padding: 60px 8px 10px 2px; }
    #language-switcher { font-size: 14px; padding: 0.4rem 0.8rem; }
}
@media (max-width: 768px) {
    .footer-container { grid-template-columns: 1fr; text-align: center; }
    .social-icons { justify-content: center; }
    .contact p { justify-content: center; }
    .footer-bottom { flex-direction: column; text-align: center; gap: 1rem; }
    .footer-bottom-links { justify-content: center; }
}
@media (max-width: 480px) {
    .footer { padding: 2rem 1.5rem 1rem; }
    .footer-bottom-links { flex-direction: column; gap: 0.7rem; align-items: center; }
    .contact p { flex-direction: column; align-items: center; }
}

/* ====== LANGUAGE SWITCHER STICKY ====== */
.language-switcher-sticky {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}
.language-switcher-sticky select {
    padding: 8px;
    font-size: 14px;
    border-radius: 5px;
    background-color: #fff;
    border: 1px solid #ccc;
    cursor: pointer;
}

/* ====== Contact Page Specific Styles ====== */

.contact-section {
    padding: 80px 50px;
    background-color: #FAF7EF;
    text-align: center;
    color: var(--text-color);
}

.contact-section h2 {
    font-size: 3.5rem;
    color: var(--text-color);
    margin-bottom: 20px;
    font-weight: 700;
}

.contact-intro {
    font-size: 1.2rem;
    margin-bottom: 50px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    color: #666;
}

.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 60px;
    margin-bottom: 60px;
    padding: 10px 310px ;
}

.contact-item {
    background-color:#fff ;
    padding: 30px;
    border-radius: 10px;
    width: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-5px);
}

.contact-item svg {
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
}

.contact-item h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #5C4033;
}

.contact-item p {
    font-size: 1.1rem;
    margin-bottom: 0;
}

.contact-item a {
    color: #666;
    text-decoration: none;
    font-weight: 500;
}

.contact-item a:hover {
    text-decoration: underline;
}

.contact-form-container {
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.contact-form-container h3 {
    font-size: 2.2rem;
    color: #5C4033;
    margin-bottom: 30px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #666;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
    transition: border-color 0.3s ease;
    background-color: #FAF7EF;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    border-color: var(--accent-color);
    outline: none;
}

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

.contact-form-container .cta-button {
    background-color: var(--accent-color);
    color: var(--text-color);
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    display: block; /* Make it a block element to center with margin auto */
    margin: 30px auto 0 auto; /* Center the button */
    width: fit-content;
}

.contact-form-container .cta-button:hover {
    background-color: #fdd835; /* Slightly darker yellow */
    transform: translateY(-2px);
}

.form-status-message {
    margin-top: 20px;
    padding: 10px 15px;
    border-radius: 5px;
    text-align: center;
    font-weight: 500;
}

.form-status-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-status-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Adjustments for Contact Page */
@media (max-width: 768px) {
    .contact-section h2 {
        font-size: 2.8rem;
    }

    .contact-intro {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .contact-info-grid {
        grid-template-columns: 1fr;
        gap:60px
    }

    .contact-item {
        padding: 20px;
    }

    .contact-item svg {
        width: 40px;
        height: 40px;
    }

    .contact-item h3 {
        font-size: 1.5rem;
    }

    .contact-item p {
        font-size: 1rem;
    }

    .contact-form-container {
        padding: 30px 20px;
    }

    .contact-form-container h3 {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }

    .form-group label {
        font-size: 0.95rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 10px;
        font-size: 0.9rem;
    }

    .contact-form-container .cta-button {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .contact-section {
        padding: 10px 15px 60px 15px;
    }

    .contact-section h2 {
        font-size: 2.2rem;
    }

    .contact-intro {
        font-size: 0.9rem;
    }

    .contact-form-container {
        padding: 25px 30px;
    }
    .contact-info-grid{
        padding:0px;
    }
}

/* ====== Thank You Message Container Styles ====== */
.thank-you-container {
    background-color: #FAF7EF;
    padding: 60px 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 40px auto; /* Adjust margin to center and give space */
    text-align: center;
    display: none; /* Hidden by default, shown by JavaScript */
    animation: fadeIn 0.8s ease-out; /* Add a subtle fade-in animation */
}

.thank-you-container h2 {
    font-size: 3.2rem;
    color: #5C4033;
    margin-bottom: 20px;
    font-weight: 700;
}

.thank-you-container p {
    font-size: 1.2rem;
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 15px;
}

.thank-you-container p a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.thank-you-container p a:hover {
    color: #fdd835;
    text-decoration: underline;
}

/* Keyframe for fade-in animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive adjustments for thank you message */
@media (max-width: 768px) {
    .thank-you-container {
        padding: 40px 30px;
        margin: 30px auto;
    }
    .thank-you-container h2 {
        font-size: 2.5rem;
    }
    .thank-you-container p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .thank-you-container {
        padding: 30px 20px;
        margin: 20px auto;
    }
    .thank-you-container h2 {
        font-size: 1.8rem;
    }
    .thank-you-container p {
        font-size: 0.95rem;
    }
}
