@import url('https://fonts.googleapis.com/css2?family=Alexandria:wght@100..900&family=Almarai:wght@300;400;700;800&family=Cairo:wght@200..1000&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Tajawal:wght@200;300;400;500;700;800;900&display=swap');

/* تعريف الخطوط المحلية */
@font-face {
    font-family: 'BFANTEZY';
    src: url('../Fonts/BFANTEZY.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins';
    src: url('../Fonts/Poppins-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'ProximaNova';
    src: url('../Fonts/ProximaNova-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'ProximaNova';
    src: url('../Fonts/Proxima Nova-Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Swissra';
    src: url('../Fonts/Swissra Normal.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Swissra';
    src: url('../Fonts/Swissra Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Swissra Black';
    src: url('../Fonts/Swissra Black.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
}

@font-face {
    font-family: 'Swissra Light';
    src: url('../Fonts/Swissra Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

/* متغيرات CSS */
:root {
    --color-bg-dark: #0f0f0f;
    --color-bg-black: #141313;
    --color-white: #ffffff;
    --color-gold: #c6a264;
    --color-gold-dark: #a8844f;
    --color-text-light: #e8e8e8;
    --color-text-dark: #111;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --radius-xxl: 200px;
    --container: 1200px;
    --container-lg: 1400px;
    --spacing-xs: 10px;
    --spacing-sm: 20px;
    --spacing-md: 40px;
    --spacing-lg: 60px;
    --spacing-xl: 80px;
    --spacing-xxl: 120px;
    --touch-target: 44px;
}

/* إعادة تعيين عامة */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    list-style: none;
}

html {
    direction: rtl;
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: 'Swissra', system-ui, sans-serif;
    color: var(--color-white);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* حاويات */
.container {
    width: min(100% - 40px, var(--container));
    margin-inline: auto;
}

.container-lg {
    width: min(100% - 40px, var(--container-lg));
    margin-inline: auto;
}

/* الهيدر والتنقل */
header {
    
    width: 100%;
    height: 100px;
    padding: 20px 90px;
    font-family: "Swissra", sans-serif;
    position: absolute;
    top: 50px;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    transition: all 0.3s ease;
}

/* زر القائمة للجوال */
.menu-toggle {
    display: none;
    position: absolute;
    inset-inline-start: 20px;
    top: 20px;
    width: 42px;
    height: 36px;
    z-index: 1100;
    background: transparent;
    border: none;
    cursor: pointer;
}
.menu-toggle span {
    display: block;
    height: 3px;
    background: #333;
    margin: 6px 0;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* درج الجوال */
.mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
}
.mobile-drawer.preopen { display: block; }
.mobile-drawer.open { display: block; }
.mobile-drawer .drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    backdrop-filter: blur(0px);
    transition: opacity 0.35s ease, backdrop-filter 0.35s ease;
}
.mobile-drawer.open .drawer-backdrop {
    opacity: 1;
    backdrop-filter: blur(3px);
}
.mobile-drawer .mobile-nav {
    position: absolute;
    inset: 0 0 0 auto; /* RTL: من اليمين */
    width: min(80vw, 360px);
    background: #141313;
    color: #fff;
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    padding: 20px;
    box-shadow: -20px 0 40px rgba(0,0,0,0.35), -6px 0 18px rgba(0,0,0,0.25);
}
.mobile-drawer.open .mobile-nav { transform: translateX(0); }
.mobile-drawer .drawer-close {
    position: absolute;
    top: 14px;
    left: 14px; /* RTL: زر الإغلاق يسار */
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.06);
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}
.mobile-drawer .drawer-close:hover {
    background: rgba(255,255,255,0.12);
}
.mobile-drawer .drawer-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 10px 15px;
    margin-top: 50px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: translateY(-20px) scale(0.9);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), 
                transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.mobile-drawer.open .drawer-logo {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition-delay: 0.1s;
}
.mobile-drawer .drawer-logo img {
    width: 90px;
    height: auto;
    filter: brightness(1.1);
}
.mobile-drawer .mobile-nav ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
    padding: 0 10px;
    justify-content: flex-start;
}
.mobile-drawer .mobile-nav li {
    opacity: 0;
    transform: translateX(24px) translateY(8px);
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), 
                opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.mobile-drawer.open .mobile-nav li { 
    opacity: 1; 
    transform: translateX(0) translateY(0); 
}
.mobile-drawer.open .mobile-nav li:nth-child(1) { transition-delay: 0.15s; }
.mobile-drawer.open .mobile-nav li:nth-child(2) { transition-delay: 0.2s; }
.mobile-drawer.open .mobile-nav li:nth-child(3) { transition-delay: 0.25s; }
.mobile-drawer.open .mobile-nav li:nth-child(4) { transition-delay: 0.3s; }
.mobile-drawer.open .mobile-nav li:nth-child(5) { transition-delay: 0.35s; }
.mobile-drawer.open .mobile-nav li:nth-child(6) { transition-delay: 0.4s; }
.mobile-drawer.open .mobile-nav li:nth-child(7) { transition-delay: 0.45s; }
.mobile-drawer.open .mobile-nav li:nth-child(8) { transition-delay: 0.5s; }
.mobile-drawer .mobile-nav li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
}
.mobile-drawer .mobile-nav li:last-child {
    border-bottom: none;
}
.mobile-drawer .mobile-nav a {
    color: #f0f0f0;
    font-size: 1.05rem;
    display: block;
    padding: 14px 10px;
    transition: all 0.2s ease;
    border-radius: 6px;
    width: 100%;
}
.mobile-drawer .mobile-nav a:hover,
.mobile-drawer .mobile-nav a:focus {
    background: rgba(198, 162, 100, 0.15);
    color: var(--color-gold);
    transform: translateX(-4px);
}

/* Animate hamburger into an X when open (aria-expanded=true) */
.menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

header.scrolled {
    background: rgba(20, 19, 19, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

nav {
    width: 100%;
    height: 100%;
}

nav ul {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    height: 100%;
}

nav ul li a {
    color: #333;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

nav ul li a:not(img):hover {
    color: var(--color-gold);
}

nav ul li a img {
    width: 100px;
    height: auto;
    display: block;
}

@media (max-width: 1024px) {
    nav ul { display: none; }
    .menu-toggle { display: block; }
}

/* قسم البطل */
#hero {
    height: 110vh;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-direction: column;
    background: url(../assets/person.png);
    background-size: 80%;
    background-position: bottom center;
    background-repeat: no-repeat;
    background-color: #f8f8f8;
    position: relative;
    padding-bottom: 100px;
    border-bottom-left-radius: 120px;
    border-bottom-right-radius: 120px;
    z-index: 999;
}

#hero h1 {
    font-size: clamp(3rem, 9vw, 10rem);
    color: #c07026;
    mix-blend-mode: multiply;
    font-family: "Swissra Black", sans-serif;
    font-size: 5rem;
    text-align: center;
    margin-bottom: 15px;
    line-height: 1.4;
    letter-spacing: -2px;
}

#hero h4 {
    font-size: clamp(1.2rem, 4vw, 3rem);
    font-family: 'Swissra', sans-serif;
    color: #444;
    text-align: center;
    font-weight: 400;
}

/* قسم التعريف */
#about {
    width: 100%;
    min-height: 100vh;
    background-color: var(--color-bg-black);
    position: relative;
    background-image: url(../assets/sections-bg.png);
    background-size: 50%;
    background-position:60vw 20vh;
    background-repeat: no-repeat;
}

.hero-after {
    width: 0%;
    height: 0vh;
    border-radius: 0 0 var(--radius-xxl) var(--radius-xxl);
    background-color: white;
}

.about-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 250px 200px;
    gap: 35px;
    margin-top: -180px;
}

#about img {
    width: 10%;
    object-fit: cover;
    min-width: 90px;
    filter: drop-shadow(0 4px 10px rgba(198, 162, 100, 0.3));
}

#about p {
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    color: rgba(255, 255, 255, 0.95);
    font-family: 'Swissra Light', sans-serif;
    text-align: justify;
    text-align-last: center;
    line-height: 2.2;
    max-width: 1200px;
}

#about a {
    margin-top: 20px;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: white;
    font-family: 'Swissra', sans-serif;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.8);
    padding: 15px 40px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

#about a:hover {
    background-color: white;
    color: black;
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2);
}

/* عنوان القسم */
.section-title {
    text-align: center;
    font-size: clamp(2rem, 3vw, 3.5rem);
    font-family: 'Swissra', sans-serif;
    font-weight: 800;
    margin-bottom: var(--spacing-lg);
    color: var(--color-white);
    position: relative;
    padding-bottom: 20px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    position: absolute;
    left: 40px;
    top: 5%;
    transform: translateY(-50%) rotate(180deg);
    height: fit-content;
    white-space: nowrap;
    z-index: 10;
}
.section-title span {
    color: var(--color-gold);
}


.section-title.dark {
    color: var(--color-text-dark);
}

/* شبكة البطاقات الذهبية */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 90px;
    width: 70%;
    margin-left: 120px;
    position: relative;
}

.cards-grid.two-cols {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.cards-grid.three-cols {
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* تدرج الأعمدة حسب الاتساع */
@media (max-width: 1200px) {
    .cards-grid.three-cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .cards-grid { grid-template-columns: 1fr 1fr; width: 100%; margin-left: 0; }
}
@media (max-width: 768px) {
    .cards-grid,
    .cards-grid.two-cols,
    .cards-grid.three-cols { grid-template-columns: 1fr; gap: 20px; }
}

.card-gold {
    background: linear-gradient(135deg, #c6a264 0%, #b89255 100%);
    color: white;
    padding: 35px 25px;
    box-shadow: 0 6px 25px rgba(198, 162, 100, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: right;
    min-height: 180px;
}

.card-gold:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(198, 162, 100, 0.4);
}

.card-gold .icon {
    font-size: 2.8rem;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.card-gold h3 {
    font-size: 1.4rem;
    font-family: 'Swissra', sans-serif;
    font-weight: bold;
    margin-bottom: 8px;
}

.card-gold p {
    color: rgba(255, 255, 255, 0.671);
    font-size: 1rem;
    font-family: 'Swissra Light', sans-serif;
    line-height: 1.7;
}

/* بطاقات صغيرة (pill) */
.card-pill {
    background: linear-gradient(135deg, #c6a264 0%, #b89255 100%);
    color: var(--color-text-dark);
    border-radius: 50px;
    padding: 18px 35px;
    box-shadow: 0 5px 20px rgba(198, 162, 100, 0.3);
    text-align: center;
    font-family: 'Swissra', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.card-pill:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(198, 162, 100, 0.4);
}

/* قسم الخبرات */
#experience {
    width: 100%;
    height: fit-content;
    padding: var(--spacing-xxl) 0px 0px 0px;
    background: linear-gradient(to bottom, var(--color-bg-black) 0%, var(--color-bg-black) 50%, white 50%, white 100%);
    position: relative;
    isolation: isolate;
}

#experience::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url(../assets/e-s-bg.png);
    background-size: 50%;
    background-position: -3vw 70%;
    background-repeat: no-repeat;
    mix-blend-mode: difference;
    filter: grayscale(1) brightness(0) invert(1);
    pointer-events: none;
    z-index: 0;
}

#experience .container {
    position: relative;
    z-index: 1;
    padding-right: 80px;
}

/* قسم المهارات */
#skills {
    width: 100%;
    padding: var(--spacing-xxl) 0;
    background-color: var(--color-bg-black);
}

/* قسم الدورات التدريبية */
#courses {
    width: 100%;
    padding: var(--spacing-xxl) 0;
    background-color: white;
}

.tabs-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.tab-btn {
    padding: 18px 45px;
    border-radius: 8px;
    font-family: 'Swissra', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.tab-btn.active {
    background: linear-gradient(135deg, #c6a264 0%, #b89255 100%);
    color: var(--color-text-dark);
    box-shadow: 0 6px 20px rgba(198, 162, 100, 0.4);
}

.tab-btn.inactive {
    background: var(--color-bg-black);
    color: var(--color-white);
}

.tab-btn.inactive:hover {
    background: #222;
}

.tab-btn.disabled {
    background: #3a3a3a;
    color: #777;
    cursor: not-allowed;
}

.tab-content {
    background: transparent;
}

/* الخط الزمني */
#timeline {
    width: 100%;
    padding: var(--spacing-xxl) 0;
    background-color: white;
    position: relative;
    background-image: url(../assets/e-s-bg.png);
    background-size: 70%;
    background-position: 40vw center;
    background-repeat: no-repeat;
}

#timeline .container {
    display: flex;
    gap: 80px;
    align-items: flex-start;
    max-width: 1200px;
}

/* العنوان العمودي */
.timeline-title-vertical {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(0deg);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    top: 120px;
    align-self: flex-start;
    flex-shrink: 0;
    position: relative;
    right: 80px;
}

.timeline-title-vertical .title-black {
    font-family: 'Swissra', sans-serif;
    font-size: 4rem;
    color: #111;
    letter-spacing: 2px;
    white-space: nowrap;
}

.timeline-title-vertical .title-gold {
    font-family: 'Swissra', sans-serif;
    font-size: 4rem;
    color: var(--color-gold);
    letter-spacing: 2px;
    white-space: nowrap;
}

.timeline-container {
    direction: ltr;
    flex: 1;
    position: relative;
    padding: 40px 0 40px 60px;
}

.timeline-line {
    position: absolute;
    left: 110px;
    width: 30px;
    height: 85%;
    background: var(--color-gold);
    top: 50px;
    border-radius: 100px;
}

.timeline-item {
    display: flex;
    position: relative;
    margin-bottom: 0;
    padding-bottom: 80px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-content {
    width: 70%;
    background: transparent;
    border: none;
    padding: 0 0 0 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timeline-content h3 {
    font-size: 1.6rem;
    font-family: 'Swissra', sans-serif;
    margin-bottom: 12px;
    color: var(--color-gold);
    font-weight: bold;
}

.timeline-content p {
    font-size: 1.05rem;
    font-family: 'Swissra Light', sans-serif;
    color: #333;
    line-height: 1.9;
    width: 50%;
    text-align: center;
}

.timeline-content .date {
    font-size: 1.3rem;
    color: var(--color-gold);
    margin-bottom: 10px;
    font-family: 'Poppins', sans-serif;
    position: absolute;
    left: -35px;
    top: 45%;
    direction: rtl;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: center;
    white-space: nowrap;
}

.timeline-dot {
    position: absolute;
    left: 15px;
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 50%;
    border: 10px solid var(--color-gold);
    top: 5px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.timeline-dot .checkmark {
    width: 45px;
}

/* قسم الخدمات */
#services {
    width: 100%;
    padding: var(--spacing-xxl) 0;
    background-image: url(../assets/e-s-bg.png);
    background-size: cover;
    background-position: 60vw bottom;
    background-repeat: no-repeat;
}

/* قسم المشاريع */
#projects {
    width: 100%;
    padding: var(--spacing-xxl) 0;
    background-color: var(--color-bg-dark);
    position: relative;
    background-image: url(../assets/sections-bg.png);
    background-size: 50%;
    background-position: right top;
    background-repeat: no-repeat;
}

.projects-wrapper {
    background: var(--color-bg-black);
    border-radius: 100px 100px 0 0;
    padding: var(--spacing-xl) var(--spacing-xl) var(--spacing-xxl);
    margin-top: var(--spacing-lg);
}

.projects-grid {
    column-count: 2;
    column-gap: 30px;
    padding: 0 150px;
}

/* projects: عمود واحد على الشاشات الصغيرة */
@media (max-width: 480px) {
    .projects-grid {
        column-count: 1;
        padding: 0 16px;
    }
}

.project-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #0f0f0f;
    cursor: zoom-in;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    -moz-column-break-inside: avoid;
    margin-bottom: 30px;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.project-card img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.35s ease;
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.65) 60%, rgba(0,0,0,0.0) 100%);
    padding: 22px;
    color: var(--color-white);
    opacity: 1;
    transform: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
    transform: none;
}

.project-overlay h4 {
    font-size: 1.3rem;
    font-family: 'Swissra', sans-serif;
    font-weight: bold;
    margin-bottom: 5px;
}

.project-overlay p {
    font-size: 0.95rem;
    font-family: 'Swissra Light', sans-serif;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.9);
}

/* Disable body scroll when lightbox or drawer is open */
body.no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Lightbox styles */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 24px;
}

.lightbox.open {
    display: flex;
}

.lb-figure {
    max-width: min(92vw, 1400px);
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.lb-image {
    max-width: 100%;
    max-height: 78vh;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.lb-caption {
    color: #f0f0f0;
    font-family: 'Swissra Light', sans-serif;
    text-align: center;
    line-height: 1.6;
    max-width: 90ch;
}

.lb-close, .lb-prev, .lb-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.lb-close:hover, .lb-prev:hover, .lb-next:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.lb-close {
    top: 24px;
    left: 24px; /* RTL: close on left */
    font-size: 22px;
    line-height: 1;
}

.lb-prev, .lb-next {
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
}

.lb-prev { right: 24px; }
.lb-next { left: 24px; }

.lb-prev::before { content: '❯'; transform: scaleX(-1); display: inline-block; }
.lb-next::before { content: '❯'; }

@media (max-width: 768px) {
    .lb-image { max-height: 70vh; }
    .lb-close, .lb-prev, .lb-next { width: 40px; height: 40px; }
    .lb-prev { right: 12px; }
    .lb-next { left: 12px; }
    .lb-close { top: 12px; left: 12px; }
}

/* قسم CTA */
#cta {
    width: 100%;
    height: 120vh;
    padding: var(--spacing-xxl) 0;
    background: linear-gradient(135deg, #f9f9f9 0%, #ececec 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: url(../assets/cta-bh.png) no-repeat center center;
    background-size: cover;
}
@media (max-width: 768px) {
    #cta { height: auto; min-height: 50vh; }
}


.cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 850px;
    margin:-50px auto 0 auto;
    padding: 40px 20px;
}

.cta-content h2 {
    font-size: 3.5rem;
    font-family: 'Swissra Light', sans-serif;
    color: var(--color-text-dark);
    margin-bottom: 25px;

}

.cta-content h2 span {
    color: var(--color-gold);
}

.btn-cta {
    color: var(--color-text-dark);
    padding: 20px 55px;
    border: 2px solid var(--color-gold);
    border-radius: 8px;
    font-family: 'Swissra Light', sans-serif;
    font-size: 1.25rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-cta:hover {
    background: var(--color-gold);
    color: white;
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(198, 162, 100, 0.5);
}

/* الفوتر */
footer {

    width: 100%;
    background: var(--color-bg-dark);
    padding: 50px 50px 0px 50px;
    position: relative;
    border-top-left-radius: 60px;
    border-top-right-radius: 60px;
    margin-top: -50px;
}

/* ========== New Footer (matches screenshot) ========== */
.footer-topbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    padding:20px 40px 10px 40px;
}
.footer-logo{width:90px;height:auto;display:block;filter:brightness(1) contrast(1.2)}
.back-to-top{color:#d7b679;font-family:'Poppins',sans-serif;font-weight:500;font-size:15px}
.back-to-top .arrow-up{display:inline-block;transform:translateY(-1px)}
.footer-sep{height:1px;background:#3a3a3a;margin:10px 40px}

.footer-grid{display:grid;grid-template-columns:1.3fr 1fr 1fr;gap:60px;padding:40px 40px}
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr; gap: 24px; padding: 24px; }
    .footer-copy { text-align: center; }
}

/* Socials */
.socials{display:flex;align-items:center;gap:18px;margin-bottom:34px}
.socials .ic{
    width:46px;
    height:46px;
    border:2px solid var(--color-gold);
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    position:relative;
    transition: all 0.3s ease;
}
.socials .ic:hover {
    background: var(--color-gold);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(198, 162, 100, 0.4);
}
.socials .ic i {
    color: var(--color-gold);
    font-size: 18px;
    transition: color 0.3s ease;
}
.socials .ic:hover i {
    color: #141313;
}

/* Contact list */
.contact{display:flex;flex-direction:column;gap:18px}
.contact li{display:flex;align-items:center;gap:14px}
.ci{
    width:42px;
    height:42px;
    background:#1c1c1c;
    border:2px solid var(--color-gold);
    border-radius:12px;
    display:flex;
    align-items:center;
    justify-content:center;
    flex:0 0 42px;
    position:relative;
}
.ci i {
    color: var(--color-gold);
    font-size: 16px;
}
.contact a{color:var(--color-text-light);font-family:sans-serif}
.contact-text{color:var(--color-text-light);font-family:'Swissra Light',sans-serif;line-height:1.3}

/* Links columns */
.links{display:flex;flex-direction:column;gap:22px}
.links a{color:#d6d6d6;font-family:'Poppins',sans-serif;letter-spacing:.4px}
.links a:hover{color:var(--color-gold)}
.links-col{display:flex;align-items:flex-start;justify-content:flex-start}
.lang .lang-btn{background:transparent;border:none;color:#d6d6d6;font-family:'Poppins',sans-serif;cursor:pointer}
.lang .caret{display:inline-block;transform:translateY(-2px)}

.footer-copy{padding:18px 40px 26px 40px;color:#cfcfcf;text-align:left}
.footer-copy p{font-family:'Poppins',sans-serif;color:#cfcfcf}

/* الاستجابة */
@media (max-width: 1280px) {
    nav ul {
        gap: 25px;
    }
    
    nav ul li a {
        font-size: 14px;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 1024px) {
    header {
        padding: 20px 40px;
    }
    
    nav ul {
        gap: 20px;
    }
    
    nav ul li a img {
        width: 80px;
    }
    
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        margin-right: 80px;
    }
    
    .cards-grid.three-cols {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .projects-grid {
        column-count: 2;
        column-gap: 24px;
        padding: 0 30px;
    }
    
    .about-content {
        padding: 50px 80px;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    
    #timeline .container {
        flex-direction: column;
        gap: 40px;
    }
    
    .timeline-title-vertical {
        writing-mode: horizontal-tb;
        transform: none;
        flex-direction: row;
        position: static;
        justify-content: center;
    }
    
    .timeline-title-vertical .title-black,
    .timeline-title-vertical .title-gold {
        font-size: 2rem;
    }
    
    .timeline-container {
        padding: 40px 0 40px 60px;
    }
    
    .timeline-line {
        left: 80px;
        width: 20px;
    }
    
    .timeline-item {
        padding-bottom: 60px;
    }
    
    .timeline-content {
        padding: 0 0 0 180px;
    }
    
    .timeline-content .date {
        left: 10px;
    }
    
    .timeline-dot {
        left: 10px;
        width: 80px;
        height: 80px;
        border-width: 8px;
    }
    
    .timeline-dot .checkmark {
        width: 35px;
    }
    
    #experience .container {
        padding-right: 80px;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    header {
        padding: 15px 20px;
        height: auto;
        top: 20px;
    }
    
    .menu-toggle {
        top: 15px;
        inset-inline-start: 15px;
    }
    
    nav ul {
        gap: 10px;
        font-size: 12px;
    }
    
    nav ul li a {
        font-size: 11px;
    }
    
    nav ul li a img {
        width: 60px;
    }
    
    #hero {
        background-size: cover;
        background-position: bottom center;
        padding-bottom: 60px;
        border-bottom-left-radius: 80px;
        border-bottom-right-radius: 80px;
        min-height: 85vh;
        height: auto;
    }
    
    #hero h1 {
        font-size: clamp(2.5rem, 11vw, 4rem);
        margin-bottom: 10px;
    }
    
    #hero h4 {
        font-size: clamp(1rem, 5vw, 1.8rem);
    }
    
    .hero-after {
        height: 15vh;
        border-radius: 0 0 100px 100px;
    }
    
    .about-content {
        padding: 60px 24px;
        margin-top: -100px;
        gap: 25px;
    }
    
    #about img {
        width: 20%;
        min-width: 80px;
    }
    
    #about p {
        font-size: clamp(0.95rem, 3.5vw, 1.1rem);
        line-height: 2;
    }
    
    #about a {
        font-size: clamp(0.95rem, 3.5vw, 1.1rem);
        padding: 14px 32px;
        margin-top: 10px;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-right: 0;
        margin-left: 0;
        width: 100%;
        padding: 0 20px;
    }
    
    .cards-grid.two-cols,
    .cards-grid.three-cols {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .section-title {
        position: static;
        transform: none;
        writing-mode: horizontal-tb;
        text-orientation: initial;
        margin-bottom: 40px;
        text-align: center;
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }
    
    #experience {
        padding: 60px 0;
    }
    
    #experience .container {
        padding-right: 0;
        padding-left: 0;
    }
    
    .card-gold {
        padding: 28px 22px;
        min-height: 150px;
    }
    
    .card-gold .icon img {
        max-width: 60px;
        height: auto;
    }
    
    .card-gold h3 {
        font-size: 1.3rem;
    }
    
    .card-gold p {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .projects-grid {
        column-count: 1;
        column-gap: 0;
        padding: 0 20px;
    }
    
    .project-card {
        margin-bottom: 20px;
        border-radius: 12px;
    }
    
    .project-overlay {
        padding: 16px 18px;
    }
    
    .project-overlay h4 {
        font-size: 1.15rem;
    }
    
    .project-overlay p {
        font-size: 0.9rem;
    }
    
    #projects {
        padding: 60px 0;
        border-top-left-radius: 80px;
        border-top-right-radius: 80px;
    }
    
    .projects-wrapper {
        border-radius: 60px 60px 0 0;
        padding: 40px 20px 60px;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        padding: 0 var(--spacing-sm) var(--spacing-md);
        gap: 40px;
    }
    
    .footer-topbar {
        padding: 20px 20px 10px;
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .footer-sep {
        margin: 10px 20px;
    }
    
    .socials {
        justify-content: center;
        flex-wrap: wrap;
        gap: 14px;
    }
    
    .socials .ic {
        width: 44px;
        height: 44px;
    }
    
    .contact {
        gap: 16px;
    }
    
    .footer-curve {
        height: 12vh;
        border-radius: 0 0 100px 100px;
    }
    
    .cta-content {
        padding: 40px 24px;
        margin: 0 auto;
    }
    
    .cta-content h2 {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
        margin-bottom: 20px;
        line-height: 1.3;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
    
    .btn-cta {
        padding: 16px 42px;
        font-size: 1.05rem;
        min-height: 52px;
    }
    
    #timeline {
        padding: 60px 0;
    }
    
    #timeline .container {
        flex-direction: column;
        gap: 30px;
        padding: 0 20px;
    }
    
    .timeline-title-vertical {
        writing-mode: horizontal-tb;
        transform: none;
        flex-direction: row;
        position: static;
        justify-content: center;
        gap: 10px;
        right: 0;
    }
    
    .timeline-title-vertical .title-black,
    .timeline-title-vertical .title-gold {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }
    
    .timeline-container {
        padding: 30px 0 30px 40px;
    }
    
    .timeline-item {
        padding-bottom: 50px;
    }
    
    .timeline-content {
        padding: 0 0 0 120px;
        width: 100%;
    }
    
    .timeline-content p {
        width: 100%;
        font-size: 0.95rem;
    }
    
    .timeline-content .date {
        left: -5px;
        font-size: 0.95rem;
    }
    
    .timeline-dot {
        left: 0px;
        width: 65px;
        height: 65px;
        border-width: 6px;
    }
    
    .timeline-dot .checkmark {
        width: 28px;
    }
    
    .timeline-line {
        width: 12px;
        left: 52px;
    }
    
    .timeline-content h3 {
        font-size: 1.3rem;
    }
    
    .tab-btn {
        padding: 14px 32px;
        font-size: 0.95rem;
    }
    
    #experience,
    #skills,
    #courses,
    #services {
        padding: 60px 0;
    }
    
    #courses .container,
    #services .container {
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    #about{
        min-height: fit-content;
        margin-top: -80px;
        padding-top: 80px;
    }
    header {
        padding: 10px 15px;
        height: auto;
        top: 15px;
    }
    
    .menu-toggle {
        width: 38px;
        height: 32px;
        top: 12px;
        inset-inline-start: 12px;
    }
    
    .menu-toggle span {
        height: 2.5px;
        margin: 5px 0;
    }
    
    nav ul {
        flex-wrap: wrap;
        gap: 8px;
        font-size: 10px;
        justify-content: center;
    }
    
    nav ul li {
        flex: 0 0 auto;
    }
    
    nav ul li:nth-child(5) {
        order: -1;
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }
    
    nav ul li a img {
        width: 70px;
    }
    
    #hero {
        background-size: 130vh;
        padding-bottom: 50px;
        border-bottom-left-radius: 60px;
        border-bottom-right-radius: 60px;
        min-height: 60vh;
    }
    
    #hero h1 {
        font-size: clamp(2rem, 12vw, 3.5rem);
        padding: 0 16px;
        margin-bottom: 8px;
    }
    
    #hero h4 {
        font-size: clamp(0.9rem, 6vw, 1.5rem);
        padding: 0 16px;
    }
    
    .hero-after {
        height: 10vh;
        border-radius: 0 0 60px 60px;
    }
    
    .about-content {
        padding: 50px 16px;
        margin-top: -80px;
        gap: 20px;
    }
    
    #about img {
        width: 22%;
        min-width: 70px;
    }
    
    #about p {
        font-size: clamp(0.9rem, 4vw, 1.05rem);
        line-height: 1.9;
    }
    
    #about a {
        font-size: clamp(0.9rem, 4vw, 1.05rem);
        padding: 12px 28px;
        min-height: 48px;
    }
    
    .section-title {
        font-size: clamp(1.5rem, 7vw, 2rem);
        margin-bottom: 30px;
        position: static;
        transform: none;
        writing-mode: horizontal-tb;
        text-orientation: initial;
        text-align: center;
    }
    
    .section-title::after {
        width: 60px;
        height: 3px;
    }
    
    .cards-grid {
        padding: 0 16px;
        gap: 18px;
    }
    
    .card-gold {
        padding: 24px 18px;
        min-height: 130px;
    }
    
    .card-gold .icon img {
        max-width: 55px;
    }
    
    .card-gold h3 {
        font-size: 1.15rem;
        margin-bottom: 6px;
    }
    
    .card-gold p {
        font-size: 0.92rem;
        line-height: 1.5;
    }
    
    .card-pill {
        padding: 16px 20px;
        font-size: 0.92rem;
        min-height: 54px;
        line-height: 1.4;
    }
    
    .tab-btn {
        padding: 12px 28px;
        font-size: 0.9rem;
        min-height: 44px;
    }
    
    #timeline {
        padding: 50px 0;
    }
    
    #timeline .container {
        flex-direction: column;
        gap: 20px;
        padding: 0 16px;
    }
    
    .timeline-title-vertical {
        writing-mode: horizontal-tb;
        transform: none;
        flex-direction: column;
        position: static;
        text-align: center;
        gap: 5px;
        right: 0;
    }
    
    .timeline-title-vertical .title-black,
    .timeline-title-vertical .title-gold {
        font-size: 2rem;
    }
    
    .timeline-container {
        padding: 20px 0 20px 25px;
    }
    
    .timeline-item {
        padding-bottom: 35px;
    }
    
    .timeline-content {
        padding: 0 0 0 90px;
        width: 100%;
        align-items: end;
    }
    
    .timeline-content h3 {
        font-size: 1.15rem;
    }
    
    .timeline-content p {
        font-size: 0.88rem;
        width: 100%;
        line-height: 1.7;
        text-align: right;
    }
    
    .timeline-content .date {
        font-size: 0.8rem;
        left: -8vw;
        top: 4.5vh;
    }
    
    .timeline-dot {
        width: 48px;
        height: 48px;
        left: 0px;
        border-width: 4px;
    }
    
    .timeline-dot .checkmark {
        width: 20px;
    }
    
    .timeline-line {
        width: 10px;
        left: 11vw;
        height: 80%;
    }
    
    #projects {
        padding: 50px 0;
        border-top-left-radius: 60px;
        border-top-right-radius: 60px;
    }
    
    .projects-wrapper {
        padding: 30px 16px 50px;
        border-radius: 40px 40px 0 0;
    }
    
    .projects-grid {
        padding: 0 16px;
    }
    
    .project-card {
        margin-bottom: 16px;
        border-radius: 10px;
    }
    
    .project-card img {
        height: auto;
    }
    
    .project-overlay {
        padding: 14px 16px;
    }
    
    .project-overlay h4 {
        font-size: 1.05rem;
    }
    
    .project-overlay p {
        font-size: 0.82rem;
    }
    
    #cta {
        padding: 50px 0;
    }
    
    .cta-content {
        padding: 30px 16px;
    }
    
    .cta-content h2 {
        font-size: clamp(1.6rem, 8vw, 2.2rem);
        line-height: 1.25;
    }
    
    .btn-cta {
        padding: 15px 36px;
        font-size: 0.98rem;
        min-height: 50px;
    }
    
    footer {
        border-top-left-radius: 50px;
        border-top-right-radius: 50px;
        padding: 40px 16px 0;
    }
    
    .footer-topbar {
        padding: 16px 16px 8px;
    }
    
    .footer-logo {
        width: 75px;
    }
    
    .back-to-top {
        font-size: 13px;
    }
    
    .footer-sep {
        margin: 8px 16px;
    }
    
    .footer-grid {
        padding: 30px 16px;
        gap: 28px;
    }
    
    .socials {
        gap: 12px;
        margin-bottom: 28px;
    }
    
    .socials .ic {
        width: 42px;
        height: 42px;
    }
    
    .contact {
        gap: 14px;
    }
    
    .ci {
        width: 40px;
        height: 40px;
    }
    
    .contact a,
    .contact-text {
        font-size: 0.9rem;
    }
    
    .links {
        gap: 18px;
    }
    
    .links a {
        font-size: 0.9rem;
    }
    
    .footer-copy {
        padding: 16px 16px 22px;
        font-size: 0.85rem;
    }
    
    .footer-copy p {
        font-size: 0.85rem;
    }
    
    .footer-curve {
        height: 8vh;
        border-radius: 0 0 60px 60px;
    }
    
    .footer-content {
        padding: 0 16px 30px;
        gap: 28px;
    }
    
    .footer-section h3 {
        font-size: 1.2rem;
        margin-bottom: 14px;
    }
    
    .footer-section ul li a,
    .footer-section p {
        font-size: 0.9rem;
    }
    
    .footer-bottom {
        padding: 18px 16px;
        font-size: 0.85rem;
    }
    
    #experience,
    #skills,
    #courses,
    #services {
        padding: 50px 0;
    }
    
    #courses .container,
    #services .container {
        padding: 0 16px;
    }
    
    .container {
        width: min(100% - 32px, var(--container));
    }
    
    .container-lg {
        width: min(100% - 32px, var(--container-lg));
    }
}

