/* ═══════════════════════════════════════════════════════
   MAS Agency — Modern Premium Design System
   ═══════════════════════════════════════════════════════ */

/* ─── TheYearofHandicrafts Arabic Font ─── */
@font-face {
    font-family: 'TheYearofHandicrafts';
    src: url('assets/fonts/TheYearofHandicrafts-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'TheYearofHandicrafts';
    src: url('assets/fonts/TheYearofHandicrafts-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'TheYearofHandicrafts';
    src: url('assets/fonts/TheYearofHandicrafts-SemiBold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'TheYearofHandicrafts';
    src: url('assets/fonts/TheYearofHandicrafts-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'TheYearofHandicrafts';
    src: url('assets/fonts/TheYearofHandicrafts-Black.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-color: #0a1628;
    --bg-secondary: #0e1f3d;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-hover: rgba(255, 255, 255, 0.09);
    --text-color: #ffffff;
    --text-muted: #9ab0cc;
    --text-light: #cdd9e8;
    --accent-color: #1269bf;
    --accent-secondary: #3a9bef;
    --accent-glow: rgba(18, 105, 191, 0.35);
    --accent-gradient: linear-gradient(135deg, #1269bf 0%, #3a9bef 100%);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.18);
    --font-main: 'TheYearofHandicrafts', 'Tajawal', sans-serif;
    --font-en: 'Inter', sans-serif;
    --transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 30px;
    --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 40px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 40px rgba(18, 105, 191, 0.2);
}

/* English LTR mode */
html[lang="en"] body {
    font-family: var(--font-en);
}

html[lang="en"] nav a::after {
    right: auto;
    left: 0;
}

html[lang="en"] .dropdown-content {
    right: auto;
    left: 0;
    text-align: left;
}

html[lang="en"] .dropdown-content a {
    text-align: left;
}

html[lang="en"] .dropdown > a::after {
    margin-right: 0;
    margin-left: 5px;
}

html[lang="en"] .footer-links a:hover {
    padding-right: 0;
    padding-left: 5px;
}

html[lang="en"] .blog-content-summary {
    text-align: left;
}

html[lang="en"] .article-body {
    text-align: left;
}

/* ─── Reset & Base ─── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

body.loading {
    overflow: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ─── Container ─── */
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

/* ─── Noise Overlay ─── */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.02'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1000;
    opacity: 0.4;
}

/* ═══════════════════════════════════════════════════════
   LOADER
   ═══════════════════════════════════════════════════════ */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.8s;
}

.loader-content {
    text-align: center;
    position: relative;
}

.loader-logo {
    width: 0;
    height: auto;
    max-height: 80px;
    opacity: 0;
    filter: brightness(0) invert(1);
    animation: logoReveal 1.4s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    margin: 0 auto 20px;
    display: block;
}

.loader-text {
    font-size: 2.2rem;
    font-weight: 800;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    animation: textReveal 0.8s ease-out 1s forwards;
    letter-spacing: 8px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

@keyframes logoReveal {
    0% { width: 0; opacity: 0; transform: scale(0.5) rotate(-10deg); }
    40% { width: 90px; opacity: 1; transform: scale(1.1) rotate(0deg); }
    60% { transform: scale(0.95); }
    80% { transform: scale(1.02); }
    100% { width: 80px; opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes textReveal {
    0% { opacity: 0; transform: translateY(20px) scale(0.9); letter-spacing: 20px; }
    100% { opacity: 1; transform: translateY(0) scale(1); letter-spacing: 8px; }
}

@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes scrollDown {
    0% { opacity: 0; transform: translateY(-8px); }
    50% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(8px); }
}

/* ═══════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════ */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 100;
    transition: var(--transition);
    background: transparent;
}

#navbar.scrolled {
    background: rgba(5, 5, 16, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

#navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 101;
}

.logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

#navbar.scrolled .logo-img {
    height: 40px;
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: rgba(10, 10, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    min-width: 220px;
    box-shadow: var(--shadow-md);
    z-index: 1000;
    border-radius: var(--radius-sm);
    padding: 8px 0;
    top: calc(100% + 8px);
    right: 0;
    border: 1px solid var(--border-color);
    animation: fadeIn 0.2s ease-out;
}

.dropdown-content a {
    color: var(--text-muted);
    padding: 10px 20px;
    text-decoration: none;
    display: block;
    text-align: right;
    transition: var(--transition-fast);
    font-size: 0.9rem;
}

.dropdown-content a:hover {
    background: rgba(18, 108, 188, 0.1);
    color: var(--accent-secondary);
    padding-right: 24px;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown > a::after {
    content: '';
}

nav ul {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-fast);
    position: relative;
    padding: 4px 0;
}

nav a:hover,
nav a.active {
    color: var(--text-color);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: var(--transition);
    border-radius: 2px;
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    z-index: 101;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-color);
    transition: var(--transition-fast);
    border-radius: 2px;
}

.menu-toggle.active span:first-child {
    transform: rotate(45deg) translate(3px, 3px);
}

.menu-toggle.active span:last-child {
    transform: rotate(-45deg) translate(3px, -3px);
}

/* ═══════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════ */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 120px 0 80px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Animated gradient orbs */
.hero-bg::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 30%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(18, 108, 188, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
    filter: blur(40px);
}

.hero-bg::after {
    content: '';
    position: absolute;
    bottom: 10%;
    right: 20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 10s ease-in-out infinite reverse;
    filter: blur(40px);
}

.hero-content {
    text-align: center;
    width: 100%;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.hero-title span {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px);
}

.hero-title span.value-reveal {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: var(--text-muted);
    margin-bottom: 48px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    transform: translateY(20px);
    line-height: 1.8;
}

.hero-actions {
    opacity: 0;
    transform: translateY(20px);
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Scroll indicator */
.hero-scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: fadeIn 1s ease-out 2s forwards;
    z-index: 2;
}

.hero-scroll-indicator .scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent-color), transparent);
    position: relative;
}

.hero-scroll-indicator .scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: var(--accent-secondary);
    border-radius: 4px;
    animation: scrollDown 1.5s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 36px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    border: 1px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--text-color);
    color: var(--bg-color);
    border-color: var(--text-color);
}

.btn-primary:hover {
    background: var(--accent-gradient);
    background-size: 200% 200%;
    border-color: transparent;
    color: #fff;
    box-shadow: 0 0 30px var(--accent-glow);
    transform: translateY(-2px);
}

.btn-outline {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    background: transparent;
}

.btn-outline:hover {
    border-color: var(--accent-color);
    background: rgba(18, 108, 188, 0.1);
    color: var(--accent-secondary);
    transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════
   SECTION COMMONS
   ═══════════════════════════════════════════════════════ */
.section-padding {
    padding: 120px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 72px;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 50px;
    background: rgba(18, 108, 188, 0.1);
    border: 1px solid rgba(18, 108, 188, 0.2);
    color: var(--accent-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 0%, #a0a0b0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.3;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Section divider gradient */
.section-divider {
    width: 60px;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 3px;
    margin: 24px auto 0;
}

/* ═══════════════════════════════════════════════════════
   ABOUT SECTION
   ═══════════════════════════════════════════════════════ */
#about {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-color) 100%);
    position: relative;
}

#about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-color), transparent);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-text .section-title {
    text-align: right;
}

html[lang="en"] .about-text .section-title {
    text-align: left;
}

.about-text .lead {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 24px;
    color: var(--text-light);
    line-height: 1.8;
}

.about-text p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.9;
}

.about-text p + p {
    margin-top: 20px;
}

.stats-grid-small {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.stat-item {
    background: var(--bg-card);
    padding: 48px 32px;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-8px);
    border-color: rgba(18, 108, 188, 0.3);
    box-shadow: var(--shadow-glow);
}

.stat-item:hover::before {
    opacity: 1;
}

.stat-item h3 {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    line-height: 1;
}

.stat-item p {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════
   SERVICES SECTION
   ═══════════════════════════════════════════════════════ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--bg-card);
    padding: 48px 36px;
    border-radius: var(--radius-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(18, 108, 188, 0.05) 0%, transparent 50%);
    opacity: 0;
    transition: var(--transition);
}

.service-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-8px);
    border-color: rgba(18, 108, 188, 0.3);
    box-shadow: var(--shadow-glow);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    font-size: 2.2rem;
    margin-bottom: 24px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background-color: rgba(18, 108, 188, 0.1);
    border: 1px solid rgba(18, 108, 188, 0.15);
    color: var(--accent-color);
    filter: none;
    -webkit-text-fill-color: var(--accent-secondary);
}

.service-card h3 {
    margin-bottom: 12px;
    font-size: 1.3rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

/* ═══════════════════════════════════════════════════════
   TEAM SECTION
   ═══════════════════════════════════════════════════════ */
.overflow-hidden {
    overflow: hidden;
}

.team-grid {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 24px;
    padding: 20px 24px;
}

.team-member {
    background: var(--bg-card);
    padding: 36px 24px 28px;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    width: 220px;
    position: relative;
    overflow: visible;
}

.team-member::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-md);
    background: var(--accent-gradient);
    opacity: 0;
    z-index: -1;
    transition: var(--transition);
}

.team-member:hover {
    transform: translateY(-12px) scale(1.02);
    z-index: 10;
    background: rgba(15, 15, 30, 0.95);
    border-color: transparent;
    box-shadow: var(--shadow-lg);
}

.team-member:hover::before {
    opacity: 0.3;
}

.member-image {
    width: 100px;
    height: 100px;
    margin: 0 auto 16px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(18, 108, 188, 0.4);
    box-shadow: 0 0 30px rgba(18, 108, 188, 0.15);
    background-color: #1a1a2e;
    transition: var(--transition);
}

.team-member:hover .member-image {
    width: 110px;
    height: 110px;
    border-color: var(--accent-secondary);
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.2);
}

.member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.team-member:hover .member-image img {
    transform: scale(1.05);
}

.team-member h3 {
    margin-bottom: 6px;
    color: var(--text-color);
    font-size: 1.05rem;
    font-weight: 700;
    transition: var(--transition-fast);
}

.team-member:hover h3 {
    color: var(--accent-secondary);
}

.member-role {
    color: var(--accent-color);
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 12px;
    transition: var(--transition-fast);
    letter-spacing: 0.3px;
}

.team-member:hover .member-role {
    color: var(--text-light);
}

.member-bio {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-top: 8px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateY(10px);
}

.team-member:hover .member-bio {
    opacity: 1;
    max-height: 200px;
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════
   CLIENTS / PARTNERS SECTION
   ═══════════════════════════════════════════════════════ */
#clients {
    background-color: var(--bg-secondary);
    position: relative;
}

#clients::before,
#clients::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-color), transparent);
}

#clients::before { top: 0; }
#clients::after { bottom: 0; }

.partners-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    width: 100%;
    margin-top: 40px;
    direction: rtl;
}

.partners-grid .client-item {
    width: 100%;
    margin: 0;
}

.clients-grid {
    display: flex !important;
    flex-flow: row wrap !important;
    justify-content: center;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.client-item {
    background: var(--bg-card);
    padding: 20px 28px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    min-width: 180px;
    position: relative;
    overflow: hidden;
}

.client-item img {
    max-width: 100%;
    max-height: 55px;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.5) brightness(1.5);
    transition: var(--transition);
}

.client-item:hover {
    border-color: rgba(18, 108, 188, 0.3);
    background: rgba(18, 108, 188, 0.05);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.client-item:hover img {
    filter: grayscale(0%) opacity(1) brightness(1);
    transform: scale(1.08);
}

/* ═══════════════════════════════════════════════════════
   INDUSTRIES SECTION
   ═══════════════════════════════════════════════════════ */
#industries .clients-grid .client-item {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 20px 32px;
    min-width: auto;
    height: auto;
    cursor: default;
}

#industries .clients-grid .client-item:hover {
    color: var(--text-color);
}

/* ═══════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════ */
footer {
    background-color: var(--bg-secondary);
    padding: 80px 0 30px;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 60px;
    align-items: start;
}

.footer-logo-img {
    height: 72px;
    width: auto;
    margin-bottom: 16px;
    object-fit: contain;
    display: block;
}

.footer-logo p {
    color: var(--text-muted);
    max-width: 300px;
    line-height: 1.7;
    font-size: 0.95rem;
}

.social-icons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.social-icons a {
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    text-decoration: none;
}

.social-icons a:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(18, 108, 188, 0.3);
}

.social-icons .x-logo-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    display: block;
}

.social-icons .x-fallback-icon {
    color: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    font-family: Arial, sans-serif;
    display: block;
}

.footer-links h3,
.footer-contact h3 {
    font-size: 1.1rem;
    margin-bottom: 24px;
    font-weight: 700;
    color: var(--text-color);
    position: relative;
    padding-bottom: 12px;
}

.footer-links h3::after,
.footer-contact h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

html[lang="en"] .footer-links h3::after,
html[lang="en"] .footer-contact h3::after {
    right: auto;
    left: 0;
}

.footer-links ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.footer-links li {
    margin-bottom: 14px;
    list-style: none !important;
}

.footer-links li::before {
    display: none !important;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition-fast);
    font-size: 0.95rem;
    display: inline-block;
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 0;
    height: 1px;
    background: var(--accent-secondary);
    transition: width 0.3s ease;
}

html[lang="en"] .footer-links a::after {
    right: auto;
    left: 0;
}

.footer-links a:hover {
    color: var(--accent-secondary);
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-contact p {
    color: var(--text-muted);
    margin-bottom: 16px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-contact p i,
.footer-contact p .fab {
    color: var(--accent-color);
    width: 22px;
    text-align: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}

html[lang="en"] .footer-contact p i,
html[lang="en"] .footer-contact p .fab {
    margin-left: 0;
    margin-right: 0;
}

.footer-contact a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-contact a:hover {
    color: var(--accent-secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ═══════════════════════════════════════════════════════
   SCROLL ANIMATIONS
   ═══════════════════════════════════════════════════════ */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children animation — container stays visible, children animate in */
.stagger-children > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.06s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.12s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.18s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.24s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.30s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.36s; }
.stagger-children.visible > *:nth-child(7) { transition-delay: 0.42s; }
.stagger-children.visible > *:nth-child(8) { transition-delay: 0.48s; }
.stagger-children.visible > *:nth-child(9) { transition-delay: 0.54s; }

.stagger-children.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* When stagger-children is combined with fade-up, only use stagger on children */
.fade-up.stagger-children {
    opacity: 1;
    transform: none;
}

.fade-up.stagger-children:not(.visible) {
    opacity: 1;
    transform: none;
}

/* ═══════════════════════════════════════════════════════
   BLOG STYLES (shared across pages)
   ═══════════════════════════════════════════════════════ */
.blog-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.blog-post {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
    height: 100%;
}

.blog-post:hover {
    transform: translateY(-8px);
    border-color: rgba(18, 108, 188, 0.3);
    box-shadow: var(--shadow-glow);
}

.blog-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-post:hover .blog-image img {
    transform: scale(1.08);
}

.blog-content-summary {
    width: 100%;
    padding: 28px;
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}

.blog-content-summary h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-color);
    line-height: 1.5;
    font-weight: 700;
}

.blog-content-summary p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: auto;
    font-size: 0.9rem;
}

.read-more {
    color: var(--accent-secondary);
    font-weight: 600;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    transition: var(--transition-fast);
}

.read-more:hover {
    gap: 10px;
}

/* Article Styles (shared across pages) */
.article-header-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.article-body {
    padding: 40px;
    text-align: right;
}

.article-body h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--accent-secondary);
    font-weight: 700;
}

.article-section {
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.article-section img {
    width: 100%;
    border-radius: var(--radius-sm);
    margin-top: 15px;
}

.article-section p {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-light);
}

.article-meta {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ═══════════════════════════════════════════════════════
   SCROLL TO TOP BUTTON
   ═══════════════════════════════════════════════════════ */
.scroll-top-btn {
    position: fixed;
    bottom: 32px;
    left: 32px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(18, 108, 188, 0.3);
}

html[lang="en"] .scroll-top-btn {
    left: auto;
    right: 32px;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(18, 108, 188, 0.5);
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 992px) {
    .blog-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .partners-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding: 80px 0;
    }

    .hero-title {
        font-size: clamp(2.4rem, 8vw, 3.5rem);
    }

    .hero-subtitle {
        font-size: 1.1rem;
        padding: 0 16px;
    }

    .menu-toggle {
        display: flex;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 360px;
        height: 100%;
        background: rgba(10, 22, 40, 0.98);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        padding: 100px 36px;
        transition: var(--transition);
        z-index: 99;
        border-left: 1px solid var(--border-color);
    }

    html[lang="en"] nav {
        right: auto;
        left: -100%;
        border-left: none;
        border-right: 1px solid var(--border-color);
    }

    nav.active {
        right: 0;
    }

    html[lang="en"] nav.active {
        right: auto;
        left: 0;
    }

    nav ul {
        flex-direction: column;
        gap: 24px;
    }

    nav a {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: clamp(1.6rem, 5vw, 2.2rem);
    }

    .section-header {
        margin-bottom: 48px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 36px;
        text-align: center;
    }

    .footer-logo {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-logo p {
        max-width: 100%;
    }

    .social-icons {
        justify-content: center;
    }

    .footer-links h3::after,
    .footer-contact h3::after {
        right: 50%;
        transform: translateX(50%);
    }

    html[lang="en"] .footer-links h3::after,
    html[lang="en"] .footer-contact h3::after {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }

    .footer-contact p {
        justify-content: center;
    }

    .about-grid {
        text-align: center;
    }

    .about-text .section-title {
        text-align: center;
    }

    .stats-grid-small {
        margin-top: 20px;
    }

    .team-member {
        width: 200px;
        padding: 28px 18px 24px;
    }

    .member-image {
        width: 90px;
        height: 90px;
    }

    .blog-list {
        grid-template-columns: 1fr;
        max-width: 500px;
    }

    .blog-image {
        height: 220px;
    }

    .blog-content-summary {
        padding: 20px;
    }

    .article-header-img {
        height: 250px;
    }

    .article-body {
        padding: 24px;
    }

    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-scroll-indicator {
        display: none;
    }
}

@media (max-width: 480px) {
    .section-padding {
        padding: 64px 0;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }

    .partners-grid {
        grid-template-columns: 1fr;
    }

    .stat-item h3 {
        font-size: 2.5rem;
    }

    .stat-item {
        padding: 36px 24px;
    }

    .scroll-top-btn {
        bottom: 20px;
        left: 20px;
        width: 42px;
        height: 42px;
    }

    html[lang="en"] .scroll-top-btn {
        left: auto;
        right: 20px;
    }
}

/* ═══════════════════════════════════════════════════════
   MOBILE MENU OVERLAY
   ═══════════════════════════════════════════════════════ */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 98;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ═══════════════════════════════════════════════════════
   UTILITY
   ═══════════════════════════════════════════════════════ */
.text-center {
    text-align: center;
}

.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Stats Section (if standalone) */
#stats {
    padding: 80px 0;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-color) 100%);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    text-align: center;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.stat-plus {
    font-size: 2rem;
    color: var(--accent-secondary);
    vertical-align: top;
    position: relative;
    top: 5px;
}

.stat-label {
    color: var(--text-muted);
    margin-top: 10px;
    font-size: 1rem;
}

/* Language toggle (shared) */
.lang-toggle {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-color);
    padding: 8px 18px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    transition: var(--transition);
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.lang-toggle:hover {
    background: rgba(18, 108, 188, 0.2);
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(18, 108, 188, 0.15);
}

.lang-toggle .lang-icon {
    font-size: 1rem;
}
