/* ================================================
   ياسين طباخ — Personal Website
   Custom Styles (Tailwind Extension)
   ================================================ */

/* Base */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: rgba(0, 113, 227, 0.28);
    color: #fff;
}

/* ---- TYPOGRAPHY ---- */
.headline-xl {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.05;
}

.headline-lg {
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.1;
}

.headline-md {
    font-size: clamp(1.4rem, 3vw, 2.4rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.15;
}

.subheadline {
    font-size: clamp(1rem, 2vw, 1.4rem);
    font-weight: 400;
    line-height: 1.6;
    color: #6e6e73;
}

/* ---- BUTTONS ---- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background-color: #0071e3;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.65rem 1.4rem;
    border-radius: 980px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary:hover {
    background-color: #0077ed;
    transform: scale(1.02);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background-color: transparent;
    color: #0071e3;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.6rem 1.35rem;
    border-radius: 980px;
    border: 1.5px solid #0071e3;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-outline:hover {
    background-color: #0071e3;
    color: #fff;
    transform: scale(1.02);
}

.btn-outline-white {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background-color: transparent;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.6rem 1.35rem;
    border-radius: 980px;
    border: 1.5px solid rgba(255,255,255,0.6);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-outline-white:hover {
    border-color: #fff;
    background-color: rgba(255,255,255,0.1);
    transform: scale(1.02);
}

/* ---- SECTIONS ---- */
.section-dark {
    background-color: #000;
    color: #f5f5f7;
}

.section-dark-soft {
    background-color: #1d1d1f;
    color: #f5f5f7;
}

.section-light {
    background-color: #f5f5f7;
    color: #1d1d1f;
}

.section-white {
    background-color: #fbfbfd;
    color: #1d1d1f;
}

/* ---- HERO ---- */
.hero-section {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 4rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 30%, rgba(0, 113, 227, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

/* ---- SKILL CARD ---- */
.skill-card {
    background-color: #fff;
    border-radius: 20px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.06);
}

.skill-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* ---- PROJECT CARD ---- */
.project-card {
    border-radius: 20px;
    overflow: hidden;
    background-color: #1d1d1f;
    position: relative;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: scale(1.015);
}

.project-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 55%);
}

/* ---- SECTION DIVIDER ---- */
.section-divider {
    display: none;
}

/* ---- LINK ARROW ---- */
.link-arrow {
    color: #0071e3;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
    transition: gap 0.2s ease;
}

.link-arrow:hover {
    gap: 0.5rem;
}

/* ---- CONTACT FORM ---- */
.form-input {
    width: 100%;
    background-color: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    color: #f5f5f7;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    outline: none;
}

.form-input::placeholder {
    color: rgba(255,255,255,0.35);
}

.form-input:focus {
    border-color: #0071e3;
    background-color: rgba(255,255,255,0.1);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #34aadc;
    outline-offset: 2px;
}

/* ---- STAT NUMBER ---- */
.stat-number {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
}

/* ---- CAROUSEL ARROW BUTTONS ---- */
.carousel-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1.5px solid rgba(255,255,255,0.18);
    color: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
    outline: none;
    user-select: none;
}

.carousel-btn:hover {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.45);
    color: #fff;
    transform: scale(1.1);
}

.carousel-btn:active {
    transform: scale(0.95);
}

.carousel-btn.is-paused {
    background: rgba(0, 113, 227, 0.25);
    border-color: rgba(0, 113, 227, 0.6);
    color: #34aadc;
}

.carousel-btn svg {
    width: 18px;
    height: 18px;
    pointer-events: none;
}

/* ---- SERVICES MARQUEE ---- */
@keyframes marquee-rtl {
    0%   { transform: translateX(0); }
    100% { transform: translateX(50%); }
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.25rem;
}

.service-card {
    width: 100%;
    height: 200px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
}

.service-card:hover {
    transform: scale(1.03);
    z-index: 2;
}

.service-card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease;
}

.service-card:hover .service-card-bg {
    transform: scale(1.08);
}

.service-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.65) 100%);
}

.service-card-content {
    position: relative;
    z-index: 2;
}

/* ---- SCROLL INDICATOR ---- */
@keyframes bounce-down {
    0%, 100% { transform: translateY(0); opacity: 0.7; }
    50%       { transform: translateY(8px); opacity: 1; }
}

.scroll-indicator {
    animation: bounce-down 2s ease-in-out infinite;
}

/* ---- TIMELINE ---- */
.timeline-item {
    padding-right: 2rem;
}

.timeline-item > span:first-child {
    display: inline-block;
    margin-right: 0.4rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    right: 0;
    top: 8px;
    width: 10px;
    height: 10px;
    background-color: #0071e3;
    border-radius: 50%;
    border: 2px solid #000;
    transform: translateX(50%);
}

/* ---- PRICING CAROUSEL ---- */
@keyframes marquee-pricing {
    0%   { transform: translateX(0); }
    100% { transform: translateX(50%); }
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.25rem;
    align-items: stretch;
}

.pricing-card {
    width: 100%;
    border-radius: 24px;
    padding: 2rem 1.75rem 1.75rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    cursor: pointer;
}


.pricing-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    z-index: 3;
}

.pricing-card.featured {
    border: 1.5px solid rgba(0, 113, 227, 0.6);
    box-shadow: 0 0 40px rgba(0, 113, 227, 0.18);
}

.pricing-card.featured::before {
    content: 'الأكثر طلباً';
    position: absolute;
    top: 1rem;
    left: 1.25rem;
    background: #0071e3;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    letter-spacing: 0;
    direction: rtl;
    unicode-bidi: plaintext;
    font-family: 'Cairo', 'Tajawal', sans-serif;
}

.pricing-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: rgba(245,245,247,0.75);
    line-height: 1.5;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.pricing-feature-item:last-child {
    border-bottom: none;
}

.pricing-check {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ---- RESPONSIVE GRID TUNING ---- */
@media (max-width: 1279px) {
    .services-grid,
    .pricing-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1023px) {
    .services-grid,
    .pricing-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .headline-xl {
        font-size: clamp(2.2rem, 7vw, 4rem);
    }

    .headline-lg {
        font-size: clamp(1.7rem, 4.8vw, 2.8rem);
    }
}

@media (max-width: 767px) {
    .services-grid,
    .pricing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pricing-card {
        padding: 1.5rem 1.2rem 1.25rem;
    }

    .hero-section {
        min-height: 92svh;
        padding-top: 5rem;
    }

    .stat-number {
        font-size: clamp(2rem, 10vw, 2.8rem);
    }

}

@media (max-width: 479px) {
    .services-grid,
    .pricing-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* ---- PROGRESS BAR ---- */
.progress-bar {
    height: 4px;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #0071e3, #34aadc);
    transition: width 1.5s ease;
}

/* ---- FADE IN ANIMATION ---- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-up {
    animation: fadeInUp 0.7s ease forwards;
}

.animate-delay-100 { animation-delay: 0.1s; }
.animate-delay-200 { animation-delay: 0.2s; }
.animate-delay-300 { animation-delay: 0.3s; }
.animate-delay-400 { animation-delay: 0.4s; }
