/* ===============================================
   MUSTAWHA — MAIN STYLESHEET
   =============================================== */
@import url('variables.css');
@import url('animations.css');

/* ── Reset & Base ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-primary);
    font-size: var(--fs-base);
    font-weight: var(--fw-regular);
    color: var(--color-text-dark);
    background: var(--color-light);
    line-height: 1.7;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font: inherit;
}

/* ── Utility ── */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding-inline: var(--section-px);
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-secondary);
    margin-bottom: var(--space-4);
}

.section-label::before {
    content: '';
    display: block;
    width: 2rem;
    height: 2px;
    border-radius: var(--radius-pill);
    background: var(--color-secondary);
}

.section-title {
    font-size: clamp(var(--fs-2xl), 4vw, var(--fs-3xl));
    font-weight: var(--fw-bold);
    line-height: 1.2;
    color: var(--color-text-dark);
}

.section-title.light {
    color: var(--color-white);
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0.85rem 2.2rem;
    border-radius: var(--radius-pill);
    font-family: var(--font-primary);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    letter-spacing: 0.03em;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--color-secondary);
    color: var(--color-white);
    box-shadow: var(--shadow-pink);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(249, 81, 131, 0.40);
}

.btn-outline {
    background: transparent;
    color: var(--color-secondary);
    border: 1.5px solid var(--color-secondary);
}

.btn-outline:hover {
    background: var(--color-secondary);
    color: var(--color-white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-pink);
}

.btn-outline-light {
    background: transparent;
    color: var(--color-white);
    border: 1.5px solid rgba(255, 255, 255, 0.50);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-white);
    color: var(--color-white);
    transform: translateY(-3px);
}

/* ======================================
   NAVBAR
   ====================================== */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-nav);
    padding: 1.4rem var(--section-px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background var(--transition-base), box-shadow var(--transition-base), padding var(--transition-base);
    animation: navbarIn 0.6s var(--ease-out) both;
}

#navbar.scrolled {
    background: rgba(26, 42, 56, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.25);
    padding-block: 1rem;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.nav-logo img {
    height: 38px;
    width: auto;
    filter: brightness(0) invert(1);
    transition: var(--transition-base);
}

#navbar.scrolled .nav-logo img {
    filter: brightness(0) invert(1);
}

/* ── Language Switcher ── */
.nav-lang-switcher {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-left: var(--space-6);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.35rem 0.6rem;
    border-radius: var(--radius-pill);
    backdrop-filter: blur(10px);
}

.lang-btn {
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    color: rgba(255, 255, 255, 0.5);
    transition: var(--transition-fast);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-pill);
}

.lang-btn.active {
    color: var(--color-white);
    background: var(--color-secondary);
}

.lang-divider {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
}

.lang-btn[data-lang="ar"] {
    font-family: var(--font-arabic);
}

/* Arabic RTL Overrides */
[lang="ar"] {
    direction: rtl;
    text-align: right;
}

[lang="ar"] .nav-actions {
    flex-direction: row-reverse;
}

[lang="ar"] .nav-lang-switcher {
    margin-left: var(--space-6);
    margin-right: 0;
}

[lang="ar"] .section-label::before {
    display: none;
}

[lang="ar"] .section-label::after {
    content: '';
    display: block;
    width: 2rem;
    height: 2px;
    border-radius: var(--radius-pill);
    background: var(--color-secondary);
}

/* Mirror slider masks for RTL */
[lang="ar"] .slider-wrapper::before {
    left: auto;
    right: 0;
    background: linear-gradient(to left, var(--color-primary), transparent);
}

[lang="ar"] .slider-wrapper::after {
    right: auto;
    left: 0;
    background: linear-gradient(to right, var(--color-primary), transparent);
}

[lang="ar"] .modal-close {
    right: auto;
    left: 1.5rem;
}

/* Force contact details to stay LTR */
[lang="ar"] .footer-contact-item a,
[lang="ar"] .footer-contact-item div {
    direction: ltr;
    unicode-bidi: embed;
    display: inline-block;
}

[lang="ar"] .footer-contact-item svg {
    margin-left: var(--space-3);
    margin-right: 0;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: var(--space-8);
    gap: var(--space-2);
    background: var(--color-secondary);
    color: var(--color-white) !important;
    padding: 0.8rem 2rem;
    border-radius: var(--radius-pill);
    font-weight: var(--fw-bold);
    box-shadow: var(--shadow-pink);
    transition: transform 0.3s var(--ease-bounce), box-shadow 0.3s var(--ease-out);
}

.btn-download:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(249, 81, 131, 0.4);
    color: var(--color-white) !important;
}

[lang="ar"] .btn-download {
    flex-direction: row-reverse;
}

[lang="ar"] .btn-download svg {
    margin-right: 0 !important;
    margin-left: 0.5rem;
}

[lang="ar"] .slider-controls {
    flex-direction: row-reverse;
}

/* WhatsApp Floating Widget */
.whatsapp-float {
    position: fixed;
    bottom: var(--space-8);
    left: var(--space-8);
    width: 60px;
    height: 60px;
    background-color: var(--color-secondary);
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: transform 0.3s var(--ease-bounce), box-shadow 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
    animation: whatsappPulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: var(--color-primary);
    box-shadow: 0 10px 25px rgba(249, 81, 131, 0.4);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

@keyframes whatsappPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(249, 81, 131, 0.4);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(249, 81, 131, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(249, 81, 131, 0);
    }
}

/* Adjust for mobile if needed */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: var(--space-6);
        left: var(--space-6);
        width: 50px;
        height: 50px;
    }

    .whatsapp-float svg {
        width: 26px;
        height: 26px;
    }
}

.nav-links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    position: relative;
    z-index: 2;
}

.nav-links a {
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: rgba(255, 255, 255, 0.80);
    letter-spacing: 0.03em;
    position: relative;
    transition: color var(--transition-fast);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    border-radius: var(--radius-pill);
    background: var(--color-secondary);
    transition: width var(--transition-base);
}

.nav-links a:hover {
    color: var(--color-white);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta {
    margin-left: var(--space-4);
}

.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 28px;
}

.nav-hamburger span {
    height: 2px;
    border-radius: var(--radius-pill);
    background: var(--color-white);
    transition: var(--transition-base);
}

/* Mobile nav */
.nav-mobile {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--color-surface-2, #1a2a38);
    z-index: calc(var(--z-nav) - 1);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-8);
}

.mobile-lang-switcher {
    position: absolute;
    top: 2rem;
    display: flex;
    gap: var(--space-4);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-lang-switcher .lang-btn {
    font-size: var(--fs-sm);
    padding: 0.4rem 1rem;
}

.nav-mobile.open {
    display: flex;
}

.nav-mobile a {
    font-size: var(--fs-xl);
    font-weight: var(--fw-bold);
    color: var(--color-white);
}

.nav-mobile a:hover {
    color: var(--color-secondary);
}

/* ======================================
   HERO
   ====================================== */
#hero {
    position: relative;
    width: 100%;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--color-surface);
    overflow: hidden;
}

#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    z-index: 0;
    pointer-events: none;
}

/* Decorative diagonal pill pattern (brand motif) */
.hero-decor {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.18;
}

.hero-decor svg {
    position: absolute;
    width: 100%;
    height: 100%;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-6);
    padding-inline: var(--section-px);
}

/* Wrapper for the floating logo */
#hero-logo-card {
    margin-bottom: var(--space-12);
    opacity: 0;
    transform: scale(0.75) translateY(30px);
    animation: heroLogoIn 1.1s 0.3s cubic-bezier(0.34, 1.28, 0.64, 1) forwards;
}

@keyframes heroLogoIn {
    from {
        opacity: 0;
        transform: scale(0.75) translateY(30px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

#hero-logo-card.loaded {
    opacity: 1;
    transform: scale(1) translateY(0);
    animation: float 5s ease-in-out infinite;
}

.hero-animated-logo {
    width: min(380px, 60vw);
    height: auto;
    overflow: visible;
    /* Soft continuous glow */
    animation: pulseGlow 4s ease-in-out infinite alternate;
}

.hero-animated-logo path {
    fill: var(--fill-color);
    opacity: 0;
    transform-origin: center;
    animation: assemblePart 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes assemblePart {
    0% {
        opacity: 0;
        transform: translate(calc(var(--dx, 0) * 1px), calc(var(--dy, 0) * 1px)) scale(0.8);
    }

    100% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
}

/* Stagger each part with different directions and delays */
.hero-animated-logo path:nth-child(1) {
    --dx: -40;
    --dy: -40;
    animation-delay: 0.2s;
}

.hero-animated-logo path:nth-child(2) {
    --dx: 40;
    --dy: -30;
    animation-delay: 0.3s;
}

.hero-animated-logo path:nth-child(3) {
    --dx: 20;
    --dy: 50;
    animation-delay: 0.4s;
}

.hero-animated-logo path:nth-child(4) {
    --dx: -30;
    --dy: 40;
    animation-delay: 0.5s;
}

.hero-animated-logo path:nth-child(5) {
    --dx: 50;
    --dy: -20;
    animation-delay: 0.6s;
}

.hero-animated-logo path:nth-child(6) {
    --dx: -50;
    --dy: 10;
    animation-delay: 0.65s;
}

.hero-animated-logo path:nth-child(7) {
    --dx: 10;
    --dy: -50;
    animation-delay: 0.7s;
}

.hero-animated-logo path:nth-child(8) {
    --dx: -20;
    --dy: 50;
    animation-delay: 0.75s;
}

.hero-animated-logo path:nth-child(9) {
    --dx: 40;
    --dy: 30;
    animation-delay: 0.8s;
}

.hero-animated-logo path:nth-child(10) {
    --dx: -40;
    --dy: -20;
    animation-delay: 0.85s;
}

.hero-animated-logo path:nth-child(11) {
    --dx: 0;
    --dy: 60;
    animation-delay: 0.9s;
}

.hero-animated-logo path:nth-child(12) {
    --dx: 0;
    --dy: -60;
    animation-delay: 0.95s;
}

.hero-animated-logo path.pink-path {
    --fill-color: var(--color-secondary);
}

.hero-animated-logo path.white-path {
    --fill-color: var(--color-white);
}

@keyframes pulseGlow {
    0% {
        filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.1));
    }

    100% {
        filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.35));
    }
}

.hero-tagline {
    font-size: clamp(var(--fs-xl), 3.5vw, var(--fs-3xl));
    font-weight: var(--fw-bold);
    color: var(--color-white);
    line-height: 1.25;
    opacity: 0;
    animation: fadeUp 0.9s 1.2s var(--ease-out) forwards;
}

.hero-tagline em {
    font-style: normal;
    color: var(--color-secondary);
}

.hero-sub {
    font-size: var(--fs-md);
    color: var(--color-text-muted);
    max-width: 52ch;
    opacity: 0;
    animation: fadeUp 0.9s 1.6s var(--ease-out) forwards;
}

.hero-actions {
    display: flex;
    gap: var(--space-4);
    margin-top: var(--space-6);
    opacity: 0;
    animation: fadeUp 0.9s 2.0s var(--ease-out) forwards;
}

.hero-scroll {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-text-muted);
    font-size: var(--fs-xs);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: fadeIn 1s 2.8s var(--ease-out) both;
}

.hero-scroll-line {
    width: 1.5px;
    height: 2.5rem;
    background: linear-gradient(to bottom, var(--color-secondary), transparent);
    border-radius: var(--radius-pill);
    animation: float 2s ease-in-out infinite;
}

/* ======================================
   ABOUT
   ====================================== */
#about {
    padding-block: var(--section-py);
    background: var(--color-white);
    overflow: hidden;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--space-16);
    align-items: center;
}

.about-text {
    margin-top: var(--space-8);
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    color: var(--color-text-muted-dark);
}

.about-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.about-globe-visual {
    position: relative;
    width: 300px;
    height: 300px;
    perspective: 1000px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.globe-sphere {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: globeRotate 20s linear infinite;
}

.meridian,
.parallel {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid var(--color-primary);
    opacity: 0.6;
}

/* Vertical lines (Meridians) */
.meridian:nth-child(1) {
    transform: rotateY(0deg);
}

.meridian:nth-child(2) {
    transform: rotateY(60deg);
}

.meridian:nth-child(3) {
    transform: rotateY(120deg);
}

/* Horizontal lines (Parallels) */
.parallel {
    border-color: var(--color-secondary);
    opacity: 0.5;
}

.parallel:nth-child(4) {
    transform: rotateX(90deg) translateZ(50px) scale(0.85);
}

.parallel:nth-child(5) {
    transform: rotateX(90deg) translateZ(-50px) scale(0.85);
}

.globe-core {
    position: absolute;
    width: 24px;
    height: 24px;
    background: var(--color-secondary);
    border-radius: 50%;
    box-shadow: 0 0 30px var(--color-secondary), 0 0 10px var(--color-secondary);
    z-index: 2;
    animation: corePulse 2s ease-in-out infinite alternate;
}

@keyframes globeRotate {
    from {
        transform: rotateX(-15deg) rotateY(0deg);
    }

    to {
        transform: rotateX(-15deg) rotateY(360deg);
    }
}

@keyframes corePulse {
    from {
        transform: scale(0.85);
        filter: brightness(1);
    }

    to {
        transform: scale(1.15);
        filter: brightness(1.2);
    }
}

/* ======================================
   SERVICES
   ====================================== */
#services {
    background: var(--color-light);
    padding-block: var(--section-py);
}

.services-header {
    text-align: center;
    margin-bottom: var(--space-16);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
}

.service-card {
    background: var(--color-white);
    border: 1.5px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-10) var(--space-8);
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(249, 81, 131, 0.04), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.service-card:hover {
    border-color: rgba(249, 81, 131, 0.35);
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(249, 81, 131, 0.12), var(--shadow-md);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--radius-md);
    background: rgba(249, 81, 131, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
}

.service-card:hover .service-icon {
    background: var(--color-secondary);
}

.service-icon svg {
    width: 1.6rem;
    height: 1.6rem;
    stroke: var(--color-secondary);
    transition: stroke var(--transition-base);
}

.service-card:hover .service-icon svg {
    stroke: var(--color-white);
}

.service-card h3 {
    font-size: var(--fs-lg);
    font-weight: var(--fw-bold);
    color: var(--color-text-dark);
    line-height: 1.3;
}

.service-card p {
    font-size: var(--fs-sm);
    color: var(--color-text-muted-dark);
    line-height: 1.7;
    flex: 1;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.service-tag {
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
    color: var(--color-secondary);
    background: rgba(249, 81, 131, 0.08);
    border-radius: var(--radius-pill);
    padding: 0.25rem 0.75rem;
    transition: var(--transition-fast);
}

.service-card:hover .service-tag {
    background: rgba(249, 81, 131, 0.14);
}

/* ======================================
   CLIENTS LOGO SLIDER
   ====================================== */
#clients {
    background: var(--color-primary);
    padding-block: var(--section-py);
    overflow: hidden;
}

.clients-header {
    text-align: center;
    margin-bottom: var(--space-16);
}

.clients-header .section-title {
    color: var(--color-white);
}

.slider-wrapper {
    position: relative;
}

/* Edge fade masks */
.slider-wrapper::before,
.slider-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 120px;
    z-index: 2;
    pointer-events: none;
}

.slider-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--color-primary), transparent);
}

.slider-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--color-primary), transparent);
}

.logo-slider {
    direction: ltr;
    /* Force LTR to keep slide math consistent */
    overflow-x: scroll;
    overflow-y: visible;
    cursor: grab;
    padding-block: var(--space-8);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.logo-slider::-webkit-scrollbar {
    display: none;
}

.logo-slider:active {
    cursor: grabbing;
}

.logo-slider-track {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    width: max-content;
    padding-inline: 40vw;
}

.logo-slider-track.reverse {
    margin-top: var(--space-6);
}

.logo-item {
    flex-shrink: 0;
    width: 240px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.28;
    filter: brightness(0) invert(1);
    transform: scale(0.80);
    transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out), filter 0.35s var(--ease-out);
}

.logo-item.active {
    opacity: 1;
    filter: none;
    transform: scale(1.5);
}

.logo-item img {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
}

/* ======================================
   PORTFOLIO PREVIEW
   ====================================== */
#portfolio {
    background: var(--color-white);
    padding-block: var(--section-py);
}

.portfolio-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: var(--space-10);
    flex-wrap: wrap;
    gap: var(--space-6);
}

/* Filter Pills */
.portfolio-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-10);
}

.filter-pill {
    padding: 0.5rem 1.4rem;
    border-radius: var(--radius-pill);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    background: var(--color-light);
    color: var(--color-text-muted-dark);
    border: 1.5px solid transparent;
    transition: var(--transition-fast);
}

.filter-pill:hover {
    border-color: var(--color-secondary);
    color: var(--color-secondary);
}

.filter-pill.active {
    background: var(--color-secondary);
    color: var(--color-white);
    box-shadow: var(--shadow-pink);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
}

.portfolio-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    aspect-ratio: 4/3;
    background: var(--color-light-2);
    cursor: pointer;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.portfolio-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: var(--shadow-lg);
}

.portfolio-card img,
.portfolio-video-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}

.portfolio-card:hover img {
    transform: scale(1.06);
}

.portfolio-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(36, 54, 73, 0.90) 0%, rgba(36, 54, 73, 0.20) 55%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-6);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.portfolio-card:hover .portfolio-card-overlay {
    opacity: 1;
}

.portfolio-card-overlay h3 {
    font-size: var(--fs-md);
    font-weight: var(--fw-bold);
    color: var(--color-white);
    line-height: 1.3;
}

.portfolio-card-cat {
    display: inline-block;
    margin-top: var(--space-2);
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-secondary);
    background: rgba(249, 81, 131, 0.15);
    border-radius: var(--radius-pill);
    padding: 0.2rem 0.75rem;
}

.portfolio-cta {
    text-align: center;
    margin-top: var(--space-12);
}

/* ======================================
   FOOTER
   ====================================== */
#footer {
    background: var(--color-surface-2, #1a2a38);
    padding-top: var(--space-24);
    padding-bottom: var(--space-10);
    text-align: center;
}

/* ── Brand block at top (centered) ── */
.footer-brand {
    margin-bottom: var(--space-10);
    padding-bottom: var(--space-10);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.footer-brand img {
    height: 38px;
    filter: brightness(0) invert(1);
    margin: 0 auto var(--space-5);
    display: block;
}

.footer-brand p {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    max-width: 46ch;
    margin: 0 auto;
    line-height: 1.8;
}

/* Social links — centered row ── */
.footer-social {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
    margin-top: var(--space-6);
}

.social-link {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    transition: var(--transition-fast);
}

.social-link:hover {
    border-color: var(--color-secondary);
    color: var(--color-secondary);
    background: rgba(249, 81, 131, 0.12);
    transform: translateY(-3px);
}

.social-link svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: currentColor;
}

/* ── 3-column links/contact grid (centered) ── */
.footer-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-10);
    padding-bottom: var(--space-12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.footer-col h4 {
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    color: var(--color-white);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: var(--space-6);
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    align-items: center;
}

.footer-col ul li a {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.footer-col ul li a:hover {
    color: var(--color-secondary);
}

/* Contact items — icon + text, centered */
.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-3);
    line-height: 1.6;
    justify-content: center;
    text-align: left;
}

.footer-contact-item svg {
    width: 1rem;
    height: 1rem;
    stroke: var(--color-secondary);
    flex-shrink: 0;
    margin-top: 0.22rem;
}

.footer-contact-item a {
    color: inherit;
    transition: color var(--transition-fast);
}

.footer-contact-item a:hover {
    color: var(--color-secondary);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: var(--space-8);
    font-size: var(--fs-xs);
    color: rgba(255, 255, 255, 0.28);
    flex-wrap: wrap;
    gap: var(--space-4);
}

.footer-bottom a {
    color: var(--color-secondary);
}

/* ======================================
   MODAL POPUP (PORTFOLIO)
   ====================================== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.open {
    display: flex;
    opacity: 1;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 18, 26, 0.95);
    backdrop-filter: blur(8px);
    cursor: pointer;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 10000;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    font-size: 2.5rem;
    color: var(--color-text-dark);
    cursor: pointer;
    z-index: 2;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--color-secondary);
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.modal-header h3 {
    font-size: var(--fs-xl);
    color: var(--color-text-dark);
    margin: 0;
}

.modal-slider {
    position: relative;
    flex: 1;
    overflow: hidden;
    background: #000;
    min-height: 50vh;
    display: flex;
    align-items: center;
    direction: ltr;
    /* Force LTR for consistent slide math */
}

.modal-track {
    display: flex;
    height: 100%;
    width: 100%;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.modal-slide {
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-slide img,
.modal-slide video {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.slider-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    pointer-events: none;
}

.slider-btn {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: var(--transition-base);
    font-size: 1.25rem;
}

.slider-btn:hover {
    background: var(--color-secondary);
}

.slider-dots {
    position: absolute;
    bottom: 1rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition-base);
}

.dot.active {
    background: var(--color-secondary);
    transform: scale(1.2);
}

/* ======================================
   RESPONSIVE
   ====================================== */
@media (max-width: 1100px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-10);
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 720px) {
    :root {
        --section-py: 5rem;
    }

    .nav-links,
    .nav-cta {
        display: none;
    }

    .nav-hamburger {
        display: flex;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-logo-card {
        padding: 2rem 2.5rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .hero-actions .btn {
        width: auto;
        min-width: 240px;
        /* Ensures buttons have a consistent, premium feel */
        justify-content: center;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-12);
    }
}

@media (max-width: 600px) {
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}