/* ============================
   MERDIGIT — FRONTEND CSS
   ============================ */
:root {
    --black: #0a0a0a;
    --dark: #1c0732;
    --dark2: #161616;
    --white: #ffffff;
    --gray: #888888;
    --light-gray: #222222;
    --accent: #000000;
    --accent2: #ff3c00;
    --font-display: 'Montserrat', sans-serif;
    --font-body: 'Montserrat', sans-serif;
    --primirey: #D02EF4;
    --second: #f44647;
    --third: #fbb03b;
    --background: linear-gradient(180deg, #1c0732, #511758, #1c0732);
    --radius: 12px;
    --transition: 0.3s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background: var(--background);
    color: var(--white);
    font-family: var(--font-body);
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* RESPONSIVE VISIBILITY */
@media (max-width: 768px) { .hide-mobile { display: none !important; } }
@media (min-width: 769px) { .hide-web { display: none !important; } }

/* ====== NAVBAR ====== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: background var(--transition), padding var(--transition);
}
.navbar.scrolled {
    background: var(--white);
    backdrop-filter: blur(12px);
    padding: 12px 0;
    border-bottom: 1px solid #222;
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo .logo-text {
    font-family: var(--font-display);
    font-size: 28px;
    letter-spacing: 2px;
    color: var(--white);
}
.nav-logo img { height: 40px; }
.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}
.nav-links a {
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--white);
    transition: color var(--transition);
}
.nav-links a:hover { color: var(--primirey); }
.navbar.scrolled .nav-links a { color: var(--dark); }

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    transition: var(--transition);
}
.navbar.scrolled .hamburger span { background: var(--dark); }

.mobile-menu {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--black);
    z-index: 999;
    padding: 80px 32px;
}
.mobile-menu.open { display: flex; align-items: center; justify-content: center; }
.mobile-menu ul { list-style: none; text-align: center; }
.mobile-menu ul li { margin: 20px 0; }
.mobile-menu ul li a {
    font-family: var(--font-display);
    font-size: 42px;
    letter-spacing: 3px;
    color: var(--white);
    transition: color var(--transition);
}
.mobile-menu ul li a:hover { color: var(--accent); }

/* ====== BUTTONS ====== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primirey);
    color: var(--white);
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(232, 255, 0, 0.3);
}

/* ====== HERO ====== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.hero-bg { position: absolute; inset: 0; }
.hero-bg::before { content: ''; position: absolute; inset: 0; background: none; }
.hero-grid-lines {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    min-height: 80vh;
}
.hero-text { padding-right: 40px; }
.hero-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    transition: transform 0.3s ease;
}
.hero-image img:hover { transform: translateY(-5px); }

.hero-eyebrow {
    font-family: var(--font-display);
    font-size: 18px;
    letter-spacing: 6px;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 16px;
    animation: fadeUp 0.8s ease both;
}
.hero-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(40px, 10vw, 70px);
    line-height: 1.2;
    letter-spacing: -1px;
    margin-bottom: 24px;
    animation: fadeUp 0.8s 0.1s ease both;
}
.hero-title-span {
    background: var(--primirey);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}
.text-primary { color: var(--primirey); }
.hero-subtitle {
    font-size: 18px;
    line-height: 1.6;
    color: var(--gray);
    max-width: 560px;
    margin-bottom: 40px;
    animation: fadeUp 0.8s 0.2s ease both;
}
.hero-cta {
    animation: fadeUp 0.8s 0.3s ease both;
    background-color: #FFFFFF;
    color: #BD44BF;
    border-radius: 5px;
    text-transform: none;
}
.hero-social {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 10;
}
.hero-social a {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--white);
    writing-mode: vertical-rl;
    transition: color var(--transition);
}
.hero-social a:hover { color: var(--accent); }

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

/* ====== SECTION COMMON ====== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}
.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(40px, 6vw, 80px);
    letter-spacing: 2px;
    margin-bottom: 16px;
}
.section-header p {
    color: var(--white);
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}
.eyebrow {
    display: inline-block;
    font-size: 12px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

/* ====== SECOND BACKGROUND ====== */
.second-background {
    background-image: url("/storage/section-backgrounds/sectiontwobackground.svg");
    background-size: cover;
    background-position: center;
    width: 100%;
    height: 270px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.social-icons {
    position: absolute;
    right: 30px;
    bottom: 35%;
    transform: translateY(50%);
    display: flex;
    flex-direction: row;
    gap: 0;
}
.social-icons a {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    backdrop-filter: blur(8px);
    transition: 0.3s;
}
.social-icons svg {
    width: 22px;
    height: 22px;
    fill: #96559c;
}

/* ====== THIRD BACKGROUND (Stats) ====== */
.third-background {
    background-image: url("/storage/section-backgrounds/statbackground.svg");
    background-size: cover;
    background-position: center;
    width: 100%;
    height: 450px;
    position: relative;
    display: flex;
    align-items: center;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
    padding: 0;
}
.stat-item {
    padding: 48px 32px;
    text-align: center;
}
.stat-number {
    display: block;
    font-size: 35px;
    font-weight: 400;
    line-height: 1.8em;
    letter-spacing: 2px;
    color: #000;
}
.stat-label {
    color: #000;
    font-size: 15px;
    font-weight: 400;
    line-height: 2.4em;
}

/* ====== SERVICES ====== */
.services {
    padding: 100px 0 60px;
    overflow: hidden;
    background-size: contain !important;
    background-position: center;
    background-repeat: no-repeat;
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 40px;
    margin: 0 20px;
    padding: 20px 24px 60px;
}
.service-tag {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 2px;
    color: var(--white);
    white-space: normal;
    padding: 25px 0;
    text-align: center;
    transition: color var(--transition), transform var(--transition);
}
.service-tag:hover {
    color: var(--primirey);
    transform: translateY(-2px);
}

/* ====== PRODUCTION ====== */
.production {
    padding: 100px 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin-top: 100px;
}
.production-header {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 40px;
    align-items: flex-start;
}
.production-copy {
    flex: 1 1 45%;
    max-width: 540px;
}
.production-copy h2 {
    font-family: var(--font-display);
    font-size: clamp(30px, 5vw, 50px);
    letter-spacing: 3px;
    font-weight: 700;
    margin-bottom: 20px;
}
.production-copy h3 {
    font-family: var(--font-display);
    font-size: clamp(20px, 3vw, 30px);
    margin-bottom: 18px;
}
.production-copy p {
    color: var(--white);
    line-height: 1.8;
    max-width: 500px;
}
.production-main-video {
    flex: 1 1 50%;
    min-width: 280px;
}
.production-main-video video,
.production-main-video .production-video-fallback {
    width: 100%;
    border-radius: 16px;
    max-height: 320px;
    background: #000;
    display: block;
}
.production-main-video video { object-fit: cover; }
.production-video-fallback {
    padding: 80px 24px;
    color: var(--gray);
    text-align: center;
}
.production-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.production-thumb {
    position: relative;
    border: none;
    padding: 0;
    cursor: pointer;
    background: transparent;
    overflow: hidden;
    border-radius: 14px;
}
.production-thumb img,
.production-thumb .thumb-empty {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
    border-radius: 14px;
    background: #111;
}
.thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-size: 14px;
}
.production-thumb .thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.2);
    transition: background var(--transition);
}
.production-thumb:hover .thumb-overlay { background: rgba(0,0,0,0.35); }
.production-thumb .play-btn.small {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--black);
    font-size: 14px;
}

/* ====== PORTFOLIO ====== */
.portfolio {
    position: relative;
    padding: 100px 0;
    overflow: hidden;
    min-height: auto;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.portfolio-card {
    margin-bottom: 150px;
    margin-top: 200px;
    padding-bottom: 10px;
}
.section-header--portfolio {
    margin-bottom: 28px;
}
.section-header--portfolio h2 {
    color: var(--primirey);
    font-size: clamp(2rem, 4vw, 4rem);
    margin-bottom: 0;
}
.section-header--centered { text-align: center; }

/* Tabs */
.portfolio-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 40px;
}
.portfolio-tab {
    padding: 8px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-family: var(--font-body);
    color: var(--dark);
    transition: all .2s;
    min-width: 110px;
}
.portfolio-tab.active {
    background: var(--primirey);
    color: #fff;
}
.portfolio-tab:hover:not(.active) {
    background: rgba(208, 46, 244, 0.2);
}

/* Panels */
.portfolio-panel { display: none; }
.portfolio-panel.active { display: block; }

/* Slider row */
.slider-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.slides-container {
    flex: 1;
    min-width: 0;
}

/* Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.portfolio-grid.hidden { display: none; }
.portfolio-grid.visible { display: grid; }

/* Items */
.portfolio-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    border-radius: 12px;
    cursor: pointer;
    background: rgba(255,255,255,0.02);
    border: none;
    padding: 0;
    display: block;
    width: 100%;
}
.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
    display: block;
}
.portfolio-item:hover img { transform: scale(1.08); }
.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.82) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition);
    text-align: center;
    padding: 20px;
}
.portfolio-item:hover .portfolio-overlay { opacity: 1; }
.portfolio-overlay h4 { font-size: 18px; margin-bottom: 8px; color: #fff; }
.portfolio-overlay p {
    font-size: 12px;
    color: rgba(255,255,255,0.85);
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

/* Nav buttons */
.slider-nav {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity .2s;
}
.slider-nav:hover { opacity: 1; }
.slider-nav:disabled { opacity: 0.2; cursor: default; }
.slider-nav svg { width: 44px; height: 44px; display: block; }
.slider-nav-placeholder { flex-shrink: 0; width: 44px; height: 44px; }

/* Dots */
.slide-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 50px;
    margin-bottom: 35px;
}
.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gray);
    cursor: pointer;
    transition: background .2s;
}
.dot.active { background: var(--primirey); }


/* Gallery Modal */
.image-modal .modal-content {
    position: relative;
    max-width: 1000px;
    width: 90vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.image-modal img {
    display: block;
    width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: var(--radius);
    transition: opacity 0.25s ease;
}

.image-modal img.fade {
    opacity: 0;
}

/* السهامين */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10;
}
.gallery-nav:hover { background: rgba(0,0,0,0.8); }
.gallery-nav svg { width: 36px; height: 36px; display: block; }
.gallery-prev { left: -60px; }
.gallery-next { right: -60px; }

/* Footer (counter + dots) */
.gallery-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
}

#galleryCounter {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
}

.gallery-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
}
.gallery-dots .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: background 0.2s;
}
.gallery-dots .dot.active { background: var(--primirey); }

/* على الموبايل السهامين جوا */
@media (max-width: 768px) {
    .gallery-prev { left: 6px; }
    .gallery-next { right: 6px; }
    .gallery-nav {
        width: 38px;
        height: 38px;
        padding: 4px;
        background: rgba(0,0,0,0.6);
    }
    .gallery-nav svg { width: 28px; height: 28px; }
}

/* ====== GALLERY MODAL ====== */
.image-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.image-modal.open { display: flex; }

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.92);
    cursor: pointer;
}

.gallery-modal-inner {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 12px;
    width: 92vw;
    max-width: 1100px;
    max-height: 88vh;
}

/* زرار الإغلاق */
.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
}

/* ====== THUMBNAILS على الشمال ====== */
.gallery-thumbs {
    width: 90px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    max-height: 88vh;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
    padding-right: 4px;
}
.gallery-thumbs::-webkit-scrollbar { width: 4px; }
.gallery-thumbs::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

.gallery-thumb {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s, opacity 0.2s;
    opacity: 0.55;
}
.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.gallery-thumb:hover { opacity: 0.85; }
.gallery-thumb.active {
    border-color: var(--primirey);
    opacity: 1;
}

/* ====== MAIN IMAGE على اليمين ====== */
.gallery-main {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

#modalImage {
    display: block;
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 10px;
    transition: opacity 0.2s ease;
}
#modalImage.fade { opacity: 0; }

/* السهامين */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    padding: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 5;
}
.gallery-nav:hover { background: rgba(0,0,0,0.85); }
.gallery-nav svg { width: 34px; height: 34px; display: block; }
.gallery-prev { left: 8px; }
.gallery-next { right: 8px; }
.gallery-nav[style*="none"] { display: none !important; }

/* العداد */
.gallery-counter {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.65);
    font-size: 12px;
    background: rgba(0,0,0,0.4);
    padding: 3px 10px;
    border-radius: 20px;
}

/* ====== MOBILE ====== */
@media (max-width: 768px) {
    .gallery-modal-inner {
        flex-direction: column-reverse;
        width: 95vw;
        max-height: 92vh;
        gap: 8px;
    }

    .gallery-thumbs {
        width: 100%;
        flex-direction: row;
        max-height: 70px;
        overflow-x: auto;
        overflow-y: hidden;
        padding-right: 0;
        padding-bottom: 4px;
    }

    .gallery-thumb {
        width: 60px;
        height: 60px;
        flex-shrink: 0;
    }

    .gallery-main { max-height: 65vh; }

    #modalImage { max-height: 62vh; }

    .gallery-prev { left: 4px; }
    .gallery-next { right: 4px; }
    .gallery-nav { width: 36px; height: 36px; }
    .gallery-nav svg { width: 26px; height: 26px; }

    .modal-close { top: -36px; font-size: 24px; }
}
/* ====== CLIENTS ====== */
.clients {
    position: relative;
    padding: 120px 0 100px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.eyebrow--light {
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.clients-title {
    color: var(--primirey);
    font-size: clamp(2.4rem, 3.5vw, 3.6rem);
    margin-bottom: 16px;
    font-weight: 700;
    letter-spacing: -1px;
}
.clients-subtitle {
    color: rgba(255,255,255,0.65);
    font-size: 15px;
    max-width: 600px;
    margin: 0 0 40px;
    line-height: 1.6;
}
.clients-header {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 40px;
    align-items: flex-start;
}
.clients-header-left {
    flex: 0 0 calc(30% - 40px);
    padding-top: 55px;
}
.clients-header-right {
    flex: 0 0 calc(70% - 40px);
}
.clients-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.client-logo {
    border: 1px solid rgba(255,255,255,0.2);
    text-align: center;
    height: 160px;
    width: 20%;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0;
    margin-bottom: 0;
    padding: 15px;
    transition: all 0.4s;
    animation: fadeIn 1.25s ease both;
    animation-delay: 0.8s;
}
.client-logo img {
    max-width: 90px;
    max-height: 90px;
    object-fit: contain;
    margin: auto;
    transition: all 0.4s;
}
.client-logo:hover { background: rgba(255,255,255,0.05); }

.testimonials-full-section {
    width: 100%;
    backdrop-filter: blur(8px);
    padding: 80px 24px;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    margin-top: 150px;
}
.testimonials-slider {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}
.testimonial {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(12px);
    padding: 40px 32px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}
.testimonial:hover {
    background: rgba(255,255,255,0.08);
    transform: translateY(-8px);
    border-color: rgba(255,255,255,0.2);
}
.testimonial-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}
.testimonial p { color: rgba(255,255,255,0.9); font-size: 16px; line-height: 1.8; margin: 0; font-style: italic; }
.testimonial-author { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.testimonial-author img {
    width: 56px; height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.15);
}
.testimonial-author h5 { font-size: 15px; margin: 0; color: #fff; font-weight: 600; }
.testimonial-author span { font-size: 13px; color: rgba(255,255,255,0.65); }

/* ====== CONTACT ====== */
.contact {
    padding: 100px 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}
.contact-info h2 {
    font-family: var(--font-display);
    font-size: 64px;
    line-height: 1;
    margin-bottom: 40px;
}
.contact-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--white);
    display: block;
    margin-bottom: 16px;
}
.contact-details p,
.contact-details a {
    display: block;
    color: var(--gray);
    font-size: 16px;
    margin-bottom: 8px;
    transition: color var(--transition);
}
.contact-details a:hover { color: var(--white); }
.contact-info .social-links { margin-top: 40px; display: flex; gap: 16px; }
.contact-info .social-links a {
    width: 40px; height: 40px;
    border: 1px solid #333;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--gray);
    transition: all var(--transition);
}
.contact-info .social-links a:hover { border-color: var(--accent); color: var(--primirey); }
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form input,
.contact-form textarea {
    background: var(--white);
    border: 1px solid #222;
    color: var(--dark);
    padding: 16px;
    font-family: var(--font-body);
    font-size: 14px;
    border-radius: var(--radius);
    transition: border-color var(--transition);
    width: 100%;
    outline: none;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--accent); }
.contact-form textarea { resize: vertical; }

/* ====== FOOTER ====== */
.footer { padding: 80px 0 0; border-top: 1px solid var(--gray); }
.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}
.footer-brand .logo-text {
    font-family: var(--font-display);
    font-size: 32px;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 16px;
}
.footer-brand .footer-logo { height: 40px; margin-bottom: 16px; }
.footer-brand p { color: var(--gray); line-height: 1.6; margin-bottom: 24px; }
.footer-brand .social-links { display: flex; gap: 12px; }
.footer-brand .social-links a {
    width: 36px; height: 36px;
    border: 1px solid #333;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--gray); font-size: 13px;
    transition: all var(--transition);
}
.footer-brand .social-links a:hover { border-color: var(--accent); color: var(--primirey); }
.footer-contact h4,
.footer-news h4 {
    font-family: var(--font-display);
    font-size: 20px;
    letter-spacing: 2px;
    margin-bottom: 20px;
}
.footer-contact p { color: var(--gray); margin-bottom: 8px; font-size: 14px; }
.footer-contact i { margin-right: 8px; color: var(--gray); }
.footer-post { margin-bottom: 16px; }
.footer-post a { color: var(--gray); font-size: 14px; line-height: 1.4; display: block; margin-bottom: 4px; transition: color var(--transition); }
.footer-post a:hover { color: var(--white); }
.footer-post small { color: #555; font-size: 12px; }
.footer-bottom {
    border-top: 1px solid #1a1a1a;
    padding: 24px;
    text-align: center;
    color: var(--gray);
    font-size: 13px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ====== MODALS ====== */
.video-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
}
.video-modal.open { display: flex; align-items: center; justify-content: center; }
.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.9);
    cursor: pointer;
}
.modal-content {
    position: relative;
    z-index: 1;
    width: 90vw;
    max-width: 900px;
}
.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
}
#modalVideo, #modalImage { width: 100%; border-radius: var(--radius); }
.image-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
}
.image-modal.open { display: flex; align-items: center; justify-content: center; }
.image-modal .modal-content { max-width: 1000px; width: 90vw; }
.image-modal img {
    display: block;
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius);
}

/* ====== MISC ====== */
.bg-control { display: grid; gap: 10px; }
.bg-preview {
    min-height: 80px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    background-color: rgba(255,255,255,0.03);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.6);
    font-size: 12px;
    overflow: hidden;
}
.bg-preview.has-image { color: transparent; }
.bg-color-preview { min-height: 40px; border-radius: 6px; }

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

/* ================================================
   RESPONSIVE — TABLET (769px – 1024px)
   ================================================ */
@media (max-width: 1200px) {
    .services-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 769px) and (max-width: 1024px) {
    /* Hero */
    .hero-grid { gap: 32px; }
    .hero-text { padding-right: 20px; }
    .hero-title { font-size: clamp(36px, 7vw, 56px); }

    /* Services */
    .services-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 24px; }

    /* Stats */
    .third-background { height: auto; min-height: 300px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); padding: 60px 0; }

    /* Production */
    .production-header { flex-direction: column; }
    .production-copy { max-width: 100%; }
    .production-thumbnails { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    /* Portfolio */
    .portfolio-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }

    /* Clients */
    .clients-header { flex-direction: column; }
    .clients-header-left,
    .clients-header-right { flex: none; width: 100%; }
    .clients-header-left { padding-top: 0; }
    .client-logo { width: 25%; }

    /* Testimonials */
    .testimonials-slider { grid-template-columns: repeat(2, 1fr); }
    .testimonials-full-section { margin-left: 0; margin-right: 0; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }

    /* Contact */
    .contact-grid { gap: 40px; }
}

/* ================================================
   RESPONSIVE — MOBILE (max 768px)
   ================================================ */
@media (max-width: 768px) {
        .hero-grid{
            grid-template-areas:
        "photo"
        "text";

    }
    
.grid-container {
        /* الترتيب في الديسكتوب: الكلام يسار والصورة يمين */
        grid-template-columns: 1fr 1fr;
        grid-template-areas: 
            "text photo";
    }
    .hero-title { grid-area: text; }
.hero-image { grid-area: photo; }

    /* === GENERAL === */
    .container { padding: 0 16px; }
    section { overflow-x: hidden; }

    /* === NAVBAR === */
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .hero-social { display: none; }

    /* === HERO === */
    .hero {
        min-height: auto;
        padding-top: 90px;
        padding-bottom: 50px;
    }
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 28px;
        min-height: auto;
        text-align: center;
    }
    .hero-text { padding-right: 0; order: 1; }
    .hero-image { order: 2; max-width: 85%; margin: 0 auto; }
    .hero-title {
        font-size: clamp(32px, 9vw, 48px);
        letter-spacing: -1px;
        line-height: 1.05;
    }
    .hero-eyebrow { font-size: 12px; letter-spacing: 3px; }
    .hero-subtitle { font-size: 14px; margin: 0 auto 24px; }
    .hero-cta { width: 100%; }

    /* === SECOND BACKGROUND === */
    .second-background {
        height: auto !important;
        min-height: 140px;
        padding: 24px 16px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .social-icons {
        position: relative !important;
       right: 1px;
        top: 20px !important;
        transform: none !important;
        justify-content: right;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }
    .social-icons a { width: 15px; height: 15px; }

    /* === SERVICES === */
    .services { padding: 50px 0 30px; }
    .services .section-header { margin-bottom: 20px; }
    .services-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0 !important;
        margin: 0 !important;
        padding: 0 0 30px !important;
    }
    .service-tag {
        font-size: 13px;
        padding: 16px 8px;
        letter-spacing: 0.5px;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    /* === THIRD BACKGROUND / STATS === */
    .third-background {
        height: auto !important;
        min-height: auto !important;
        padding: 10px 0;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        padding: 50px 0 !important;
        gap: 0;
        margin: 50px 0;
    }
    .stat-item {
        padding: 24px 12px;
        /* border-right: 1px solid rgba(0,0,0,0.1);
        border-bottom: 1px solid rgba(0,0,0,0.1); */
    }
    .stat-item:nth-child(2n) { border-right: none; }
    .stat-number { font-size: 15px; line-height: 1.4; }
    .stat-label { font-size: 11px; line-height: 1.8; }

    /* === PRODUCTION === */
    .production { padding: 50px 0; }
    .production-header { flex-direction: column; gap: 20px; margin-bottom: 20px; }
    .production-copy { flex: none; max-width: 100%; text-align: center; }
    .production-copy h2 { font-size: 24px; margin-bottom: 10px; }
    .production-copy h3 { font-size: 18px; margin-bottom: 10px; }
    .production-copy p { font-size: 13px; max-width: 100%; }
    .production-main-video { flex: none; min-width: unset; width: 100%; }
    .production-main-video video { max-height: 220px; border-radius: 10px; }
    .production-thumbnails {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
        margin-top: 12px;
    }
    .production-thumb img,
    .production-thumb .thumb-empty { height: 110px; border-radius: 10px; }
    .production-thumb .play-btn.small { width: 32px; height: 32px; font-size: 11px; }

    /* === PORTFOLIO === */
    .portfolio { padding: 50px 0; min-height: auto; }
    .portfolio-card { margin-bottom: 45px; padding-bottom: 45px; }
    .section-header--portfolio { margin-bottom: 16px; }
    .section-header--portfolio h2 { font-size: 1.6rem; }
    .portfolio-tabs { gap: 6px; padding: 0 4px; margin-bottom: 14px; }
    .portfolio-tab { padding: 6px 12px; font-size: 12px; min-width: auto; }
    .slider-row { gap: 6px; }
    .portfolio-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }
    .slider-nav { width: 32px !important; height: 32px !important; }
    .slider-nav svg { width: 32px !important; height: 32px !important; }
    .slider-nav-placeholder { width: 32px; height: 32px; }

    /* === SECTION HEADER === */
    .section-header { margin-bottom: 28px; }
    .section-header h2 { font-size: clamp(24px, 7vw, 40px); margin-bottom: 10px; }
    .section-header p { font-size: 13px; }

    /* === CLIENTS === */
    .clients { padding: 50px 0 40px; }
    .clients-header { flex-direction: column; gap: 20px; margin-bottom: 20px; }
    .clients-header-left {
        flex: none;
        width: 100%;
        padding-top: 0;
        text-align: center;
    }
    .clients-header-right { flex: none; width: 100%; }
    .clients-title { font-size: 1.8rem; margin-bottom: 10px; }
    .clients-subtitle { font-size: 13px; margin-bottom: 16px; }
    .clients-grid {
        display: flex !important;
        flex-wrap: wrap !important;
    }
    .client-logo {
        width: 33.333% !important;
        height: 100px !important;
        margin: 0 !important;
        padding: 12px !important;
        line-height: normal !important;
    }
    .client-logo img {
        max-width: 60px !important;
        max-height: 50px !important;
    }

    /* === TESTIMONIALS === */
    .testimonials-full-section {
        padding: 30px 12px;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100%;
    }
    .testimonials-slider {
        grid-template-columns: 1fr !important;
        gap: 16px;
        padding: 0;
    }
    .testimonial { padding: 24px 16px; min-height: auto; border-radius: 14px; }
    .testimonial p { font-size: 13px; line-height: 1.7; }
    .testimonial-author h5 { font-size: 13px; }
    .testimonial-author span { font-size: 12px; }

    /* === CONTACT === */
    .contact { padding: 50px 0; }
    .contact-grid { grid-template-columns: 1fr; gap: 28px; }
    .contact-info h2 { font-size: 32px; margin-bottom: 20px; }
    .contact-details a,
    .contact-details p { font-size: 14px; }
    .form-row { grid-template-columns: 1fr; gap: 12px; }
    .contact-form input,
    .contact-form textarea { font-size: 14px; padding: 14px; }
    .contact-form .btn-primary { width: 100%; }

    /* === FOOTER === */
    .footer { padding: 40px 0 0; }
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 28px;
        padding: 0 16px;
        margin-bottom: 30px;
    }
    .footer-brand .logo-text { font-size: 24px; }
    .footer-brand p { font-size: 13px; }
    .footer-contact h4,
    .footer-news h4 { font-size: 16px; margin-bottom: 12px; }
    .footer-contact p { font-size: 13px; }
    .footer-bottom { font-size: 11px; padding: 14px 16px; }

    /* === MODAL === */
    .modal-content,
    .image-modal .modal-content { width: 95vw; }
    .modal-close { font-size: 20px; top: -32px; }

        .slides-container {
        max-height: calc(1.5* ((50vw - 20px) * 0.75 + 8px));
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: var(--primirey) transparent;
        scroll-snap-type: y mandatory;
    }

    .slides-container .portfolio-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        align-content: start;
    }

    .slides-container .portfolio-item {
        scroll-snap-align: start;
    }
}

/* ================================================
   RESPONSIVE — SMALL PHONES (max 480px)
   ================================================ */
@media (max-width: 480px) {



.hero-title { font-size: clamp(28px, 8vw, 38px); }
    .hero-image { max-width: 95%; }
    .service-tag { font-size: 10px; padding: 14px 0px; }

   
    .portfolio-tab { font-size: 11px; padding: 5px 10px; }

    .production-thumbnails { grid-template-columns: 1fr !important; }
    .production-thumb img,
    .production-thumb .thumb-empty { height: 160px; }

    .client-logo { width: 40% !important; }

   
    .stat-item { border-right: none !important; }

    .contact-info h2 { font-size: 26px; }
}


/* ====== BLOG INDEX ====== */
.blog-index-hero {
    padding: 140px 0 60px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.blog-index-hero-inner { max-width: 700px; }
.blog-index-title {
    font-family: var(--font-display);
    font-size: clamp(36px, 6vw, 72px);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 16px;
    letter-spacing: -2px;
}
.blog-index-subtitle {
    font-size: 18px;
    color: rgba(255,255,255,0.55);
    line-height: 1.6;
}

/* Filter Bar */
.blog-filter-section { padding: 32px 0; }
.blog-filter-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Search */
.blog-search-form { flex-shrink: 0; }
.blog-search-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 100px;
    padding: 10px 18px;
    transition: border-color 0.2s;
    min-width: 240px;
}
.blog-search-wrap:focus-within { border-color: var(--primirey); }
.blog-search-wrap i { color: rgba(255,255,255,0.4); font-size: 13px; flex-shrink: 0; }
.blog-search-wrap input {
    background: none;
    border: none;
    outline: none;
    color: var(--white);
    font-size: 14px;
    font-family: var(--font-body);
    width: 100%;
}
.blog-search-wrap input::placeholder { color: rgba(255,255,255,0.35); }
.search-clear {
    color: rgba(255,255,255,0.4);
    font-size: 12px;
    flex-shrink: 0;
    transition: color 0.2s;
}
.search-clear:hover { color: var(--white); }

/* Categories */
.blog-cats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.blog-cat-btn {
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 13px;
    color: rgba(255,255,255,0.65);
    border: 1px solid rgba(255,255,255,0.12);
    background: transparent;
    transition: all 0.2s;
    white-space: nowrap;
}
.blog-cat-btn:hover { color: var(--white); border-color: rgba(255,255,255,0.3); }
.blog-cat-btn.active {
    background: var(--primirey);
    border-color: var(--primirey);
    color: #fff;
}

/* Results info */
.blog-index-content { padding: 0 0 100px; }
.blog-results-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    color: rgba(255,255,255,0.45);
    font-size: 13px;
}
.clear-filters {
    color: rgba(255,255,255,0.45);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}
.clear-filters:hover { color: var(--primirey); }

/* Grid */
.blog-index-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* Card */
.blog-index-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}
.blog-index-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

/* Card image */
.blog-index-card-img {
    position: relative;
    display: block;
    aspect-ratio: 16/9;
    overflow: hidden;
}
.blog-index-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.blog-index-card:hover .blog-index-card-img img { transform: scale(1.05); }
.blog-index-card-img-placeholder {
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.2);
    font-size: 32px;
}
.blog-index-card-cat {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primirey);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 100px;
}

/* Card body */
.blog-index-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 12px;
}
.blog-index-card-meta {
    display: flex;
    gap: 16px;
    color: rgba(255,255,255,0.4);
    font-size: 12px;
}
.blog-index-card-meta i { margin-right: 5px; color: var(--primirey); }
.blog-index-card-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    flex: 1;
}
.blog-index-card-title a {
    color: var(--white);
    transition: color 0.2s;
}
.blog-index-card-title a:hover { color: var(--primirey); }
.blog-index-card-excerpt {
    color: rgba(255,255,255,0.55);
    font-size: 14px;
    line-height: 1.6;
}
.blog-index-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primirey);
    font-size: 13px;
    font-weight: 600;
    margin-top: auto;
    transition: gap 0.2s;
}
.blog-index-read-more:hover { gap: 12px; }

/* Empty state */
.blog-empty {
    text-align: center;
    padding: 80px 24px;
    color: rgba(255,255,255,0.4);
}
.blog-empty i { font-size: 48px; margin-bottom: 20px; display: block; }
.blog-empty h3 { font-size: 22px; color: var(--white); margin-bottom: 10px; }
.blog-empty p { font-size: 15px; }

/* Pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 60px;
    flex-wrap: wrap;
}
.page-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    transition: all 0.2s;
    cursor: pointer;
}
.page-btn:hover { border-color: var(--primirey); color: var(--primirey); }
.page-btn--active {
    background: var(--primirey);
    border-color: var(--primirey);
    color: #fff;
}
.page-btn--disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 1024px) {
    .blog-index-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .blog-index-hero { padding: 110px 0 40px; }
    .blog-index-title { letter-spacing: -1px; }
    .blog-index-subtitle { font-size: 15px; }
    .blog-filter-bar { flex-direction: column; align-items: stretch; }
    .blog-search-wrap { min-width: unset; }
    .blog-index-grid { grid-template-columns: 1fr; gap: 20px; }
    .blog-index-card-body { padding: 18px; }
    .blog-pagination { gap: 6px; }
    .page-btn { width: 36px; height: 36px; font-size: 13px; }
}

/* ====== BLOG DETAIL ====== */
.blog-detail-hero {
    padding: 140px 0 60px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.blog-detail-hero-inner {
    max-width: 860px;
}
.blog-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.55);
    font-size: 14px;
    margin-bottom: 24px;
    transition: color 0.2s;
}
.blog-back-link:hover { color: var(--primirey); }
.blog-back-link i { font-size: 12px; }

.blog-detail-meta { margin-bottom: 16px; }
.blog-detail-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 5vw, 52px);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 20px;
    color: var(--white);
}
.blog-detail-excerpt {
    font-size: 18px;
    color: rgba(255,255,255,0.65);
    line-height: 1.7;
    margin-bottom: 24px;
    max-width: 720px;
}
.blog-detail-info {
    display: flex;
    gap: 24px;
    color: rgba(255,255,255,0.45);
    font-size: 13px;
}
.blog-detail-info i { margin-right: 6px; color: var(--primirey); }

/* Featured Image */
.blog-detail-image-section { padding: 40px 0 0; }
.blog-detail-featured-img {
    border-radius: 16px;
    overflow: hidden;
    max-height: 500px;
}
.blog-detail-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Layout */
.blog-detail-content-section { padding: 60px 0 100px; }
.blog-detail-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 60px;
    align-items: start;
}

/* Article body */
.blog-detail-body {
    color: rgba(255,255,255,0.85);
    font-size: 16px;
    line-height: 1.9;
}
.blog-detail-body h1,
.blog-detail-body h2,
.blog-detail-body h3,
.blog-detail-body h4 {
    color: var(--white);
    font-family: var(--font-display);
    margin: 36px 0 16px;
    line-height: 1.3;
}
.blog-detail-body h2 { font-size: 28px; }
.blog-detail-body h3 { font-size: 22px; }
.blog-detail-body p { margin-bottom: 20px; }
.blog-detail-body img {
    width: 100%;
    border-radius: 10px;
    margin: 24px 0;
}
.blog-detail-body a {
    color: var(--primirey);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.blog-detail-body ul,
.blog-detail-body ol {
    padding-left: 24px;
    margin-bottom: 20px;
}
.blog-detail-body li { margin-bottom: 8px; }
.blog-detail-body blockquote {
    border-left: 3px solid var(--primirey);
    padding: 16px 24px;
    margin: 28px 0;
    background: rgba(208,46,244,0.06);
    border-radius: 0 8px 8px 0;
    color: rgba(255,255,255,0.75);
    font-style: italic;
    font-size: 17px;
}
.blog-detail-body pre {
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    margin: 24px 0;
    font-size: 14px;
}
.blog-detail-body code {
    background: rgba(255,255,255,0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
}

/* Sidebar */
.blog-detail-sidebar { position: sticky; top: 100px; }
.sidebar-widget {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 24px;
}
.sidebar-widget-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* Recent Posts */
.sidebar-post {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: opacity 0.2s;
}
.sidebar-post:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-post:hover { opacity: 0.75; }
.sidebar-post img,
.sidebar-post-img-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255,255,255,0.06);
    display: block;
}
.sidebar-post-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.sidebar-post-title {
    font-size: 13px;
    color: var(--white);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sidebar-post-date {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
}

/* Share buttons */
.sidebar-share {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.share-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s, transform 0.2s;
    text-decoration: none;
    font-family: var(--font-body);
}
.share-btn:hover { opacity: 0.85; transform: translateX(3px); }
.share-fb, .share-li, .share-tw { background: var(--primirey); color: #fff; }
.share-copy { background: rgba(255,255,255,0.08); color: var(--white); }

/* Mobile */
@media (max-width: 1024px) {
    .blog-detail-layout { grid-template-columns: 1fr; gap: 40px; }
    .blog-detail-sidebar { position: static; }
}
@media (max-width: 768px) {
    .blog-detail-hero { padding: 110px 0 40px; }
    .blog-detail-title { font-size: clamp(24px, 7vw, 36px); }
    .blog-detail-excerpt { font-size: 15px; }
    .blog-detail-info { flex-direction: column; gap: 8px; }
    .blog-detail-content-section { padding: 40px 0 60px; }
    .blog-detail-body { font-size: 15px; }
    .blog-detail-body h2 { font-size: 22px; }
    .blog-detail-body h3 { font-size: 18px; }
}