/* =============================
   Hub Page — hub.css
   ============================= */

@font-face {
    font-family: 'TheYearOfHandicrafts';
    src: url('fonts/TheYearofHandicrafts-Regular.woff2') format('woff2'),
         url('fonts/TheYearofHandicrafts-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'TheYearOfHandicrafts';
    src: url('fonts/TheYearofHandicrafts-Medium.woff2') format('woff2'),
         url('fonts/TheYearofHandicrafts-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'TheYearOfHandicrafts';
    src: url('fonts/TheYearofHandicrafts-SemiBold.woff2') format('woff2'),
         url('fonts/TheYearofHandicrafts-SemiBold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'TheYearOfHandicrafts';
    src: url('fonts/TheYearofHandicrafts-Bold.woff2') format('woff2'),
         url('fonts/TheYearofHandicrafts-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'TheYearOfHandicrafts';
    src: url('fonts/TheYearofHandicrafts-Black.woff2') format('woff2'),
         url('fonts/TheYearofHandicrafts-Black.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

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

:root {
    --bg:      #ece7dc;
    --primary: #1d447a;
    --primary-light: #2a5fa8;
    --text:    #1a1a2e;
    --muted:   #6b7280;
    --card-bg: #ffffff;
    --radius:  24px;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Cairo', 'TheYearOfHandicrafts', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.hero-content h1,
.service-card h2,
.hub-footer {
    font-family: 'TheYearOfHandicrafts', 'Cairo', sans-serif;
}

/* ---- Navbar ---- */
.hub-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 18px 5%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(236, 231, 220, 0.85);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    border-bottom: 1px solid transparent;
    transition: backdrop-filter 0.4s, background 0.4s, border-color 0.4s;
}

.hub-nav.scrolled {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(236, 231, 220, 0.6);
    border-bottom: 1px solid rgba(29,68,122,0.1);
}

.brand-logo {
    height: 36px;
    width: auto;
    color: var(--primary);
    display: block;
}

/* ---- Hero ---- */
.hero {
    position: relative;
    padding: 160px 5% 80px;
    text-align: center;
    overflow: hidden;
}

.hero-bg-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(29,68,122,0.12) 1.5px, transparent 1.5px);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
    pointer-events: none;
}

.hero-bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    filter: blur(8px);
    transform: scale(1.05);
    z-index: -1;
    border-radius: 16px;
}

.hero-badge {
    display: inline-block;
    background: rgba(29,68,122,0.1);
    color: var(--primary);
    border: 1px solid rgba(29,68,122,0.2);
    border-radius: 100px;
    padding: 6px 18px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    line-height: 1.25;
    color: var(--text);
    margin-bottom: 20px;
    letter-spacing: 0.08em;
}

.hero-content h1 span {
    color: var(--primary);
}

.hero-content p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--muted);
    line-height: 1.8;
    max-width: 560px;
    margin: 0 auto;
}

/* ---- Services Section ---- */
.services-section {
    padding: 40px 5% 100px;
    flex: 1;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 28px;
    max-width: 1100px;
    margin: 0 auto;
}

/* ---- Service Card ---- */
.service-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 36px 32px 28px;
    border: 1.5px solid rgba(29,68,122,0.08);
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    text-decoration: none;
    color: inherit;
    transition: transform 0.35s cubic-bezier(0.175,0.885,0.32,1.275),
                box-shadow 0.35s ease,
                border-color 0.3s;
    overflow: hidden;
}

/* Shimmer top border on active */
.service-card.active::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--primary));
    background-size: 200% 100%;
    animation: shimmer-line 2.5s linear infinite;
}

@keyframes shimmer-line {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.service-card.active:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 48px rgba(29,68,122,0.18);
    border-color: rgba(29,68,122,0.25);
}

.service-card.coming-soon {
    opacity: 0.6;
    cursor: default;
}

.service-card.coming-soon:hover {
    transform: none;
    box-shadow: none;
}

/* Badge */
.card-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 100px;
    letter-spacing: 0.04em;
}

.card-badge.soon {
    background: rgba(29,68,122,0.12);
    color: var(--primary);
}

/* Icon */
.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: rgba(29,68,122,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 24px;
    transition: background 0.3s, transform 0.3s;
}

.service-card.active:hover .card-icon {
    background: var(--primary);
    transform: scale(1.1);
}

.service-card.active:hover .card-icon svg {
    stroke: #fff;
}

.card-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--primary);
    transition: stroke 0.3s;
}

/* Text */
.service-card h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text);
}

.service-card p {
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.75;
    flex: 1;
}

/* Footer */
.card-footer {
    border-top: 1px solid rgba(29,68,122,0.08);
    padding-top: 16px;
    margin-top: 4px;
}

.card-cta {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    transition: letter-spacing 0.3s;
}

.service-card.active:hover .card-cta {
    letter-spacing: 0.05em;
}

.soon-label {
    font-size: 0.85rem;
    color: var(--muted);
}

/* ---- Footer ---- */
.hub-footer {
    text-align: center;
    padding: 28px;
    font-size: 0.85rem;
    color: var(--muted);
    border-top: 1px solid rgba(29,68,122,0.08);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .hero { padding: 130px 5% 60px; }
    .services-grid { grid-template-columns: 1fr; max-width: 420px; }
    .service-card { padding: 32px 24px 24px; }
}

.nav-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 1200px; }
.lang-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(236, 231, 220, 0.5); border: 1px solid rgba(29,68,122,0.1); color: var(--text-main); font-weight: 700; cursor: pointer; transition: all 0.3s ease; margin: 0 10px; font-family: inherit; font-size: 0.9rem; }
.lang-btn:hover { background: var(--primary); color: #fff; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(29,68,122,0.2); }

.freelance-cert { margin-top: 8px; font-size: 0.8rem; color: var(--muted); opacity: 0.8; }

/* ---- Promo Section ---- */
.promo-section { padding: 80px 5%; max-width: 1000px; margin: 0 auto; text-align: center; }
.promo-header { margin-bottom: 40px; }
.promo-header h2 { font-size: 2.2rem; color: var(--primary); margin-bottom: 16px; }
.promo-header p { color: var(--muted); font-size: 1.1rem; max-width: 600px; margin: 0 auto; line-height: 1.6; }
.video-wrapper { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; border-radius: var(--radius); box-shadow: 0 20px 40px rgba(29,68,122,0.15); background: #000; border: 8px solid rgba(255, 255, 255, 0.5); backdrop-filter: blur(10px); }
.video-wrapper iframe, .video-wrapper video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

/* Hero Split Layout */
.hero-layout { display: flex; align-items: center; justify-content: space-between; gap: 40px; max-width: 1200px; margin: 0 auto; text-align: right; }
.hero-text { flex: 1; max-width: 600px; }
.en-mode .hero-layout { text-align: left; }
.hero-content h1 { margin-left: 0; margin-right: 0; }
.hero-content p { margin-left: 0; margin-right: 0; }
.hero-image { flex: 1; display: flex; justify-content: center; align-items: center; }
.character-svg { max-width: 100%; height: auto; max-height: 500px; filter: drop-shadow(0 20px 40px rgba(29,68,122,0.15)); }
.animate-floating { animation: float 6s ease-in-out infinite; }
@keyframes float { 0% { transform: translateY(0); } 50% { transform: translateY(-20px); } 100% { transform: translateY(0); } }
@media (max-width: 900px) { .hero-layout { flex-direction: column; text-align: center; } .en-mode .hero-layout { text-align: center; } .hero-text { max-width: 100%; } .hero-content h1, .hero-content p { margin-left: auto; margin-right: auto; } .character-svg { max-height: 350px; margin-top: 30px; } }
