/*
Theme Name: ERAM MALTY Services - Xtra Child Theme (RTL Arabic)
Theme URI: https://eram-malty.com
Description: Child theme for Xtra Theme - ERAM MALTY SERVICES COMPANY Arabic RTL customization
Author: ERAM MALTY SERVICES COMPANY
Author URI: https://eram-malty.com
Template: xtra
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: eram-malty
Tags: corporate, technology, security, network, advertising, printing, rtl, arabic
*/

/* ========================================
   ERAM MALTY Official Brand Color Palette
   ======================================== */
:root {
    --eram-primary: #172B36;
    --eram-secondary: #D5A23A;
    --eram-text: #39434A;
    --eram-accent: #C62828;
    --eram-background: #FFFFFF;
    --eram-surface: #F4F6F7;
    --eram-success: #147D73;
    --eram-white: #FFFFFF;
    --eram-light-gray: #F4F6F7;
    --eram-medium-gray: #7A8691;
    --eram-dark-gray: #39434A;
    --eram-border: #E0E5E8;
}

/* ========================================
   RTL & Arabic Font Support
   ======================================== */
html {
    direction: rtl;
    text-align: right;
}

body {
    font-family: 'Cairo', 'Tajawal', 'Noto Sans Arabic', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--eram-text);
    line-height: 1.8;
    direction: rtl;
    text-align: right;
    background-color: var(--eram-background);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cairo', 'Tajawal', 'Noto Sans Arabic', sans-serif;
    font-weight: 700;
    color: var(--eram-primary);
    line-height: 1.4;
    direction: rtl;
    text-align: right;
}

/* ========================================
   Button Styles (RTL)
   ======================================== */
.btn-era-primary {
    background: var(--eram-primary);
    color: var(--eram-white);
    border: 2px solid var(--eram-primary);
    border-radius: 4px;
    padding: 14px 32px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
}

.btn-era-primary:hover {
    background: #0d1a22;
    border-color: #0d1a22;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(23, 43, 54, 0.3);
}

.btn-era-secondary {
    background: transparent;
    color: var(--eram-primary);
    border: 2px solid var(--eram-primary);
    border-radius: 4px;
    padding: 14px 32px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
}

.btn-era-secondary:hover {
    background: var(--eram-primary);
    color: var(--eram-white);
}

.btn-era-accent {
    background: var(--eram-secondary);
    color: var(--eram-primary);
    border: 2px solid var(--eram-secondary);
    border-radius: 4px;
    padding: 14px 32px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
}

.btn-era-accent:hover {
    background: #c4942e;
    border-color: #c4942e;
    color: var(--eram-white);
}

.btn-era-danger {
    background: var(--eram-accent);
    color: var(--eram-white);
    border: 2px solid var(--eram-accent);
    border-radius: 4px;
    padding: 14px 32px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
}

.btn-era-danger:hover {
    background: #a51e1e;
    border-color: #a51e1e;
}

.btn-era-success {
    background: var(--eram-success);
    color: var(--eram-white);
    border: 2px solid var(--eram-success);
    border-radius: 4px;
    padding: 14px 32px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
}

.btn-era-success:hover {
    background: #0f635b;
    border-color: #0f635b;
}

/* ========================================
   Hero Section (RTL)
   ======================================== */
.era-hero {
    background: linear-gradient(135deg, var(--eram-primary) 0%, #0d1a22 100%);
    position: relative;
    overflow: hidden;
    padding: 120px 0;
    direction: rtl;
    text-align: right;
}

.era-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(213,162,58,0.08)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

.era-hero .elementor-container {
    position: relative;
    z-index: 2;
    direction: rtl;
}

.era-hero h1 {
    color: var(--eram-white);
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 24px;
    text-align: right;
    direction: rtl;
}

.era-hero .era-subtitle {
    color: rgba(255,255,255,0.9);
    font-size: clamp(18px, 2.5vw, 22px);
    font-weight: 400;
    line-height: 1.7;
    max-width: 720px;
    margin-bottom: 36px;
    text-align: right;
    direction: rtl;
}

.era-hero .elementor-button-wrapper {
    display: flex;
    gap: 16px;
    justify-content: flex-start;
    direction: rtl;
}

/* ========================================
   Section Styling (RTL)
   ======================================== */
.era-section {
    padding: 100px 0;
    direction: rtl;
    text-align: right;
}

.era-section-alt {
    background: var(--eram-surface);
}

.era-section-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    text-align: center;
    margin-bottom: 16px;
    position: relative;
    direction: rtl;
    color: var(--eram-primary);
}

.era-section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--eram-secondary);
    margin: 16px auto 0;
    border-radius: 2px;
}

.era-section-subtitle {
    color: var(--eram-medium-gray);
    font-size: 18px;
    text-align: center;
    max-width: 720px;
    margin: 0 auto 60px;
    line-height: 1.8;
    direction: rtl;
}

/* ========================================
   Service Cards (RTL)
   ======================================== */
.era-service-card {
    background: var(--eram-background);
    border-radius: 12px;
    padding: 40px 32px;
    transition: all 0.3s ease;
    border: 1px solid var(--eram-border);
    height: 100%;
    position: relative;
    overflow: hidden;
    direction: rtl;
    text-align: right;
}

.era-service-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(270deg, var(--eram-primary), var(--eram-secondary));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.era-service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 48px rgba(23, 43, 54, 0.12);
    border-color: var(--eram-secondary);
}

.era-service-card:hover::before {
    transform: scaleX(1);
}

.era-service-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--eram-primary), #244556);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--eram-white);
    font-size: 28px;
    margin-left: auto;
    margin-right: 0;
}

.era-service-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--eram-primary);
    text-align: right;
    direction: rtl;
}

.era-service-card p {
    color: var(--eram-text);
    font-size: 15px;
    line-height: 1.8;
    margin: 0;
    text-align: right;
    direction: rtl;
}

/* ========================================
   Why Choose Us (RTL)
   ======================================== */
.era-feature-item {
    display: flex;
    gap: 20px;
    padding: 24px 0;
    border-bottom: 1px solid var(--eram-border);
    direction: rtl;
}

.era-feature-item:last-child {
    border-bottom: none;
}

.era-feature-icon {
    width: 56px;
    height: 56px;
    background: var(--eram-surface);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--eram-primary);
    font-size: 24px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    margin-left: 0;
    margin-right: auto;
}

.era-feature-item:hover .era-feature-icon {
    background: var(--eram-primary);
    color: var(--eram-white);
}

.era-feature-content {
    text-align: right;
    direction: rtl;
}

.era-feature-content h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--eram-primary);
    text-align: right;
    direction: rtl;
}

.era-feature-content p {
    color: var(--eram-text);
    font-size: 15px;
    margin: 0;
    line-height: 1.8;
    text-align: right;
    direction: rtl;
}

/* ========================================
   Project Cards (RTL)
   ======================================== */
.era-project-card {
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 4/3;
    direction: rtl;
}

.era-project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.era-project-card:hover img {
    transform: scale(1.05);
}

.era-project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(23,43,54,0) 50%, var(--eram-primary) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 32px;
    opacity: 0;
    transition: opacity 0.3s ease;
    direction: rtl;
    text-align: right;
}

.era-project-card:hover .era-project-overlay {
    opacity: 1;
}

.era-project-category {
    color: var(--eram-secondary);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    text-align: right;
    direction: rtl;
}

.era-project-title {
    color: var(--eram-white);
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    text-align: right;
    direction: rtl;
}

/* ========================================
   Stats Counter (RTL)
   ======================================== */
.era-stats {
    background: var(--eram-primary);
    padding: 80px 0;
    direction: rtl;
}

.era-stat-item {
    text-align: center;
    padding: 24px;
    direction: rtl;
}

.era-stat-number {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 800;
    color: var(--eram-white);
    line-height: 1;
    margin-bottom: 8px;
    font-family: 'Cairo', sans-serif;
}

.era-stat-label {
    color: rgba(255,255,255,0.8);
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Cairo', sans-serif;
}

/* ========================================
   Contact Section (RTL)
   ======================================== */
.era-contact-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
    direction: rtl;
}

.era-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 24px;
    background: var(--eram-background);
    border-radius: 12px;
    border: 1px solid var(--eram-border);
    transition: all 0.3s ease;
    direction: rtl;
    text-align: right;
}

.era-contact-item:hover {
    border-color: var(--eram-secondary);
    transform: translateX(-8px);
}

.era-contact-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--eram-primary), #244556);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--eram-white);
    font-size: 22px;
    flex-shrink: 0;
    margin-left: 0;
    margin-right: auto;
}

.era-contact-details {
    text-align: right;
    direction: rtl;
}

.era-contact-details h5 {
    font-size: 16px;
    font-weight: 700;
    color: var(--eram-primary);
    margin: 0 0 4px;
    text-align: right;
    direction: rtl;
}

.era-contact-details a,
.era-contact-details span {
    color: var(--eram-text);
    font-size: 16px;
    text-decoration: none;
    transition: color 0.3s ease;
    direction: rtl;
}

.era-contact-details a:hover {
    color: var(--eram-primary);
}

/* ========================================
   WhatsApp Float Button (RTL - Left side)
   ======================================== */
.era-whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 64px;
    height: 64px;
    background: var(--eram-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--eram-white);
    font-size: 28px;
    box-shadow: 0 8px 24px rgba(20, 125, 115, 0.4);
    z-index: 9999;
    animation: era-pulse 2s infinite;
    text-decoration: none;
    direction: ltr;
}

@keyframes era-pulse {
    0% { box-shadow: 0 8px 24px rgba(20, 125, 115, 0.4); }
    50% { box-shadow: 0 8px 32px rgba(20, 125, 115, 0.6); }
    100% { box-shadow: 0 8px 24px rgba(20, 125, 115, 0.4); }
}

.era-whatsapp-float:hover {
    transform: scale(1.1);
}

/* ========================================
   Footer (RTL)
   ======================================== */
.era-footer {
    background: var(--eram-primary);
    color: var(--eram-white);
    padding: 80px 0 30px;
    direction: rtl;
    text-align: right;
}

.era-footer a {
    color: rgba(255,255,255,0.7);
    transition: color 0.3s ease;
    direction: rtl;
}

.era-footer a:hover {
    color: var(--eram-secondary);
}

.era-footer-logo {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 16px;
    text-align: right;
    direction: rtl;
    font-family: 'Cairo', sans-serif;
}

.era-footer-tagline {
    color: rgba(255,255,255,0.6);
    font-size: 15px;
    line-height: 1.8;
    max-width: 300px;
    text-align: right;
    direction: rtl;
}

.era-footer-title {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 24px;
    color: var(--eram-white);
    text-align: right;
    direction: rtl;
    font-family: 'Cairo', sans-serif;
}

.era-footer-links li {
    margin-bottom: 12px;
    text-align: right;
    direction: rtl;
}

.era-footer-links a {
    text-align: right;
    direction: rtl;
}

.era-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 60px;
    padding-top: 30px;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    direction: rtl;
}

/* ========================================
   Form Styles (RTL)
   ======================================== */
.era-form-field {
    direction: rtl;
    text-align: right;
}

.era-form-field input,
.era-form-field textarea,
.era-form-field select {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', sans-serif;
    background: var(--eram-background);
    border: 1px solid var(--eram-border);
    border-radius: 8px;
    padding: 16px 20px;
    color: var(--eram-text);
}

.era-form-field input:focus,
.era-form-field textarea:focus,
.era-form-field select:focus {
    outline: none;
    border-color: var(--eram-secondary);
    box-shadow: 0 0 0 3px rgba(213, 162, 58, 0.2);
}

.era-form-field input::placeholder,
.era-form-field textarea::placeholder {
    direction: rtl;
    text-align: right;
    color: var(--eram-medium-gray);
}

/* ========================================
   Responsive (RTL)
   ======================================== */
@media (max-width: 1024px) {
    .era-section {
        padding: 80px 0;
    }
    .era-hero {
        padding: 100px 0;
    }
}

@media (max-width: 768px) {
    .era-section {
        padding: 60px 0;
    }
    .era-hero {
        padding: 80px 0;
        text-align: center;
    }
    .era-hero .era-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    .era-service-card {
        padding: 32px 24px;
    }
    .era-contact-item:hover {
        transform: none;
    }
    .era-whatsapp-float {
        bottom: 20px;
        left: 20px;
        width: 56px;
        height: 56px;
        font-size: 24px;
    }
    .era-hero .elementor-button-wrapper {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .era-hero h1 {
        font-size: 28px;
    }
    .era-section-title {
        font-size: 24px;
    }
    .era-stat-number {
        font-size: 32px;
    }
}

/* ========================================
   Elementor Editor Compatibility
   ======================================== */
.elementor-editor-active .era-hero,
.elementor-editor-active .era-section,
.elementor-editor-active .era-service-card,
.elementor-editor-active .era-project-card {
    min-height: 200px;
}

/* Force RTL in Elementor Editor */
.elementor-editor-active body {
    direction: rtl;
}

.elementor-editor-active .elementor {
    direction: rtl;
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .era-whatsapp-float,
    .elementor-button,
    .era-project-overlay {
        display: none !important;
    }
}

/* ========================================
   Elementor Widget RTL Overrides
   ======================================== */
.elementor-widget-heading .elementor-heading-title {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', sans-serif;
}

.elementor-widget-text-editor .elementor-text-editor {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', sans-serif;
}

.elementor-widget-button .elementor-button {
    direction: rtl;
    font-family: 'Cairo', sans-serif !important;
}

.elementor-widget-icon-box .elementor-icon-box-content {
    direction: rtl;
    text-align: right;
}

.elementor-widget-icon-box .elementor-icon-box-title {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', sans-serif;
}

.elementor-widget-icon-box .elementor-icon-box-description {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', sans-serif;
}

.elementor-widget-icon-list .elementor-icon-list-text {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', sans-serif;
}

.elementor-widget-counter .elementor-counter-title {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', sans-serif;
}

.elementor-widget-form .elementor-field {
    direction: rtl;
    text-align: right;
}

.elementor-widget-form .elementor-field-group input,
.elementor-widget-form .elementor-field-group textarea,
.elementor-widget-form .elementor-field-group select {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', sans-serif;
}

.elementor-widget-nav-menu .elementor-nav-menu {
    direction: rtl;
}

.elementor-widget-nav-menu .elementor-item {
    direction: rtl;
    text-align: right;
}

.elementor-widget-image-carousel .swiper-slide {
    direction: rtl;
}

.elementor-widget-posts .elementor-post__card {
    direction: rtl;
    text-align: right;
}

.elementor-widget-posts .elementor-post__title {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', sans-serif;
}

.elementor-widget-posts .elementor-post__excerpt {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', sans-serif;
}

.elementor-widget-tabs .elementor-tab-title {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', sans-serif;
}

.elementor-widget-tabs .elementor-tab-content {
    direction: rtl;
    text-align: right;
}

.elementor-widget-divider .elementor-divider-separator {
    margin-right: auto;
    margin-left: auto;
}

/* Badge/Tag styling */
.elementor-badge {
    background: var(--eram-secondary);
    color: var(--eram-primary);
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
}

/* Alert/Notification */
.elementor-alert {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', sans-serif;
}

/* Progress Bar */
.elementor-progress-bar {
    direction: rtl;
}

/* Testimonial Carousel */
.elementor-testimonial .elementor-testimonial-content {
    direction: rtl;
    text-align: right;
}

/* Accordion/Toggle */
.elementor-accordion .elementor-tab-title {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', sans-serif;
}

.elementor-accordion .elementor-tab-content {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', sans-serif;
}