/* === GLOBAL RESETS & UTILITIES === */
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #F0F2F5;
    color: #333;
    overflow-x: hidden;
    overflow-y: scroll;
}
img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* === HEADER & NAVIGATION (DESKTOP) === */
header {
    background-color: #008040;
    color: #fff;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    overflow-x: hidden;
}
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}
.logo {
    display: flex;
    align-items: center;
    max-height: 60px;
}
.logo img {
    height: 100%;
    width: auto;
    max-width: 200px;
    display: block;
}
.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
.nav-links li {
    margin-left: 25px;
}
.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 5px 0;
    transition: color 0.3s ease;
}
.nav-links a:hover {
    color: #FF4747;
}
.burger {
    display: none;
    cursor: pointer;
}
.burger div {
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 5px;
    transition: all 0.3s ease;
}
.language-selector {
    margin-left: 20px;
}
.language-selector select {
    padding: 8px 35px 8px 15px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 5px;
    background-color: rgba(0, 176, 89, 0.8);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23ffffff" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
}
.language-selector select:focus {
    outline: none;
    border-color: #FF4747;
    box-shadow: 0 0 5px rgba(255, 71, 71, 0.5);
}

/* === HERO SECTION (DESKTOP) === */
.hero {
    background-color: #fff;
    color: #333;
    text-align: center;
    padding: 100px 20px;
    height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #A7DBD8;
}
.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: #008040;
}
.hero p {
    font-size: 1.5rem;
    margin-bottom: 40px;
    color: #555;
}
.btn {
    display: inline-block;
    background-color: #FF4747;
    color: #fff;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.2rem;
    transition: background-color 0.3s ease;
}
.btn:hover {
    background-color: #CC3333;
}

/* === FOOTER (DESKTOP) === */
footer {
    background-color: #008040;
    color: #fff;
    text-align: center;
    padding: 20px;
    margin-top: 50px;
}

/* === CONTENT SECTIONS (DESKTOP) === */
.content-section {
    max-width: 1200px;
    margin: 50px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.content-section h2 {
    color: #008040;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
}
.feature-box {
    border: 1px solid #A7DBD8;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    background-color: #FDFDFD;
}

/* === SERVICES PAGE (DESKTOP) === */
.intro-text {
    text-align: center;
    font-size: 1.15rem;
    max-width: 800px;
    margin: 0 auto 50px auto;
    color: #555;
}
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.service-item {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}
.service-item h3 {
    color: #008040;
    font-size: 1.8rem;
    margin-bottom: 15px;
}
.service-item p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 20px;
}
.service-item ul {
    list-style: none;
    padding: 0;
    margin-top: 15px;
    text-align: left;
    color: #444;
}
.service-item ul li {
    padding: 8px 0;
    border-bottom: 1px dashed #A7DBD8;
    display: flex;
    align-items: center;
}
.service-item ul li:last-child {
    border-bottom: none;
}
.service-item ul li::before {
    content: '✓';
    color: #00B059;
    margin-right: 10px;
    font-weight: bold;
}
.call-to-action-bottom {
    text-align: center;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}
.call-to-action-bottom p {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: #333;
    font-weight: 500;
}

/* === CONTACT PAGE (DESKTOP) === */
.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 40px;
    justify-content: center;
}
.contact-info,
.contact-form {
    background-color: #fff;
    padding: 35px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    flex: 1;
    min-width: 300px;
}
.contact-info h3,
.contact-form h3 {
    color: #008040;
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center;
}
.contact-info p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 15px;
    color: #555;
}
.contact-info ul {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}
.contact-info ul li {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #333;
    display: flex;
    align-items: flex-start;
}
.contact-info ul li i {
    color: #00B059;
    margin-right: 15px;
    font-size: 1.3em;
    margin-top: 3px;
}
.contact-info ul li a {
    color: #008040;
    text-decoration: none;
    transition: color 0.3s ease;
}
.contact-info ul li a:hover {
    color: #FF4747;
}
.social-links {
    margin-top: 30px;
    text-align: center;
}
.social-links .social-icon {
    font-size: 2.2rem;
    color: #00B059;
    margin: 0 15px;
    transition: color 0.3s ease;
}
.social-links .social-icon:hover {
    color: #FF4747;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
    font-size: 1rem;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    transition: border-color 0.3s ease;
}
.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    border-color: #00B059;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 176, 89, 0.2);
}
.contact-form .btn {
    width: auto;
    padding: 15px 40px;
    display: block;
    margin: 20px auto 0 auto;
    font-size: 1.2rem;
}

/* === TAX CALCULATOR PAGE (DESKTOP) === */
.calculator-container {
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    max-width: 600px;
    margin: 40px auto;
    text-align: center;
}
.calculator-container .form-group {
    margin-bottom: 25px;
    text-align: left;
}
.calculator-container .form-group label {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 10px;
}
.calculator-container .form-group input[type="number"] {
    padding: 12px;
    font-size: 1.2rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}
.calculator-container .form-group input[type="number"]:focus {
    border-color: #00B059;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 176, 89, 0.2);
}
.calculator-container .btn {
    width: auto;
    padding: 15px 50px;
    margin: 30px auto;
    font-size: 1.3rem;
}
.results-container {
    margin-top: 40px;
    padding: 25px;
    background-color: #F0F2F5;
    border-radius: 8px;
    border: 1px solid #A7DBD8;
    text-align: left;
}
.results-container h3 {
    color: #008040;
    margin-bottom: 20px;
    font-size: 1.7rem;
    text-align: center;
}
.results-container p {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #444;
}
.results-container span {
    font-weight: bold;
    color: #FF4747;
    font-size: 1.3rem;
    margin-left: 10px;
}
.disclaimer {
    margin-top: 40px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #ccc;
    font-size: 0.95rem;
    color: #666;
    text-align: left;
}
.disclaimer h4 {
    color: #CC3333;
    margin-bottom: 15px;
    font-size: 1.1rem;
    text-align: center;
}

@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0px);
    }
}

/* === RESPONSIVE: MOBILE STYLES === */
@media screen and (max-width: 768px) {
    nav {
        padding: 0 10px;
    }
    .logo {
        max-height: 40px;
        margin-right: 10px;
    }
    .logo img {
        max-width: 140px;
        height: auto;
    }
    .language-selector {
        position: absolute;
        right: 80px;
        left: auto;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1000;
        margin: 0 10px;
        display: block;
        width: auto;
        text-align: initial;
    }
    .language-selector select {
        width: auto;
    }
    .burger {
        display: block;
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1100;
        margin-right: 0;
    }
    .nav-links {
        position: fixed; /* CHANGE: Use fixed to position relative to the viewport, ensuring it covers the screen */
        right: 0;
        top: 0; /* CHANGE: Start from the very top of the viewport */
        height: 100vh; /* CHANGE: Make it fill the entire viewport height */
        width: 50%; /* Keep your desired width for the menu */
        background-color: #008040; /* Keep your menu background color */
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start; /* NEW: Vertically center the menu items within the full height */
        transform: translateX(100%); /* Starts off-screen to the right (LTR) */
        transition: transform 0.5s ease-in; /* SIMPLIFY: Only transition 'transform' for the slide effect */
        z-index: 998; /* Ensure it's below language selector (1000) and burger (1100), but above content */
        visibility: hidden; /* NEW: Keep it truly hidden until it starts sliding */
        /* REMOVE: max-height, opacity, overflow-y, padding-top from this block */
        /* The transition property here should *only* include 'transform' */
    }

    .nav-links.nav-active {
        transform: translateX(0%); /* Slides into view */
        visibility: visible; /* NEW: Make it visible as it starts sliding in */
        padding-top: 12vh; /* Keep this to push content below the header */
        /* REMOVE: max-height, opacity, overflow-y from here */
    }

    .nav-links li {
        opacity: 0; /* Links start hidden, will be animated by navLinkFade */
        margin: 20px 0; /* NEW: Add vertical spacing between menu items */
        padding: 0; /* Adjust padding if you're using margins */
        width: 100%;
        text-align: center;
        border-bottom: none; /* NEW: Remove borders from individual list items for cleaner look in menu */
    }
    .nav-links li:last-child {
        border-bottom: none; /* Ensure no border on the last item */
    }
    .nav-links li a {
        color: #fff; /* Ensure link text is white against the green background */
        text-decoration: none;
        font-size: 1.1rem; /* Adjust font size if needed */
    }

    /* Ensure your navLinkFade animation is applied correctly */
    .nav-links.nav-active li {
        animation: navLinkFade 0.5s ease forwards 0.2s; /* This should still work */
    }
    /* Burger Animation */
    .toggle .line1 { transform: rotate(-45deg) translate(-5px, 6px); }
    .toggle .line2 { opacity: 0; }
    .toggle .line3 { transform: rotate(45deg) translate(-5px, -6px); }
    /* Hero section adjustments */
    .hero h1 { font-size: 2.5rem; }
    .hero p { font-size: 1.2rem; }
    /* Services page */
    .service-grid { grid-template-columns: 1fr; }
    .service-item { margin: 0 10px; }
    /* Contact page */
    .contact-container { flex-direction: column; }
    .contact-info, .contact-form {
        min-width: unset;
        width: 100%;
    }
}
/* Extra small screens */
@media screen and (max-width: 480px) {
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; }
}
@media screen and (max-width: 600px) {
    .calculator-container { padding: 20px; margin: 20px auto; }
    .calculator-container .btn { width: 100%; }
    .results-container p, .results-container span { font-size: 1.1rem; }
}

/* === RTL SUPPORT: DESKTOP === */
body[dir="rtl"] {
    text-align: right;
    direction: rtl;
}
body[dir="rtl"] nav {
    flex-direction: row-reverse;
}
body[dir="rtl"] .nav-links {
    margin-left: auto;
    margin-right: 0;
}
body[dir="rtl"] .nav-links li {
    margin-left: 0;
    margin-right: 25px;
}
body[dir="rtl"] .intro-text,
body[dir="rtl"] .content-section h2,
body[dir="rtl"] .service-item h3,
body[dir="rtl"] .service-item p,
body[dir="rtl"] .service-item ul,
body[dir="rtl"] .call-to-action-bottom p,
body[dir="rtl"] .contact-info h3,
body[dir="rtl"] .contact-info p,
body[dir="rtl"] .contact-info ul,
body[dir="rtl"] .contact-form h3,
body[dir="rtl"] .disclaimer h4 {
    text-align: right;
}
body[dir="rtl"] .service-item ul {
    padding-right: 0;
    padding-left: 20px;
}
body[dir="rtl"] .service-item ul li {
    flex-direction: row-reverse;
}
body[dir="rtl"] .service-item ul li::before {
    margin-left: 10px;
    margin-right: 0;
}
body[dir="rtl"] .contact-info ul li {
    flex-direction: row-reverse;
}
body[dir="rtl"] .contact-info ul li i {
    margin-left: 15px;
    margin-right: 0;
}
body[dir="rtl"] .form-group label {
    text-align: right;
}
body[dir="rtl"] .contact-container,
body[dir="rtl"] .service-grid {
    flex-direction: row-reverse;
}
body[dir="rtl"] .language-selector select {
    padding: 8px 15px 8px 35px;
    background-position: left 10px center;
}
/* === END OF CSS === */