:root {
    --light-green: #91ef18;
    --dark-green: #144434;
    --lime-green: #eaff1d;

    --max-width: 1200px;
    --transition: all 0.3s ease;
}

/* ===================== */
/* Fonts */
/* ===================== */
@font-face {
    font-family: "Alexandria";
    src: url("../assets/fonts/Alexandria-VariableFont_wght.woff2");
}
@font-face {
    font-family: "Tajawal";
    src: url("../assets/fonts/Tajawal-Regular.woff2");
}

/* ===================== */
/* Base */
/* ===================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: "DM Sans", sans-serif;
}

/* RTL font overrides for headings/text */
body.rtl p,
body.rtl h2,
body.rtl h3,
body.rtl span,
body.rtl a,
body.rtl button,
body.rtl select,
body.rtl input,
body.rtl textarea,
body.rtl input::placeholder,
body.rtl textarea::placeholder {
    font-family: "Tajawal", sans-serif !important;
}
body.rtl h1 {
    font-family: "Alexandria", sans-serif !important;
}

/* ===================== */
/* Hero Section */
/* ===================== */
.contact-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    background: linear-gradient(
            to right,
            rgba(3, 82, 3, 0.5) 0%,
            rgba(88, 214, 88, 0.3) 50%,
            rgba(137, 108, 10, 0.4) 90%
        ),
        url("../assets/images/contact/contact-hero.webp") center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    background-attachment: fixed;
    text-align: center;
    color: #fff;
    padding: 0 2rem;
    opacity: 0.95;
    overflow: hidden;
}
.contact-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}
.contact-hero .hero-content {
    position: relative;
    z-index: 1;
}
.contact-hero h1 {
    color: #fff;
    font-size: 3.2rem;
    font-weight: 700;
    max-width: 800px;
    line-height: 1.2;
    font-family: "Allenoire", sans-serif;
    text-transform: capitalize;
    margin: 0 auto;
    width: 50%;
}

/* ===================== */
/* Contact Section */
/* ===================== */
.contact-section {
    padding: 6vw 8vw;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    gap: 3rem;
    align-items: center;
}
.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: stretch;
}
.contact-image {
    flex: 1;
    display: flex;
}
.contact-image img {
    width: 100%;
    height: 745px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.contact-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.contact-form #ar-top h2 {
    color: var(--dark-green);
    font-size: 1rem;
}
.contact-form h1 {
    font-size: 2rem;
    color: var(--dark-green);
    font-family: "Allenoire", sans-serif;
    margin: 0.5rem 0 1.5rem;
}
.contact-form p {
    margin-bottom: 1.5rem;
    color: #555;
    line-height: 1.6;
}

/* ===================== */
/* Form Fields - Unified UI/UX */
/* ===================== */
.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 1rem 1.2rem;
    margin-bottom: 1.2rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 1rem;
    background: #fff;
    color: #333;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Placeholder */
.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #999;
    font-size: 0.95rem;
    font-family: 'playfair', serif;
}

/* Hover & Focus */
.contact-form input:hover,
.contact-form textarea:hover,
.contact-form select:hover {
    border-color: rgba(145, 239, 24, 0.5);
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    border: 1px solid var(--light-green);
    box-shadow: 0 0 8px rgba(145, 239, 24, 0.35);
}

/* Textarea */
.contact-form textarea {
    min-height: 140px;
    resize: vertical;
}

/* Inline validation helpers (optional) */
.contact-form .is-invalid {
    border-color: #e53935 !important;
}
.contact-form .is-valid {
    border-color: #2e7d32 !important;
}
.contact-form .hint {
    font-size: 0.85rem;
    color: #777;
    margin-top: -0.8rem;
    margin-bottom: 1rem;
}

/* ===================== */
/* Select Dropdown – brand caret + colors */
/* ===================== */
.contact-form select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: linear-gradient(#fff, #fff) padding-box,
        url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 7l5 6 5-6' stroke='%23144434' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E")
            no-repeat right 14px center/16px 16px;
}
.contact-form select:focus {
    background: linear-gradient(#fff, #fff) padding-box,
        url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 7l5 6 5-6' stroke='%2391ef18' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E")
            no-repeat right 14px center/16px 16px;
}

/* ===================== */
/* Buttons */
/* ===================== */
.contact-form button {
    background: var(--lime-green);
    color: var(--dark-green);
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 12px rgba(145, 239, 24, 0.4);
}
.contact-form button:hover {
    background: var(--dark-green);
    color: #fff;
    transform: translateY(-2px);
}
.contact-form button:active {
    transform: scale(0.98);
}

/* ===================== */
/* Partners Section */
/* ===================== */
.partners {
    text-align: center;
    background: linear-gradient(rgba(20, 68, 52, 0.9), rgba(20, 68, 52, 0.9)),
        url("../assets/images/hero/brandGuideline.webp") center/cover no-repeat;
    background-attachment: fixed;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
    overflow-x: hidden;
    transform: none !important;
    will-change: auto;
    isolation: isolate;
}
.partners #partnerwrapper {
    backdrop-filter: blur(5px);
    padding: 5vw 8vw;
    text-align: center;
}
.partners h1 {
    font-family: "Allenoire", sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 200;
    margin: 1rem 0 2rem;
    color: #fff;
}
.partners #ar-top h2 {
    color: var(--light-green);
}

.partners-logos {
    overflow: hidden;
    position: relative;
    max-width: 90%;
    margin: 0 auto;
}
.partners-track {
    display: flex;
    width: max-content;
    gap: 4rem;
    animation: scrollLeft 20s linear infinite;
}
.partners-track img {
    height: 90px;
    object-fit: contain;
    transition: filter 0.3s ease;
    padding: 1rem 2rem;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 12px;
}
.partners button {
    background: var(--lime-green);
    color: var(--dark-green);
    border: none;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 25px;
}
.partners button:hover {
    background: var(--dark-green);
    color: var(--lime-green);
}

/* ===================== */
/* Info Cards (Send Us a Message / Give Us a Call) */
/* ===================== */
.contact-info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 5vw 8vw;
    max-width: var(--max-width);
    margin: 0 auto;
}
.info-card {
    background: var(--dark-green);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #fff;
}
.info-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}
.info-card i {
    font-size: 2rem;
    color: var(--lime-green);
    margin-bottom: 1rem;
}
.info-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--light-green);
}
.info-card p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
}

/* Envelope animation */
.info-card i.fa-envelope {
    animation: envelopeOpenClose 2s infinite ease-in-out;
    transform-origin: center bottom;
    display: inline-block;
}
/* Phone ring animation */
.info-card i.fa-phone {
    animation: phoneRing 1.5s infinite ease-in-out;
    display: inline-block;
    transform-origin: center center;
}

/* ===================== */
/* Section Labels on Contact Page */
/* ===================== */
.contact-page #ar-top h2 {
    font-size: 1rem;
}
.contact-page #ar-top {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
}
.contact-page #ar-top #dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--light-green);
    position: relative;
}
.contact-page #ar-top #dot::before {
    content: "";
    position: absolute;
    top: -5px;
    left: -5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--light-green);
    opacity: 0.3;
    animation: dotRipple 2s ease-in-out infinite;
}

/* ===================== */
/* Animations */
/* ===================== */
@keyframes scrollLeft {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(calc(-50% - 2rem));
    }
}
@keyframes envelopeOpenClose {
    0%,
    100% {
        transform: rotateX(0deg);
    }
    50% {
        transform: rotateX(-40deg);
    }
}
@keyframes phoneRing {
    0% {
        transform: rotate(0);
    }
    10% {
        transform: rotate(-15deg);
    }
    20% {
        transform: rotate(15deg);
    }
    30% {
        transform: rotate(-10deg);
    }
    40% {
        transform: rotate(10deg);
    }
    50% {
        transform: rotate(-5deg);
    }
    60% {
        transform: rotate(5deg);
    }
    70%,
    100% {
        transform: rotate(0);
    }
}
@keyframes dotPulse {
    0%,
    100% {
        transform: scale(1);
        background-color: var(--light-green);
    }
    50% {
        transform: scale(1.2);
        background-color: var(--lime-green);
    }
}
@keyframes dotRipple {
    0% {
        transform: scale(0.8);
        opacity: 0.7;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Fade-in on scroll */
.section-fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.section-fade-in.animate {
    opacity: 1;
    transform: translateY(0);
}

/* ===================== */
/* RTL Support */
/* ===================== */
[dir="rtl"] {
    text-align: right;
}
[dir="rtl"] .contact-hero {
    text-align: center;
}
[dir="rtl"] .contact-hero h1 {
    text-align: center;
    line-height: 1.7;
}
[dir="rtl"] .contact-container {
    flex-direction: row-reverse;
}
[dir="rtl"] .contact-form {
    text-align: right;
}
[dir="rtl"] .contact-form #ar-top #dot {
    margin-left: 1rem;
    margin-right: 0;
}
[dir="rtl"] .contact-form h2,
[dir="rtl"] .contact-form h1,
[dir="rtl"] .contact-form p {
    text-align: right;
}
[dir="rtl"] .contact-form input,
[dir="rtl"] .contact-form textarea {
    text-align: right;
    padding-right: 1rem;
    padding-left: 1rem;
}
[dir="rtl"] .contact-form input::placeholder,
[dir="rtl"] .contact-form textarea::placeholder {
    text-align: right;
}
[dir="rtl"] #partnerwrapper #ar-top #dot {
    margin-left: 1rem;
    margin-right: 0;
}
[dir="rtl"] #partnerwrapper h2 {
    text-align: right;
}
[dir="rtl"] #partnerwrapper h1 {
    text-align: center;
}
/* Reverse marquee for RTL */
[dir="rtl"] .partners-track {
    animation: scrollRight 20s linear infinite;
}
@keyframes scrollRight {
    from {
        transform: translate(calc(50% + 2rem));
    }
    to {
        transform: translate(0);
    }
}
[dir="rtl"] .contact-info-cards {
    direction: rtl;
}
[dir="rtl"] .info-card i {
    margin-left: 1rem;
    margin-right: 0;
}

/* ===================== */
/* Responsive */
/* ===================== */

/* ≤ 992px (Tablet) */
@media (max-width: 992px) {
    .contact-section {
        flex-direction: column;
        padding: 8vw 5vw;
        gap: 2rem;
        justify-content: center;
        align-items: center;
    }
    .contact-image {
        display: none;
    }

    .contact-form {
        width: 100%;
        max-width: 700px;
        background: linear-gradient(
            145deg,
            var(--dark-green),
            rgba(20, 68, 52, 0.95)
        );
        padding: 2.5rem 2rem;
        border-radius: 20px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
        text-align: center;
        color: #fff;
    }
    .contact-form h1 {
        font-size: 1.7rem;
        margin-bottom: 1rem;
        color: var(--lime-green);
    }
    .contact-form p {
        margin-bottom: 1.5rem;
        font-size: 1rem;
        color: rgba(255, 255, 255, 0.85);
    }

    .contact-form input,
    .contact-form textarea,
    .contact-form select {
        background: rgba(255, 255, 255, 0.95);
        border: 1px solid rgba(145, 239, 24, 0.5);
        color: #333;
    }
    .contact-form input:focus,
    .contact-form textarea:focus,
    .contact-form select:focus {
        border: 1px solid var(--lime-green);
        box-shadow: 0 0 8px rgba(145, 239, 24, 0.5);
    }
    .contact-form button {
        background: var(--lime-green);
        color: var(--dark-green);
        font-weight: 600;
        box-shadow: 0 4px 12px rgba(145, 239, 24, 0.4);
    }

    .contact-hero {
        height: 70vh;
        padding: 0 1.5rem;
        background-position: center top;
    }
    .contact-hero h1 {
        font-size: 2.4rem;
        line-height: 1.3;
    }

    .partners-track img {
        height: 70px;
    }

    /* Mobile-friendly select spacing/colors in tablet range */
    .contact-form select {
        background: linear-gradient(#fff, #fff) padding-box,
            url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 7l5 6 5-6' stroke='%23144434' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E")
                no-repeat right 14px center/16px 16px;
    }
}

/* ≤ 768px (Mobile Landscape) */
@media (max-width: 768px) {
    .contact-form {
        padding: 2rem 1.5rem;
        border-radius: 16px;
        background: linear-gradient(
            160deg,
            var(--dark-green),
            rgba(20, 68, 52, 0.9)
        );
    }
    .contact-form h1 {
        font-size: 1.5rem;
        color: var(--light-green);
    }
    .contact-form input,
    .contact-form textarea,
    .contact-form select {
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
    }
    .contact-form button {
        width: 100%;
        padding: 0.9rem;
        font-size: 0.95rem;
    }

    .contact-hero {
        height: 60vh;
        padding: 0 1rem;
        background-position: center top;
    }
    .contact-hero h1 {
        font-size: 2rem;
    }

    .partners-track img {
        height: 60px;
        padding: 0.8rem 1.5rem;
    }

    /* Roundness for select on smaller screens */
    .contact-form select {
        border-radius: 10px;
    }
}

/* ≤ 480px (Mobile Portrait) */
@media (max-width: 480px) {
    .contact-form {
        padding: 1.5rem 1rem;
        border-radius: 14px;
        background: linear-gradient(
            180deg,
            var(--dark-green),
            rgba(20, 68, 52, 0.95)
        );
    }
    .contact-form h1 {
        font-size: 1.3rem;
        color: var(--lime-green);
        margin-bottom: 0.8rem;
    }
    .contact-form p {
        font-size: 0.9rem;
        color: rgba(255, 255, 255, 0.8);
    }
    .contact-form input,
    .contact-form textarea,
    .contact-form select {
        font-size: 0.85rem;
        padding: 0.65rem 0.9rem;
    }
    .contact-form button {
        font-size: 0.9rem;
        padding: 0.8rem;
    }

    .contact-hero {
        height: 50vh;
        padding: 0 0.8rem;
        background-position: top;
    }
    .contact-hero h1 {
        font-size: 1.6rem;
        line-height: 1.2;
    }

    .contact-form select {
        border-radius: 8px;
    }
}

/* ===================== */
/* Extra: Keep partner dots/labels responsive in RTL */
/* ===================== */
@media (max-width: 768px) {
    [dir="rtl"] .contact-container {
        flex-direction: column;
    }
    [dir="rtl"] .contact-form {
        margin-top: 2rem;
        text-align: right;
    }
    [dir="rtl"] .contact-info-cards {
        flex-direction: column;
    }
    [dir="rtl"] .contact-text {
        text-align: right;
        line-height: 1.2;
    }
}
@media (max-width: 480px) {
    [dir="rtl"] .contact-form h1 {
        font-size: 1.5rem;
        text-align: right;
    }
    [dir="rtl"] .contact-hero h1 {
        text-align: center;
        font-size: 1.4rem;
    }
}


/* ===================== */
/* Custom Notification Styles */
/* ===================== */
.custom-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 300px;
    max-width: 500px;
    transform: translateX(calc(100% + 40px));
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    z-index: 10000;
}

.custom-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.notification-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    flex-shrink: 0;
}

.notification-message {
    color: #333;
    font-size: 0.95rem;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.notification-close:hover {
    color: #333;
}

/* Success notification */
.custom-notification.success {
    border-left: 4px solid #2e7d32;
}

.custom-notification.success .notification-icon {
    background: #2e7d32;
    color: white;
}

/* Error notification */
.custom-notification.error {
    border-left: 4px solid #d32f2f;
}

.custom-notification.error .notification-icon {
    background: #d32f2f;
    color: white;
}

/* Info notification */
.custom-notification.info {
    border-left: 4px solid #1976d2;
}

.custom-notification.info .notification-icon {
    background: #1976d2;
    color: white;
}

/* Loading spinner animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .custom-notification {
        right: 10px;
        left: 10px;
        min-width: unset;
        max-width: unset;
    }
}

/* RTL Support for notifications */
[dir="rtl"] .custom-notification {
    right: auto;
    left: 20px;
    transform: translateX(calc(-100% - 40px));
}

[dir="rtl"] .custom-notification.show {
    transform: translateX(0);
}

@media (max-width: 768px) {
    [dir="rtl"] .custom-notification {
        left: 10px;
        right: 10px;
    }
}