/* =====================================================
   WEBLY DIGITAL SOLUTIONS - Base Styles
   Core styles, resets, and utilities
   ===================================================== */

@import url('./variables.css');

/* ==================== CSS RESET ==================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-regular);
    line-height: var(--leading-normal);
    color: var(--color-text-white);
    background-color: var(--color-bg-dark);
    overflow-x: hidden;
    direction: rtl;
}

/* English body */
html[lang="en"] body {
    direction: ltr;
}

/* ==================== TYPOGRAPHY ==================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    margin-bottom: var(--space-4);
}

h1 {
    font-size: var(--text-hero);
    font-weight: var(--font-black);
    letter-spacing: var(--tracking-tight);
}

h2 {
    font-size: var(--text-5xl);
    font-weight: var(--font-extrabold);
}

h3 {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
}

h4 {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
}

h5 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
}

h6 {
    font-size: var(--text-lg);
    font-weight: var(--font-medium);
}

p {
    margin-bottom: var(--space-4);
    color: var(--color-text-muted);
}

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

a:hover {
    color: var(--color-primary-light);
}

strong,
b {
    font-weight: var(--font-bold);
}

/* ==================== LISTS ==================== */

ul,
ol {
    list-style: none;
}

/* ==================== IMAGES ==================== */

img,
video,
svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==================== BUTTONS ==================== */

button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ==================== FORMS ==================== */

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    border: none;
    outline: none;
    background: transparent;
}

/* ==================== SELECTION ==================== */

::selection {
    background-color: var(--color-primary);
    color: var(--color-text-white);
}

/* ==================== SCROLLBAR ==================== */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-dark);
}

/* ==================== LAYOUT ==================== */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: var(--section-padding) 0;
    position: relative;
}

.section-dark {
    background: var(--color-bg-gradient);
}

.section-light {
    background: var(--color-bg-light);
    color: var(--color-text-dark);
}

.section-light p {
    color: var(--color-text-body);
}

/* ==================== FLEX UTILITIES ==================== */

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.items-end {
    align-items: flex-end;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-around {
    justify-content: space-around;
}

.gap-2 {
    gap: var(--space-2);
}

.gap-4 {
    gap: var(--space-4);
}

.gap-6 {
    gap: var(--space-6);
}

.gap-8 {
    gap: var(--space-8);
}

.gap-10 {
    gap: var(--space-10);
}

.gap-12 {
    gap: var(--space-12);
}

/* ==================== GRID UTILITIES ==================== */

.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, 1fr);
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .md\:grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==================== TEXT UTILITIES ==================== */

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

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

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

.text-primary {
    color: var(--color-primary);
}

.text-white {
    color: var(--color-text-white);
}

.text-muted {
    color: var(--color-text-muted);
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== VISIBILITY ==================== */

.hidden {
    display: none;
}

.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

@media (max-width: 767px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .hide-desktop {
        display: none !important;
    }
}

/* ==================== ANIMATIONS SETUP ==================== */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for children */
.stagger-1 {
    transition-delay: 0.1s;
}

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

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

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

.stagger-5 {
    transition-delay: 0.5s;
}

/* ==================== DECORATIVE ELEMENTS ==================== */

.glow-orb {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: var(--gradient-glow);
    filter: blur(80px);
    pointer-events: none;
    z-index: var(--z-behind);
}

.glow-orb-primary {
    background: radial-gradient(circle, rgba(199, 125, 255, 0.4) 0%, transparent 70%);
}

.glow-orb-secondary {
    background: radial-gradient(circle, rgba(123, 44, 191, 0.3) 0%, transparent 70%);
}

/* ==================== SECTION HEADERS ==================== */

.section-header {
    text-align: center;
    margin-bottom: var(--space-16);
}

.section-header .section-subtitle {
    color: var(--color-primary);
    font-size: var(--text-lg);
    font-weight: var(--font-medium);
    margin-bottom: var(--space-4);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
}

.section-header .section-title {
    font-size: var(--text-5xl);
    font-weight: var(--font-extrabold);
    margin-bottom: var(--space-6);
}

.section-header .section-description {
    max-width: 700px;
    margin: 0 auto;
    font-size: var(--text-lg);
    color: var(--color-text-muted);
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    h1 {
        font-size: var(--text-5xl);
    }

    h2 {
        font-size: var(--text-4xl);
    }

    h3 {
        font-size: var(--text-2xl);
    }

    .section-header .section-title {
        font-size: var(--text-4xl);
    }
}