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

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

body {
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
    background-color: #080710;
    color: #f1f5f9;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* ============ Animated Blobs ============ */
.bg-blobs {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.18;
    animation: float 25s infinite alternate ease-in-out;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: #a855f7; /* Purple */
    top: 10%;
    right: 15%;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: #ec4899; /* Pink */
    bottom: 15%;
    left: 10%;
    animation-delay: -5s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: #3b82f6; /* Blue */
    top: 50%;
    right: 45%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(60px, -40px) scale(1.1); }
    100% { transform: translate(-40px, 80px) scale(0.9); }
}

/* ============ Header Navbar ============ */
.header-nav {
    position: fixed;
    top: 16px;
    left: 5%;
    right: 5%;
    height: 70px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 30px;
}

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

.logo-link img {
    height: 44px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.3));
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-menu a {
    text-decoration: none;
    color: rgba(241, 245, 249, 0.7);
    font-size: 14px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 100px;
    transition: all 0.3s ease;
}

.nav-menu a:hover, .nav-menu a.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(236, 72, 153, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang-selector {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    padding: 3px;
}

.lang-selector a {
    text-decoration: none;
    color: rgba(241, 245, 249, 0.6);
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 100px;
    transition: all 0.2s ease;
}

.lang-selector a.active {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    color: #ffffff;
}

.btn-login {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 700;
    padding: 10px 24px;
    border-radius: 100px;
    box-shadow: 0 8px 20px rgba(168, 85, 247, 0.25);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(236, 72, 153, 0.4);
}

.hamburger-btn {
    display: none;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 18px;
    padding: 8px 12px;
    border-radius: 100px;
    cursor: pointer;
}

/* ============ Hero Section ============ */
.main-wrapper {
    flex: 1;
    padding-top: 160px;
    padding-bottom: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.hero-header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 800px;
    padding: 0 20px;
}

.hero-tag {
    display: inline-block;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(236, 72, 153, 0.15));
    border: 1px solid rgba(236, 72, 153, 0.3);
    color: #ec4899;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 18px;
    border-radius: 100px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-title {
    font-size: 40px;
    font-weight: 900;
    background: linear-gradient(135deg, #ffffff 30%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    letter-spacing: -0.8px;
    line-height: 1.3;
}

.hero-desc {
    font-size: 16.5px;
    line-height: 1.8;
    color: #94a3b8;
    font-weight: 400;
    max-width: 680px;
    margin: 0 auto;
}

/* ============ Cards Layout ============ */
.grid-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Capsule Card Design */
.capsule-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 40px; /* Highly rounded pill corners */
    padding: 36px 30px;
    text-decoration: none;
    color: #ecedee;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    width: calc(33.333% - 16px);
    min-width: 280px;
    position: relative;
    overflow: hidden;
}

/* Special pill card widths matching original proportions */
.capsule-card:nth-child(1), .capsule-card:nth-child(2) {
    width: calc(50% - 12px);
}
.capsule-card:nth-child(3) {
    width: 60%;
    border-radius: 100px; /* long horizontal capsule */
    flex-direction: row;
    text-align: right;
    padding: 30px 48px;
    justify-content: space-between;
}
.capsule-card:nth-child(3) .card-icon {
    margin-bottom: 0;
}
.capsule-card:nth-child(3) .card-content {
    flex: 1;
    margin-right: 24px;
}
.capsule-card:nth-child(4), .capsule-card:nth-child(5) {
    width: calc(50% - 12px);
}

.card-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(236, 72, 153, 0.1));
    border: 1px solid rgba(236, 72, 153, 0.2);
    color: #ec4899;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.card-title {
    font-size: 19px;
    font-weight: 800;
    color: #ffffff;
}

.card-desc {
    font-size: 14.5px;
    line-height: 1.7;
    color: #94a3b8;
}

.card-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
    margin-top: auto;
}

/* Hover effects */
.capsule-card:hover {
    border-color: rgba(236, 72, 153, 0.4);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4), 
        0 0 30px rgba(168, 85, 247, 0.15);
}

.capsule-card:hover .card-icon {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    color: #ffffff;
    transform: rotate(360deg);
}

.capsule-card:hover .card-btn {
    background: #ffffff;
    color: #080710;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.25);
}

/* Inner glow ring on hover */
.capsule-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    border: 1px solid transparent;
    background: linear-gradient(135deg, #a855f7, #ec4899) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.capsule-card:hover::after {
    opacity: 1;
}

/* ============ Footer ============ */
.footer {
    background: rgba(8, 7, 16, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding: 35px 0;
    text-align: center;
    position: relative;
    z-index: 2;
    margin-top: auto;
}

.footer-text {
    font-size: 13.5px;
    color: #4b5563;
    font-weight: 500;
}

/* ============ Responsive Styles ============ */
@media (max-width: 1024px) {
    .grid-container {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    .capsule-card {
        width: 100% !important;
        max-width: 500px;
        border-radius: 40px !important;
        flex-direction: column !important;
        text-align: center !important;
        padding: 36px 30px !important;
    }
    .capsule-card .card-content {
        margin-right: 0 !important;
        margin-top: 10px;
    }
    .hero-title {
        font-size: 32px;
    }
}

@media (max-width: 900px) {
    .nav-menu {
        display: none;
    }
    .hamburger-btn {
        display: block;
    }
    .header-nav {
        top: 0;
        left: 0;
        right: 0;
        border-radius: 0;
        border-width: 0 0 1px 0;
    }
}
