/* ViloTools Global Styles - Luxury Dark Purple Theme */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #6c3483;
    /* Deep Luxurious Purple */
    --primary-light: #8e44ad;
    --primary-dark: #4a235a;
    --accent-color: #d2b4de;
    /* Soft Purple/Gold-ish accent if needed */
    --text-color: #2c3e50;
    --text-light: #ffffff;
    --bg-color: #f8f9fa;
    --bg-card: #ffffff;
    --shadow: 0 10px 30px rgba(108, 52, 131, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 16px;
}

[data-theme="dark"] {
    --text-color: #f8f9fa;
    --bg-color: #1a1a2d;
    /* Very Dark Purple/Blue */
    --bg-card: #252540;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* RTL Support for Arabic */
html[dir="rtl"] body {
    font-family: 'Cairo', sans-serif;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- Header & Navbar --- */
header {
    background: rgba(255, 255, 255, 0.1);
    /* Ultra Transparent */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

[data-theme="dark"] header {
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 50px;
    width: auto;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    font-weight: 600;
    color: var(--text-color);
    position: relative;
    font-size: 16px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Controls (Lang & Theme) */
.controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-color);
    transition: transform 0.3s ease, color 0.3s ease;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    color: var(--primary-color);
    background-color: rgba(108, 52, 131, 0.1);
    transform: rotate(15deg);
}

.lang-btn {
    font-family: inherit;
    font-weight: 700;
    font-size: 16px;
}

/* Mobile Menu */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* --- Hero Section --- */
/* --- Hero Section --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
    /* Offset for fixed header */
}

.hero-container {
    display: flex;
    align-items: center;
    width: 100%;
}

.hero-content {
    flex: 1;
    z-index: 2;
    padding-right: 50px;
}

html[dir="rtl"] .hero-content {
    padding-right: 0;
    padding-left: 50px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--primary-color);
    /* Fallback */
    animation: fadeInUp 1s ease-out;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 30px;
    opacity: 0.8;
    max-width: 600px;
    animation: fadeInUp 1.2s ease-out;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 2;
    animation: float 6s ease-in-out infinite;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(108, 52, 131, 0.3));
}

/* Background Shapes */
.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: 1;
    opacity: 0.4;
}

.shape-1 {
    top: -100px;
    right: -100px;
    width: 600px;
    height: 600px;
    background: #8e44ad;
    mix-blend-mode: overlay;
    animation: float 8s infinite alternate;
}

.shape-2 {
    bottom: -50px;
    left: -100px;
    width: 500px;
    height: 500px;
    background: #4a235a;
    mix-blend-mode: overlay;
    animation: float 10s infinite alternate-reverse;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(108, 52, 131, 0.3);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(108, 52, 131, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-sm {
    padding: 8px 20px;
    font-size: 14px;
    border-radius: 30px;
}

/* --- Services/Tools Section --- */
.tools-section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 60px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--primary-light);
    margin: 15px auto 0;
    border-radius: 2px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.tool-card {
    background-color: var(--bg-card);
    padding: 40px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-10px);
}

.tool-card:hover::before {
    opacity: 0.05;
}

.tool-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(108, 52, 131, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 32px;
    color: var(--primary-color);
    transition: var(--transition);
}

.tool-card:hover .tool-icon {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.tool-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.tool-card p {
    color: var(--text-color);
    margin-bottom: 25px;
    opacity: 0.7;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- About Section --- */
.about-section {
    padding: 100px 0;
    background-color: var(--bg-color);
    /* Matches clean layout */
}

.about-container {
    display: flex;
    align-items: center;
    gap: 60px;
}

.about-image {
    flex: 1;
    position: relative;
    animation: fadeInUp 1s ease-out;
}

.about-image img {
    width: 100%;
    max-width: 400px;
    border-radius: 30px;
    box-shadow: 20px 20px 0 var(--primary-light), 0 0 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.about-image img:hover {
    transform: scale(1.02);
}

.about-content {
    flex: 1.5;
    animation: fadeInUp 1.2s ease-out;
}

.about-subtitle {
    font-size: 1.1rem;
    text-transform: uppercase;
    color: var(--primary-color);
    letter-spacing: 2px;
    margin-bottom: 10px;
    font-weight: 700;
}

.about-text p {
    margin-bottom: 20px;
    line-height: 1.8;
    color: var(--text-color);
    font-size: 1.05rem;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .about-container {
        flex-direction: column;
        text-align: center;
    }

    .about-image img {
        max-width: 300px;
        box-shadow: 15px 15px 0 var(--primary-light);
    }

    .section-title {
        font-size: 2rem;
    }
}

/* --- Footer --- */
footer {
    background-color: var(--bg-card);
    padding: 60px 0 20px;
    margin-top: 50px;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.02);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 300px;
}

.footer-links h4 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
    /* RTL aware? handled below */
}

html[dir="rtl"] .footer-links a:hover {
    padding-left: 0;
    padding-right: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--bg-card);
        flex-direction: column;
        padding: 30px;
        gap: 20px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        transform: translateY(-150%);
        transition: transform 0.4s ease;
        z-index: 999;
    }

    .nav-links.active {
        transform: translateY(0);
    }

    /* Allow auto height on mobile */
    .hero {
        height: auto;
        padding: 130px 0 60px;
        /* More breathing room top and bottom */
        flex-direction: column-reverse;
        /* Ensure this is set just in case */
    }

    .hero-container {
        flex-direction: column-reverse;
        gap: 30px;
    }

    .hero-content {
        padding: 0 20px;
        margin-top: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
        /* Add space between elements */
    }

    html[dir="rtl"] .hero-content {
        padding: 0 20px;
    }

    .hero h1 {
        font-size: 2.2rem;
        margin-bottom: 10px;
        line-height: 1.3;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 20px;
        line-height: 1.6;
    }

    .hero-image {
        display: none;
    }
}

/* Animations Keyframes */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}