/* =========================================
   PRACTICE AREAS PAGE - pa.css
   ========================================= */

/* #region HERO SECTION */
main {
    padding-top: var(--header-height);
}

.pa-hero-section {
    position: relative;
    min-height: 45vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('../assets/img/pabackground.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.pa-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(31, 32, 38, 0.75);
    z-index: 1;
}

.pa-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.pa-hero-content h1 {
    color: #F6F6F6;
    font-size: clamp(50px, 8vw, 120px);
    margin-bottom: 20px;
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.1;
}

.pa-hero-content p {
    color: rgba(246, 246, 246, 0.8);
    font-size: 18px;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.7;
    font-family: var(--font-body);
    font-weight: 300;
}

/* #endregion */


/* #region GRID SECTION */
.pa-grid-section {
    padding: 100px 0 120px;
    background-color: #F6F6F6;
}

.pa-grid-container {
    width: 90%;
    max-width: none;
    margin: 0 auto;
}

/* Section Header */
.pa-section-header {
    margin-bottom: 60px;
}

.pa-section-header h2 {
    font-size: clamp(40px, 5vw, 70px);
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.1;
    color: var(--color-black);
    margin-bottom: 20px;
}

.pa-header-line {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, #FEC96D, rgba(254, 201, 109, 0.2));
}

html[lang="ar"] .pa-header-line {
    background: linear-gradient(270deg, #FEC96D, rgba(254, 201, 109, 0.2));
}

/* #endregion */


/* #region CARDS GRID */
.pa-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    width: 100%;
}

/* #endregion */


/* #region CARD STYLES */
.pa-card {
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #F6F6F6;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        box-shadow 0.4s ease;
    position: relative;
}

/* Light sweep overlay */
.pa-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.15),
            transparent);
    transition: left 0.6s ease;
    z-index: 5;
    pointer-events: none;
}

/* Hover: grow + light sweep */
.pa-card:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 40px rgba(31, 32, 38, 0.15);
}

.pa-card:hover::after {
    left: 100%;
}

/* Card Image */
.pa-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
}

.pa-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.pa-card:hover .pa-card-image img {
    transform: scale(1.08);
}

/* Card Body */
.pa-card-body {
    padding: 24px 20px;
    background-color: #1F2026;
    color: #F6F6F6;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.pa-card-body h3 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 12px;
    line-height: 1.3;
    color: #FFFFFF;
}

.pa-card-body h3.en-text {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 500 !important;
}

.pa-card-body h3.ar-text {
    font-family: "greycliff-arabic-cf", sans-serif !important;
    font-weight: 500 !important;
}

.pa-card-body p {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(246, 246, 246, 0.7);
    margin-bottom: 20px;
    flex-grow: 1;
}

.pa-card-body p.en-text {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 300 !important;
}

.pa-card-body p.ar-text {
    font-family: "greycliff-arabic-cf", sans-serif !important;
}

/* Card Link (Learn more) */
.pa-card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #FEC96D;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: auto;
    border: 1px solid rgba(254, 201, 109, 0.3);
    padding: 8px 16px;
    border-radius: var(--border-radius);
    width: fit-content;
}

.pa-card-link:hover {
    background-color: #FEC96D;
    color: #1F2026;
    border-color: #FEC96D;
}

.pa-card-link svg {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.pa-card-link:hover svg {
    transform: translateX(4px);
}

/* RTL arrow flip */
html[lang="ar"] .pa-card-link svg {
    transform: scaleX(-1);
}

html[lang="ar"] .pa-card-link:hover svg {
    transform: scaleX(-1) translateX(4px);
}

/* #endregion */


/* #region STAGGER ANIMATION */
.pa-card {
    opacity: 0;
    transform: translateY(30px);
    animation: paCardFadeIn 0.6s forwards;
}

@keyframes paCardFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger delays for each card */
.pa-card:nth-child(1) {
    animation-delay: 0.05s;
}

.pa-card:nth-child(2) {
    animation-delay: 0.10s;
}

.pa-card:nth-child(3) {
    animation-delay: 0.15s;
}

.pa-card:nth-child(4) {
    animation-delay: 0.20s;
}

.pa-card:nth-child(5) {
    animation-delay: 0.25s;
}

.pa-card:nth-child(6) {
    animation-delay: 0.30s;
}

.pa-card:nth-child(7) {
    animation-delay: 0.35s;
}

.pa-card:nth-child(8) {
    animation-delay: 0.40s;
}

.pa-card:nth-child(9) {
    animation-delay: 0.45s;
}

.pa-card:nth-child(10) {
    animation-delay: 0.50s;
}

.pa-card:nth-child(11) {
    animation-delay: 0.55s;
}

.pa-card:nth-child(12) {
    animation-delay: 0.60s;
}

.pa-card:nth-child(13) {
    animation-delay: 0.65s;
}

.pa-card:nth-child(14) {
    animation-delay: 0.70s;
}

/* #endregion */


/* #region RESPONSIVE */

/* Tablet: 2 columnas */
@media (max-width: 1200px) {
    .pa-cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .pa-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .pa-grid-section {
        padding: 80px 0 100px;
    }

    .pa-hero-section {
        min-height: 35vh;
    }

    .pa-hero-content p {
        font-size: 16px;
    }
}

/* Mobile: 1 columna */
@media (max-width: 600px) {
    .pa-cards-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .pa-grid-section {
        padding: 60px 0 80px;
    }

    .pa-section-header {
        margin-bottom: 40px;
    }

    .pa-hero-section {
        min-height: 30vh;
    }

    .pa-card-image {
        height: 180px;
    }
}

/* #endregion */


/* #region RTL SUPPORT */
html[lang="ar"] .pa-hero-content {
    text-align: center;
}

html[lang="ar"] .pa-card-body {
    text-align: right;
}

html[lang="ar"] .pa-card-link {
    flex-direction: row-reverse;
}

/* #endregion */