/* ===========================================
   CSS Reset & Base Styles
   =========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --black: #000000;
    --white: #ffffff;
    --gray-light: #f5f5f5;
    --gray-medium: #cccccc;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Assistant", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-optical-sizing: auto;
    line-height: 1.6;
    color: var(--black);
    background: var(--white);
    overflow-x: hidden;
}

body[data-lang="he"] {
    direction: rtl;
    font-family: "Assistant", sans-serif;
}

body[data-lang="en"],
body[data-lang="ru"] {
    direction: ltr;
    font-family: "Lato", sans-serif;
}

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

/* ===========================================
   Header & Navigation
   =========================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 2px solid var(--black);
    z-index: 1000;
    transition: var(--transition);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    gap: 20px;
}

.logo img {
    height: 70px;
    width: auto;
}

.nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--black);
    font-weight: 500;
    font-size: 16px;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--black);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.language-selector {
    display: flex;
}

.language-selector select {
    padding: 8px 12px;
    border: 2px solid var(--black);
    background: var(--white);
    color: var(--black);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.language-selector select:hover {
    background: var(--black);
    color: var(--white);
}

/* Mobile language selector - hidden on desktop */
.language-selector-mobile {
    display: none;
}

/* Desktop language selector - visible on desktop */
.language-selector-desktop {
    display: flex;
}

@media (max-width: 768px) {
    /* Show mobile selector inside menu */
    .language-selector-mobile {
        display: flex;
        width: 100%;
        margin-top: 10px;
        padding-top: 15px;
        border-top: 2px solid var(--black);
    }

    .language-selector-mobile select {
        width: 100%;
    }

    /* Hide desktop selector */
    .language-selector-desktop {
        display: none;
    }
}

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

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--black);
    transition: var(--transition);
}

/* ===========================================
   Hero Section
   =========================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-stripe {
    position: absolute;
    top: 0;
    width: 200%;
    height: 100%;
    opacity: 0.3;
    background-image: url(images/cover.png);
    background-size: contain;
    background-position-x: center;
    background-position-y: center;
}

.hero-stripe-old {
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 50px,
        var(--black) 50px,
        var(--black) 52px
    );
    opacity: 0.03;
    pointer-events: none;
}

.hero-content {
    text-align: center;
    z-index: 1;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    letter-spacing: -2px;
    margin-bottom: 20px;
    line-height: 1.1;
}

.main-logo > img {
	height: 250px;
    width: auto;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    margin-bottom: 40px;
    font-weight: 300;
    line-height: 1.4;
}

.cta-button {
    display: inline-block;
    padding: 18px 50px;
    background: var(--black);
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    border: 3px solid var(--black);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--white);
    transition: var(--transition);
    z-index: -1;
}

.cta-button:hover {
    color: var(--black);
	background: #fff;
}

.cta-button:hover::before {
    left: 0;
}

.scroll-indicator {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 50px;
    border: 2px solid var(--black);
    border-radius: 25px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.scroll-indicator span {
    width: 4px;
    height: 10px;
    background: var(--black);
    border-radius: 2px;
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0%, 100% { transform: translateY(0); opacity: 0; }
    50% { transform: translateY(15px); opacity: 1; }
}

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

/* ===========================================
   Section Styles
   =========================================== */
section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 20px;
}

.title-underline {
    width: 80px;
    height: 4px;
    background: var(--black);
    margin: 0 auto 20px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #333;
}

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

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

.about-text p {
    font-size: 1.1rem;
    line-height: 1.3;
    margin-bottom: 40px;
    text-align: center;
}

.about-features {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 500;
}

.feature-icon {
    width: 30px;
    height: 30px;
    background: var(--black);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
}

/* ===========================================
   Services Section
   =========================================== */
.services {
    background: var(--gray-light);
    position: relative;
}

.stripe-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 100px,
        var(--black) 100px,
        var(--black) 102px
    );
    opacity: 0.02;
    pointer-events: none;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.service-item {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.service-card {
    padding: 27px;
    border: 3px solid var(--black);
    border-bottom: none;
    transition: var(--transition);
    position: relative;
    flex: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: auto;
    width: 0;
    height: 100%;
    background: var(--black);
    transition: var(--transition);
    z-index: 0;
}

[dir="rtl"] .service-card::before {
    left: auto;
    right: 0;
}

.service-card:hover::before {
    width: 100%;
}

.service-card:hover{
    color: var(--white);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.service-card p {
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.service-image {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    border: 3px solid var(--black);
    border-top: none;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.service-item:hover .service-image img {
    transform: scale(1.05);
}

/* ===========================================
   Gallery Section
   =========================================== */
.gallery {
    background: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.gallery-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.before-after-container {
    position: relative;
    border: 3px solid var(--black);
    overflow: hidden;
}

.before-after-label {
    position: absolute;
    top: 10px;
    padding: 5px 15px;
    background: var(--black);
    color: var(--white);
    font-weight: 600;
    font-size: 14px;
    z-index: 1;
}

[dir="rtl"] .before-after-label.before {
    right: 10px;
}

[dir="ltr"] .before-after-label.before {
    left: 10px;
}

[dir="rtl"] .before-after-label.after {
    left: 10px;
}

[dir="ltr"] .before-after-label.after {
    right: 10px;
}

.before-after-placeholder {
    width: 100%;
    padding-bottom: 120%;
    background: var(--gray-light);
    position: relative;
}

.before-after-placeholder::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 3px solid var(--black);
    border-radius: 50%;
    opacity: 0.1;
}

.before-after-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* ===========================================
   Before/After Image Comparison Slider
   =========================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.comparison-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    border: 4px solid var(--black);
    cursor: ew-resize;
    user-select: none;
    background: var(--black);
	max-height: 300px;
}

.comparison-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
}

.comparison-after {
    z-index: 1;
}

.comparison-before {
    z-index: 2;
    clip-path: inset(0 0 0 0);
}

.comparison-slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: var(--black);
    z-index: 3;
    cursor: ew-resize;
    transform: translateX(-50%);
}

.comparison-slider-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid var(--black);
    border-radius: 50%;
}

.comparison-slider-handle::after {
    content: '⟷';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: bold;
    color: var(--black);
    z-index: 1;
}

.comparison-label {
    position: absolute;
    bottom: 10px;
    padding: 4px 12px;
    background: var(--black);
    color: var(--white);
    font-weight: 600;
    font-size: 14px;
    z-index: 4;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* LTR: Before on left, After on right */
.comparison-label.before {
    left: 10px;
}

.comparison-label.after {
    right: 10px;
    left: auto;
}

/* RTL: Before on right, After on left */
[dir="rtl"] .comparison-label.before {
    right: 10px;
    left: auto;
}

[dir="rtl"] .comparison-label.after {
    left: 10px;
    right: auto;
}

/* Remove old styles */
.gallery-item {
    display: block;
}

.before-after-container {
    display: none;
}

/* ===========================================
   Testimonials Section
   =========================================== */
.testimonials {
    background: var(--gray-light);
    position: relative;
}

.stripe-bg-reverse {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 50px,
        var(--black) 50px,
        var(--black) 52px
    );
    opacity: 0.02;
    pointer-events: none;
}

/* Carousel Container */
.testimonials-carousel {
    position: relative;
    margin-bottom: 60px;
    user-select: none;
}

.carousel-wrapper {
    overflow: hidden;
    position: relative;
}

.carousel-track {
    display: flex;
    transition: transform 0.3s ease-in-out;
    will-change: transform;
}

.carousel-slide {
    min-width: 100%;
    padding: 0 10px;
}

.testimonials-written {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background: var(--white);
    padding: 40px 30px;
    border: 3px solid var(--black);
    position: relative;
    transition: var(--transition);
    height: 100%;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 10px 10px 0 var(--black);
}

.testimonial-quote {
    font-size: 4rem;
    line-height: 1;
    font-weight: 900;
    opacity: 0.1;
    position: absolute;
    top: 20px;
}

[dir="rtl"] .testimonial-quote {
    right: 20px;
}

[dir="ltr"] .testimonial-quote {
    left: 20px;
}

.testimonial-text {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 20px;
    position: relative;
}

.testimonial-author {
    font-weight: 600;
    text-align: right;
}

[dir="ltr"] .testimonial-author {
    text-align: left;
}

/* Carousel Navigation */
.carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.carousel-button {
    width: 50px;
    height: 50px;
    background: var(--white);
    border: 3px solid var(--black);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
}

.carousel-button:hover {
    background: var(--black);
    color: var(--white);
}

.carousel-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carousel-dots {
    display: flex;
    gap: 10px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--black);
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dot.active {
    background: var(--black);
}

/* Video Carousel */
.subsection-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
}

.video-carousel {
    position: relative;
    user-select: none;
}

.video-carousel-wrapper {
    overflow: hidden;
    position: relative;
}

.video-carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

.video-carousel-slide {
    min-width: 100%;
    display: flex;
    justify-content: center;
    padding: 0 10px;
}

.video-container {
    max-width: 400px;
    width: 100%;
    border: 4px solid var(--black);
    background: var(--black);
}

.video-container video {
    width: 100%;
    height: auto;
    display: block;
}

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

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group input,
.form-group textarea {
    padding: 15px;
    border: 2px solid var(--black);
    background: var(--white);
    font-size: 16px;
    font-family: inherit;
    transition: var(--transition);
    direction: ltr;
    text-align: left;
}

[dir="rtl"] .form-group input,
[dir="rtl"] .form-group textarea {
    direction: rtl;
    text-align: right;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-button {
    padding: 18px 40px;
    background: var(--black);
    color: var(--white);
    border: 3px solid var(--black);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--white);
    transition: var(--transition);
    z-index: -1;
}

.submit-button:hover {
    color: var(--black);
}

.submit-button:hover::before {
    left: 0;
}

.form-message {
    padding: 15px;
    text-align: center;
    font-weight: 500;
    border: 2px solid var(--black);
    display: none;
}

.form-message.success {
    display: block;
    background: var(--white);
    color: var(--black);
}

.form-message.error {
    display: block;
    background: var(--black);
    color: var(--white);
}

/* ===========================================
   Footer
   =========================================== */
.footer {
    background: var(--black);
    color: var(--white);
    padding: 40px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-logo img {
    height: 200px;
    width: auto;
    filter: invert(1);
}

.footer-text p {
    font-size: 14px;
}

.footer-social {
    display: flex;
    gap: 16px;
    align-items: center;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease, transform 0.3s ease;
    text-decoration: none;
}

.footer-social a:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.footer-social svg {
    width: 20px;
    height: 20px;
    fill: #ffffff;
}

.footer-links {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-nav-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
    letter-spacing: 0.05em;
}

.footer-nav-link:hover {
    color: var(--white);
}

/* ===========================================
   Responsive Design
   =========================================== */
@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        border-bottom: 2px solid var(--black);
        gap: 15px;
        z-index: 999;
    }

    .nav.active {
        display: flex;
    }

    .language-selector {
        order: 999;
        width: 100%;
    }

    .language-selector select {
        width: 100%;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .hero {
        min-height: 80vh;
    }
    
    .hero-stripe {
        background-image: url(images/cover-mobile.png);
        width: 100%;
        background-size: cover;
    }
    
    /*.hero-stripe {
        background-size: cover;
        background-position-x: 95%;
    }*/

    section {
        padding: 60px 0;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .comparison-slider {
        max-width: 100%;
        max-height: 180px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    @media (min-width: 769px) and (max-width: 1024px) {
        .services-grid {
            grid-template-columns: repeat(2, 1fr);
        }
    }

    .testimonials-written {
        grid-template-columns: 1fr;
    }

    .about-features {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .cta-button {
        padding: 12px 35px;
        margin-bottom: 15px;
    }
    
    .feature-item {
        width: 185px;
    }
    
    .comparison-slider-handle::before {
        width: 40px;
        height: 40px;
        border: 3px solid var(--black);
    }
    
    .comparison-slider-handle::after {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 5px 0;
    }
    
    .logo {
        height: 45px;
    }

    .logo img {
        height: 100%;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .gallery-item {
        grid-template-columns: 1fr;
    }
    
    .footer-logo img {
        height: auto;
        width: 95%;
    }
}

/* ===========================================
   Animations & Utilities
   =========================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Smooth scrolling offset for fixed header */
section[id] {
    scroll-margin-top: 80px;
}

/* ===========================================
   FAQ Accordion
   =========================================== */
.faq {
    padding: 80px 0;
    background: var(--gray-light);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--white);
    border: 1px solid var(--gray-medium);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: right;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    color: var(--black);
    line-height: 1.5;
    transition: background 0.2s ease;
}

.faq-question:hover {
    background: var(--gray-light);
}

.faq-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    position: relative;
}

.faq-icon::before,
.faq-icon::after {
    content: '';
    position: absolute;
    background: var(--black);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.faq-icon::before {
    width: 2px;
    height: 100%;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.faq-icon::after {
    width: 100%;
    height: 2px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.faq-question[aria-expanded="true"] .faq-icon::before {
    transform: translateX(-50%) rotate(90deg);
    opacity: 0;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-answer p {
    padding: 0 24px 20px;
    font-size: 15px;
    line-height: 1.7;
    color: #444;
}

.faq-item.open .faq-answer {
    max-height: 500px;
}

/* ===========================================
   WhatsApp Floating Button
   =========================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    right: auto;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
}

[dir="rtl"] .whatsapp-float {
    right: 30px;
    left: auto;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.6);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: #ffffff;
}

/* ===========================================
   Blog Page Styles
   =========================================== */

.blog-header {
    padding: 120px 0 60px;
    text-align: center;
    background: var(--white);
    border-bottom: 3px solid var(--black);
}

.blog-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    margin-bottom: 20px;
}

.blog-subtitle {
    font-size: 1.2rem;
    color: #333;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    padding: 80px 0;
}

.blog-card {
    background: #ffffff;
    border: 3px solid var(--black);
    padding: 0;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: #f0f0f0;
    background-image: url('/images/cover.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(4px) brightness(1) saturate(0.8);
    z-index: 0;
    transform: scale(1.1);
    pointer-events: none;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 10px 10px 0 var(--black);
}

.blog-card-content {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
    background: rgb(0 0 0 / 60%);
}

.blog-card-date {
    font-size: 0.9rem;
    color: #d9d9d9;
    margin-bottom: 15px;
}

.blog-card-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
    color: #fff;
}

.blog-card-excerpt {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
    color: #dfdfdf;
}

.blog-card-link {
    display: inline-block;
    padding: 12px 30px;
    background: var(--black);
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    border: 2px solid var(--black);
    transition: var(--transition);
    align-self: flex-start;
    position: relative;
    z-index: 2;
}

.blog-card-link:hover {
    background: var(--white);
    color: var(--black);
}

.post-hero {
    position: relative;
    height: 400px;
    background: var(--black);
    overflow: hidden;
    margin-top: 90px;
}

.post-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
}

.post-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: var(--white);
}

.post-hero-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 15px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.post-hero-meta {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 1rem;
    opacity: 0.9;
    flex-wrap: wrap;
}

.post-content {
    max-width: 800px;
    margin: 80px auto;
    padding: 0 20px;
}

.post-content h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 50px 0 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--black);
}

.post-content h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 40px 0 20px;
}

.post-content p {
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 25px;
    color: #222;
}

.post-content ul,
.post-content ol {
    margin: 25px 0;
    padding-right: 30px;
    line-height: 1.8;
}

[dir="ltr"] .post-content ul,
[dir="ltr"] .post-content ol {
    padding-right: 0;
    padding-left: 30px;
}

.post-content li {
    font-size: 1.15rem;
    margin-bottom: 15px;
}

.post-cta {
    background: var(--white);
    color: var(--black);
    padding: 60px 40px;
    text-align: center;
    margin: 80px 0;
    border: 10px solid var(--black);
}

.post-cta h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--black);
	margin-top: 0px;
}


.post-cta > .term-content p { 
	color: var(--black);
}

.post-cta p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--black);
}

.back-to-blog {
    display: inline-block;
    padding: 12px 30px;
    background: var(--white);
    color: var(--black);
    text-decoration: none;
    font-weight: 600;
    border: 2px solid var(--black);
    transition: var(--transition);
    margin-bottom: 40px;
}

.back-to-blog:hover {
    background: var(--black);
    color: var(--white);
}

/* ===========================================
   Glossary Page Styles
   =========================================== */

.glossary-header {
    padding: 120px 0 60px;
    text-align: center;
    background: var(--white);
    border-bottom: 3px solid var(--black);
}

.glossary-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    margin-bottom: 20px;
}

.glossary-subtitle {
    font-size: 1.2rem;
    color: #333;
}

.glossary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 80px 0;
}

.glossary-card {
    border: 3px solid var(--black);
    padding: 25px;
    transition: var(--transition);
    background: var(--white);
    text-decoration: none;
    color: var(--black);
    display: block;
    position: relative;
    overflow: hidden;
}

.glossary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--black);
    transition: var(--transition);
    z-index: 0;
}

[dir="rtl"] .glossary-card::before {
    left: auto;
    right: -100%;
}

.glossary-card:hover::before {
    left: 0;
}

[dir="rtl"] .glossary-card:hover::before {
    right: 0;
    left: auto;
}

.glossary-card:hover {
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 6px 6px 0 var(--black);
}

.glossary-card-term {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.glossary-card-brief {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #555;
    position: relative;
    z-index: 1;
    transition: color 0.3s;
}

.glossary-card:hover .glossary-card-brief {
    color: #ddd;
}

/* Glossary Term Page */
.term-hero {
    background: var(--black);
    color: var(--white);
    padding: 140px 0 60px;
    text-align: center;
}

.term-hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    margin-bottom: 20px;
}

.term-hero-subtitle {
    font-size: 1.3rem;
    opacity: 0.8;
}

.term-content {
    max-width: 800px;
    margin: 80px auto;
    padding: 0 20px;
}

.term-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 40px 0 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--black);
}

.term-content h3 {
    font-size: 1.6rem;
    font-weight: 600;
    margin: 35px 0 15px;
}

.post-cta > h3 {
	margin-top: 0px;
	font-size: 2rem;
    font-weight: 700;
}

.term-content p {
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 25px;
    color: #222;
}

.term-content ul,
.term-content ol {
    margin: 25px 0;
    padding-right: 30px;
    line-height: 1.8;
}

[dir="ltr"] .term-content ul,
[dir="ltr"] .term-content ol {
    padding-right: 0;
    padding-left: 30px;
}

.term-content li {
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.back-to-glossary {
    display: inline-block;
    padding: 12px 30px;
    background: var(--white);
    color: var(--black);
    text-decoration: none;
    font-weight: 600;
    border: 2px solid var(--black);
    transition: var(--transition);
    margin-bottom: 40px;
}

.back-to-glossary:hover {
    background: var(--black);
    color: var(--white);
}

/* ===========================================
   Blog & Glossary Responsive
   =========================================== */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
        padding: 60px 0;
    }

    .blog-header,
    .glossary-header {
        padding: 100px 0 40px;
    }

    .post-hero {
        height: 300px;
    }

    .post-content,
    .term-content {
        margin: 40px auto;
    }

    .glossary-grid {
        grid-template-columns: 1fr;
        padding: 60px 0;
    }

    .term-hero {
        padding: 120px 0 40px;
    }

    .post-cta {
        padding: 40px 20px;
        margin: 40px 0;
    }
}

/* ===========================================
   Blog – Post Images & Highlight Box
   =========================================== */

.post-image {
    margin: 50px 0;
    border: 3px solid var(--black);
}

.post-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-image-caption {
    padding: 15px;
    background: var(--gray-light);
    border-top: 2px solid var(--black);
    font-size: 0.95rem;
    text-align: center;
    font-style: italic;
}

.highlight-box {
    background: var(--gray-light);
    border-right: 5px solid var(--black);
    padding: 30px;
    margin: 40px 0;
}

.highlight-box h3 {
    margin-top: 0;
    font-size: 1.5rem;
}

/* ===========================================
   Blog – Related Posts
   =========================================== */

.related-posts {
    margin: 60px 0;
}

.related-posts-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 30px;
    border-bottom: 3px solid var(--black);
    padding-bottom: 15px;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.related-post-card {
    border: 2px solid var(--black);
    padding: 20px;
    text-decoration: none;
    color: var(--black);
    display: block;
    transition: var(--transition);
}

.related-post-card:hover {
    background: var(--black);
    color: var(--white);
}

.related-post-date {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 8px;
}

.related-post-card:hover .related-post-date {
    color: #ccc;
}

.related-post-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.related-post-excerpt {
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ===========================================
   Glossary – Related Terms
   =========================================== */

.related-terms {
    margin: 60px 0;
    padding-top: 40px;
    border-top: 3px solid var(--black);
}

.related-terms-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 30px;
}

.related-terms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.related-term-link {
    display: block;
    padding: 20px;
    border: 2px solid var(--black);
    text-decoration: none;
    color: var(--black);
    font-weight: 600;
    font-size: 1.1rem;
    text-align: center;
    transition: var(--transition);
}

.related-term-link:hover {
    background: var(--black);
    color: var(--white);
}
