/*
Theme Name: Seopex Flow Theme
Theme URI: https://yourcompany.com
Author: Your Company
Author URI: https://yourcompany.com
Description: A modern, AI-powered SEO automation agency theme with bilingual support (Arabic/English) and conversion-focused design
Version: 1.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: seopex-flow.com
Tags: business, agency, seo, rtl-language-support, custom-colors, animation

This theme, like WordPress, is licensed under the GPL.
*/

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

:root {
    /* Primary Colors */
    --primary-color: #3700B3;
    --primary-dark: #2A0085;
    --primary-light: #6200EE;
    --secondary-color: #03DAC5;
    --secondary-dark: #00B4A0;
    /* Background Colors */
    --bg-dark: #121212;
    --bg-card: #1E1E1E;
    --bg-gradient: linear-gradient(135deg, #3700B3 0%, #6200EE 100%);
    /* Text Colors */
    --text-primary: #FFFFFF;
    --text-secondary: #B3B3B3;
    --text-muted: #808080;
    /* Accent Colors */
    --accent-pink: #FF0080;
    --accent-orange: #FF6B35;
    --accent-green: #00E676;
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-arabic: 'Cairo', 'Tajawal', sans-serif;
    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

body {
    font-family: var(--font-primary);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

    /* Arabic Language Support */
    body.rtl,
    body[dir="rtl"] {
        direction: rtl;
        font-family: var(--font-arabic);
    }

/* ===================================
   Typography
=================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    background: linear-gradient(135deg, #FFFFFF 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition-smooth);
}

    a:hover {
        color: var(--secondary-dark);
    }

/* ===================================
   Container & Grid System
=================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.container-fluid {
    max-width: 100%;
    padding: 0 var(--spacing-md);
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 calc(var(--spacing-sm) * -1);
}

.col {
    flex: 1;
    padding: 0 var(--spacing-sm);
}

/* Grid Classes */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-sm);
}

/* ===================================
   Buttons
=================================== */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

    .btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
        transition: left 0.5s;
        z-index: -1;
    }

    .btn:hover::before {
        left: 100%;
    }

.btn-primary {
    background: var(--bg-gradient);
    color: white;
    box-shadow: 0 10px 30px rgba(98, 0, 238, 0.3);
}

    .btn-primary:hover {
        transform: translateY(-3px);
        box-shadow: 0 15px 40px rgba(98, 0, 238, 0.5);
    }

.btn-secondary {
    background: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

    .btn-secondary:hover {
        background: var(--secondary-color);
        color: var(--bg-dark);
        transform: translateY(-3px);
    }

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
}

    .btn-outline:hover {
        background: white;
        color: var(--primary-color);
        border-color: white;
    }

/* ===================================
   Cards
=================================== */
.card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: var(--spacing-md);
    transition: var(--transition-smooth);
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
}

    .card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: var(--bg-gradient);
        transform: scaleX(0);
        transition: transform 0.3s;
    }

    .card:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 40px rgba(0,0,0,0.3);
        border-color: var(--primary-light);
    }

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

/* ===================================
   Glassmorphism Effect
=================================== */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

/* ===================================
   Animations
=================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(98, 0, 238, 0.5);
    }

    50% {
        box-shadow: 0 0 40px rgba(98, 0, 238, 0.8);
    }
}

/* Animation Classes */
.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.8s ease-out forwards;
}

.animate-fadeInRight {
    animation: fadeInRight 0.8s ease-out forwards;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* Stagger Animation Delays */
.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

.stagger-4 {
    animation-delay: 0.4s;
}

/* Initially hide animated elements */
.animate-fadeInUp,
.animate-fadeInLeft,
.animate-fadeInRight {
    opacity: 0;
}

/* ===================================
   Utility Classes
=================================== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-sm {
    margin-top: var(--spacing-sm);
}

.mt-md {
    margin-top: var(--spacing-md);
}

.mt-lg {
    margin-top: var(--spacing-lg);
}

.mb-sm {
    margin-bottom: var(--spacing-sm);
}

.mb-md {
    margin-bottom: var(--spacing-md);
}

.mb-lg {
    margin-bottom: var(--spacing-lg);
}

.pt-lg {
    padding-top: var(--spacing-lg);
}

.pb-lg {
    padding-bottom: var(--spacing-lg);
}

.section-padding {
    padding: var(--spacing-xl) 0;
}

/* Gradient Text */
.gradient-text {
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===================================
   Responsive Design
=================================== */
@media (max-width: 768px) {
    :root {
        --spacing-xl: 3rem;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .btn {
        width: 100%;
    }
}

/* ===================================
   Loading States
=================================== */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

    .loading::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 20px;
        height: 20px;
        margin: -10px 0 0 -10px;
        border: 2px solid var(--secondary-color);
        border-top-color: transparent;
        border-radius: 50%;
        animation: spin 0.6s linear infinite;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Sidebar Newsletter */
.sidebar-newsletter {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

    .sidebar-newsletter input {
        background: rgba(0,0,0,0.2);
        border: 1px solid rgba(255,255,255,0.1);
        padding: 12px;
        border-radius: 8px;
        color: white;
    }

    .sidebar-newsletter button {
        background: var(--secondary-color);
        color: var(--bg-dark);
        border: none;
        padding: 12px;
        border-radius: 8px;
        font-weight: 700;
        cursor: pointer;
    }

/* Inline Newsletter CTA (Blog Grid) */
.newsletter-grid-box {
    background: linear-gradient(135deg, var(--primary-color) 0%, #300075 100%) !important;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.newsletter-form-mini {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 400px;
    margin-top: 20px;
}

    .newsletter-form-mini input {
        flex: 1;
        padding: 12px;
        border-radius: 8px;
        border: none;
    }

    .newsletter-form-mini button {
        background: var(--bg-dark);
        color: white;
        padding: 12px 20px;
        border-radius: 8px;
        border: none;
        font-weight: 600;
    }

/* Article Header Dynamic BG */
.article-header {
    background: linear-gradient(to bottom, rgba(98, 0, 238, 0.05), transparent);
    padding: 120px 0 60px;
}