/* ============================================
   Tzrifin Theme – Main Stylesheet
   RTL Hebrew Real Estate Blog
   ============================================ */

/* === CSS Variables / Design System === */
:root {
    /* Primary Colors (Dark Midnight Navy) */
    --color-primary: #0a1121;
    --color-primary-light: #162642;
    --color-primary-dark: #050a14;
    
    /* Accent - Clean Dark Orange (Replaced Blue) */
    --color-accent: #d95c14;
    --color-accent-light: #f58442;
    --color-accent-subtle: rgba(217, 92, 20, 0.1);
    
    /* CTA Orange */
    --color-cta: #d95c14;
    --color-cta-hover: #b84c0f;
    
    /* Backgrounds */
    --color-bg: #f8fafc;
    --color-bg-alt: #f1f5f9;
    --color-bg-dark: #0a1121;
    --color-bg-card: #ffffff;
    
    /* Text */
    --color-text: #2c2c2c;
    --color-text-light: #6b7280;
    --color-text-muted: #9ca3af;
    --color-text-on-dark: #ffffff;
    
    /* Status */
    --color-planning: #e67332;
    --color-building: #d95c14;
    --color-occupancy: #b84c0f;
    --color-completed: #8a3a0c;
    
    /* Layout */
    --container-max: 1200px;
    --header-height: 72px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-color: #e5e7eb;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.08);
    --shadow-xl: 0 20px 50px rgba(0,0,0,0.12);
    
    /* Typography */
    --font-main: 'Heebo', sans-serif;
    --font-secondary: 'Inter', sans-serif;
    
    /* Transitions */
    --transition: 0.3s ease;
    --transition-slow: 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    direction: rtl;
    text-align: right;
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition);
}

ul, ol {
    list-style: none;
}

/* === Container === */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-main);
    font-weight: 500;
    font-size: 0.95rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-cta);
    color: #fff;
    border-color: var(--color-cta);
}

.btn-primary:hover {
    background: var(--color-cta-hover);
    border-color: var(--color-cta-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(217, 92, 20, 0.3);
}

.btn-outline {
    background: #ffffff;
    color: var(--color-primary);
    border-color: #ffffff;
}

.btn-outline:hover {
    background: #f0f0f0;
    color: var(--color-cta);
    border-color: #f0f0f0;
}

.btn-outline-dark {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline-dark:hover {
    background: var(--color-primary);
    color: #fff;
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.85rem;
}

/* === Header === */
.site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    height: var(--header-height);
    transition: all var(--transition);
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
    background-color: rgba(255, 255, 255, 0.98) !important;
}

.header-inner {
    display: flex;
    align-items: center;
    height: var(--header-height);
    gap: 32px;
}

.site-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.site-logo img {
    height: 40px;
    width: auto;
}

.logo-text {
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--color-primary);
    letter-spacing: -0.5px;
}

.logo-text strong {
    font-weight: 700;
    color: var(--color-cta);
}

.main-nav {
    flex: 1;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
    white-space: nowrap;
}

.nav-menu li a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
    padding: 8px 0;
    position: relative;
    transition: color var(--transition);
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--color-cta);
    transition: width var(--transition);
}

.nav-menu li a:hover,
.nav-menu li.current-menu-item a {
    color: var(--color-cta);
}

/* === Dropdown Menu Styles === */
.nav-menu li {
    position: relative;
}

.nav-menu .menu-item-has-children > a {
    padding-left: 14px;
}

.nav-menu .menu-item-has-children > a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 6px !important;
    height: 6px !important;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-50%) rotate(45deg) !important;
    background: transparent;
    transition: none !important;
    margin: 0;
}

.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    right: 50%;
    transform: translateX(50%) translateY(10px);
    min-width: 150px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-radius: var(--border-radius-sm);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 100;
    list-style: none;
    border: 1px solid var(--border-color);
    text-align: center;
}

.nav-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(50%) translateY(0);
}

.nav-menu .sub-menu li {
    display: block;
    width: 100%;
}

.nav-menu .sub-menu li a {
    display: block;
    padding: 10px 20px;
    color: var(--color-text);
    font-size: 0.95rem;
    transition: all var(--transition);
}

.nav-menu .sub-menu li a::after {
    display: none; /* Hide the underline animation on sub-menu links */
}

.nav-menu .sub-menu li a:hover {
    background: var(--color-bg-light);
    color: var(--color-primary);
}

.nav-menu li a:hover::after,
.nav-menu li.current-menu-item a::after {
    width: 100%;
}

.header-cta {
    flex-shrink: 0;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-primary);
    transition: all var(--transition);
    border-radius: 2px;
}

/* === Site Main === */
.site-main {
    margin-top: var(--header-height);
}

@media (max-width: 991px) {
    .header-inner {
        justify-content: space-between !important;
    }
}

/* === Hero Section - Compact === */
.hero-section {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-color: var(--color-primary-dark);
    padding: 80px 0 60px;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(10, 17, 33, 0.1), rgba(10, 17, 33, 0.2));
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    margin: 0 auto;
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 900;
    color: #fff;
    margin-bottom: 16px;
    line-height: 1.2;
    letter-spacing: -1px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: #fff;
    max-width: 600px;
    margin: 0 auto 28px;
    font-weight: 500;
    line-height: 1.6;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.hero-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* === Stats Bar === */
.stats-bar {
    background: var(--color-primary);
    padding: 28px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-family: var(--font-secondary);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-accent-light);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    margin-top: 6px;
    font-weight: 300;
}

/* === Sections === */
.section {
    padding: 64px 0;
}

.section-dark {
    background: var(--color-primary);
    color: #fff;
}
.section-dark .section-title { color: #fff; }

.section-light {
    background: #f8fafc;
}

/* === About Complex Section === */
.section-about-complex {
    padding: 80px 0;
    background: var(--color-bg);
}

.about-complex-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text-lead {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-text);
    margin-bottom: 24px;
    font-weight: 600;
}

.about-text-secondary {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-text-light);
    font-weight: 400;
}

.mask-image-radius {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

/* === Modern FAQ Section === */
.section-faq {
    padding: 80px 0;
}

.faq-container {
    max-width: 800px;
    margin: 40px auto 0;
}

.faq-item {
    background: #f8f9fa;
    border: none;
    border-radius: var(--border-radius-sm);
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: none;
    background: #f1f3f5;
}

.faq-item.active {
    box-shadow: none;
    background: #f8f9fa;
}

.faq-question {
    padding: 18px 24px;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    color: var(--color-primary);
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}



.faq-split-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: stretch;
}

@media (min-width: 992px) {
    .faq-split-layout {
        grid-template-columns: 1fr 1.5fr;
        gap: 60px;
    }
}

.faq-icon {
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1;
    color: var(--color-cta);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.faq-item.active .faq-icon {
    /* Keep original color */
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-answer-inner {
    padding: 0 24px 24px;
    color: var(--color-text-light);
    line-height: 1.7;
    font-size: 0.95rem;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 36px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-primary);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--color-accent);
    margin-top: 24px;
    margin-bottom: 24px;
    border-radius: 2px;
}
.section-title.no-line::after {
    display: none !important;
}

.section-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-cta);
    transition: all var(--transition);
}

.section-link:hover {
    color: var(--color-cta-hover);
    gap: 8px;
}

/* === Post Cards Grid === */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.post-card {
    background: var(--color-bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    border-color: transparent;
}

.post-card-image {
    display: block;
    position: relative;
    aspect-ratio: 16/9;
    max-height: 180px;
    overflow: hidden;
}

.post-card-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform var(--transition-slow);
}

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}

.post-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('https://images.unsplash.com/photo-1497366216548-37526070297c?q=40&w=600&auto=format&fit=crop') center/cover;
    color: transparent;
}

.post-card-category {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 12px;
    background: var(--color-cta);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 20px;
}

.post-card-body {
    padding: 12px 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    color: var(--color-primary);
}

.post-card-title a:hover {
    color: var(--color-cta);
}

.post-card-excerpt {
    font-size: 0.88rem;
    color: var(--color-text-light);
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 12px;
    margin-top: auto;
}

.post-card-link {
    display: inline-block;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--color-cta);
    padding: 8px 16px;
    border: 1px solid var(--color-cta);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    align-self: flex-start;
}

.post-card-link:hover {
    background: var(--color-cta);
    color: #fff;
}

/* === Project Cards === */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.project-card {
    background: var(--color-bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    border-color: transparent;
}

.project-card-image {
    display: block;
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.project-card-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform var(--transition-slow);
}

.project-card:hover .project-card-image img {
    transform: scale(1.05);
}

.project-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-bg-alt), #e8e5df);
    color: var(--color-text-muted);
}

.project-status-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    color: #fff;
}

.status-planning { background: var(--color-planning); }
.status-building { background: var(--color-building); }
.status-occupancy { background: var(--color-occupancy); }
.status-completed { background: var(--color-completed); }

.project-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-card-body .btn {
    margin-top: auto;
}

.project-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--color-primary);
}

.project-card-title a:hover {
    color: var(--color-cta);
}

.project-card-developer {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 12px;
}

.project-card-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.project-detail {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--color-text-light);
}

.project-detail svg {
    color: var(--color-accent);
}

/* === Map Section === */
.map-preview-container {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.home-map {
    width: 100%;
    height: 350px;
}

.leaflet-layer, .leaflet-control-zoom-in, .leaflet-control-zoom-out, .leaflet-control-attribution {
  filter: grayscale(0.8) sepia(0.5) hue-rotate(170deg) saturate(1.8) contrast(1.1) brightness(1.1);
}

/* Full map page */
.full-map {
    width: 100%;
    height: calc(100vh - var(--header-height) - 100px);
    min-height: 500px;
}

/* === Newsletter === */
.section-newsletter {
    background: var(--color-primary);
    padding: 48px 0;
}

.newsletter-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.newsletter-text h2 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 6px;
}

.newsletter-text p {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

.newsletter-form {
    flex: 1;
    min-width: 300px;
    max-width: 380px;
}

.newsletter-input-group {
    display: flex;
    gap: 8px;
}

.newsletter-input-group input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--border-radius-sm);
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-family: var(--font-main);
    font-size: 0.95rem;
    direction: ltr;
    text-align: right;
}

.newsletter-input-group input::placeholder {
    color: rgba(255,255,255,0.5);
}

.newsletter-input-group input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.newsletter-status {
    margin-top: 8px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
}

.tzrifin-banner {
    padding: 24px 0;
    text-align: center;
    max-width: var(--container-max);
    margin: 0 auto;
}

.tzrifin-banner:empty {
    display: block;
    width: 100%;
    min-height: 120px;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    position: relative;
    border-radius: var(--border-radius-sm);
}

.tzrifin-banner:empty::before {
    content: 'שטח פרסום לבאנר - נהלו דרך לוח הבקרה';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #64748b;
    font-weight: 500;
    font-size: 1.1rem;
}

.tzrifin-banner img {
    max-width: 100%;
    margin: 0 auto;
    border-radius: var(--border-radius-sm);
}

/* === Blog Archive === */
.category-filter {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.category-filter .filter-btn {
    padding: 8px 20px;
    border-radius: 24px;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid rgba(15, 23, 42, 0.2);
    background: transparent;
    color: var(--color-primary);
    font-family: var(--font-main);
}

.category-filter .filter-btn:hover {
    background: rgba(15, 23, 42, 0.05);
}

.category-filter .filter-btn.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

/* === Single Post / Article Styling === */
.article-header {
    margin-bottom: 24px;
}

.article-meta-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.article-meta-top .category-badge {
    padding: 4px 14px;
    background: var(--color-cta);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 20px;
}

.article-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--color-primary);
    line-height: 1.3;
    margin-bottom: 16px;
    font-weight: 700;
}

.article-excerpt {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--color-text);
    font-weight: 500;
    margin-bottom: 30px;
}

.article-featured-image {
    margin-bottom: 40px;
}

.article-featured-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    object-fit: cover;
    max-height: 500px;
}

.single-post-content {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 0 48px;
    font-size: 1.05rem;
    line-height: 1.85;
}

.single-post-content h2 {
    font-size: 1.5rem;
    margin: 36px 0 16px;
    color: var(--color-primary);
}

.single-post-content h3 {
    font-size: 1.25rem;
    margin: 28px 0 12px;
    color: var(--color-primary);
}

.single-post-content p {
    margin-bottom: 20px;
}

.single-post-content img {
    border-radius: var(--border-radius);
    margin: 24px 0;
}

.single-post-content blockquote {
    border-right: 4px solid var(--color-accent);
    padding: 16px 24px;
    margin: 24px 0;
    background: var(--color-bg-alt);
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    font-style: italic;
    color: var(--color-text-light);
}

/* Share buttons */
.share-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 40px 0;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.share-buttons span {
    font-weight: 600;
    font-size: 0.9rem;
    margin-left: 8px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-bg-alt);
    color: var(--color-text-light);
    transition: all var(--transition);
}

.share-btn:hover {
    background: var(--color-cta);
    color: #fff;
}

/* Related posts */
.related-posts {
    background: var(--color-bg-alt);
    padding: 48px 0;
}

/* === Single Project === */
.project-hero {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.project-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
}

.project-hero-content {
    position: absolute;
    bottom: 32px;
    right: 0;
    left: 0;
    z-index: 2;
}

.project-hero-content h1 {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 8px;
}

.project-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 32px 0;
}

.project-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.project-info-item svg {
    color: var(--color-accent);
    flex-shrink: 0;
    margin-top: 2px;
}

.project-info-label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    display: block;
}

.project-info-value {
    font-weight: 600;
    color: var(--color-primary);
}

/* Project gallery */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 32px 0;
}

.project-gallery-item {
    aspect-ratio: 4/3;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    cursor: pointer;
}

.project-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.project-gallery-item:hover img {
    transform: scale(1.05);
}

/* === FAQ === */
.faq-list, .faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    background: #fff;
    transition: all var(--transition);
}

.faq-item:hover {
    border-color: var(--color-cta);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    background: transparent;
    border: none;
    width: 100%;
    text-align: right;
    font-family: var(--font-main);
    color: var(--color-primary);
    transition: all var(--transition);
}

.faq-question:hover {
    color: var(--color-cta);
    background: rgba(0,0,0,0.01);
}

.faq-question .faq-icon-wrapper,
.faq-question .faq-icon {
    width: 24px;
    height: 24px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 16px;
    color: var(--color-cta) !important;
}


.faq-question .faq-icon-wrapper svg,
.faq-question .faq-icon svg {
    display: none !important;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.faq-answer-inner {
    padding: 0 30px 24px;
    color: var(--color-text-light);
    line-height: 1.8;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

/* === Contact Form === */
.tzrifin-contact-form {
    max-width: 700px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: var(--color-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-main);
    font-size: 0.95rem;
    color: var(--color-text);
    transition: border-color var(--transition);
    background: #fff;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-cta);
    box-shadow: 0 0 0 3px rgba(91, 106, 191, 0.1);
}

.form-status {
    margin-top: 12px;
    font-size: 0.9rem;
}

.form-status.success {
    color: var(--color-occupancy);
}

.form-status.error {
    color: #ef4444;
}

/* === Footer === */
.site-footer {
    background: var(--color-primary-dark);
    color: var(--color-text-on-dark);
    padding: 48px 0 0;
    position: relative;
    z-index: 10;
}

.footer-grid-yad1 {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    padding-bottom: 40px;
}

.footer-links-area {
    display: flex;
    gap: 40px;
    order: 1;
}

.footer-form-area {
    width: 100%;
    max-width: 380px;
    margin-right: auto;
    margin-left: 0;
    order: 2;
}

.footer-contact-box {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    color: var(--color-text);
    border: 2px solid var(--border-color);
}

.fc-header h3 {
    color: var(--color-primary);
    font-size: 1.15rem;
    margin-bottom: 4px;
}

.fc-header p {
    color: var(--color-text-light);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.fc-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fc-form input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-main);
    background: #f8fafc;
}

.fc-form input[type="tel"] {
    text-align: right;
    direction: ltr; /* Keeps numbers flowing LTR but visually right-aligned */
}

.fc-form input[type="tel"]::placeholder {
    text-align: right;
}

.fc-form button {
    margin-top: 4px;
    width: 100%;
    padding: 10px;
    font-size: 1rem;
}

.footer-logo .logo-text {
    color: #fff;
    font-size: 1.2rem;
}

.footer-logo .logo-text strong {
    color: var(--color-cta);
}

.footer-desc {
    color: rgba(255,255,255,0.6);
    font-size: 0.88rem;
    margin-top: 12px;
    line-height: 1.7;
}

.footer-col h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: #fff;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links li a {
    color: rgba(255,255,255,0.6);
    font-size: 0.88rem;
    transition: color var(--transition);
}

.footer-links li a:hover {
    color: var(--color-accent-light);
}

.footer-contact-info li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.6);
    font-size: 0.88rem;
    margin-bottom: 10px;
}

.footer-contact-info svg {
    flex-shrink: 0;
    color: var(--color-accent-light);
}

.social-links {
    display: flex;
    gap: 8px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    transition: all var(--transition);
}

.social-links a:hover {
    background: var(--color-accent);
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    color: rgba(255,255,255,0.4);
    font-size: 0.82rem;
}

/* === Pagination === */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 40px 0;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    transition: all var(--transition);
    border: 1px solid var(--border-color);
}

.pagination a:hover {
    background: var(--color-cta);
    color: #fff;
    border-color: var(--color-cta);
}

.pagination .current {
    background: var(--color-cta);
    color: #fff;
    border-color: var(--color-cta);
}

/* === 404 === */
.page-404 {
    text-align: center;
    padding: 100px 0;
}

.page-404 h1 {
    font-size: 6rem;
    color: var(--color-cta);
    margin-bottom: 16px;
    font-weight: 900;
}

.page-404 p {
    color: var(--color-text-light);
    font-size: 1.1rem;
    margin-bottom: 24px;
}

/* === No Results === */
.no-results {
    text-align: center;
    padding: 40px;
    color: var(--color-text-muted);
    grid-column: 1 / -1;
}

/* === Animations === */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animations */
.posts-grid .animate-on-scroll:nth-child(1) { transition-delay: 0s; }
.posts-grid .animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.posts-grid .animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.posts-grid .animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }

.projects-grid .animate-on-scroll:nth-child(1) { transition-delay: 0s; }
.projects-grid .animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.projects-grid .animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.projects-grid .animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }

/* === Filter Overlay for Projects === */
.filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding: 20px 0;
}

.filter-bar select {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-main);
    font-size: 0.9rem;
    background: #fff;
    cursor: pointer;
}

/* === Page Templates & Archive Common === */
.page-header,
.archive-header {
    background: transparent;
    padding: 50px 0 0;
    text-align: center;
    border-bottom: none;
    margin-bottom: 0;
}


.page-header h1,
.archive-header h1,
.page-header-map h1,
.v2-content-section h1 {
    font-size: 38px !important;
    color: var(--color-primary);
    margin: 0;
    font-weight: 800 !important;
    line-height: 1.2;
    letter-spacing: -1px;
}

.page-header h1::after,
.archive-header h1::after {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: var(--color-cta);
    margin: 20px auto;
}

.page-header p,
.archive-header p,
.page-description p {
    color: var(--color-text-light);
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 20px;
}

.page-content {
    padding: 48px 0;
}

/* === About Timeline === */
.timeline {
    position: relative;
    padding-right: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    right: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 36px;
    padding-right: 32px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    right: -32px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-cta);
    border: 3px solid #fff;
    box-shadow: var(--shadow-sm);
}

.timeline-year {
    font-weight: 700;
    color: var(--color-cta);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

/* === Map Filter === */
.map-controls {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    flex-wrap: wrap;
}

.map-legend {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* === Responsive === */
.project-gallery-grid {
    grid-template-columns: 1fr 1fr;
}
.project-gallery-smalls {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}
.project-details-split {
    grid-template-columns: 2.5fr 1fr;
}
.specs-grid {
    grid-template-columns: 1fr 1fr;
}
.contact-grid {
    grid-template-columns: 1fr 1fr;
}
@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .project-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-details-split {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid-yad1 {
        grid-template-columns: 1fr;
    }

    .footer-links-area {
        order: 1;
    }
    .footer-form-area {
        order: 2;
        max-width: 100%;
    }
}

/* Globals for mobile side drawer */
.mobile-menu-overlay,
.mobile-menu-close {
    display: none;
}

@media (max-width: 768px) {
    .nav-menu,
    .header-cta {
        display: none;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    /* Mobile menu (Side Drawer) */
    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.6);
        z-index: 998;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    .mobile-menu-overlay.active {
        display: block;
        opacity: 1;
    }

    .main-nav {
        display: block !important;
        position: fixed;
        top: 0;
        left: -100%;
        width: 320px;
        max-width: 85vw;
        bottom: 0;
        height: 100vh !important;
        background: #fff;
        z-index: 999;
        padding: 60px 0 24px 0; /* 0 side padding so lines stretch full width */
        box-shadow: 5px 0 20px rgba(0,0,0,0.1);
        transition: left 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        overflow-y: auto;
    }
    .main-nav.open {
        left: 0;
    }
    
    .mobile-menu-close {
        display: block;
        position: absolute;
        top: 15px;
        right: 20px;
        background: none;
        border: none;
        font-size: 32px;
        color: var(--color-text);
        cursor: pointer;
        line-height: 1;
        padding: 0;
    }

    .main-nav .nav-menu {
        display: flex !important;
        flex-direction: column;
        align-items: stretch; /* OVERRIDE DESKTOP align-items: center */
        width: 100%;
        gap: 0;
        text-align: right;
    }
    
    .main-nav .nav-menu li {
        width: 100%;
    }
    
    .main-nav .nav-menu li a {
        display: block;
        text-align: right;
        padding: 16px 50px 16px 24px; /* 50px right padding to align text inwards */
        font-size: 1.1rem;
        border-bottom: 1px solid var(--border-color);
        color: var(--color-text);
        position: relative; /* for arrow positioning */
    }
    
    .main-nav .nav-menu li.menu-item-has-children > a::before {
        position: absolute !important;
        left: 24px; /* stick to the left edge */
        top: 50% !important;
        transform: translateY(-50%) rotate(45deg) !important;
        margin: 0;
    }
    
    .nav-menu .sub-menu {
        position: static;
        transform: none !important;
        box-shadow: none;
        border: none;
        opacity: 1;
        visibility: visible;
        display: none;
        min-width: 100%;
        padding: 0;
        margin-top: 0;
        margin-right: 0; /* 0 margin so borders stretch full width */
        background: transparent;
        text-align: right;
    }
    
    .nav-menu li.menu-item-has-children.active > .sub-menu {
        display: block;
    }

    .nav-menu .sub-menu li a {
        padding: 12px 70px 12px 24px; /* 70px right padding = 50px parent + 20px indent */
        font-size: 1rem;
        border-bottom: 1px solid var(--border-color);
        color: #555555;
    }
    
    .nav-menu .sub-menu li:last-child a {
        border-bottom: none;
    }
    
    .posts-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 16px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        /* Hide scrollbar visually but keep functionality */
        scrollbar-width: thin;
        scrollbar-color: var(--color-primary-light) transparent;
    }
    
    .posts-grid::-webkit-scrollbar {
        height: 6px;
    }
    
    .posts-grid::-webkit-scrollbar-thumb {
        background-color: var(--color-primary-light);
        border-radius: 4px;
    }
    
    .posts-grid > * {
        flex: 0 0 85%;
        scroll-snap-align: center;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .about-complex-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .project-gallery-grid {
        grid-template-columns: 1fr;
        height: auto !important;
    }
    
    .project-gallery-smalls {
        display: none !important;
    }

    .specs-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .hero-section {
        min-height: 320px;
        padding: 60px 0 48px;
    }
    
    .newsletter-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .newsletter-form {
        max-width: 100%;
    }
    
    .newsletter-input-group {
        flex-direction: column;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .project-hero {
        height: 250px;
    }
    
    .project-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .project-gallery {
        grid-template-columns: 1fr;
    }
}

/* === Timeline === */
.section-timeline {
    background: #fff;
}
.timeline-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding-right: 50px;
}
.timeline-container::before {
    content: '';
    position: absolute;
    top: 5px;
    bottom: 0;
    right: 18px; /* line position */
    width: 2px;
    background: var(--color-cta);
}
.timeline-item {
    position: relative;
    margin-bottom: 50px;
}
.timeline-item:last-child {
    margin-bottom: 0;
}
.timeline-dot {
    position: absolute;
    right: -41px;
    top: 5px;
    width: 20px;
    height: 20px;
    background: var(--color-cta);
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 0 0 1px transparent;
    z-index: 1;
}
.timeline-content {
    background: transparent;
}
.timeline-header {
    display: flex;
    justify-content: flex-start;
    align-items: baseline;
    margin-bottom: 8px;
    gap: 20px;
}
.timeline-title {
    margin: 0;
    font-size: 1.25rem;
    color: var(--color-primary);
    font-weight: 700;
}
.timeline-date {
    font-weight: 600;
    color: #e67e22;
    font-size: 1.05rem;
}
.timeline-content p {
    color: #666;
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .timeline-container {
        padding-right: 40px;
    }
    .timeline-container::before {
        right: 14px;
    }
    .timeline-dot {
        right: -35px;
    }
    .timeline-header {
        flex-direction: column-reverse;
        gap: 5px;
        align-items: flex-start;
    }
}

/* === Print === */
@media print {
    .site-header,
    .site-footer,
    .share-buttons,
    .newsletter-section,
    .tzrifin-banner {
        display: none;
    }
    
    .site-main {
        margin-top: 0;
    }
}

@media (max-width: 991px) {
    .faq-split-layout {
        flex-direction: column !important;
    }
    .project-content-grid {
        grid-template-columns: 1fr !important;
    }
    .footer-grid-yad1 {
        flex-direction: column !important;
        gap: 40px !important;
    }
    .footer-col, .footer-block {
        width: 100% !important;
        text-align: center;
    }
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}
.mobile-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--color-primary);
    margin: 5px 0;
    transition: 0.3s;
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
        margin-right: 15px;
    }
    .header-cta {
        margin-right: auto;
    }
    .faq-grid-2col {
        grid-template-columns: 1fr !important;
    }
    .contact-dual-cards {
        grid-template-columns: 1fr !important;
    }
    .projects-grid {
        grid-template-columns: 1fr !important;
    }
    .news-grid {
        grid-template-columns: 1fr !important;
    }
    .info-card {
        padding: 24px !important;
    }
    .single-project .project-gallery-grid {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
    }
    .project-gallery-smalls {
        grid-template-columns: 1fr 1fr !important;
        display: grid !important;
        gap: 16px !important;
    }
    .project-gallery-smalls img {
        height: 150px !important;
    }
}
/* --- RECOVERY & TODAY UPDATES --- */

/* 1. Modal Styles */
.tzrifin-hero-modal {
    display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6); align-items: center; justify-content: center;
}
.tzrifin-hero-modal.active { display: flex; }
.tzrifin-modal-content {
    background-color: #fff; padding: 40px; width: 90%; max-width: 500px;
    position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    text-align: right !important; direction: rtl !important; border-radius: 0 !important;
}
.tzrifin-modal-close {
    position: absolute; top: 15px; left: 20px; font-size: 28px; font-weight: bold; cursor: pointer; color: #888;
}
.tzrifin-modal-close:hover { color: #333; }
.tzrifin-modal-content label {
    display: block !important; text-align: right !important; width: 100% !important; font-weight: bold; margin-bottom: 5px; direction: rtl;
}
.tzrifin-modal-content input, .tzrifin-modal-content select {
    width: 100%; padding: 12px; margin-bottom: 15px; border: 1px solid #ccc; background: #fafafa;
    text-align: right !important; direction: rtl !important; border-radius: 0 !important;
}
.tzrifin-modal-content button {
    width: 100% !important; padding: 14px; background: var(--color-primary); color: #fff; border: none; font-size: 1.1rem; cursor: pointer;
    border-radius: 0 !important;
}

/* Mobile Sticky CTA */
@media(max-width: 768px) {
    .btn-hero-cta { display: none !important; }
    .mobile-sticky-cta {
        position: fixed; bottom: 0; left: 0; right: 0; z-index: 9998;
        background: var(--color-cta); color: #fff; text-align: center; padding: 16px; border-radius: 0 !important;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.2); font-size: 1.1rem; font-weight: bold; display: block !important;
    }
}
@media(min-width: 769px) { .mobile-sticky-cta { display: none !important; } }

/* Hero Heights */
@media(min-width: 769px) { .hero-section { min-height: 320px !important; height: 320px !important; } }
@media(max-width: 768px) { .hero-section { min-height: 250px !important; height: 250px !important; } }

/* 2. Banner Constraints & Project Grid */
.projects-marketing-banner img { height: 160px !important; object-fit: cover !important; }
@media(min-width: 992px) {
    .projects-grid { grid-template-columns: repeat(3, 1fr) !important; }
}

/* 3. Typography & UI Fixes */
.project-card h3, .project-card h3 a, .post-card-title, .post-card-title a { font-size: 20px !important; margin-bottom: 5px !important; }
.post-card .post-card-link {
    background: transparent !important; border: none !important; color: var(--color-primary) !important;
    padding: 0 !important; text-decoration: underline !important; box-shadow: none !important;
    font-weight: 600; display: inline-block; height: auto !important; margin-top: 5px; margin-bottom: 0 !important;
}
.post-card .post-card-meta { margin-bottom: 5px !important; gap: 10px !important; }
.post-card .post-card-link:hover { color: var(--color-cta-hover) !important; }
.section-projects { 
    position: relative;
    background: transparent !important;
}
.section-projects::before {
    display: none !important;
}
.section-projects .container {
    position: relative;
    z-index: 2;
}
.section-projects { padding-bottom: 25px !important; }
.projects-grid { margin-bottom: 0 !important; }
.project-card { border: none !important; box-shadow: 0 4px 15px rgba(0,0,0,0.03) !important; }
.project-card-body { height: 120px !important; min-height: 120px !important; max-height: 120px !important; padding: 15px !important; overflow: hidden; justify-content: flex-start !important; }

/* 4. EXACT RED-LINE SPACING FIXES */
.home hr { margin-bottom: 35px !important; margin-top: 35px !important; }
.home hr + div, .home hr + section, .home hr + p, .home hr + * { margin-top: 0 !important; padding-top: 0 !important; }
.home .section-faq .faq-grid-2col { gap: 17.5px !important; }
.home .faq-item { margin-bottom: 0 !important; margin-top: 0 !important; }
.home .section-projects { padding-bottom: 17.5px !important; }
.home .projects-marketing-banner { margin-bottom: 0 !important; padding-bottom: 0 !important; display: block; }
.home .projects-marketing-banner img { display: block !important; margin-bottom: 0 !important; padding-bottom: 0 !important; }

/* ========================================= */
/* GLOBAL SPACING OVERRIDE (MAX 25PX)      */
/* ========================================= */
.section { padding-top: 25px !important; padding-bottom: 25px !important; }
.section-header { margin: 0 !important; padding: 0 !important; align-items: baseline !important; }
.section-title { margin: 0 0 25px 0 !important; padding: 0 20px 0 0 !important; line-height: 1.2 !important; position: relative !important; display: flex !important; align-items: center !important; justify-content: flex-start !important; text-align: right !important; }
.section-title::after { display: none !important; }
.section-title::before { content: '' !important; position: absolute !important; right: 0 !important; top: 50% !important; transform: translateY(-50%) !important; width: 6px !important; height: 27px !important; background-color: var(--color-cta) !important; }
.home .site-main { margin-top: 0 !important; }
.hero-section { margin-top: 0 !important; margin-bottom: 0 !important; padding-top: calc(var(--header-height) + 25px) !important; padding-bottom: 25px !important; }
.hero-compact { padding-top: calc(var(--header-height) + 25px) !important; }
.hero-compact .hero-content { padding-top: 0 !important; padding-bottom: 25px !important; }
.v2-layout { padding-top: 25px !important; padding-bottom: 25px !important; }
.v2-grid-master { gap: 15px !important; }
.v2-card { padding: 15px !important; margin-bottom: 15px !important; }
.projects-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 15px !important; margin-bottom: 0 !important; }
.faq-grid-2col { display: block !important; column-count: 1 !important; max-width: 900px !important; margin: 0 auto !important; }
.faq-grid-2col .faq-item { break-inside: avoid !important; margin-bottom: 15px !important; display: block; width: 100%; }
@media (max-width: 991px) { .faq-grid-2col { column-count: 1 !important; } }
.posts-grid, .posts-grid-compact { gap: 15px !important; margin-top: 0 !important; }
.v2-main-content { gap: 10px !important; }
.v2-sidebar-sticky { gap: 10px !important; }
.news-layout-wrapper { gap: 15px !important; margin-top: 0 !important; }
.post-card-body { justify-content: flex-start !important; }
.post-card-excerpt { margin-top: 5px !important; margin-bottom: 5px !important; }
.post-card .post-card-link { margin-top: 5px !important; }

/* === Single Article Layout with Sidebar === */
.article-layout-wrapper {
    display: grid;
    grid-template-columns: 3fr 1fr; /* Content on right (3fr), Sidebar on left (1fr) in RTL */
    gap: 40px;
    align-items: start;
    margin-top: calc(var(--header-height) + 40px);
    margin-bottom: 60px;
}

.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: calc(var(--header-height) + 24px);
}

.article-sidebar .sidebar-widget {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
}

.article-sidebar .widget-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}
.article-sidebar .widget-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 18px;
    background: var(--color-primary);
    border-radius: 2px;
}

/* Sidebar Search Widget */
.widget-search .search-form {
    position: relative;
}
.widget-search .search-form input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--color-bg-light);
    font-family: inherit;
    transition: border-color 0.3s ease;
}
.widget-search .search-form input:focus {
    border-color: var(--color-primary);
    outline: none;
}
.widget-search .search-form button {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-primary);
    cursor: pointer;
}

/* Sidebar Categories Widget */
.widget-categories ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.widget-categories li {
    margin-bottom: 12px;
}
.widget-categories li:last-child {
    margin-bottom: 0;
}
.widget-categories a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: var(--color-text);
    padding: 8px 0;
    transition: color 0.3s ease;
}
.widget-categories a:hover {
    color: var(--color-primary);
}
.widget-categories .cat-count {
    background: var(--color-bg-light);
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

/* Sidebar Newsletter Widget */
.widget-newsletter {
    background: var(--color-primary) !important; /* Matches site theme */
    color: #fff;
    padding: 30px 24px !important;
}
.widget-newsletter .widget-title {
    color: #fff;
    justify-content: flex-start;
    gap: 10px;
    font-size: 20px;
    margin-bottom: 12px;
}
.widget-newsletter .widget-title::before {
    display: none;
}
.widget-newsletter .widget-title svg {
    display: inline-block;
    margin: 0;
}
.widget-newsletter p {
    text-align: right;
    font-size: 14px;
    margin-bottom: 20px;
    opacity: 0.9;
}
.widget-newsletter input {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    color: #fff;
    margin-bottom: 12px;
    text-align: right;
}
.widget-newsletter input::placeholder {
    color: rgba(255,255,255,0.6);
}
.widget-newsletter button {
    width: 100%;
    padding: 12px;
    background: var(--color-cta);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}
.widget-newsletter button:hover {
    background: #fff;
    color: var(--color-cta);
}

@media (max-width: 991px) {
    .article-layout-wrapper {
        grid-template-columns: 1fr;
    }
    .article-sidebar {
        position: static;
        margin-top: 40px;
    }
    .article-sidebar .sidebar-widget {
        margin-bottom: 0;
    }
}


/* UNIFORM BORDER RADIUS */
.project-card, .post-card, .v2-card, .faq-item, .mask-image-radius, .faq-image-side img { border-radius: 12px !important; overflow: hidden !important; }
.faq-question { padding: 12px 16px !important; font-size: 16px !important; font-weight: 500 !important; }
.faq-answer-inner { padding: 0 16px 16px !important; font-size: 15px !important; }
.faq-icon-wrapper::before, .faq-icon-wrapper::after { content: ''; position: absolute; background-color: currentColor; transition: transform 0.3s ease, opacity 0.3s ease; border-radius: 2px; }
.faq-icon-wrapper::before { width: 14px; height: 2px; top: 11px; left: 5px; }
.faq-icon-wrapper::after { width: 2px; height: 14px; top: 5px; left: 11px; }
.faq-item.active .faq-icon-wrapper::after { transform: rotate(90deg) scaleY(0); opacity: 0; }
.faq-item.active .faq-icon-wrapper { transform: none !important; }
.faq-item, .faq-item:hover, .faq-item.active, .faq-question, .faq-answer, .faq-answer-inner { background: #fff !important; }
.home hr { margin-top: 25px !important; margin-bottom: 25px !important; }
.newsletter-inner { padding: 25px 20px !important; margin-top: 0 !important; }
.footer-top { padding: 25px 0 !important; margin-top: 0 !important; }
.footer-bottom { padding: 20px 0 !important; }

/* ========================================= */
/* FOOTER LAYOUT & TYPOGRAPHY OVERRIDES      */
/* ========================================= */
.footer-main-layout { display: grid !important; grid-template-columns: 1.5fr 1fr !important; gap: 60px !important; padding-bottom: 40px !important; align-items: start !important; }
.footer-left-col { margin-top: 6px !important; }
/* Removed media query from here */

.footer-right-col { display: flex; flex-direction: column; gap: 24px !important; margin-top: 0 !important; }
.footer-logo { margin-bottom: 12px !important; margin-top: 0 !important; display: inline-block; line-height: 1 !important; }
.footer-logo .logo-text { line-height: 1 !important; display: inline-block; }
.footer-desc { margin-bottom: 12px !important; }
.footer-links-area { gap: 60px !important; flex-wrap: wrap; justify-content: flex-start !important; }
.footer-block-header { display: flex !important; gap: 12px !important; align-items: center !important; margin-bottom: 20px !important; }
.footer-block-header span { font-size: 17px !important; line-height: 1 !important; }
.footer-block-header svg { width: 18px !important; height: 18px !important; color: var(--color-cta) !important; }
ul.footer-links, .footer-links ul, .footer-contact-info { padding-right: 30px !important; margin: 0 !important; list-style: none !important; }
.footer-links li, .footer-contact-info li { margin-bottom: 15px !important; font-size: 15px !important; }
.footer-links li a, .footer-contact-info li a { color: #fff !important; opacity: 0.8 !important; transition: color 0.3s ease, opacity 0.3s ease !important; text-decoration: none !important; }
.footer-links li a:hover, .footer-contact-info li a:hover { color: var(--color-primary) !important; opacity: 1 !important; }

@media (max-width: 991px) {
    /* Mobile Projects Horizontal Slider */
    .home .projects-grid {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 15px !important;
        margin-right: 0 !important; /* Align with container on the right */
        margin-left: -15px !important; /* Bleed out on the left */
        padding-right: 0 !important; /* No padding needed on the right */
        padding-left: 15px !important; /* End padding for the left edge */
        gap: 15px !important; /* Gap between cards */
        grid-template-columns: none !important; /* Override desktop grid */
    }
    
    /* Hide scrollbar for a cleaner look */
    .home .projects-grid::-webkit-scrollbar {
        display: none !important;
    }
    
    .home .projects-grid .project-card {
        flex: 0 0 75% !important; /* Next card peeks in */
        scroll-snap-align: start !important;
        height: 330px !important; /* Requested fixed height */
        display: flex !important;
        flex-direction: column !important;
    }
    
    .home .projects-grid .project-card .project-card-image {
        flex: 1 1 auto !important;
        height: auto !important;
        min-height: 210px !important; /* 330 - 120 = 210 */
    }
    
    .home .projects-grid .project-card .project-card-body {
        flex: 0 0 120px !important; /* Hardcode bottom part height */
    }

    /* FOOTER MOBILE OVERRIDES */
    .footer-main-layout { grid-template-columns: 1fr !important; gap: 40px !important; } 
    .footer-left-col { order: 2; margin-top: 0 !important; } 
    .footer-right-col { gap: 40px !important; align-items: stretch !important; text-align: right !important; }
    
    /* Logo centered */
    .footer-logo { margin: 0 auto 12px !important; display: block !important; text-align: center; }
    .footer-desc { text-align: center !important; }

    /* Hide the third column (Contact) on mobile */
    .footer-block:nth-child(3) { display: none !important; }
    
    /* Set the remaining two columns side by side */
    .footer-links-area { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 0 !important; align-items: start !important; } 
    .footer-block { padding: 0 !important; margin: 0 !important; }
    
    /* Shrink headers and align right */
    .footer-block-header { justify-content: flex-start !important; gap: 8px !important; margin-bottom: 12px !important; padding: 0 !important; }
    /* Mobile footer adjustments */
    .footer-block-header span { font-size: 17px !important; }
    .footer-block-header svg { width: 17px !important; height: 17px !important; }
    
    /* Adjust lists */
    ul.footer-links, .footer-links ul { padding-right: 0 !important; padding-left: 0 !important; margin: 0 !important; text-align: right !important; }
    .footer-links li { margin-bottom: 8px !important; font-size: 13px !important; }
}


/* === Premium WordPress Gallery Styling === */
.wp-block-gallery { gap: 24px !important; display: grid !important; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important; margin: 0 !important; padding: 0 !important; }
.wp-block-gallery .wp-block-image { margin: 0 !important; width: 100% !important; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.06); transition: transform 0.4s ease, box-shadow 0.4s ease; cursor: pointer; aspect-ratio: 1 / 1; }
.wp-block-gallery .wp-block-image:hover { transform: translateY(-5px); box-shadow: 0 12px 30px rgba(0,0,0,0.12); }
.wp-block-gallery .wp-block-image img { width: 100% !important; height: 100% !important; object-fit: cover !important; transition: transform 0.5s ease; min-height: unset; }
.wp-block-gallery .wp-block-image:hover img { transform: scale(1.05); }

/* Unified Internal Pages Desktop Top Padding (Overrides global 25px rule) */
@media (min-width: 992px) {
    .page-header, .archive-header, .page-header-map, .v2-layout, .section-about-complex {
        padding-top: 50px !important;
    }
    .hero-compact {
        padding-top: calc(var(--header-height) + 50px) !important;
    }
}

/* User Custom Mobile Overrides */
@media (max-width: 991px) {
    /* Ensure internal projects and news pages are 1 column grid and NOT sliders */
    body:not(.home) .projects-grid,
    body:not(.home) .posts-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        flex-wrap: wrap !important;
        overflow-x: visible !important;
        scroll-snap-type: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        gap: 24px !important;
        padding-bottom: 0 !important;
    }
    
    body:not(.home) .projects-grid .project-card,
    body:not(.home) .posts-grid > * {
        flex: none !important;
        width: auto !important;
        height: auto !important;
    }
    
    /* Internal pages mobile header padding to H1 */
    .page-header, .archive-header, .page-header-map {
        padding-top: 40px !important;
    }
    .v2-layout {
        padding-top: 20px !important;
    }
    .hero-compact {
        padding-top: calc(var(--header-height) + 40px) !important;
    }
    .section-about-complex {
        padding-top: 40px !important;
    }
    
    /* Internal pages mobile H1 typography */
    .page-header h1,
    .archive-header h1,
    .page-header-map h1 {
        font-size: 32px !important;
    }
    
    .v2-content-section h1 {
        font-size: 28px !important;
    }
    
    /* About page mobile alignment and spacing */
    .about-content {
        text-align: center !important;
    }
    .about-content .section-title::after {
        margin-left: auto !important;
        margin-right: auto !important;
    }
    .about-complex-grid {
        gap: 20px !important;
    }
    
    /* Eliminate all extra gaps so only the 20px grid gap remains */
    .about-content .about-text-secondary {
        margin-bottom: 0 !important;
    }
    .about-content .single-post-content {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
        display: none; /* Hide entirely if empty to prevent empty padding/margin rendering */
    }
    .about-content .single-post-content:not(:empty) {
        display: block;
    }
}

/* User Requested Typography and Mobile Margin Fixes for Single Article */
.article-featured-image img { height: 270px !important; }
.article-excerpt { font-size: 16.5px !important; font-weight: 600 !important; }
.single-post-content h2 { font-size: 20px !important; }
.single-post-content p { font-size: 15px !important; }



/* Fix post-card image width issue on mobile by removing max-height restriction */
.post-card-image { max-height: none !important; }

/* User Requested Bullet Point Styling */
.single-post-content ul {
    list-style-type: disc !important;
    padding-right: 20px !important;
    margin-bottom: 20px !important;
}
.single-post-content li {
    font-size: 15px !important;
    margin-bottom: 10px !important;
    line-height: 1.85 !important;
}
.single-post-content ul li::marker {
    color: red !important;
    font-size: 18px !important;
}

/* Fix for horizontal scroll bleeding on mobile */
@media (max-width: 991px) {
    body, html { overflow-x: hidden !important; width: 100vw !important; max-width: 100% !important; }
    .container { box-sizing: border-box !important; padding-left: 24px !important; padding-right: 24px !important; width: 100% !important; max-width: 100vw !important; }
    .article-layout-wrapper { overflow-x: hidden !important; box-sizing: border-box !important; }
}


/* === Single Article & Mobile Spacing Fixes === */
.article-featured-image img { height: 450px !important; }
@media (max-width: 991px) {
    .article-featured-image img { height: 270px !important; }
}

/* Hide empty banner widget to prevent huge gaps on mobile */
.widget-banner:empty { display: none !important; }
.article-sidebar .widget-banner { line-height: 0; }

/* Force gap reduction on mobile article layout */
@media (max-width: 991px) {
    .article-layout-wrapper { gap: 20px !important; margin-bottom: 20px !important; }
    .article-sidebar { gap: 20px !important; margin-top: 0 !important; }
}

/* Share buttons bottom gap on desktop */
.single-post-content { padding-bottom: 0 !important; margin-bottom: 0 !important; }
.share-buttons { margin-bottom: 0 !important; }
.article-layout-wrapper { margin-bottom: 20px !important; }

/* Reduce spacing in article archive page between description and banner */
.archive-header { margin-bottom: 20px !important; padding-bottom: 10px !important; }
.page-header { margin-bottom: 20px !important; padding-bottom: 10px !important; }


/* Fix archive spacing inside the description where the banner image is placed */
.archive-header p { margin-bottom: 0 !important; padding-bottom: 0 !important; }
.archive-header p:last-child { margin-bottom: 0 !important; }
.archive-header img.aligncenter { margin-top: 10px !important; margin-bottom: 0 !important; }
.section.section-archive { padding-top: 20px !important; }

/* Ensure footer form select matches other inputs */
.fc-form select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-main);
    margin-bottom: 0px;
    background: #fff;
    color: var(--color-text);
    outline: none;
}
.fc-form select:focus {
    border-color: var(--color-primary);
}

/* Fix right side gap on desktop single post */
@media (min-width: 992px) {
    .single-post-content {
        max-width: 100% !important;
        margin: 0 !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
    }
}

/* Fix single project page top spacing (exact 20px from breadcrumbs) */
.v2-layout {
    padding-top: 0 !important;
}

/* Single Project Headers with Orange Tab */
.v2-section-title {
    text-align: right;
    position: relative;
    padding-right: 30px;
    margin-right: 0;
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--color-primary);
    line-height: 1.2;
    display: flex;
    align-items: center;
}
.v2-section-title::before {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 27px;
    background-color: var(--color-cta);
}
@media (max-width: 991px) {
    .v2-section-title {
        padding-right: 24px;
        font-size: 22px;
    }
}

/* Expandable Text Boxes */
.tz-expandable { position: relative; }
.tz-expandable-content {
    overflow: hidden;
    position: relative;
    transition: max-height 0.4s ease;
}
.tz-expandable-content > *:first-child {
    margin-top: 0 !important;
}
.tz-expandable:not(.expanded) .tz-expandable-content::after {
    content: "";
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 40px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.9));
    pointer-events: none;
}
.tz-expandable.expanded .tz-expandable-content {
    max-height: 2000px !important;
}
.tz-read-more {
    color: var(--color-cta);
    font-size: 15px;
    font-weight: 400;
    cursor: pointer;
    display: inline-block;
    margin-top: 5px;
}
.tz-expandable.expanded .tz-expandable-content::after,
.tz-expandable.tz-no-overflow .tz-expandable-content::after {
    display: none !important;
}
@media (min-width: 992px) {
    #projectSpecsBoxWrapper .tz-expandable:not(.expanded) .tz-expandable-content,
    #projectDeveloperBoxWrapper .tz-expandable:not(.expanded) .tz-expandable-content {
        max-height: 80px !important;
    }
}
