/* Variables */
:root {
    --primary: #002b5c;          /* Deep Navy Blue */
    --primary-light: #0a4d8c;
    --primary-dark: #001a38;
    --secondary: #d4af37;        /* Gold */
    --secondary-light: #f5d056;
    --secondary-dark: #a58829;
    --dark: #1a1a1a;             /* Almost Black */
    --white: #ffffff;
    --text-light: #ffffff;
    --text-dark: #333333;
    --header-height: 80px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
    --border-radius: 4px;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
}
/* iPad and Tablet Specific Adjustments */
@media (min-width: 768px) and (max-width: 1024px) {
    /* Ensure 3 columns on iPad */
    .attorneys-grid .row {
        display: flex;
        flex-wrap: nowrap; /* Prevent wrapping */
        overflow-x: auto; /* Allow horizontal scroll if needed */
        gap: 15px;
        margin: 0 -10px;
    }

    .attorneys-grid .col-lg-4,
    .attorneys-grid .col-md-6 {
        flex: 0 0 calc(33.333% - 10px);
        max-width: calc(33.333% - 10px);
        padding: 0;
    }

    /* Adjust card sizes for iPad */
    .attorney-card__inner {
        padding: 20px 15px;
    }

    .attorney-card__image {
        height: 250px; /* Reduced height for iPad */
    }

    .attorney-card__name {
        font-size: 18px;
    }

    .attorney-card__position {
        font-size: 14px;
    }

    .attorney-card__license {
        font-size: 12px;
        padding: 4px 8px;
    }

    .attorney-email-link {
        font-size: 11px;
        padding: 8px 10px;
    }

    .attorney-email-link span {
        font-size: 9px;
    }

    .attorney-card__details-btn {
        padding: 10px;
        font-size: 13px;
    }
}

/* Alternative approach using flexbox for better control */
@media (min-width: 768px) and (max-width: 1024px) {
    .attorneys-grid .container {
        max-width: 100%;
        padding: 0 20px;
    }

    .attorneys-grid .row {
        --bs-gutter-x: 1rem; /* Reduce Bootstrap gutter */
    }

    /* Force 3 columns with custom flex */
    .attorneys-grid .col-lg-4.col-md-6 {
        flex: 0 0 33.333%;
        max-width: 33.333%;
        padding-right: 8px;
        padding-left: 8px;
    }
}

/* Specific iPad Pro adjustments */
@media (min-width: 1024px) and (max-width: 1199px) {
    .attorneys-grid .col-lg-4 {
        flex: 0 0 33.333%;
        max-width: 40.333%;
    }

    .attorney-card__inner {
        padding: 25px 20px;
    }

    .attorney-card__image {
        height: 280px;
    }
}

/* If you want to ensure it never breaks into multiple rows on tablets */
@media (min-width: 768px) and (max-width: 1199px) {
    .attorneys-section {
        overflow-x: hidden;
    }

    .attorneys-grid {
        max-width: 100%;
    }

    .attorneys-grid .row {
        flex-wrap: nowrap !important;
        margin: 0 -8px;
    }

    .attorneys-grid [class*="col-"] {
        flex-shrink: 1; /* Allow shrinking to fit */
        padding: 0 8px;
    }
}
body {
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
    background: var(--white);
    color: var(--text-dark);
    overflow-x: hidden;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--primary-dark);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: all var(--transition);
}

.header.scrolled {
    height: 70px;
    box-shadow: var(--shadow-lg);
    background: var(--primary);
}

.header__container {
    max-width: 1400px;
    height: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.logo {
    height: 65px;
    transition: all var(--transition);
    display: flex;
    align-items: center;
}

.header.scrolled .logo {
    height: 55px;
}

.logo img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
}

.nav__list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 10px;
    justify-content: center;
}

.nav__item {
    position: relative;
}

.nav__link {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all var(--transition);
    position: relative;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: all var(--transition);
    transform: translateX(-50%);
}

.nav__link:hover::after,
.nav__link.active::after {
    width: 70%;
}

.nav__link:hover,
.nav__link.active {
    color: var(--secondary);
}

.nav__link i {
    margin-left: 8px;
    font-size: 14px;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown__content {
    position: absolute;
    top: 100%;
    right: 0;
    width: 250px;
    background: var(--primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition);
    z-index: 1001;
    border-top: 2px solid var(--secondary);
}

.dropdown:hover .dropdown__content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown__link {
    display: block;
    padding: 10px 20px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 15px;
    transition: all var(--transition);
    position: relative;
}

.dropdown__link::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 10px;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: all var(--transition);
    transform: translateY(-50%);
    opacity: 0;
}

.dropdown__link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--secondary);
    padding-right: 25px;
}

.dropdown__link:hover::before {
    width: 8px;
    opacity: 1;
}

.dropdown__link i {
    margin-left: 8px;
    color: var(--secondary);
    font-size: 14px;
}

/* Contact Button */
.contact-btn {
    background: var(--secondary);
    color: var(--primary-dark) !important;
    padding: 8px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.3);
    margin-right: 15px;
}

.contact-btn:hover {
    background: var(--secondary-light);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(212, 175, 55, 0.4);
}

.contact-btn::after {
    display: none;
}

/* Mobile Menu */
.menu-button {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 22px;
    position: relative;
    z-index: 1002;
}

.menu-button__line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--text-light);
    transition: all var(--transition);
    right: 0;
}

.menu-button__line:nth-child(1) { top: 0; }
.menu-button__line:nth-child(2) { top: 10px; width: 80%; }
.menu-button__line:nth-child(3) { top: 20px; }

.menu-button.active .menu-button__line:nth-child(1) {
    transform: rotate(45deg);
    top: 10px;
}

.menu-button.active .menu-button__line:nth-child(2) {
    opacity: 0;
    transform: translateX(10px);
}

.menu-button.active .menu-button__line:nth-child(3) {
    transform: rotate(-45deg);
    top: 10px;
}

/* Mobile Navigation */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

body.menu-open {
    overflow: hidden;
}

/* Main Content - No padding needed */
main {
    margin-top: var(--header-height);
    padding-top: 0;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .nav {
        justify-content: flex-end;
    }

    .menu-button {
        display: block;
    }

    .nav__list {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        background: var(--primary);
        z-index: 1001;
        box-shadow: var(--shadow-lg);
        transition: all var(--transition);
        overflow-y: auto;
        padding: 100px 20px 30px;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
    }

    .nav__list.active {
        right: 0;
    }

    .nav__item {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav__link {
        padding: 15px 0;
        width: 100%;
    }

    .nav__link::after {
        display: none;
    }

    .dropdown__content {
        position: static;
        width: 100%;
        box-shadow: none;
        padding: 0 0 10px 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        border-top: none;
        background: transparent;
    }

    .dropdown__link {
        padding: 10px 20px;
        border-right: 2px solid var(--secondary);
        margin: 5px 0;
    }

    .dropdown__link:hover {
        background: rgba(255, 255, 255, 0.05);
    }

    .dropdown.active .dropdown__content {
        display: block;
    }

    .contact-btn {
        margin: 15px 0 0;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    .logo {
        height: 50px;
    }

    .header.scrolled .logo {
        height: 45px;
    }
}

@media (max-width: 576px) {
    .logo {
        height: 45px;
    }

    .header.scrolled .logo {
        height: 40px;
    }

    .header__container {
        padding: 0 15px;
    }
}
