/* #region CSS Variables & Core Resets */


:root {
    /* Colors */
    --color-black: #1F2026;
    --color-yellow: #FEC96D;
    --color-white: #F6F6F6;
    --color-grey: #979797;
    --color-border: #DADADA;

    /* Typography */
    --font-heading: 'Abhaya Libre', serif;
    /* Medium 500 / Bold 700 */
    --font-body: 'Poppins', sans-serif;
    /* Light 300 / Regular 400 */
    --font-arabic: "greycliff-arabic-cf", sans-serif;

    /* Layout */
    --header-height: 75px;
    --border-radius: 3px;
    --container-width: 90%;
    --container-max: 90%;
}

/* Global Reset & Box Sizing */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-white);
    color: var(--color-black);
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}


img,
video,
svg {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* #endregion */

/* --- LÓGICA GLOBAL DE VISIBILIDAD --- */

/* Oculta el idioma no seleccionado de forma global */
html[lang="en"] .ar-text {
    display: none !important;
}

html[lang="ar"] .en-text {
    display: none !important;
}

/* Configuración de dirección y fuentes base */
html[lang="ar"] {
    direction: rtl;
    text-align: right;
}

html[lang="ar"] .ar-text {
    font-family: "greycliff-arabic-cf", sans-serif;
    /* editable: font-family */
}

html[lang="en"] {
    direction: ltr;
    text-align: left;
}

html[lang="en"] .en-text {
    font-family: 'Abhaya Libre', serif;
    /* editable: font-family */
}



/* #region Typography Base */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.1;
    color: var(--color-black);
}

h4 {
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--color-black);
}

/* Responsive Font Sizes utilizing clamped values for better mobile experience */
h1 {
    font-size: clamp(60px, 8vw, 160px);
}

h2 {
    font-size: clamp(40px, 6vw, 120px);
}

h4 {
    font-size: clamp(20px, 3vw, 24px);
}

p {
    font-size: 16px;
}

/* #endregion */

/* #region Utility Classes */
.container {
    width: var(--container-width);
    max-width: var(--container-max);
    margin-inline: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    height: 50px;
}

.btn-icon {
    width: 20px;
    height: 20px;
}

.btn-primary {
    background-color: var(--color-yellow);
    color: var(--color-black);
}

.btn-primary:hover {
    background-color: #e5b45f;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--color-white);
    color: var(--color-white);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Ocultar elementos de mobile en desktop */
.mobile-cta-icon {
    display: none;
}

/* #endregion */

/* #region Header & Navigation */

/* ESTADO INICIAL: Totalmente opaco en la cima */
.site-header {
    height: 75px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: #1F2026;
    /* Negro sólido sin transparencia */
    transition: all 0.4s ease;
    /* Transición suave para el cambio */
    backdrop-filter: none;
    /* Sin desenfoque al inicio */
}

/* ESTADO AL HACER SCROLL: Glassmorphism activo */
.site-header.scrolled {
    background: rgba(31, 32, 38, 0.4);
    /* 40% de opacidad */
    backdrop-filter: blur(10px);
    /* AQUÍ MODIFICAS EL BLUR */
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo img {
    height: 40px;
}

/* Desktop/Tablet: use logov1, hide on mobile */
.logo .logo-desktop {
    display: block;
}

.logo .logo-mobile {
    display: none;
}

.main-nav ul {
    display: flex;
    gap: 30px;
}

.main-nav a {
    color: var(--color-white);
    font-weight: 300;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Dropdown Styles */
.has-dropdown {
    position: relative;
}

.dropdown-icon {
    font-size: 14px;
    font-weight: bold;
    display: inline-block;
    transition: transform 0.3s ease;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #1F2026;
    min-width: 220px;
    padding: 15px 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

@media (min-width: 992px) {
    .has-dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu a {
    padding: 10px 25px !important;
    font-size: 15px !important;
    font-weight: 300 !important;
    width: 100%;
    color: var(--color-white) !important;
}

.dropdown-menu a:hover {
    background: rgba(254, 201, 109, 0.1);
    color: var(--color-yellow) !important;
}

@media (max-width: 991px) {
    .main-nav ul {
        flex-direction: column;
        gap: 20px;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 5px 0 0 20px;
        display: none !important;
        flex-direction: column;
    }

    .has-dropdown.active .dropdown-menu {
        display: flex !important;
    }
    
    .has-dropdown.active .dropdown-icon {
        transform: rotate(45deg);
    }

    .dropdown-menu a {
        padding: 10px 0 !important; /* Reset padding for mobile */
    }
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--color-yellow);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-toggle {
    display: none;
    /* Desktop default */
}

/* #endregion */

/* #region Floating Widgets */

.lang-toggle-wrapper {
    position: fixed;
    bottom: 30px;
    inset-inline-end: 100px;
    /* Logical position */
    z-index: 1500;
}

.lang-btn {
    background: var(--color-black);
    color: var(--color-white);
    height: 50px;
    padding: 0 30px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.lang-btn .active {
    color: var(--color-yellow);
}

/* WhatsApp */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    inset-inline-end: 30px;
    width: 50px;
    height: 50px;
    background: var(--color-black);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* #endregion */

/* #region Social Floating Button */
.social-floating-wrapper {
    position: fixed;
    bottom: 30px;
    inset-inline-start: 30px;
    /* Logical start */
    z-index: 1500;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.social-main-btn {
    width: 50px;
    height: 50px;
    background: var(--color-black);
    color: var(--color-white);
    border-radius: 50%;
    /* Using circle for fab look typically, or stay consistent with border-radius: 3px */
    border-radius: var(--border-radius);
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
}

.social-icons-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* Hidden by default, handled via GSAP */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    padding-bottom: 30px;
    /* Prevent clicks on invisible icons */
    pointer-events: none;
}

/* Enable clicks only when menu is open */
.social-floating-wrapper.is-open .social-icons-list {
    pointer-events: auto;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: var(--color-white);
    color: var(--color-black);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-weight: 500;
    /* Also prevent clicks on individual icons when closed */
    pointer-events: none;
}

.social-floating-wrapper.is-open .social-icon {
    pointer-events: auto;
}

/* #endregion */

/* #region Media Queries */
@media (max-width: 992px) {
    .main-nav {
        display: none;
    }

    .header-actions .btn {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero-content h1 {
        font-size: 60px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .practice-areas-grid {
        flex: 1 1 100%;
    }

    .section-header {
        position: static;
        margin-bottom: 30px;
    }

    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .faq-grid {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
    }

}

/* #endregion */

/* #region --- HEADER (Mobile & Tablet) --- */
@media (max-width: 1024px) {
    .header-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }

    /* Orden: Menu(1) | Logo(2) | CTA(3) */
    .menu-toggle {
        display: block !important;
        position: absolute;
        left: 20px;
        /* Lo anclamos a la izquierda */
        top: 50%;
        transform: translateY(-50%);
        z-index: 1002
    }

    .logo {
        order: 2;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .logo .logo-desktop {
        display: block;
    }

    .logo .logo-mobile {
        display: none;
    }

    .header-actions {
        position: absolute;
        right: 20px;
        /* Esto lo clava a la derecha */
        top: 50%;
        transform: translateY(-50%);
        display: flex;
    }

    .desktop-cta {
        display: none !important;
    }

    /* Matamos el CTA grande en mobile */

    .mobile-cta-icon {
        background: var(--color-yellow);
        height: 45px;
        width: auto;
        /* Importante: 'auto' para que el padding funcione */
        padding-inline: 10px;
        /* Los 10px de padding izquierda/derecha que pediste */
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 3px;
    }

    /* CTA Mobile: Solo icono */
    .btn-cta-mobile {
        width: 45px;
        height: 45px;
        padding: 0 !important;
        justify-content: center;
    }

    .btn-cta-mobile .cta-text {
        display: none;
        /* Ocultamos el texto */
    }

    .btn-cta-mobile img {
        margin: 0 !important;
    }

    /* Dropdown Estilo Premium */
    .main-nav {
        display: none;
        /* Oculto por defecto */
        position: absolute;
        top: 75px;
        /* Altura del header */
        left: -2.5%;
        /* Compensa el padding del container */
        width: 105%;
        background: #1F2026;
        /* Negro sólido */
        z-index: 1000;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .main-nav.active {
        display: block;
        /* Se muestra con el JS */
        animation: fadeInDown 0.3s ease;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }

    .main-nav ul li {
        border-bottom: 1px solid rgba(151, 151, 151, 0.2);
        /* Separador gris */
    }

    .main-nav ul li a {
        display: block;
        padding: 20px 5%;
        color: var(--color-white);
        font-size: 18px;
    }

    .main-nav ul li a.active {
        color: var(--color-yellow) !important;
    }
}

/* Logo: Show logo.svg only on mobile phones */
@media (max-width: 768px) {
    .logo .logo-desktop {
        display: none !important;
    }

    .logo .logo-mobile {
        display: block !important;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* #endregion */



/* #region FOOTER */


.site-footer {
    background-color: #1F2026;
    color: #F6F6F6;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
    /* Vital para contener la animación de los arcos */
    width: 100%;

    /* Animación de Desenfoque inicial */
    opacity: 0;
    filter: blur(15px);
    transition: opacity 1s ease-out, filter 1s ease-out;
}

.site-footer.is-visible {
    opacity: 1;
    filter: blur(0);
}

/* 2. Animación de Fondo (Arcos Opacos) */
.footer-arches {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    /* Evita que estorben al dar click */
}

.arch {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Aumentado a 8% */
    border-radius: 50%;
    transform: translateX(-50%);
    bottom: -20%;
    animation: pulseArch 5s infinite alternate ease-in-out;
}

.arch-1 {
    width: 150vw;
    height: 150vw;
    left: 50%;
    animation-duration: 8s;
}

.arch-2 {
    width: 100vw;
    height: 100vw;
    left: 50%;
    animation-duration: 12;
    animation-delay: 2s;
}

@keyframes pulseArch {
    0% {
        transform: translateX(-50%) scale(1) translateY(0);
        opacity: 0.5;
    }

    100% {
        transform: translateX(-50%) scale(1.05) translateY(-50px);
        opacity: 1;
    }
}



/* 3. Grid Principal (Forzando 90%) */
.footer-grid {
    display: grid;
    /* Ajustamos el peso para balancear mejor el logo y el contacto */
    grid-template-columns: 1.2fr 1fr 1fr 1fr 1.5fr;
    gap: 30px;
    width: 90% !important;
    max-width: none !important;
    /* Le ponemos un tope elegante para que no se desparrame en pantallas ultra anchas */
    margin: 0 auto !important;
    /* Esto garantiza el centrado exacto */
    position: relative;
    z-index: 1;
    box-sizing: border-box !important;
}

/* 4. Logo y Textos */
.footer-logo img {
    height: 80px;
    /* Logo 2 veces más grande */
}

/* Títulos Amarillos en Poppins */
.footer-col h4 {
    font-family: 'Poppins', sans-serif !important;
    font-size: 20px !important;
    /* De 18 a 20 */
    font-weight: 500;
    color: #FEC96D;
    margin-bottom: 25px;
}

.footer-links li {
    margin-bottom: 12px;
    font-size: 16px;
    /* De 14 a 16 */
    color: rgba(246, 246, 246, 0.7);
}

.footer-links a {
    color: inherit;
    transition: color 0.3s ease;
    text-decoration: none;
    /* Quitamos subrayados por si acaso */
}

.footer-links a:hover {
    color: #FFFFFF;
    /* Hover Blanco */
}

.contact-item {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    font-size: 16px;
    /* De 14 a 16 */
    color: rgba(246, 246, 246, 0.7);
    line-height: 1.6;
}

.contact-item i {
    color: #FEC96D;
    margin-top: 4px;
}

.email-stack a {
    color: rgba(246, 246, 246, 0.7);
    transition: color 0.3s;
    text-decoration: none;
}

.email-stack a:hover {
    color: #FFFFFF;
    /* Hover Blanco en correos */
}

/* 5. Copyright (Centrado, Poppins 18px Amarillo y 16px) */
.footer-bottom {
    position: relative;
    z-index: 1;
    margin-top: 60px;
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Centrado total */
    justify-content: center;
    text-align: center;
}

.copyright-text {
    font-family: 'Poppins', sans-serif !important;
    font-size: 18px !important;
    color: #FEC96D !important;
    margin: 0 0 10px 0;
}

.credits p {
    font-family: 'Poppins', sans-serif !important;
    font-size: 16px !important;
    color: rgba(246, 246, 246, 0.6);
    margin: 0;
}

.credits a {
    color: #F6F6F6;
    text-decoration: underline;
    transition: color 0.3s;
}

.credits a:hover {
    color: #FEC96D;
}

/* 6. Responsive Móvil */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr;
        /* Colapsa a 1 columna */
        gap: 40px;
    }

    .hide-on-mobile {
        display: none;
        /* Oculta el título vacío en móvil para no generar espacios muertos */
    }

    .footer-bottom {
        padding: 30px 20px;
    }

    .copyright-text {
        font-size: 16px !important;
        /* Ajuste para que no rompa la pantalla en celular */
    }
}


/* =========================================
   TRANSLATION
   ========================================= */
html[lang="en"] .ar-text {
    display: none !important;
}

html[lang="ar"] .en-text {
    display: none !important;
}

h1.en-text,
h2.en-text,
h3.en-text {
    font-family: 'Abhaya Libre', serif !important;
}

p.en-text,
span.en-text,
a.en-text,
div.en-text {
    font-family: 'Poppins', sans-serif !important;
}

.ar-text {
    font-family: "greycliff-arabic-cf", sans-serif !important;
}

html[dir="rtl"] {
    text-align: right;
}

/* --- ARABIC FONT: Noto Sans Arabic for Tablet & Mobile --- */
@media (max-width: 1024px) {
    .ar-text {
        font-family: "Noto Sans Arabic", sans-serif !important;
        font-optical-sizing: auto;
        font-style: normal;
        font-variation-settings: "wdth" 100;
    }

    html[lang="ar"] .ar-text {
        font-family: "Noto Sans Arabic", sans-serif !important;
        font-optical-sizing: auto;
        font-style: normal;
        font-variation-settings: "wdth" 100;
    }
}


/* #endregion */