/* 
   UMBELLA - Electrical & Audio Appliance Repair Center
   Premium Stylesheet 
   Establishment: 2013
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Color Palette - Dark Mode (Default) */
    --bg-body: #050a14;
    --bg-surface: #0f172a;
    --bg-surface-hover: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --accent-primary: #38bdf8;
    /* Electric Blue */
    --accent-secondary: #fbbf24;
    /* Amber/Gold */
    --border-color: #1e293b;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
    --shadow-glow: 0 0 15px rgba(56, 189, 248, 0.15);

    /* Spacing */
    --container-padding: 2rem;
    --section-spacing: 8rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-hover: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent-primary: #0284c7;
    --accent-secondary: #d97706;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 15px rgba(2, 132, 199, 0.1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    font-weight: 700;
    color: var(--text-primary);
}

/* Fluid Typography */
h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
textarea {
    font-family: inherit;
    border: none;
    outline: none;
}

.container {
    max-width: 1280px;
    /* Slightly wider container */
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Typography Utilities */
.text-accent {
    color: var(--accent-primary);
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title {
    /* Font size handled by fluid typography h2/h3 logic above for better response */
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(5, 10, 20, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    /* Subtler border */
    padding: 1.25rem 0;
    transition: all var(--transition-smooth);
}

[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-logo img {
    height: 48px;
    /* Slightly larger logo */
    width: auto;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent-primary);
    transition: width 0.3s ease;
}

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

.nav-link:hover,
.nav-link.active {
    color: var(--accent-primary);
}

.theme-toggle {
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.lang-toggle {
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
    white-space: nowrap;
    font-weight: 500;
}

.lang-toggle:hover,
.theme-toggle:hover {
    background: var(--bg-surface-hover);
    color: var(--accent-secondary);
    border-color: var(--accent-secondary);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
    background: transparent;
    padding: 0.5rem;
    /* Tap friendly */
}

/* Hero Section */
.hero {
    min-height: 90vh;
    /* Taller hero */
    display: flex;
    align-items: center;
    position: relative;
    padding: 8rem 0;
    background: url('../images/hero-bg.png') no-repeat center center/cover;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(5, 10, 20, 0.85), rgba(5, 10, 20, 0.95));
    z-index: 1;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    line-height: 1.1;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.35rem;
    color: #cbd5e1;
    /* Lighter text for hero contrast */
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-group {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    /* Larger buttons */
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 9999px;
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 160px;
    /* Consistent width */
}

.btn-primary {
    background-color: var(--accent-primary);
    color: #fff;
    box-shadow: 0 4px 14px 0 rgba(56, 189, 248, 0.4);
}

[data-theme="light"] .btn-primary {
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px 0 rgba(56, 189, 248, 0.3);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

[data-theme="light"] .btn-secondary {
    background-color: rgba(255, 255, 255, 0.8);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

[data-theme="light"] .btn-secondary:hover {
    background-color: #fff;
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Hero Glow (Removed JS glow, using gradient overlay instead) */
.hero-glow {
    display: none;
}

/* About Section */
.about {
    padding: var(--section-spacing) 0;
    background-color: var(--bg-body);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    /* Increased gap */
    align-items: center;
}

.about-text h2 {
    margin-bottom: 2rem;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-image {
    position: relative;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    aspect-ratio: 4/3;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

/* Services */
.services {
    padding: var(--section-spacing) 0;
    background-color: var(--bg-surface);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    /* Wider cards */
    gap: 2.5rem;
}

.service-card {
    background-color: var(--bg-body);
    padding: 3rem 2rem;
    border-radius: 1.5rem;
    border: 1px solid var(--border-color);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-primary);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.2), 0 0 15px rgba(56, 189, 248, 0.1);
}

.service-img-container {
    width: 100%;
    height: 180px;
    /* Fixed height for consistency */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border-radius: 0.5rem;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
}

.service-img-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.service-card:hover .service-img-container img {
    transform: scale(1.1);
}

.service-icon {
    font-size: 2rem;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    width: 3.5rem;
    height: 3.5rem;
    background: rgba(56, 189, 248, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    transition: background 0.3s ease, transform 0.3s ease;
}

.service-card:hover .service-icon {
    background: var(--accent-primary);
    color: white;
    transform: scale(1.1) rotate(-5deg);
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    flex-grow: 1;
    /* Pushes content to fill height */
}

/* Why Choose Us & Trust */
.features {
    padding: var(--section-spacing) 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.feature-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 1.5rem;
    border-radius: 1rem;
    transition: background 0.3s ease;
}

.feature-item:hover {
    background: var(--bg-surface);
}

.feature-icon-box {
    color: var(--accent-secondary);
    font-size: 2rem;
    background: rgba(251, 191, 36, 0.1);
    min-width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Trust / Stats */
.trust-banner {
    padding: 4rem 0;
    background: linear-gradient(rgba(5, 10, 20, 0.9), rgba(5, 10, 20, 0.9)),
        url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDQwIDQwIiBmaWxsLW9wYWNpdHk9IjAuMDUiPjxwYXRoIGQ9Ik0wIDBoNDB2NDBIMHoiIGZpbGw9IiMzOGJkZjgiLz48L3N2Zz4=');
    background-attachment: fixed;
    text-align: center;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.trust-msg h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.trust-msg span {
    color: var(--accent-primary);
}

/* Testimonials / Feedback */
.testimonials {
    padding: var(--section-spacing) 0;
    background-color: var(--bg-surface);
}

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

.review-card {
    background-color: var(--bg-body);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}

.review-text {
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.stars {
    color: var(--accent-secondary);
    margin-bottom: 1rem;
}

/* Contact Section */
.contact {
    padding: var(--section-spacing) 0 3rem;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info-card {
    background-color: var(--bg-surface);
    padding: 2.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}

.info-item {
    margin-bottom: 2rem;
}

.info-item h4 {
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.info-item p {
    color: var(--text-secondary);
    line-height: 1.7;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

textarea {
    resize: vertical;
    min-height: 150px;
}

/* Footer */
footer {
    padding: 3rem 0;
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    text-align: center;
    margin-top: 2rem;
}

.footer-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.back-to-top {
    display: inline-block;
    margin-top: 1rem;
    color: var(--accent-primary);
    font-weight: 500;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

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

    .about-grid,
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-surface);
        flex-direction: column;
        padding: 2rem;
        border-bottom: 1px solid var(--border-color);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        box-shadow: var(--shadow-lg);
    }

    .nav-links.active {
        transform: translateY(0);
    }
}

/* RTL / Arabic Support */
[dir="rtl"] body {
    direction: rtl;
    font-family: "Cairo", sans-serif;
    text-align: right;
}

[dir="rtl"] .hero h1,
[dir="rtl"] .hero p,
[dir="rtl"] .section-title,
[dir="rtl"] .section-subtitle,
[dir="rtl"] .section-header {
    text-align: center;
}

[dir="rtl"] .btn {
    flex-direction: row-reverse;
}

[dir="rtl"] .btn i {
    margin-left: 0;
    margin-right: 0.75rem;
    /* Flip icon margin */
    transform: scaleX(-1);
    /* Flip arrow icon */
}

[dir="rtl"] .nav-links {
    gap: 2.5rem;
}

[dir="rtl"] .feature-item {
    text-align: right;
}

[dir="rtl"] .contact-info .section-title {
    text-align: right !important;
}

[dir="rtl"] .contact-info-card .info-item h4 i {
    margin-right: 0;
    margin-left: 0.5rem;
}

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

/* Adjust contact form alignment in RTL */
[dir="rtl"] .contact-layout {
    direction: rtl;
}


/* Enhanced Contact Section */
.contact-section {
    padding: var(--section-spacing) 0;
    background-color: var(--bg-surface);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto;
}

.contact-form,
.contact-info {
    background: var(--bg-body);
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.contact-form h2,
.contact-info h2 {
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

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

.contact-form button {
    width: 100%;
}

.contact-info p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.contact-info strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.directions-btn {
    margin-top: 1.5rem;
    width: 100%;
}

.map-container {
    margin-top: 3rem;
    border-radius: 1.5rem;
    overflow: hidden;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    background: var(--bg-body);
}

@media (max-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}


/* Contact CTA Replacement */
.contact-cta {
    background: var(--bg-body);
    padding: 3rem;
    border-radius: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.contact-cta h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.contact-cta p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: #25D366;
    color: #fff;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 9999px;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.whatsapp-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
    color: #fff;
}

.contact-alternatives {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.alt-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
}

.alt-contact-link:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: rgba(56, 189, 248, 0.1);
}


/* Updated Hero Styling */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    /* Blend user gradient with existing background image logic */
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.8), rgba(2, 6, 23, 0.9)), url("../images/hero-gen.png") no-repeat center center/cover;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    /* Fluid */
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    /* Use theme variable */
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Contact CTA Buttons */
.cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.cta-btn.call {
    background: #2563eb;
}

.cta-btn.whatsapp {
    background: #25d366;
}

.cta-btn.location {
    background: #64748b;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-btn {
        width: 100%;
    }
}