/*
Theme Name: muthalat-law
Theme URI: https://www.m-aladala.com
Author: IBRAHIM 
Description: قالب مخصص لشركة مثلث العدالة للاستشارات القانونية
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: muthalat-law
*/

@font-face {
    font-family: 'Cairo';
    src: url('src/Cairo-VariableFont_slnt,wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --navy-dark: #001f3c;
    --navy: #0d2137;
    --gold: #c9a96e;
    --gold-light: #d4b97a;
    --accent-main: #CCAE83;
    --text-dark: #1d1e20;
    --text-gray: #36344d;
    --text-muted: #727586;
    --bg-light: #f5f5f5;
    --bg-white: #ffffff;
    --border-light: #e0e0e0;
    --header-bg: #d0d5db;
    --font-family: 'Cairo', sans-serif;
    --max-width: 1224px;
    --transition: 0.3s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: var(--font-family);
    direction: rtl;
    text-align: right;
    color: var(--text-dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    line-height: 1.3;
}

p {
    margin: 0;
}

ul, ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

.top-bar {
    background-color: var(--navy-dark);
    color: #fff;
    padding: 8px 16px;
    font-size: 0.85rem;
}

.top-bar .container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.top-bar__location,
.top-bar__phones {
    display: flex;
    align-items: center;
    gap: 6px;
}

.top-bar__phones a {
    color: var(--accent-main);
    font-weight: 700;
    transition: opacity var(--transition);
}

.top-bar__phones a:hover {
    opacity: 0.8;
}

.top-bar__location svg,
.top-bar__phones svg {
    flex-shrink: 0;
}

.site-header {
    background-color: var(--header-bg);
    padding: 0 16px;
    min-height: 90px;
    display: flex;
    align-items: center;
}

.site-header .container {
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row-reverse;
}

.header-socials {
    display: flex;
    gap: 12px;
    margin-right: 16px;
    align-items: center;
}
.header-socials a {
    color: var(--navy-dark);
    transition: color var(--transition);
}
.header-socials a:hover {
    color: var(--accent-main);
}

.site-logo {
    display: block;
    width: 220px;
    flex-shrink: 0;
}

.site-logo img {
    width: 100%;
    height: auto;
}


.main-nav {
    display: flex;
    align-items: center;
    gap: 0;
}

.main-nav__list {
    display: flex;
    align-items: center;
    gap: 0;
}

.main-nav__list li a {
    color: var(--navy-dark);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 10px 14px;
    border-radius: 6px;
    transition: background-color var(--transition), color var(--transition);
    white-space: nowrap;
    display: block;
}

.main-nav__list li a:hover,
.main-nav__list li a.active {
    background-color: rgba(0, 31, 60, 0.1);
    color: var(--navy-dark);
}


.lang-switcher {
    position: relative;
    margin-right: 12px;
}

.lang-switcher__btn {
    background: var(--navy-dark);
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    font-family: var(--font-family);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color var(--transition);
}

.lang-switcher__btn:hover {
    background-color: var(--navy);
}

.lang-switcher__btn svg {
    transition: transform var(--transition);
}

.lang-switcher.open .lang-switcher__btn svg {
    transform: rotate(180deg);
}

.lang-switcher__dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
    min-width: 140px;
    z-index: 10;
}

.lang-switcher.open .lang-switcher__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-switcher__dropdown a {
    display: block;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark);
    transition: background-color var(--transition);
}

.lang-switcher__dropdown a:hover {
    background-color: var(--bg-light);
}


.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background-color: var(--navy-dark);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.hero {
    background: linear-gradient(135deg, rgba(0, 31, 60, 0.1) 0%, rgba(0, 31, 60, 0.1) 100%),
                url('src/Frame%2019.png') center/cover no-repeat;
    padding: 100px 16px;
    color: #fff;
    min-height: 550px;
    display: flex;
    align-items: center;
}

.hero .container {
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
}

.hero__title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.3;
}

.hero__title span {
    color: var(--accent-main);
}

.hero__desc {
    font-size: 1.3rem;
    line-height: 1.9;
    max-width: 720px;
    margin-bottom: 40px;
    opacity: 0.95;
}

.hero__buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition);
    border: none;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.btn--whatsapp {
    background-color: var(--accent-main);
    color: #fff;
}

.btn--whatsapp:hover {
    background-color: #b5986f;
}

.btn--outline {
    background-color: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.btn--outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.section {
    padding: 80px 16px;
}

.section .container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.section__title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--navy-dark);
    margin-bottom: 16px;
}

.section__title--center {
    text-align: center;
}

.section__underline {
    display: block;
    width: 80px;
    height: 4px;
    background: var(--accent-main);
    border-radius: 2px;
    margin-bottom: 40px;
}

.section__underline--center {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 50px;
}

.about {
    background-color: var(--bg-light);
}

.about__container {
    display: flex;
    align-items: center;
    gap: 60px;
}

#aboutus .about__container {
    background-color: rgb(0, 31, 60);
    padding: 40px;
    border-radius: 20px;
}

#aboutus .section__title,
#aboutus .about__slogan {
    color: #fff;
}

#aboutus .about__text {
    color: rgba(255, 255, 255, 0.9);
}

.about__content {
    flex: 1;
}

.about__image {
    flex: 1;
    position: relative;
    padding: 20px;
}

.about__img-wrapper {
    position: relative;
    border-radius: 20px;
}

.about__img-wrapper img {
    border-radius: 20px;
    width: 100%;
    position: relative;
    z-index: 2;
    display: block;
}

.about__img-overlay {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 40%;
    height: 40%;
    background-color: var(--accent-main);
    border-radius: 20px;
    z-index: 1;
}

@media (max-width: 768px) {
    .about__container {
        flex-direction: column !important;
    }
}

.about__text {
    color: var(--text-gray);
    font-size: 1.1rem;
    line-height: 1.9;
    margin-bottom: 20px;
}

.about__slogan {
    color: var(--navy-dark);
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 28px;
}

.services {
    background-color: rgb(0, 31, 60);
}

.services .section__title {
    color: #fff;
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    align-items: start;
}

.service-card:nth-child(3n+2) {
    margin-top: 40px;
}
.service-card:nth-child(6n+1), .service-card:nth-child(6n+6) {
    margin-top: 80px;
}
.service-card:nth-child(6n+3), .service-card:nth-child(6n+4) {
    margin-top: 0px;
}

@media (max-width: 768px) {
    .service-card { margin-top: 0 !important; }
}

.service-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
}

.service-card__img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-card__img {
    transform: scale(1.05);
}

.service-card__img-wrapper {
    overflow: hidden;
    height: 200px;
}

.service-card__body {
    padding: 20px 24px;
    text-align: center;
}

.service-card__title {
    color: var(--navy-dark);
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.5;
}

.vision-mission {
    background-color: var(--bg-light);
}

.vision-mission__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.vm-card {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-right: 5px solid var(--accent-main);
    transition: transform var(--transition), box-shadow var(--transition);
}

.vm-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.vm-card__title {
    color: var(--navy-dark);
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 16px;
}

.vm-card__text {
    color: var(--text-muted);
    line-height: 1.9;
    font-size: 1rem;
}

.custom-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}
.form-input, .form-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 1rem;
    background-color: #f9f9f9;
    transition: border-color var(--transition);
}
.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--accent-main);
}
.btn--submit {
    background-color: var(--accent-main);
    color: #fff;
    align-self: flex-start;
}
.btn--submit:hover {
    background-color: #b5986f;
}

.contact {
    background-color: var(--navy-dark);
    color: #fff;
}

.contact__header {
    text-align: center;
    margin-bottom: 50px;
}

.contact__header .section__title {
    color: #fff;
    margin-bottom: 16px;
}

.contact__cta-text {
    font-size: 1.15rem;
    margin-bottom: 24px;
    opacity: 0.9;
    text-align: center;
}

.contact__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 50px;
}

.contact-item {
    text-align: center;
    padding: 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background-color var(--transition), transform 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.contact-item__icon {
    margin-bottom: 12px;
}

.contact-item__icon svg {
    width: 36px;
    height: 36px;
    color: var(--accent-main);
}

.contact-item__label {
    font-size: 1rem;
    margin-bottom: 8px;
    opacity: 0.85;
}

.contact-item__value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--accent-main);
}

.contact-item__value a {
    color: var(--accent-main);
    transition: opacity var(--transition);
}

.contact-item__value a:hover {
    opacity: 0.8;
}


.contact__info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background-color var(--transition), transform var(--transition);
}

.contact-info-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.contact-info-item__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 205, 53, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-info-item__icon svg {
    width: 20px;
    height: 20px;
    color: var(--accent-main);
}

.contact-info-item__text {
    font-size: 0.95rem;
    line-height: 1.5;
}

.contact-info-item__text a {
    color: #fff;
}

.contact-info-item__text a:hover {
    color: var(--accent-main);
}

.company-desc {
    background-color: var(--bg-light);
    padding: 60px 16px;
}

.company-desc .container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.company-desc__text {
    color: var(--text-gray);
    font-size: 1.05rem;
    line-height: 1.9;
}

.site-footer {
    background-color: var(--navy-dark);
    padding: 28px 16px;
    text-align: center;
    color: #fff;
    border-top: 3px solid var(--accent-main);
}

.site-footer .container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.site-footer__copy {
    font-size: 0.95rem;
    opacity: 0.85;
}

.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 24px;
    right: 24px;
    left: auto;
    background-color: #CCAE83;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    box-shadow: 0 4px 12px rgba(163, 197, 60, 0.4);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition), background-color var(--transition);
    animation: pulse-green 2s infinite;
}

.whatsapp-float:hover {
    background-color: #D0D5DB;
    transform: scale(1.1);
    animation: none;
}

@keyframes pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(163, 197, 60, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 15px rgba(163, 197, 60, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(163, 197, 60, 0); }
}

.custom-popup-overlay {
    display: none;
    position: fixed;
    z-index: 9999999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.custom-popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 90%;
    max-width: 480px;
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.custom-popup-overlay.popup-visible .custom-popup-content {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.custom-popup-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
}

.custom-popup-close {
    position: absolute;
    top: -15px;
    right: -15px;
    background-color: #ffffff;
    color: #333333;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    line-height: 34px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: transform 0.2s;
    z-index: 10000000;
}

.custom-popup-close:hover {
    transform: scale(1.15);
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(80px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}


.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }
.service-card:nth-child(7) { transition-delay: 0.35s; }
.service-card:nth-child(8) { transition-delay: 0.4s; }
.service-card:nth-child(9) { transition-delay: 0.45s; }

@media (max-width: 992px) {
    .hero__title {
        font-size: 2.5rem;
    }

    .hero__desc {
        font-size: 1.1rem;
    }

    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .vision-mission__grid {
        grid-template-columns: 1fr;
    }

    .contact__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-nav__list li a {
        padding: 10px 10px;
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .top-bar .container {
        flex-direction: column;
        text-align: center;
        gap: 4px;
    }

    .top-bar__location,
    .top-bar__phones {
        justify-content: center;
    }


    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background-color: var(--bg-white);
        flex-direction: column;
        padding: 80px 24px 24px;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        transition: right var(--transition);
        z-index: 999;
        overflow-y: auto;
    }

    .main-nav.open {
        right: 0;
    }

    .main-nav__list {
        flex-direction: column;
        width: 100%;
    }

    .main-nav__list li a {
        padding: 14px 16px;
        font-size: 1.05rem;
        border-bottom: 1px solid var(--border-light);
        border-radius: 0;
    }

    .lang-switcher {
        margin-right: 0;
        margin-top: 16px;
        width: 100%;
    }

    .lang-switcher__btn {
        width: 100%;
        justify-content: center;
    }

    .lang-switcher__dropdown {
        position: static;
        transform: none;
        margin-top: 4px;
    }

    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
    }

    .mobile-overlay.active {
        display: block;
    }


    .hero {
        padding: 60px 16px;
        min-height: 400px;
    }

    .hero__title {
        font-size: 2rem;
    }

    .hero__desc {
        font-size: 1rem;
    }

    .hero__buttons {
        flex-direction: column;
    }

    .btn {
        justify-content: center;
    }


    .section {
        padding: 50px 16px;
    }

    .section__title {
        font-size: 1.8rem;
    }


    .services__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }


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

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


    .vm-card {
        padding: 28px;
    }

    .custom-popup-close {
        top: -12px;
        right: -12px;
    }
}

@media (max-width: 480px) {
    .site-logo {
        width: 160px;
    }

    .hero__title {
        font-size: 1.7rem;
    }
}


.hero__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero__content {
    flex: 1;
    max-width: 600px;
}


.hero__image-carousel {
    flex: 1;
    max-width: 480px;
    height: 450px;
    overflow: hidden;
    position: relative;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.hero-slider-track {
    display: flex;
    flex-direction: row;
    width: 100%;
    transition: transform 0.5s ease-in-out;
}

.hero-slide {
    width: 100%;
    flex-shrink: 0;
    padding: 0;
}

.hero-slide img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    object-fit: cover;
}


.review-images-section {
    padding: 40px 0;
    overflow: hidden;
}

.review-slider {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    overflow: hidden;
    position: relative;
}

.review-slider-track {
    display: flex;
    width: fit-content;
    transition: transform 0.5s ease-in-out;
}

.review-slide {
    width: 350px;
    height: 250px;
    flex-shrink: 0;
    padding: 10px;
}

.review-slide a {
    display: block;
    width: 100%;
    height: 100%;
}

.review-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;

}

.review-slide img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}


.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
}
.slider-btn:hover {
    background: rgba(0,0,0,0.8);
}
.slider-btn--left { left: 10px; }
.slider-btn--right { right: 10px; }


@media (max-width: 992px) {
    .hero__container {
        flex-direction: column;
        text-align: center;
    }
    .hero__content {
        max-width: 100%;
    }
    .hero__buttons {
        justify-content: center;
    }
    .hero__image-carousel {
        width: 100%;
        max-width: 400px;
        height: 350px;
    }
    .review-slide {
        width: 220px;
        height: 150px;
    }
}