/* ===================================
   Khatib Family Professional Website
   Navy & Gold Elegant Theme
   RTL Arabic Support
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&display=swap');

:root {
    --navy-dark: #1a2a4a;
    --navy: #2c3e5c;
    --navy-light: #3d5278;
    --gold: #c9a227;
    --gold-light: #e8c547;
    --gold-dark: #9a7b1c;
    --white: #ffffff;
    --off-white: #f8f9fa;
    --gray-light: #e9ecef;
    --gray: #6c757d;
    --text-dark: #212529;
    --shadow: 0 4px 20px rgba(26, 42, 74, 0.15);
    --shadow-hover: 0 8px 30px rgba(26, 42, 74, 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
    text-align: right;
    line-height: 1.8;
    color: var(--text-dark);
    background: var(--off-white);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.4;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.3rem; }

p {
    font-size: 1.1rem;
    color: var(--gray);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== HEADER ===== */
header {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-text {
    color: var(--white);
}

.logo-text h1 {
    font-size: 1.5rem;
    margin-bottom: -5px;
}

.logo-text span {
    font-size: 0.85rem;
    color: var(--gold);
    font-weight: 400;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

nav a {
    color: var(--white);
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 0;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s ease;
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

nav a:hover {
    color: var(--gold);
}

.mobile-menu {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, var(--navy-light) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a227' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100%;
}

.hero h1 {
    color: var(--white);
    font-size: clamp(1.1rem, 4.5vw, 3.5rem);
    margin-bottom: 1rem;
    white-space: nowrap;
}

.hero h1 span {
    color: var(--gold);
}

.hero .subtitle {
    color: var(--gold-light);
    font-size: clamp(0.85rem, 2.5vw, 1.4rem);
    margin-bottom: 0.5rem;
    font-weight: 500;
    white-space: nowrap;
}

.hero .location {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.hero .location i {
    margin-left: 0.5rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--gold);
    color: var(--navy-dark);
}

.btn-primary:hover {
    background: var(--gold-light);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(201, 162, 39, 0.3);
}

.btn-secondary {
    background: var(--navy);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--navy-light);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(26, 42, 74, 0.3);
}

.btn-outline {
    background: transparent;
    border-color: var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--navy-dark);
}

.btn-whatsapp {
    background: #25D366;
    color: white;
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-3px);
}

.btn-phone {
    background: var(--navy);
    color: white;
    border-color: var(--gold);
}

.btn-phone:hover {
    background: var(--gold);
    color: var(--navy-dark);
}

/* ===== SECTION STYLING ===== */
section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    color: var(--navy-dark);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 3px;
    background: var(--gold);
}

.section-header p {
    max-width: 600px;
    margin: 1.5rem auto 0;
}

/* ===== FAMILY MEMBERS GRID ===== */
.members-section {
    background: var(--white);
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.member-card {
    background: var(--off-white);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: var(--shadow);
}

.member-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.member-image {
    height: 280px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-image .placeholder-icon {
    font-size: 5rem;
    color: var(--gold);
    opacity: 0.5;
}

.member-category {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--gold);
    color: var(--navy-dark);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.member-info {
    padding: 1.5rem;
}

.member-info h3 {
    color: var(--navy-dark);
    margin-bottom: 0.5rem;
}

.member-info .profession {
    color: var(--gold-dark);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.member-info p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.member-actions {
    display: flex;
    gap: 0.75rem;
}

.member-actions .btn {
    flex: 1;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

/* ===== INDIVIDUAL PAGE STYLES ===== */
.page-hero {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
    padding: 120px 0 60px;
    text-align: center;
    color: var(--white);
}

.page-hero .category {
    background: var(--gold);
    color: var(--navy-dark);
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    margin-bottom: 1rem;
}

.page-hero h1 {
    margin-bottom: 0.5rem;
}

.page-hero .subtitle {
    color: var(--gold-light);
    font-size: 1.3rem;
}

.profile-section {
    background: var(--white);
    padding: 4rem 0;
}

.profile-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 3rem;
    align-items: start;
}

.profile-image {
    background: var(--off-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.profile-image img {
    width: 100%;
    height: auto;
    display: block;
}

.profile-image .placeholder {
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
}

.profile-image .placeholder-icon {
    font-size: 8rem;
    color: var(--gold);
    opacity: 0.5;
}

.profile-content h2 {
    color: var(--navy-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gold);
}

.profile-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 2;
}

.info-list {
    list-style: none;
    margin: 2rem 0;
}

.info-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--off-white);
    border-radius: 10px;
    margin-bottom: 0.75rem;
}

.info-list li i {
    color: var(--gold);
    font-size: 1rem;
    width: 24px;
    flex-shrink: 0;
    transform: translateY(-3px);
}

.info-list li span {
    line-height: 1.8;
}

.info-list li strong {
    color: var(--navy-dark);
    margin-left: 0.5rem;
}

/* Services Grid */
.services-section {
    background: var(--off-white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.service-card i {
    font-size: 3rem;
    color: var(--gold);
    margin-bottom: 1rem;
}

.service-card h4 {
    color: var(--navy-dark);
    margin-bottom: 0.75rem;
}

/* Contact Section */
.contact-section {
    background: var(--white);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.contact-card {
    background: var(--off-white);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.contact-card:hover {
    background: var(--navy);
    color: var(--white);
}

.contact-card:hover h4,
.contact-card:hover p {
    color: var(--white);
}

.contact-card:hover i {
    color: var(--gold);
}

.contact-card i {
    font-size: 2.5rem;
    color: var(--navy);
    margin-bottom: 1rem;
}

.contact-card h4 {
    color: var(--navy-dark);
    margin-bottom: 0.5rem;
}

/* Memorial Section */
.memorial-section {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
    color: var(--white);
    position: relative;
}

.memorial-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23c9a227' fill-opacity='0.03'%3E%3Cpath d='M20 20l20-20H0z'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.memorial-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.memorial-content h2 {
    color: var(--gold);
    margin-bottom: 2rem;
}

.memorial-content blockquote {
    font-size: 1.4rem;
    font-style: italic;
    line-height: 2;
    color: rgba(255, 255, 255, 0.9);
    border-right: 4px solid var(--gold);
    padding-right: 2rem;
    margin: 2rem 0;
}

/* ===== FOOTER ===== */
footer {
    background: var(--navy-dark);
    color: var(--white);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--gold);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.footer-section a:hover {
    color: var(--gold);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* ===== RESPONSIVE ===== */

/* Large Desktop (1200px+) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }

    .members-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop/Laptop (992px - 1199px) */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }

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

}

/* Tablet Landscape (768px - 991px) */
@media (max-width: 991px) {
    .container {
        max-width: 720px;
    }

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

    .profile-image {
        max-width: 400px;
        margin: 0 auto;
    }

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

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

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

    h1 { font-size: 2.4rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.4rem; }

    section {
        padding: 4rem 0;
    }

    .section-header {
        margin-bottom: 3rem;
    }
}

/* Tablet Portrait (576px - 767px) */
@media (max-width: 767px) {
    .container {
        max-width: 540px;
        padding: 0 1.5rem;
    }

    /* Header Mobile */
    header {
        padding: 0.75rem 0;
    }

    header .container {
        flex-wrap: wrap;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .logo-text h1 {
        font-size: 1.2rem;
    }

    .logo-text span {
        font-size: 0.75rem;
    }

    nav {
        display: none;
        width: 100%;
        margin-top: 1rem;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 10px;
        padding: 0.5rem;
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
    }

    nav li {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    nav li:first-child {
        border-top: none;
    }

    nav a {
        display: block;
        padding: 1rem;
        text-align: center;
    }

    nav a::after {
        display: none;
    }

    .mobile-menu {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.1);
    }

    /* Hero Mobile */
    .hero {
        min-height: auto;
        padding: 120px 0 60px;
    }

    .hero .location {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .hero-cta .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    /* Typography Mobile */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
    h3 { font-size: 1.3rem; }
    h4 { font-size: 1.1rem; }

    p {
        font-size: 1rem;
    }

    /* Sections Mobile */
    section {
        padding: 3rem 0;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .section-header h2::after {
        width: 60px;
    }

    .section-header p {
        font-size: 0.95rem;
    }

    /* Members Grid Mobile */
    .members-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .member-card {
        border-radius: 15px;
    }

    .member-image {
        height: 220px;
    }

    .member-info {
        padding: 1.25rem;
    }

    .member-info h3 {
        font-size: 1.3rem;
    }

    .member-info p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .member-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .member-actions .btn {
        padding: 0.875rem 1rem;
    }

    /* Profile Page Mobile */
    .page-hero {
        padding: 100px 0 40px;
    }

    .page-hero .category {
        font-size: 0.8rem;
        padding: 0.4rem 1rem;
    }

    .page-hero h1 {
        font-size: 1.8rem;
    }

    .page-hero .subtitle {
        font-size: 1.1rem;
    }

    .profile-section {
        padding: 2.5rem 0;
    }

    .profile-grid {
        gap: 2rem;
    }

    .profile-image {
        max-width: 100%;
    }

    .profile-image .placeholder {
        height: 280px;
    }

    .profile-image .placeholder-icon {
        font-size: 5rem;
    }

    .profile-content h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }

    .profile-content p {
        font-size: 1rem;
        line-height: 1.8;
        margin-bottom: 1rem;
    }

    .info-list li {
        padding: 0.875rem;
        flex-wrap: wrap;
    }

    .info-list li i {
        font-size: 1.1rem;
    }

    .info-list li span {
        font-size: 0.95rem;
    }

    /* Services Mobile */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .service-card {
        padding: 1.5rem;
        border-radius: 12px;
    }

    .service-card i {
        font-size: 2.5rem;
    }

    .service-card h4 {
        font-size: 1.1rem;
    }

    .service-card p {
        font-size: 0.9rem;
    }

    /* Contact Grid Mobile */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .contact-card {
        padding: 1.5rem;
        border-radius: 12px;
    }

    .contact-card i {
        font-size: 2rem;
    }

    /* Memorial Section Mobile */
    .memorial-content blockquote {
        font-size: 1.1rem;
        padding-right: 1.5rem;
    }

    /* Footer Mobile */
    footer {
        padding: 2.5rem 0 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-section h4 {
        font-size: 1.1rem;
    }

    .footer-section p,
    .footer-section a {
        font-size: 0.9rem;
    }

    .footer-bottom p {
        font-size: 0.8rem;
    }

    /* Buttons Mobile */
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* Small Mobile (up to 575px) */
@media (max-width: 575px) {
    .container {
        padding: 0 1rem;
    }

    /* Header Small Mobile */
    .logo {
        gap: 0.75rem;
    }

    .logo-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .logo-text h1 {
        font-size: 1rem;
    }

    .logo-text span {
        font-size: 0.7rem;
    }

    /* Hero Small Mobile */
    .hero {
        padding: 100px 0 50px;
    }

    .hero .location {
        font-size: 0.9rem;
    }

    /* Typography Small Mobile */
    h1 { font-size: 1.7rem; }
    h2 { font-size: 1.4rem; }
    h3 { font-size: 1.2rem; }
    h4 { font-size: 1rem; }

    p {
        font-size: 0.95rem;
    }

    /* Cards Small Mobile */
    .member-image {
        height: 200px;
    }

    .member-info {
        padding: 1rem;
    }

    .member-info h3 {
        font-size: 1.2rem;
    }

    .member-category {
        font-size: 0.75rem;
        padding: 0.3rem 0.75rem;
    }

    /* Profile Small Mobile */
    .page-hero {
        padding: 90px 0 30px;
    }

    .page-hero h1 {
        font-size: 1.5rem;
    }

    .page-hero .subtitle {
        font-size: 1rem;
    }

    .profile-image .placeholder {
        height: 240px;
    }

    .profile-image .placeholder-icon {
        font-size: 4rem;
    }

    .info-list li {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    /* Services Small Mobile */
    .service-card {
        padding: 1.25rem;
    }

    .service-card i {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }

    .service-card h4 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .service-card p {
        font-size: 0.85rem;
    }

    /* Contact Small Mobile */
    .contact-card {
        padding: 1.25rem;
    }

    .contact-card i {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }

    .contact-card h4 {
        font-size: 1rem;
    }

    .contact-card p {
        font-size: 0.85rem;
    }

    /* Memorial Small Mobile */
    .memorial-content blockquote {
        font-size: 1rem;
        padding-right: 1rem;
        margin: 1.5rem 0;
    }

    /* Buttons Small Mobile */
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
        gap: 0.4rem;
    }

    .btn i {
        font-size: 0.9rem;
    }
}

/* Extra Small Mobile (up to 380px) */
@media (max-width: 380px) {
    .container {
        padding: 0 0.75rem;
    }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.3rem; }

    .logo-text h1 {
        font-size: 0.9rem;
    }

    .page-hero h1 {
        font-size: 1.3rem;
    }

    .member-info h3 {
        font-size: 1.1rem;
    }

    .service-card,
    .contact-card {
        padding: 1rem;
    }
}

/* Landscape Mode Fixes */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 100px 0 40px;
    }

    .hero .location {
        margin-bottom: 1rem;
    }

    .hero-cta {
        flex-direction: row;
    }
}

/* Print Styles */
@media print {
    header,
    .mobile-menu,
    .hero-cta,
    .member-actions,
    .btn {
        display: none !important;
    }

    .hero {
        min-height: auto;
        padding: 2rem 0;
        background: #f5f5f5 !important;
        color: #000 !important;
    }

    .hero h1,
    .hero .subtitle,
    .hero .location {
        color: #000 !important;
    }

    section {
        padding: 1.5rem 0;
    }

    .member-card,
    .service-card,
    .contact-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --gold: #d4a800;
        --navy-dark: #000033;
    }

    .btn {
        border-width: 3px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ===== LOADING ANIMATION ===== */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(201, 162, 39, 0.2);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader-text {
    color: var(--gold);
    font-size: 1.2rem;
    font-weight: 600;
}

/* ===== SOCIAL SHARING ===== */
.social-share {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.social-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.social-share-btn.facebook {
    background: #1877f2;
}

.social-share-btn.twitter {
    background: #1da1f2;
}

.social-share-btn.whatsapp {
    background: #25D366;
}

.social-share-btn.telegram {
    background: #0088cc;
}

.social-share-btn.linkedin {
    background: #0077b5;
}

.social-share-btn.copy-link {
    background: var(--navy);
    border: 2px solid var(--gold);
}

/* ===== GALLERY HOVER ===== */
.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* ===== WHATSAPP FLOAT BUTTON ===== */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

@media (max-width: 767px) {
    .whatsapp-float {
        bottom: 1.5rem;
        left: 1.5rem;
        width: 55px;
        height: 55px;
        font-size: 1.8rem;
    }
}

/* ===== SCROLL PROGRESS BAR ===== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
    z-index: 10001;
    transition: width 0.1s ease;
}

/* ===== SHRINKING HEADER ===== */
header.scrolled {
    padding: 0.5rem 0;
    background: rgba(26, 42, 74, 0.98);
    backdrop-filter: blur(10px);
}

header.scrolled .logo-text h1 {
    font-size: 1.2rem;
}

header.scrolled .logo-text span {
    font-size: 0.75rem;
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 50px;
    height: 50px;
    background: var(--navy);
    border: 2px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--gold);
    color: var(--navy-dark);
    transform: translateY(-5px);
}

/* ===== SCROLL ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }
.fade-in-delay-5 { transition-delay: 0.5s; }
.fade-in-delay-6 { transition-delay: 0.6s; }

/* ===== WAVE SECTION DIVIDERS ===== */
.wave-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}

.wave-divider-top {
    top: 0;
    bottom: auto;
    transform: rotate(180deg);
}

/* ===== ENHANCED CARD EFFECTS ===== */
.member-card {
    position: relative;
    overflow: hidden;
}

.member-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.1), transparent);
    transition: left 0.5s ease;
    z-index: 1;
}

.member-card:hover::before {
    left: 100%;
}

.member-card:hover {
    box-shadow: 0 15px 40px rgba(26, 42, 74, 0.25), 0 0 20px rgba(201, 162, 39, 0.1);
}

.member-image img {
    transition: transform 0.5s ease;
}

.member-card:hover .member-image img {
    transform: scale(1.1);
}

/* ===== ARABIC ORNAMENTAL DIVIDER ===== */
.ornament-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
}

.ornament-divider::before,
.ornament-divider::after {
    content: '';
    flex: 1;
    max-width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.ornament-divider i {
    color: var(--gold);
    font-size: 1.2rem;
}

/* ===== STATS SECTION ===== */
.stats-section {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
    padding: 4rem 0;
    position: relative;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    font-weight: 500;
}

.stat-icon {
    font-size: 2rem;
    color: var(--gold);
    opacity: 0.5;
    margin-bottom: 1rem;
}

/* ===== MOTTO SECTION ===== */
.motto-section {
    background: var(--off-white);
    padding: 4rem 0;
    text-align: center;
    position: relative;
}

.motto-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    position: relative;
}

.motto-content::before {
    content: '"';
    position: absolute;
    top: -20px;
    right: 30px;
    font-size: 8rem;
    color: var(--gold);
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}

.motto-text {
    font-size: 1.8rem;
    color: var(--navy-dark);
    line-height: 2;
    font-weight: 500;
}

.motto-author {
    margin-top: 1.5rem;
    color: var(--gold-dark);
    font-size: 1.1rem;
    font-weight: 600;
}

/* ===== HERO ENHANCEMENTS ===== */
.hero-enhanced {
    position: relative;
    overflow: hidden;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23c9a227' fill-rule='evenodd'%3E%3Cpath d='M40 0L20 20l20 20 20-20L40 0zm0 40L20 60l20 20 20-20-20-20z' fill-opacity='1'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-title-animate {
    animation: fadeInUp 1s ease forwards;
    opacity: 0;
}

.hero-subtitle-animate {
    animation: fadeInUp 1s ease 0.3s forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== FAMILY EMBLEM ===== */
.family-emblem {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(201, 162, 39, 0.3);
    animation: fadeInUp 1s ease forwards;
    opacity: 0;
}

.family-emblem i {
    font-size: 3rem;
    color: var(--navy-dark);
}

/* ===== GLASSMORPHISM CARDS ===== */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
}

/* ===== SECTION WITH PARALLAX ===== */
.parallax-section {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

@media (max-width: 767px) {
    .back-to-top {
        bottom: 1.5rem;
        left: 1.5rem;
        width: 45px;
        height: 45px;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .motto-text {
        font-size: 1.4rem;
    }

    .family-emblem {
        width: 100px;
        height: 100px;
    }

    .family-emblem i {
        font-size: 2.5rem;
    }

    .wave-divider svg {
        height: 40px;
    }
}

/* ===================================
   Breadcrumb Navigation
   =================================== */
.breadcrumb {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1rem 0;
    margin-top: 80px;
    border-bottom: 1px solid rgba(26, 42, 74, 0.1);
}

.breadcrumb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.breadcrumb nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--navy);
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.breadcrumb a:hover {
    color: var(--gold-dark);
}

.breadcrumb-separator {
    color: var(--gray);
    margin: 0 0.25rem;
}

.breadcrumb-current {
    color: var(--gold-dark);
    font-weight: 600;
}

/* Breadcrumb JSON-LD structured data support */
.breadcrumb ol {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb li {
    display: inline-flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: '←';
    margin: 0 0.5rem;
    color: var(--gray);
}

@media (max-width: 768px) {
    .breadcrumb {
        padding: 0.75rem 0;
        margin-top: 70px;
    }

    .breadcrumb-container {
        padding: 0 1rem;
    }

    .breadcrumb nav {
        font-size: 0.85rem;
    }
}

/* ===================================
   Accessibility Improvements
   =================================== */

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

/* Focus visible for modern browsers */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

/* Remove outline for mouse users */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
    outline: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --gold: #b8860b;
        --navy-dark: #000033;
    }

    .member-card,
    .service-card,
    .contact-card {
        border: 2px solid var(--navy-dark);
    }
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .fade-in-up,
    .hero-content h1,
    .hero-content p,
    .hero-content .btn {
        opacity: 1 !important;
        transform: none !important;
    }

    .page-loader {
        display: none !important;
    }
}

/* Screen reader only class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip link styling */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold);
    color: var(--navy-dark);
    padding: 0.5rem 1rem;
    border-radius: 0 0 10px 10px;
    z-index: 100001;
    transition: top 0.3s;
    text-decoration: none;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

/* Better link underlines for accessibility */
main a:not(.btn):not(.member-link):not([class*="btn"]) {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Ensure sufficient color contrast for text */
.gray-text,
[style*="color: var(--gray)"] {
    color: #5a5a5a !important;
}

/* ===================================
   Icon & Arabic Text Alignment Fix
   =================================== */

/* Global icon alignment for Arabic text */
.fas, .fab, .far, .fal, .fad,
[class*="fa-"] {
    vertical-align: -0.1em;
    line-height: 1;
}

/* Fix icon height to match Arabic text */
i.fas, i.fab, i.far, i.fal, i.fad,
i[class*="fa-"] {
    line-height: 1;
}

/* Inline icons with text (not in flex containers) */
p > i, span > i, a > i:not(:only-child),
h1 > i, h2 > i, h3 > i, h4 > i, h5 > i, h6 > i {
    transform: translateY(-2px);
}


/* Navigation link icons */
nav a i,
.nav a i {
    vertical-align: middle;
    margin-left: 0.25rem;
}

/* Button icons */
.btn i,
button i {
    vertical-align: middle;
    transform: translateY(-3px);
    display: inline-block;
}

/* Card icons */
.member-card i,
.service-card i,
.contact-card i {
    display: block;
    line-height: 1;
}

/* Section header icons */
h1 i, h2 i, h3 i, h4 i, h5 i, h6 i {
    vertical-align: middle;
    margin-left: 0.5rem;
}

/* Inline text with icons */
p i, span i, a i, li i {
    vertical-align: middle;
}

/* Footer icons */
footer i {
    vertical-align: middle;
}

/* Breadcrumb icons */
.breadcrumb i {
    font-size: 0.9em;
    transform: translateY(-3px);
    display: inline-block;
}

/* Badge/category icons */
.category i,
.tribute-badge i,
[class*="badge"] i {
    vertical-align: middle;
    margin-left: 0.25rem;
    transform: translateY(-3px);
    display: inline-block;
}
