/* ===== CSS Variables ===== */
:root {
    --color-primary: #6B4423;
    --color-primary-dark: #4A3728;
    --color-primary-light: #8B6914;
    --color-accent: #C4A35A;
    --color-bg: #FAF7F2;
    --color-bg-dark: #2D1F14;
    --color-text: #2D1F14;
    --color-text-muted: #5D4E37;
    --color-white: #FFFFFF;
    --font-ar: 'Tajawal', sans-serif;
    --font-en: 'Outfit', sans-serif;
    --transition: 0.3s ease;
    --shadow: 0 4px 20px rgba(45, 31, 20, 0.08);
    --shadow-hover: 0 8px 30px rgba(45, 31, 20, 0.12);
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-family: var(--font-ar);
}

html[dir="ltr"] {
    font-family: var(--font-en);
}

body {
    font-family: var(--font-ar);
    font-weight: 500;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    overflow-x: hidden;
}

body[dir="ltr"] {
    font-family: var(--font-en);
    font-weight: 400;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== Language Switcher (inside nav menu) ===== */
.nav-menu-lang {
    order: 999; /* Desktop: at end of nav */
}

.lang-switcher {
    display: flex;
    gap: 0.25rem;
    background: var(--color-white);
    padding: 0.25rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* Desktop: lang switcher in nav bar */
@media (min-width: 769px) {
    .nav-menu .lang-switcher {
        box-shadow: var(--shadow);
    }
}

.lang-btn {
    padding: 0.4rem 0.75rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted);
    border-radius: 6px;
    transition: var(--transition);
}

.lang-btn:hover,
.lang-btn.active {
    background: var(--color-primary);
    color: var(--color-white);
}

/* ===== Calculator Announcement Banner (شريط إعلاني) ===== */
.calc-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(90deg, var(--color-primary-dark) 0%, var(--color-primary) 50%, var(--color-primary-dark) 100%);
    color: var(--color-white);
    padding: 0.6rem 1rem;
    box-shadow: 0 4px 20px rgba(107, 68, 35, 0.3);
    transform: translateY(0);
    transition: transform 0.35s ease;
}
.calc-banner.dismissed {
    transform: translateY(-100%);
}
.calc-banner-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.calc-banner-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    flex: 1;
    min-width: 200px;
    justify-content: center;
}
.calc-banner-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: var(--color-accent);
    color: var(--color-primary-dark);
    font-weight: 700;
    font-size: 0.75rem;
    border-radius: 4px;
    white-space: nowrap;
}
.calc-banner-btn {
    flex-shrink: 0;
    padding: 0.45rem 1rem;
    background: var(--color-white);
    color: var(--color-primary) !important;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.2s, box-shadow 0.2s;
}
.calc-banner-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.calc-banner-close {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 0.75rem;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border: none;
    background: rgba(255,255,255,0.3);
    color: var(--color-white);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    pointer-events: auto;
}
.calc-banner-close:hover {
    background: rgba(255,255,255,0.35);
}
[dir="ltr"] .calc-banner-close {
    right: auto;
    left: 0.75rem;
}
body.has-calc-banner { padding-top: 48px; }
body.has-calc-banner .header { top: 48px; }

@media (max-width: 768px) {
    .calc-banner { padding: 0.55rem 2.5rem 0.55rem 0.75rem; }
    .calc-banner-inner { gap: 0.6rem; }
    .calc-banner-text { font-size: 0.85rem; min-width: auto; flex-direction: column; align-items: flex-start; gap: 0.25rem; }
    .calc-banner-btn { padding: 0.4rem 0.85rem; font-size: 0.85rem; }
    body.has-calc-banner { padding-top: 72px; }
    body.has-calc-banner .header { top: 72px; }
}
[dir="ltr"] .calc-banner { padding: 0.55rem 0.75rem 0.55rem 2.5rem; }

/* ===== Header & Navigation ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: #FAF7F2;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(107, 68, 35, 0.1);
    transition: var(--transition);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    background: #FAF7F2 !important;
    border: none !important;
    box-shadow: none !important;
}

.logo .logo-ar,
.logo .logo-en,
.logo .logo-img {
    background: #FAF7F2 !important;
    border: none !important;
}

.logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.logo-en {
    display: none;
}

body[dir="ltr"] .logo-ar {
    display: none;
}

body[dir="ltr"] .logo-en {
    display: inline;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    font-family: inherit;
    transition: var(--transition);
}

/* Ensure mobile menu uses Arabic font when in RTL */
[dir="rtl"] .nav-menu,
[dir="rtl"] .nav-menu a {
    font-family: var(--font-ar);
}

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

/* Calculator link - prominent CTA style */
.nav-calculator-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-white) !important;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(107, 68, 35, 0.25);
    transition: transform 0.2s, box-shadow 0.2s;
}
.nav-calculator-link:hover {
    color: var(--color-white) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(107, 68, 35, 0.35);
}
.nav-calculator-link .nav-calc-icon {
    font-size: 1.1em;
    opacity: 0.95;
}
[dir="ltr"] .nav-calculator-link .nav-calc-icon {
    order: 1;
}
.nav-calculator-link .nav-calc-tagline {
    display: none;
}

/* Mobile calculator CTA - hidden on desktop */
.calc-mobile-cta {
    display: none;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-primary);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    padding-top: 100px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect fill="%236B4423" fill-opacity="0.03" width="100" height="100"/><path d="M0 50 L50 0 L100 50 L50 100 Z" fill="none" stroke="%23C4A35A" stroke-opacity="0.1" stroke-width="0.5"/></svg>');
}
.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
}
.hero-bg.loaded {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(135deg, rgba(45, 31, 20, 0.85) 0%, rgba(107, 68, 35, 0.7) 50%, rgba(74, 55, 40, 0.8) 100%),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(196, 163, 90, 0.03) 2px,
            rgba(196, 163, 90, 0.03) 4px
        );
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
    width: 100%;
    padding-top: calc(4rem + 2em);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 1rem;
}

.hero-title .en {
    display: none;
}

body[dir="ltr"] .hero-title .ar {
    display: none;
}

body[dir="ltr"] .hero-title .en {
    display: block;
}

.hero-company {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.hero-logo {
    height: 280px;
    width: auto;
    object-fit: contain;
    margin-top: 0;
    margin-bottom: 1.5rem;
    display: block;
    margin-inline: auto;
}

@media (max-width: 768px) {
    .hero {
        padding-top: 90px;
    }
    .hero-content {
        padding-top: 2rem;
    }
    .hero-logo {
        height: 180px;
        margin-bottom: 1.25rem;
    }
}

/* Ensure LTR (English) has same spacing - no overlap with header */
body[dir="ltr"] .hero {
    padding-top: 100px;
}

body[dir="ltr"] .hero-content {
    padding-top: calc(4rem + 2em);
}

@media (max-width: 768px) {
    body[dir="ltr"] .hero {
        padding-top: 90px;
    }
    body[dir="ltr"] .hero-content {
        padding-top: 2rem;
    }
}

.hero-tagline,
.hero-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 1rem;
    max-width: 560px;
    margin-inline: auto;
}

.hero-reg {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 1.5rem;
    max-width: 500px;
    margin-inline: auto;
}

.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.btn-primary {
    background: var(--color-accent);
    color: var(--color-bg-dark);
}

.btn-primary:hover {
    background: #D4B86A;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid rgba(255, 255, 255, 0.8);
    border-bottom: 2px solid rgba(255, 255, 255, 0.8);
    transform: rotate(45deg);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: rotate(45deg) translateY(0); }
    50% { transform: rotate(45deg) translateY(8px); }
}

/* ===== Sections ===== */
.section {
    padding: 5rem 0;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--color-primary);
    margin-bottom: 1rem;
    text-align: center;
}

.section-desc {
    text-align: center;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* ===== About Section ===== */
.about {
    background: var(--color-white);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-content p {
    margin-bottom: 1.25rem;
    color: var(--color-text-muted);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-top: 2rem;
}

.about-text {
    margin-bottom: 1rem;
    color: var(--color-text-muted);
}

/* ===== Philosophy Section ===== */
.philosophy {
    background: var(--color-bg);
}

.philosophy-intro {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 1.5rem;
}

.philosophy p {
    margin-bottom: 1rem;
    color: var(--color-text-muted);
}

.vision-mission {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2.5rem 0;
}

.vm-card {
    background: var(--color-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.vm-card h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.vm-card p {
    color: var(--color-text-muted);
    margin: 0;
}

.craftsmanship {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(107, 68, 35, 0.06);
    border-radius: 12px;
    border-inline-start: 4px solid var(--color-primary);
}

body[dir="ltr"] .craftsmanship {
    border-inline-start: none;
    border-left: none;
    border-inline-end: none;
    border-right: 4px solid var(--color-primary);
}

/* ===== Values Section ===== */
.values {
    background: var(--color-white);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.value-card {
    background: var(--color-bg);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
}

.value-card h4 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.value-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin: 0;
}

.differentiators {
    margin: 3rem 0;
}

.differentiators h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.differentiators ul {
    list-style: none;
}

.differentiators li {
    padding: 0.5rem 0;
    padding-inline-start: 1.5rem;
    position: relative;
    color: var(--color-text-muted);
}

.differentiators li::before {
    content: "✓";
    position: absolute;
    inset-inline-start: 0;
    color: var(--color-primary);
    font-weight: 700;
}

.value-proposition {
    background: linear-gradient(135deg, rgba(107, 68, 35, 0.08) 0%, rgba(196, 163, 90, 0.06) 100%);
    padding: 2rem;
    border-radius: 12px;
}

.value-proposition h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.value-proposition p {
    color: var(--color-text-muted);
    margin: 0;
}

/* ===== Services Section ===== */
.services {
    background: var(--color-bg);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.service-card {
    background: var(--color-white);
    padding: 1.75rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    color: var(--color-primary);
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.service-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin: 0;
}

.process-section,
.partnerships {
    margin: 2.5rem 0;
}

.process-section h3,
.partnerships h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.process-section ul {
    list-style: none;
}

.process-section li {
    padding: 0.5rem 0;
    padding-inline-start: 1.5rem;
    position: relative;
    color: var(--color-text-muted);
}

.process-section li::before {
    content: "→";
    position: absolute;
    inset-inline-start: 0;
    color: var(--color-primary);
}

.partnerships p {
    color: var(--color-text-muted);
    margin: 0;
}

.about-features {
    list-style: none;
    margin-top: 1.5rem;
}

.about-features li {
    padding: 0.5rem 0;
    color: var(--color-primary);
    font-weight: 500;
}

.about-visual {
    min-height: 300px;
    border-radius: 12px;
    overflow: hidden;
}

.wood-pattern {
    width: 100%;
    height: 100%;
    min-height: 300px;
    background: 
        linear-gradient(105deg, transparent 40%, rgba(107, 68, 35, 0.1) 40%, rgba(107, 68, 35, 0.1) 60%, transparent 60%),
        linear-gradient(75deg, transparent 30%, rgba(139, 105, 20, 0.08) 30%, rgba(139, 105, 20, 0.08) 70%, transparent 70%),
        linear-gradient(135deg, #8B6914 0%, #6B4423 50%, #4A3728 100%);
}

/* ===== Products Section ===== */
.products {
    background: var(--color-bg);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background: var(--color-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.product-card h3 {
    color: var(--color-primary);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.product-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* ===== Gallery Section (Preview + Instagram) ===== */
.gallery {
    background: linear-gradient(180deg, var(--color-white) 0%, #faf8f5 100%);
}

.gallery-preview-wrap {
    margin-top: 2rem;
    padding: 2rem 0;
}

.gallery-preview-loading {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--color-text-muted);
    font-size: 1.05rem;
}

.gallery-preview-loading-text::after {
    content: '';
    animation: gallery-dots 1.5s infinite;
}

@keyframes gallery-dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Professional gallery preview grid - first image featured large, 5 smaller in 2 columns */
.gallery-preview-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    grid-template-rows: repeat(3, minmax(130px, 160px));
    gap: 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

.gallery-preview-item {
    border-radius: 16px;
    overflow: hidden;
    display: block;
    position: relative;
    box-shadow: 0 4px 20px rgba(45, 31, 20, 0.08);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.gallery-preview-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(45, 31, 20, 0.25) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.gallery-preview-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(107, 68, 35, 0.18);
}

.gallery-preview-item:hover::after {
    opacity: 1;
}

/* First item: featured hero (spans 3 rows, left column) */
.gallery-preview-item:first-child {
    grid-column: 1;
    grid-row: 1 / -1;
}

.gallery-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    user-drag: none;
    -webkit-touch-callout: none;
    pointer-events: none;
}

.gallery-preview-cta {
    margin-top: 2rem;
    text-align: center;
}

.gallery-preview-cta .btn {
    padding: 0.85rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
}

.gallery-preview-empty {
    text-align: center;
    padding: 2.5rem;
}

@media (max-width: 900px) {
    .gallery-preview-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, minmax(160px, 200px));
        min-height: auto;
    }
    .gallery-preview-item:first-child {
        grid-column: span 2;
        grid-row: span 1;
    }
}

@media (max-width: 600px) {
    .gallery-preview-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, minmax(140px, 180px));
        gap: 0.75rem;
        min-height: auto;
    }
    .gallery-preview-item:first-child {
        grid-column: span 2;
        grid-row: span 1;
    }
}

.instagram-gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
}

.instagram-profile-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 2rem;
    background: linear-gradient(135deg, #faf7f2 0%, #f0ebe3 100%);
    border: 1px solid rgba(107, 68, 35, 0.15);
    border-radius: 16px;
    text-decoration: none;
    color: var(--color-text);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(45, 31, 20, 0.06);
}

.instagram-profile-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 8px 30px rgba(107, 68, 35, 0.12);
    transform: translateY(-2px);
}

.instagram-profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6B4423, #8B6914);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.instagram-profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.instagram-icon {
    width: 32px;
    height: 32px;
    color: white;
}

.instagram-profile-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.instagram-username {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-primary);
}

.instagram-follow {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.instagram-feed-wrap {
    width: 100%;
    max-width: 900px;
}

.instafeed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.instafeed-grid .gallery-item {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.instafeed-grid .gallery-item:hover {
    transform: scale(1.03);
}

.instafeed-grid .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.instafeed-fallback {
    text-align: center;
    padding: 2rem;
}

.instafeed-fallback a {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
}

.instafeed-fallback a:hover {
    text-decoration: underline;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    aspect-ratio: 4/3;
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.gallery-item:hover {
    transform: scale(1.03);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--color-text-muted);
}

.gallery-error {
    color: var(--color-primary);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--color-text-muted);
}

/* ===== Brochure Section ===== */
.brochure {
    background: var(--color-bg);
}

.brochure-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.brochure-actions .btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.brochure-actions .btn-outline:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.brochure-preview {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--color-white);
}

.brochure-iframe {
    width: 100%;
    height: 70vh;
    min-height: 500px;
    border: none;
}

/* ===== Contact Section ===== */
.contact {
    background: var(--color-bg);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-icon {
    font-size: 1.5rem;
}

.contact-item strong {
    display: block;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
}

.contact-item a {
    color: var(--color-text);
    text-decoration: none;
}

.contact-item a:hover {
    color: var(--color-primary);
}

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

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    border: 1px solid rgba(107, 68, 35, 0.2);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(107, 68, 35, 0.1);
}

.contact-form-status {
    margin: 0;
    font-size: 0.95rem;
    min-height: 1.4em;
}

.contact-form-status.success {
    color: #0a7c42;
}

.contact-form-status.error {
    color: #c0392b;
}

.contact-form button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ===== Footer ===== */
.footer {
    background: var(--color-bg-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 2rem 0;
}

.footer-content {
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.footer-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.footer-brand .logo-en {
    display: none;
}

body[dir="ltr"] .footer-brand .logo-ar {
    display: none;
}

body[dir="ltr"] .footer-brand .logo-en {
    display: inline;
}

.footer-text {
    font-size: 0.9rem;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .about-visual {
        order: -1;
        min-height: 200px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--color-white);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        box-shadow: -5px 0 20px rgba(0,0,0,0.1);
        transform: translateX(100%);
        transition: var(--transition);
    }

    /* Lang switcher at top of mobile menu (not in header) */
    .nav-menu-lang {
        order: -1;
        margin-bottom: 1rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid rgba(107, 68, 35, 0.12);
    }

    body[dir="ltr"] .nav-menu {
        right: auto;
        left: 0;
        transform: translateX(-100%);
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-calculator-wrap {
        width: 100%;
        padding: 0;
        margin: 0.75rem 0;
        order: -2;
    }
    .nav-calculator-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.35rem;
        width: 100%;
        padding: 1.25rem 1.5rem;
        margin: 0;
        font-size: 1.15rem;
        position: relative;
        overflow: hidden;
        border: 2px solid rgba(196, 163, 90, 0.5);
        box-shadow: 0 4px 20px rgba(107, 68, 35, 0.2);
    }
    .nav-calculator-link::before {
        content: attr(data-badge);
        position: absolute;
        top: 0.5rem;
        left: 0.5rem;
        right: auto;
        font-size: 0.7rem;
        font-weight: 700;
        padding: 0.2rem 0.5rem;
        background: var(--color-accent);
        color: var(--color-primary-dark);
        border-radius: 4px;
        letter-spacing: 0.02em;
    }
    [dir="rtl"] .nav-calculator-link::before {
        left: auto;
        right: 0.5rem;
    }
    .nav-calculator-link .nav-calc-icon {
        font-size: 1.8rem;
        margin-bottom: 0.15rem;
    }
    .nav-calculator-link .nav-calc-tagline {
        display: block;
        font-size: 0.85rem;
        font-weight: 500;
        opacity: 0.95;
    }

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    .section {
        padding: 3rem 0;
    }

    /* Mobile floating calculator CTA - encouraging bar at bottom */
    .calc-mobile-cta {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 998;
        background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
        padding: 0.85rem 1rem;
        box-shadow: 0 -4px 24px rgba(107, 68, 35, 0.35);
        opacity: 0;
        visibility: hidden;
        transform: translateY(100%);
        transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
    }
    .calc-mobile-cta.visible {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    .calc-mobile-cta-inner {
        width: 100%;
        max-width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
    }
    .calc-mobile-cta-text {
        flex: 1;
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--color-white);
        line-height: 1.3;
    }
    .calc-mobile-cta-btn {
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        padding: 0.6rem 1rem;
        background: var(--color-white);
        color: var(--color-primary) !important;
        font-weight: 700;
        font-size: 0.95rem;
        border-radius: 8px;
        text-decoration: none;
        box-shadow: 0 2px 12px rgba(0,0,0,0.2);
        transition: transform 0.2s, box-shadow 0.2s;
        white-space: nowrap;
    }
    .calc-mobile-cta-btn:active {
        transform: scale(0.97);
    }
    body { padding-bottom: 0; }
    body:has(.calc-mobile-cta.visible) { padding-bottom: 72px; }
}
