/* =========================================================== */
/* 1. HERO SECTION                                             */
/* =========================================================== */
.hero-section { 
    padding: 10rem 0 8rem 0; 
    text-align: center; 
    max-width: 60rem; 
    margin: 0 auto; 
}

.hero-headline { 
    font-size: 4rem; 
    font-weight: 700; 
    line-height: 1.2; 
    color: var(--text-color); 
    margin-bottom: 1.5rem; 
}

.hero-subheading { 
    font-size: 1.125rem; 
    color: var(--text-subtle); 
    line-height: 1.6; 
    max-width: 40rem; 
    margin: 0 auto; 
}

/* =========================================================== */
/* 2. PRODUCT SHOWCASE                                         */
/* =========================================================== */
.product-showcase { 
    padding: 2rem 0; 
    max-width: var(--mw-content); 
    margin: 0 auto 8rem auto; 
}

.products-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 3rem; 
}

.product-card {
    position: relative; 
    background: var(--surface-color); 
    backdrop-filter: blur(1.25rem);
    border: 1px solid var(--border-color); 
    border-radius: 1.875rem; 
    padding: 4rem 3rem;
    overflow: hidden; 
    transition: all 0.4s ease; 
    box-shadow: var(--card-shadow);
    cursor: pointer; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    min-height: 25rem; 
}

.product-card:hover { 
    transform: translateY(-0.625rem); 
    border-color: var(--text-color); 
    background: var(--glass-bg); 
}

.card-content { 
    position: relative; 
    z-index: 2; 
    /* FIX: 'start' aligns left for EN and right for AR automatically */
    text-align: start; 
    height: 100%; 
    display: flex; 
    flex-direction: column; 
}

.product-title { font-size: 2.5rem; font-weight: 700; color: var(--text-color); margin-bottom: 1rem; }
.product-desc { font-size: 1.1rem; color: var(--text-subtle); line-height: 1.7; margin-bottom: 2.5rem; }

.bg-icon {
    position: absolute; 
    bottom: -2rem; 
    /* FIX: inset-inline-end handles RTL/LTR flipping */
    inset-inline-end: -2rem; 
    font-size: 15rem; 
    color: var(--text-color); 
    opacity: 0.03; 
    z-index: 1;
    transform: rotate(-15deg); 
    transition: 0.5s ease; 
    pointer-events: none;
}

.card-header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; }

.status-badge {
    display: inline-flex; align-items: center;
    background: rgba(255, 255, 255, 0.1); border: 1px solid var(--border-color); 
    padding: 0.5rem 0.6rem; font-size: 0.6rem; text-transform: uppercase; 
    font-weight: 700; border-radius: 3.125rem; white-space: nowrap;
}

.pulse-dot { width: 6px; height: 6px; background-color: #ff4d4d; border-radius: 50%; animation: pulseRed 2s infinite; }
@keyframes pulseRed { 0% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.8); } 100% { opacity: 1; transform: scale(1); } }

/* CONSULTATION & STUDIO */
.consultation-section { border-top: 1px solid var(--border-color); padding: 2rem 0; }
.section-headline { text-align: center; font-size: 2.5rem; font-weight: 700; margin-bottom: 5rem; }
.expertise-container { max-width: var(--mw-1); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; text-align: center; }
.expertise-item { padding: 2rem; transition: transform 0.3s; }
.expertise-item:hover { transform: translateY(-0.3125rem); } 
.exp-icon {
    display: flex; justify-content: center; align-items: center; width: 6rem; height: 6rem; margin: 0 auto 1.5rem auto; border-radius: 50%;
    background: var(--surface-color); backdrop-filter: blur(0.625rem); border: 1px solid var(--border-color);
    box-shadow: 0 0 1.875rem var(--aurora-1), inset 0 0 1.25rem rgba(255,255,255,0.1); 
    font-size: 2.5rem; color: var(--text-color); transition: all 0.4s ease;
}
.expertise-item:hover .exp-icon { transform: scale(1.1); box-shadow: 0 0 3.125rem var(--aurora-2), inset 0 0 0.625rem rgba(255,255,255,0.5); border-color: var(--text-color); }
.expertise-item h3 { font-size: 1.2rem; font-weight: 600; }
.center-btn-wrapper { text-align: center; margin-top: 5rem; }

.services-section { max-width: var(--mw-1); margin: 0 auto 5rem auto; border-top: 1px solid var(--border-color); padding-top: 8rem; }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; max-width: var(--mw-content); margin: 0 auto; }
.studio-tile {
    background: var(--surface-color); backdrop-filter: blur(1.5625rem); border-radius: 1.5rem; padding: 0.0625rem; 
    border: 1px solid var(--border-color); position: relative; overflow: hidden; transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); box-shadow: var(--card-shadow); cursor: pointer;
}
.tile-inner { background: var(--bg-color); border-radius: 1.4375rem; padding: 3rem 2rem; height: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; transition: background 0.4s ease; }
.studio-tile:hover { transform: translateY(-0.5rem); box-shadow: 0 1.25rem 3.125rem rgba(0,0,0,0.1); border-color: var(--text-color); }
.studio-tile:hover .tile-inner { background: transparent; }
.tile-icon { font-size: 2rem; color: var(--text-color); margin-bottom: 1.5rem; padding: 1rem; border-radius: 0.75rem; 
    background: var(--surface-color); border: 1px solid var(--border-color); transition: transform 0.4s ease; }
.studio-tile:hover .tile-icon { transform: scale(1.1) rotate(5deg); background: var(--glass-bg); box-shadow: 0 0 1.5625rem var(--aurora-1); } 
.studio-tile h4 { font-size: 1.4rem; font-weight: 700; margin-bottom: 0.8rem; color: var(--text-color); }
.studio-tile p { font-size: 0.95rem; color: var(--text-subtle); line-height: 1.5; font-weight: 400; }

/* =========================================================== */
/* RESPONSIVE MEDIA QUERIES */
/* =========================================================== */

@media (max-width: 64rem) {
    .products-grid { grid-template-columns: 1fr; }
    .product-card { min-height: auto; padding: 3rem; }
    .expertise-container { grid-template-columns: 1fr 1fr; padding: 0rem 3rem;}
    .services-grid { grid-template-columns: 1fr 1fr; }
    .hero-headline { font-size: 3rem; }
    .hero-section { padding-top: 4rem; padding-bottom: 4rem; }
    .product-desc {font-size: 0.9rem; margin-bottom: 1.5rem;}
    .product-showcase {margin: 0 auto; padding-bottom: 3rem}
    .consultation-section{padding: 3rem 0; margin: 0 auto;}
    .center-btn-wrapper{margin: 0 auto;}
    .services-section {margin: auto; padding: 3rem 0;}
    .footer {margin:  0rem; padding: 2rem 0rem;}
}

/* MOBILE (Max 48rem) */
@media (max-width: 48rem) {
    .hero-headline { font-size: 2.5rem; padding: 0 1rem; }
    .hero-subheading { padding: 0 1rem; }
    .section-headline { font-size: 2rem; margin-bottom: 3rem; }
    .products-grid { gap: 2rem; }

    /* RESET TO 1 COLUMN FOR CONSULTATION */
    .expertise-container { grid-template-columns: 1fr; gap: 1rem; padding-bottom: 0; width: 100%; }

    /* CONSULTATION: ROW LAYOUT (Icon Left, Text Right) */
    .expertise-item {
        display: flex; flex-direction: row; align-items: center; justify-content: flex-start; text-align: left;
        padding: 1.5rem; background: var(--surface-color); border: 1px solid var(--border-color); border-radius: 1.25rem;
    }
    .exp-icon { width: 3.5rem; height: 3.5rem; font-size: 1.5rem; margin: 0 1.2rem 0 0; flex-shrink: 0; }
    .expertise-item h3 { font-size: 1.1rem; margin: 0; }

    /* STUDIO: 2 COLUMNS, SMALL BOXES (Icon Top, Text Bottom) */
    .services-grid {
        grid-template-columns: 1fr 1fr; /* 2 Columns */
        gap: 1rem; width: 100%;
    }
    
    .studio-tile { border-radius: 1.25rem; min-height: auto; }
    .studio-tile .tile-inner {
        flex-direction: column; /* Stacked */
        align-items: center; text-align: center;
        padding: 1.5rem 1rem;
    }
    .tile-icon { font-size: 1.5rem; margin: 0 0 1rem 0; padding: 0.8rem; }
    .studio-tile h4 { font-size: 1rem; margin: 0; line-height: 1.2; }
    .studio-tile p { display: none; } /* Hide Text */

    /* BUTTONS 60% WIDTH */
    .center-btn-wrapper .glow-btn { width: 60%; padding: 1rem; font-size: 0.9rem; }
    
    /* Header Row Mobile */
    .card-header-row { gap: 0.5rem; }
    .product-title { font-size: 1.5rem; }
    .status-badge { padding: 0.4rem 0.8rem; font-size: 0.65rem; margin-bottom: 1rem; }
}

@media (max-width: 30rem) {
    .product-card { padding: 2rem 1.5rem; }
    .product-title { font-size: 1.4rem; }
    .bg-icon { font-size: 10rem; }
}

/* =========================================================== */
/* 3. CONSULTATION SECTION (RESTORED OLD VERSION)             */
/* =========================================================== */
.consultation-section { 
    border-top: 1px solid var(--border-color); 
    padding: 4rem 0; 
}

.section-headline { 
    text-align: center; 
    font-size: 2.5rem; 
    font-weight: 700; 
    margin-bottom: 5rem; 
}

.expertise-container { 
    max-width: var(--mw-content); 
    margin: 0 auto; 
    display: grid; 
    /* 4 Columns on Desktop */
    grid-template-columns: repeat(4, 1fr); 
    gap: 2rem; 
    text-align: center; 
}

.expertise-item { 
    padding: 2rem; 
    transition: transform 0.3s ease; 
}

.expertise-item:hover { 
    transform: translateY(-0.5rem); 
} 

.exp-icon {
    display: flex; 
    justify-content: center; 
    align-items: center; 
    width: 6rem; 
    height: 6rem; 
    margin: 0 auto 1.5rem auto; 
    border-radius: 50%;
    background: var(--surface-color); 
    backdrop-filter: blur(10px); 
    border: 1px solid var(--border-color);
    box-shadow: 0 0 20px var(--aurora-1); 
    font-size: 2.5rem; 
    color: var(--text-color); 
    transition: all 0.4s ease;
}

.expertise-item h3 { 
    font-size: 1.2rem; 
    font-weight: 600; 
    line-height: 1.4;
}

.center-btn-wrapper { 
    text-align: center; 
    margin-top: 4rem; 
}

/* =========================================================== */
/* RESPONSIVE MEDIA QUERIES (RESTORED OLD VERSION)            */
/* =========================================================== */

/* Tablet View */
@media (max-width: 64rem) {
    .expertise-container { 
        grid-template-columns: 1fr 1fr; /* 2 Columns */
        padding: 0 3rem;
    }
}

/* Mobile View (List Style) */
@media (max-width: 48rem) {
    .expertise-container { 
        grid-template-columns: 1fr; /* 1 Column */
        gap: 1rem; 
        width: 100%; 
    }

    .expertise-item {
        display: flex; 
        flex-direction: row; 
        align-items: center; 
        justify-content: flex-start; 
        text-align: start; /* Supports RTL Automatically */
        padding: 1.5rem; 
        background: var(--surface-color); 
        border: 1px solid var(--border-color); 
        border-radius: 1.25rem;
    }

    /* Fix Overlap: Use margin-inline to handle English/Arabic automatically */
    .exp-icon { 
        width: 3.5rem; 
        height: 3.5rem; 
        font-size: 1.5rem; 
        margin: 0;
        margin-inline-end: 1.2rem; /* Spacing between icon and text */
        flex-shrink: 0; 
    }

    .expertise-item h3 { 
        font-size: 1.1rem; 
        margin: 0; 
        flex: 1; /* Allow text to fill the space without squashing icon */
    }
}