/* ========== شركة عبد الغفور للوكالة البحرية - Base ========== */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&family=Inter:wght@300;400;600;700&display=swap');

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

:root {
    --marine-bg: #f8fafc;
    --marine-bg-alt: #f1f5f9;
    --marine-text: #0f172a;
    --marine-text-muted: #64748b;
    --marine-border: #e2e8f0;
    --marine-primary: #2563eb;
    --marine-primary-dark: #1d4ed8;
}

body {
    font-family: 'Cairo', 'Inter', sans-serif;
    background-color: var(--marine-bg);
    color: var(--marine-text);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

[dir="ltr"] body {
    font-family: 'Inter', 'Cairo', sans-serif;
}

/* Dark theme */
body.dark {
    --marine-bg: #0f172a;
    --marine-bg-alt: #1e293b;
    --marine-text: #f8fafc;
    --marine-text-muted: #94a3b8;
    --marine-border: #334155;
}

body.dark {
    background-color: #0f172a;
    color: #f8fafc;
}

/* ========== Header & Navigation (موحد مع باقي الشركات) ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    transition: all 0.3s ease;
}

.header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

body.dark .header {
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

body.dark .header.scrolled {
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.15);
}

.navbar {
    padding: 0.5rem 0;
}

.nav-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

@media (min-width: 640px) {
    .nav-container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .nav-container {
        padding: 0 2rem;
    }
}

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

.nav-logo .logo-icon {
    width: 3rem;
    height: 3rem;
    background: var(--marine-primary);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

.nav-logo .logo-icon i {
    color: white;
    font-size: 1.5rem;
}

.nav-logo .logo-text {
    display: flex;
    flex-direction: column;
}

.nav-logo .logo-text .main {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
}

.nav-logo .logo-text .sub {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--marine-primary);
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 0.35rem 0.5rem;
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.2s;
    border-radius: 6px;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--marine-primary);
    transition: width 0.3s;
}

.nav-link:hover {
    color: var(--marine-primary);
}

.nav-link:hover::after {
    width: 80%;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 1px solid var(--marine-border);
    background: rgba(255, 255, 255, 0.5);
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.theme-toggle:hover {
    background: var(--marine-primary);
    color: white;
    border-color: var(--marine-primary);
}

body.dark .theme-toggle {
    background: rgba(30, 41, 59, 0.5);
}

body.dark .theme-toggle:hover {
    background: var(--marine-primary);
}

.language-toggle {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 1px solid var(--marine-border);
    background: rgba(255, 255, 255, 0.5);
    color: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.language-toggle:hover {
    background: var(--marine-primary);
    color: white;
    border-color: var(--marine-primary);
}

body.dark .language-toggle {
    background: rgba(30, 41, 59, 0.5);
}

body.dark .language-toggle:hover {
    background: var(--marine-primary);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 0.5rem;
    border: none;
    background: none;
    color: inherit;
}

.hamburger .bar {
    width: 24px;
    height: 2.5px;
    background: currentColor;
    border-radius: 2px;
    transition: all 0.3s;
}

.hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 1023px) {
    .hamburger {
        display: flex;
    }
    .nav-menu {
        position: fixed;
        top: 4.5rem;
        right: 0;
        width: 100%;
        max-width: 18rem;
        background: white;
        flex-direction: column;
        padding: 1.5rem;
        gap: 0;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
        border-radius: 0 0 0 1rem;
        opacity: 0;
        visibility: hidden;
        transform: translateX(100%);
        transition: all 0.3s ease;
    }
    [dir="ltr"] .nav-menu {
        right: auto;
        left: 0;
        transform: translateX(-100%);
        border-radius: 0 0 1rem 0;
    }
    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }
    .nav-item {
        width: 100%;
        border-bottom: 1px solid var(--marine-border);
    }
    .nav-item:last-child {
        border-bottom: none;
    }
    .nav-link {
        padding: 0.75rem 0;
        display: block;
    }
    body.dark .nav-menu {
        background: #0f172a;
        border-color: #334155;
    }
}

/* ========== Hero ========== */
.hero-bg {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
        url('https://images.unsplash.com/photo-1524522173746-f628baad3644?auto=format&fit=crop&q=80&w=2000') center/cover no-repeat;
}

.hero-bg .hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(37, 99, 235, 0.15);
    pointer-events: none;
}

.hero-bg .hero-content {
    max-width: 64rem;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 10;
}

.hero-bg .hero-badge {
    display: inline-block;
    padding: 0.25rem 1rem;
    background: #2563eb;
    color: white;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: 9999px;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-bg h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 2rem;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .hero-bg h1 {
        font-size: 4rem;
    }
}

.hero-bg .hero-subtitle {
    font-size: 1.125rem;
    color: #e2e8f0;
    margin-bottom: 3rem;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .hero-bg .hero-subtitle {
        font-size: 1.5rem;
    }
}

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

.hero-bg .btn-hero-primary {
    display: inline-block;
    background: #2563eb;
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1.125rem;
    text-decoration: none;
    transition: all 0.2s;
}

.hero-bg .btn-hero-primary:hover {
    background: #1d4ed8;
    transform: scale(1.02);
}

.hero-bg .btn-hero-outline {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1.125rem;
    text-decoration: none;
    transition: all 0.2s;
}

.hero-bg .btn-hero-outline:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ========== About Section ========== */
.about-section {
    padding: 5rem 0;
    background: white;
}

body.dark .about-section {
    background: #0f172a;
}

.about-section .section-wrap {
    max-width: 80rem;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
}

.about-image-wrap {
    position: relative;
}

.about-img {
    width: 100%;
    border-radius: 1rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

body.dark .about-img {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.about-badge-years {
    position: absolute;
    bottom: -2rem;
    right: -2rem;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
    display: none;
}

[dir="ltr"] .about-badge-years {
    right: auto;
    left: -2rem;
}

@media (min-width: 768px) {
    .about-badge-years {
        display: block;
    }
}

.about-num {
    display: block;
    font-size: 2.25rem;
    font-weight: 800;
}

.about-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

.about-badge-trusted {
    position: absolute;
    top: 2rem;
    left: -2rem;
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    display: none;
}

[dir="ltr"] .about-badge-trusted {
    left: auto;
    right: -2rem;
}

body.dark .about-badge-trusted {
    background: #1e293b;
}

@media (min-width: 768px) {
    .about-badge-trusted {
        display: flex;
    }
}

.about-trusted-icon {
    width: 3rem;
    height: 3rem;
    background: rgba(34, 197, 94, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #16a34a;
}

body.dark .about-trusted-icon {
    background: rgba(34, 197, 94, 0.2);
}

.about-trusted-title {
    font-weight: 700;
    display: block;
}

.about-trusted-desc {
    font-size: 0.875rem;
    color: var(--marine-text-muted);
}

.about-badge {
    display: inline-block;
    padding: 0.25rem 1rem;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

body.dark .about-badge {
    background: rgba(37, 99, 235, 0.2);
}

.about-title {
    font-size: 1.875rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .about-title {
        font-size: 2.25rem;
    }
}

.about-lead {
    font-size: 1.125rem;
    color: var(--marine-text-muted);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.about-feature-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

body.dark .about-feature-icon {
    background: rgba(37, 99, 235, 0.2);
}

.about-feature span {
    font-weight: 500;
}

/* ========== Sections common ========== */
.section-wrap {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .section-wrap {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .section-wrap {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.section-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 3rem;
    }
}

.section-divider {
    width: 5rem;
    height: 0.375rem;
    background: #2563eb;
    margin: 0 auto 1rem;
    border-radius: 9999px;
}

.section-badge {
    display: inline-block;
    padding: 0.25rem 1rem;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

body.dark .section-badge {
    background: rgba(37, 99, 235, 0.2);
}

.section-desc {
    font-size: 1.125rem;
    color: var(--marine-text-muted);
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
}

/* ========== Services ========== */
#services {
    padding: 6rem 0;
    background: var(--marine-bg-alt);
}

body.dark #services {
    background: #1e293b;
}

@media (max-width: 767px) {
    #services {
        padding: 4rem 0;
    }
}

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

#services .section-badge {
    margin-bottom: 1rem;
}

#services .section-desc {
    margin-bottom: 0.5rem;
}

#services .services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    #services .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    #services .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.service-card {
    background: white;
    padding: 2.5rem;
    border-radius: 2.5rem;
    border: 1px solid var(--marine-border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    transition: all 0.5s ease;
}

body.dark .service-card {
    background: #1e293b;
    border-color: #334155;
}

.service-card:hover {
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.1);
    border-color: #2563eb;
}

.service-card .card-icon {
    width: 4rem;
    height: 4rem;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    transition: all 0.3s;
}

body.dark .service-card .card-icon {
    background: rgba(37, 99, 235, 0.2);
}

.service-card:hover .card-icon {
    background: #2563eb;
    color: white;
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--marine-text-muted);
    line-height: 1.7;
}

/* ========== Portfolio ========== */
#portfolio {
    padding: 5rem 0;
    background: #0f172a;
    color: white;
}

#portfolio .section-wrap {
    max-width: 80rem;
}

#portfolio .portfolio-header {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

@media (min-width: 768px) {
    #portfolio .portfolio-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }
}

#portfolio .portfolio-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    #portfolio .portfolio-header h2 {
        font-size: 3rem;
    }
}

#portfolio .portfolio-header p {
    color: #94a3b8;
    font-size: 1.125rem;
}

#portfolio .stats-box {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
}

#portfolio .stats-box .num {
    display: block;
    font-size: 1.875rem;
    font-weight: 700;
    color: #2563eb;
}

#portfolio .stats-box .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
}

/* Gallery section header */
.gallery-section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.gallery-section-header .section-badge-light {
    background: rgba(255, 255, 255, 0.1);
    color: #93c5fd;
}

.gallery-section-header .portfolio-main-title {
    color: white;
}

.gallery-section-header .section-desc-light {
    color: #94a3b8;
}

/* Gallery filters */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.gallery-filter {
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    transition: all 0.2s;
}

.gallery-filter:hover {
    background: rgba(255, 255, 255, 0.2);
}

.gallery-filter.active {
    background: #2563eb;
    color: white;
}

#portfolio .gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    #portfolio .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 16rem;
    }
}

@media (min-width: 1024px) {
    #portfolio .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

#portfolio .gallery-item {
    height: 12rem;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    position: relative;
}

@media (min-width: 768px) {
    #portfolio .gallery-item {
        height: auto;
        min-height: 16rem;
    }
}

#portfolio .gallery-item.gallery-item-large {
    grid-column: span 1;
}

@media (min-width: 768px) {
    #portfolio .gallery-item.gallery-item-large {
        grid-column: span 2;
        grid-row: span 2;
    }
}

#portfolio .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

#portfolio .gallery-item:hover img {
    transform: scale(1.1);
}

#portfolio .gallery-item .gallery-overlay,
#portfolio .gallery-item .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.85), transparent);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}

#portfolio .gallery-item:hover .gallery-overlay,
#portfolio .gallery-item:hover .overlay {
    opacity: 1;
}

.gallery-overlay h4 {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.25rem;
}

@media (min-width: 768px) {
    .gallery-item-large .gallery-overlay h4 {
        font-size: 1.5rem;
    }
}

.gallery-overlay p {
    font-size: 0.875rem;
    color: #94a3b8;
}

/* Videos from field */
.videos-from-field {
    margin-bottom: 3rem;
}

.videos-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-align: center;
    margin-bottom: 2rem;
}

.video-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .video-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .video-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

.video-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.video-card-thumb {
    position: relative;
    aspect-ratio: 16/9;
    background: #1e293b;
    overflow: hidden;
}

.video-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-card-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.2s;
}

.video-card:hover .video-card-play {
    opacity: 1;
}

.video-card-play i {
    width: 4rem;
    height: 4rem;
    background: white;
    color: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    padding-left: 0.25rem;
}

[dir="rtl"] .video-card-play i {
    padding-left: 0;
    padding-right: 0.25rem;
}

.video-card-body {
    padding: 1rem;
}

.video-card-body h4 {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.25rem;
}

.video-card-body p {
    font-size: 0.875rem;
    color: #94a3b8;
}

#portfolio .gallery-item .overlay {
    padding: 1rem;
}

#portfolio .gallery-item .overlay:not(.gallery-overlay) {
    align-items: flex-end;
}

/* Video block */
#portfolio .video-block {
    background: #2563eb;
    border-radius: 3rem;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    #portfolio .video-block {
        padding: 4rem;
    }
}

#portfolio .video-block .video-inner {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 1024px) {
    #portfolio .video-block .video-inner {
        grid-template-columns: 1fr 1fr;
    }
}

#portfolio .video-block h3 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

#portfolio .video-block .video-desc {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

#portfolio .video-block .play-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    color: #2563eb;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

#portfolio .video-block .video-preview,
#portfolio .video-block .video-block-featured {
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    border: 4px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

#portfolio .video-block .video-block-featured video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#portfolio .video-block .video-preview img,
#portfolio .video-block .video-block-featured img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

#portfolio .video-block .video-preview .play-icon,
#portfolio .video-block .video-block-featured .play-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#portfolio .video-block .video-preview .play-icon span {
    width: 4rem;
    height: 4rem;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 1.5rem;
}

[dir="rtl"] #portfolio .video-block .video-preview .play-icon span,
[dir="rtl"] #portfolio .video-block .video-block-featured .play-icon span {
    margin-right: 0.25rem;
}

[dir="ltr"] #portfolio .video-block .video-preview .play-icon span,
[dir="ltr"] #portfolio .video-block .video-block-featured .play-icon span {
    margin-left: 0.25rem;
}

.video-block-right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ========== Location ========== */
#location {
    padding: 6rem 0;
    background: white;
}

body.dark #location {
    background: #020617;
}

#location .section-wrap {
    max-width: 80rem;
}

#location .location-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
}

@media (min-width: 1024px) {
    #location .location-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
}

#location .map-wrap {
    order: 2;
    height: 28rem;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    border: 8px solid var(--marine-border);
    position: relative;
}

@media (min-width: 1024px) {
    #location .map-wrap {
        order: 1;
        height: 31.25rem;
    }
}

body.dark #location .map-wrap {
    border-color: #1e293b;
}

#location .map-wrap iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

#location .map-badge {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    background: #2563eb;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 1rem;
}

[dir="ltr"] #location .map-badge {
    right: auto;
    left: 1.5rem;
}

#location .map-badge i {
    font-size: 1.5rem;
}

#location .map-badge .small {
    font-size: 0.75rem;
    font-weight: 700;
    opacity: 0.9;
}

#location .map-badge .strong {
    font-weight: 700;
}

#location .location-content {
    order: 1;
}

@media (min-width: 1024px) {
    #location .location-content {
        order: 2;
    }
}

#location .location-badge {
    color: #2563eb;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.875rem;
}

#location .location-content h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin: 1rem 0 2rem;
}

@media (min-width: 768px) {
    #location .location-content h2 {
        font-size: 3rem;
    }
}

#location .location-content .lead {
    color: var(--marine-text-muted);
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

#location .info-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

#location .info-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--marine-bg-alt);
    border-radius: 1.5rem;
    border: 1px solid var(--marine-border);
}

body.dark #location .info-card {
    background: #1e293b;
    border-color: #334155;
}

#location .info-card i {
    font-size: 1.875rem;
    color: #2563eb;
}

#location .info-card h4 {
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

#location .info-card p {
    font-size: 0.875rem;
    color: var(--marine-text-muted);
}

/* ========== تواصل معنا (قبل الفوتر) ========== */
.contact-section {
    padding: 6rem 0;
    background: var(--marine-bg);
}

body.dark .contact-section {
    background: #0f172a;
}

@media (max-width: 767px) {
    .contact-section {
        padding: 4rem 0;
    }
}

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

.contact-section .section-badge {
    margin-bottom: 1rem;
}

.contact-section .section-desc {
    margin-bottom: 0.5rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    max-width: 56rem;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .contact-grid {
        grid-template-columns: 1fr 1.2fr;
        gap: 3.5rem;
        max-width: 80rem;
        align-items: start;
    }
}

.contact-info-block {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.contact-info-card {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: var(--marine-bg-alt);
    border: 1px solid var(--marine-border);
    border-radius: 1.25rem;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.contact-info-card:hover {
    border-color: var(--marine-primary);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08);
}

body.dark .contact-info-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark .contact-info-card:hover {
    border-color: var(--marine-primary);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15);
}

.contact-info-icon {
    width: 3rem;
    height: 3rem;
    min-width: 3rem;
    min-height: 3rem;
    background: var(--marine-primary);
    color: white;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
}

.contact-info-card h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--marine-primary);
    margin-bottom: 0.35rem;
}

.contact-info-card p,
.contact-info-card a {
    font-size: 1rem;
    color: var(--marine-text);
    text-decoration: none;
    margin: 0;
}

.contact-info-card a:hover {
    color: var(--marine-primary);
}

body.dark .contact-info-card p,
body.dark .contact-info-card a {
    color: #f8fafc;
}

.contact-form-block {
    background: var(--marine-bg-alt);
    border: 1px solid var(--marine-border);
    border-radius: 1.5rem;
    padding: 2rem;
}

body.dark .contact-form-block {
    background: #1e293b;
    border-color: #334155;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.contact-form-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--marine-text);
}

body.dark .contact-label {
    color: #f8fafc;
}

.contact-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid var(--marine-border);
    border-radius: 0.75rem;
    background: var(--marine-bg);
    color: var(--marine-text);
    transition: border-color 0.2s ease;
}

.contact-input:focus {
    outline: none;
    border-color: var(--marine-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

body.dark .contact-input {
    background: #0f172a;
    border-color: #334155;
    color: #f8fafc;
}

body.dark .contact-input:focus {
    border-color: var(--marine-primary);
}

.contact-textarea {
    resize: vertical;
    min-height: 6rem;
}

.contact-submit {
    margin-top: 0.5rem;
    padding: 1rem 1.75rem;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    color: white;
    background: var(--marine-primary);
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.contact-submit:hover {
    background: var(--marine-primary-dark);
    transform: translateY(-2px);
}

.contact-submit:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

/* ========== Footer (موحد: روابط سريعة + تواصل معنا) ========== */
.footer {
    background: linear-gradient(180deg, var(--marine-bg-alt) 0%, var(--marine-bg) 100%);
    padding: 5rem 0 2rem;
    margin-top: 0;
    border-top: 1px solid var(--marine-border);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--marine-primary), #0ea5e9);
}

body.dark .footer {
    background: linear-gradient(180deg, #020617 0%, #0f172a 100%);
    border-top-color: #334155;
}

.footer .container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .footer .container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .footer .container {
        padding: 0 2rem;
    }
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

@media (min-width: 640px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-content {
        grid-template-columns: 1.5fr 1fr 1fr;
        gap: 3rem;
    }
}

.footer-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: right;
}

[dir="ltr"] .footer-section {
    text-align: left;
    align-items: flex-start;
}

.footer-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-brand-icon {
    width: 3rem;
    height: 3rem;
    background: var(--marine-primary);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.footer-brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.footer-description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--marine-text-muted);
    margin-bottom: 1rem;
    max-width: 22rem;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.social-link {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--marine-border);
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s;
}

body.dark .social-link {
    background: #1e293b;
}

.social-link:hover {
    background: var(--marine-primary);
    color: white;
    transform: translateY(-2px);
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--marine-primary);
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 2.5rem;
    height: 3px;
    background: var(--marine-primary);
    border-radius: 2px;
}

[dir="ltr"] .footer-title::after {
    right: auto;
    left: 0;
}

.footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
}

.footer-menu a {
    color: var(--marine-text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-menu a:hover {
    color: var(--marine-primary);
}

.footer-contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
}

.footer-contact-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--marine-text-muted);
    font-size: 0.95rem;
}

.footer-contact-list i {
    color: var(--marine-primary);
    font-size: 1rem;
    width: 1.25rem;
    flex-shrink: 0;
}

.footer-contact-list a {
    color: var(--marine-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-contact-list a:hover {
    color: var(--marine-primary);
}

.footer-bottom {
    padding-top: 1.5rem;
    margin-top: 1rem;
    border-top: 1px solid var(--marine-border);
}

body.dark .footer-bottom {
    border-top-color: #334155;
}

.footer-bottom-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.footer-copyright {
    color: var(--marine-text-muted);
    font-size: 0.875rem;
    margin: 0;
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.footer-legal a {
    color: var(--marine-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-legal a:hover {
    color: var(--marine-primary);
}

.footer-legal .separator {
    color: var(--marine-text-muted);
    opacity: 0.6;
}

/* ========== Responsive & Global ========== */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    scroll-padding-top: 5.5rem;
}

img {
    max-width: 100%;
    height: auto;
}

/* Responsive - Hero */
@media (max-width: 479px) {
    .hero-bg h1 {
        font-size: 1.75rem;
    }
    .hero-bg .hero-subtitle {
        font-size: 1rem;
    }
    .hero-bg .btn-hero-primary,
    .hero-bg .btn-hero-outline {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* Responsive - About */
@media (max-width: 639px) {
    .about-section {
        padding: 3rem 0;
    }
    .about-title {
        font-size: 1.5rem;
    }
    .about-features {
        grid-template-columns: 1fr;
    }
}

/* Responsive - Services */
@media (max-width: 767px) {
    #services {
        padding: 4rem 0;
    }
    #services .service-card {
        padding: 1.5rem;
    }
}

/* Responsive - Portfolio / Gallery */
@media (max-width: 639px) {
    #portfolio .gallery-grid {
        grid-template-columns: 1fr;
    }
    #portfolio .gallery-item.gallery-item-large {
        grid-column: span 1;
        grid-row: span 1;
    }
    .video-cards {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 479px) {
    #portfolio .video-block {
        padding: 1.5rem;
    }
}

/* فيديوهات مكتبة الفيديو - عرض كامل */
#portfolio .video-block .video-cards {
    grid-column: 1 / -1;
}

/* نافذة تشغيل الفيديو */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0,0,0,0.85);
}
.video-modal-backdrop {
    position: absolute;
    inset: 0;
    cursor: pointer;
}
.video-modal-content {
    position: relative;
    width: 100%;
    max-width: 900px;
    background: #111;
    border-radius: 0.5rem;
    overflow: hidden;
}
.video-modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 10;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    background: rgba(0,0,0,0.6);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 50%;
}
[dir="rtl"] .video-modal-close { right: auto; left: 0.5rem; }

/* Responsive - Location */
@media (max-width: 479px) {
    #location .map-wrap {
        height: 20rem;
    }
}
@media (max-width: 639px) {
    #location .location-grid {
        gap: 2rem;
    }
}

/* Responsive - Footer */
@media (max-width: 639px) {
    .footer {
        padding: 3rem 0 1.5rem;
    }
    .footer-section {
        align-items: center;
        text-align: center;
    }
    [dir="ltr"] .footer-section {
        text-align: center;
        align-items: center;
    }
    .footer-menu,
    .footer-contact-list {
        align-items: center;
    }
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
}

/* توسيط المحتوى بالكامل على شاشات الموبايل */
@media (max-width: 767px) {
    .section-wrap {
        margin-left: auto;
        margin-right: auto;
    }
    .section-header,
    .services-header,
    .gallery-section-header,
    .contact-section-header {
        text-align: center;
    }
    .section-title,
    .section-desc,
    .section-badge {
        margin-left: auto;
        margin-right: auto;
    }
    .section-divider {
        margin-left: auto;
        margin-right: auto;
    }
    .about-content {
        text-align: center;
    }
    .about-title,
    .about-lead,
    .about-badge {
        margin-left: auto;
        margin-right: auto;
    }
    .about-features {
        justify-content: center;
    }
    .hero-content {
        text-align: center;
    }
    .hero-bg .hero-badge,
    .hero-bg h1,
    .hero-bg .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-buttons {
        justify-content: center;
    }
    #services .services-grid {
        place-items: center;
    }
    #services .service-card {
        text-align: center;
    }
    #location .location-grid {
        text-align: center;
    }
    #contact .contact-section-header + * {
        margin-left: auto;
        margin-right: auto;
    }
    .contact-form-wrap,
    .contact-info-block {
        margin-left: auto;
        margin-right: auto;
    }
}
