/* ============================================================
   Gap1 Landing Page — Dark & Blue Theme
   ============================================================ */

/* ---------- Root variables ---------- */
:root {
    --g1-bg-deep:    #050a18;
    --g1-bg-dark:    #0a1128;
    --g1-bg-card:    rgba(15, 25, 60, .55);
    --g1-blue-100:   #dbeafe;
    --g1-blue-400:   #60a5fa;
    --g1-blue-500:   #3b82f6;
    --g1-blue-600:   #2563eb;
    --g1-cyan:       #06b6d4;
    --g1-indigo:     #818cf8;
    --g1-purple:     #a78bfa;
    --g1-text:       #e2e8f0;
    --g1-muted:      #94a3b8;
    --g1-border:     rgba(255,255,255,.07);
    --g1-glow:       rgba(59,130,246,.35);
}

/* ---------- Dark navbar for landing page ---------- */
body:has(.g1-landing) > header {
    position: relative;
    z-index: 10;
}
body:has(.g1-landing) > header .navbar {
    background: var(--g1-bg-dark) !important;
    border-bottom-color: var(--g1-border) !important;
    box-shadow: 0 2px 16px rgba(0,0,0,.4);
}
body:has(.g1-landing) > header .navbar-brand,
body:has(.g1-landing) > header .nav-link,
body:has(.g1-landing) > header .nav-link.text-dark,
body:has(.g1-landing) > header .dropdown-toggle.text-dark {
    color: var(--g1-text) !important;
}
body:has(.g1-landing) > header .nav-link:hover,
body:has(.g1-landing) > header .navbar-brand:hover {
    color: var(--g1-blue-400) !important;
}
body:has(.g1-landing) > header .dropdown-menu {
    background: var(--g1-bg-dark);
    border-color: var(--g1-border);
}
body:has(.g1-landing) > header .dropdown-item {
    color: var(--g1-text);
}
body:has(.g1-landing) > header .dropdown-item:hover,
body:has(.g1-landing) > header .dropdown-item:focus {
    background: rgba(59,130,246,.15);
    color: #fff;
}
body:has(.g1-landing) > header .dropdown-divider {
    border-color: var(--g1-border);
}
body:has(.g1-landing) > header .navbar-toggler {
    border-color: var(--g1-border);
    color: var(--g1-text);
}
body:has(.g1-landing) > header .navbar-toggler-icon {
    filter: invert(1);
}

/* ---------- Page wrapper (escapes layout .container) ---------- */
.g1-landing {
    margin: -1rem calc((100vw - 100%) / -2 - 12px) 0;
    font-family: IranSansX, Tahoma, Arial, sans-serif;
    color: var(--g1-text);
    direction: rtl;
    overflow-x: hidden;
    background: var(--g1-bg-deep);
}

/* ---------- Animated gradient background canvas ---------- */
.g1-bg-canvas {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(59,130,246,.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 80%, rgba(139,92,246,.10) 0%, transparent 55%),
        var(--g1-bg-deep);
    animation: g1CanvasPulse 12s ease-in-out infinite alternate;
}
@keyframes g1CanvasPulse {
    0%   { opacity: 1; }
    100% { opacity: .7; }
}

/* ---------- Section base ---------- */
.g1-section {
    position: relative;
    z-index: 1;
    padding: 5rem 1.5rem;
}
.g1-section-alt {
    background: rgba(10,17,40,.6);
    border-top: 1px solid var(--g1-border);
    border-bottom: 1px solid var(--g1-border);
}

/* ---------- Headings ---------- */
.g1-title {
    font-size: 2.2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: .6rem;
    background: linear-gradient(135deg, var(--g1-blue-400), var(--g1-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.g1-subtitle {
    text-align: center;
    color: var(--g1-muted);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* ---------- HERO ---------- */
.g1-hero {
    min-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 3rem 1rem;
}
.g1-hero-inner {
    max-width: 780px;
}
.g1-hero-badge {
    display: inline-block;
    padding: .35rem 1rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    background: rgba(59,130,246,.12);
    color: var(--g1-blue-400);
    border: 1px solid rgba(59,130,246,.25);
    margin-bottom: 1.5rem;
    animation: g1FadeDown .8s ease-out both;
}
.g1-hero h1 {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 1.2rem;
    animation: g1FadeDown 1s ease-out .15s both;
}
.g1-hero h1 .g1-gradient-text {
    background: linear-gradient(135deg, var(--g1-blue-400), var(--g1-cyan), var(--g1-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.g1-hero p.lead {
    font-size: 1.15rem;
    color: var(--g1-muted);
    max-width: 560px;
    margin: 0 auto 2.2rem;
    animation: g1FadeDown 1s ease-out .3s both;
}
.g1-hero-actions {
    animation: g1FadeDown 1s ease-out .45s both;
}

/* CTA glow button */
.g1-btn-glow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 2rem;
    border: none;
    border-radius: .6rem;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--g1-blue-600), var(--g1-blue-500));
    box-shadow: 0 0 25px var(--g1-glow), 0 4px 15px rgba(0,0,0,.3);
    cursor: pointer;
    transition: transform .25s, box-shadow .25s;
    text-decoration: none;
}
.g1-btn-glow:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 0 40px var(--g1-glow), 0 8px 30px rgba(0,0,0,.35);
    color: #fff;
}
.g1-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 2rem;
    border-radius: .6rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--g1-blue-400);
    background: transparent;
    border: 1.5px solid rgba(59,130,246,.35);
    cursor: pointer;
    transition: background .25s, border-color .25s, color .25s;
    text-decoration: none;
}
.g1-btn-outline:hover {
    background: rgba(59,130,246,.08);
    border-color: var(--g1-blue-400);
    color: #fff;
}

/* Scroll-down indicator */
.g1-scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: g1Bounce 2s infinite;
    color: var(--g1-muted);
    font-size: 1.6rem;
}
@keyframes g1Bounce {
    0%,100% { transform: translateX(-50%) translateY(0); }
    50%     { transform: translateX(-50%) translateY(10px); }
}

/* ---------- GLASS CARDS ---------- */
.g1-card {
    background: var(--g1-bg-card);
    border: 1px solid var(--g1-border);
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform .35s, border-color .35s, box-shadow .35s;
    height: 100%;
}
.g1-card:hover {
    transform: translateY(-6px);
    border-color: rgba(59,130,246,.25);
    box-shadow: 0 12px 40px rgba(59,130,246,.08);
}
.g1-card-icon {
    width: 56px;
    height: 56px;
    border-radius: .85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
    background: linear-gradient(135deg, rgba(59,130,246,.15), rgba(6,182,212,.10));
    color: var(--g1-blue-400);
    box-shadow: 0 0 18px rgba(59,130,246,.12);
}
.g1-card h5 {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: .6rem;
    color: #fff;
}
.g1-card p {
    color: var(--g1-muted);
    font-size: .92rem;
    line-height: 1.7;
    margin: 0;
}

/* ---------- FEATURE ROWS (alternating image + text) ---------- */
.g1-feature-row {
    display: flex;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-bottom: 4rem;
}
.g1-feature-row:last-child { margin-bottom: 0; }
.g1-feature-visual {
    flex: 1 1 340px;
    text-align: center;
}
.g1-feature-content {
    flex: 1 1 400px;
}
.g1-feature-content h3 {
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: .8rem;
    color: #fff;
}
.g1-feature-content h3 i { margin-left: .5rem; color: var(--g1-blue-400); }
.g1-feature-content p {
    color: var(--g1-muted);
    line-height: 1.8;
}
.g1-feature-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
}
.g1-feature-list li {
    padding: .45rem 0;
    color: var(--g1-muted);
    font-size: .93rem;
    display: flex;
    align-items: start;
    gap: .6rem;
}
.g1-feature-list li i {
    color: var(--g1-cyan);
    margin-top: .25rem;
    flex-shrink: 0;
}

/* Floating illustration wrapper */
.g1-float-box {
    width: 280px;
    height: 220px;
    margin: 0 auto;
    border-radius: 1.2rem;
    background: linear-gradient(135deg, rgba(59,130,246,.10), rgba(139,92,246,.08));
    border: 1px solid var(--g1-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    animation: g1Float 5s ease-in-out infinite;
    box-shadow: 0 0 50px rgba(59,130,246,.08);
}
@keyframes g1Float {
    0%,100% { transform: translateY(0); }
    50%     { transform: translateY(-14px); }
}

/* ---------- STATS COUNTERS ---------- */
.g1-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    padding: 3rem 0;
}
.g1-stat {
    text-align: center;
    min-width: 140px;
}
.g1-stat-value {
    font-size: 2.6rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--g1-blue-400), var(--g1-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    direction: ltr;
}
.g1-stat-label {
    color: var(--g1-muted);
    font-size: .88rem;
    margin-top: .25rem;
}

/* ---------- TIMELINE (How it works) ---------- */
.g1-timeline {
    position: relative;
    max-width: 650px;
    margin: 0 auto;
    padding-right: 2.5rem;
}
.g1-timeline::before {
    content: '';
    position: absolute;
    /* Center the 2px line on the 32px dots (dot center is 1rem from right edge) */
    right: calc(1rem - 1px);
    /* Start/end at dot centers — JS sets exact values via custom properties */
    top: var(--tl-top, calc(.15rem + 16px));
    bottom: var(--tl-bottom, 2rem);
    width: 2px;
    background: linear-gradient(180deg, var(--g1-blue-500), var(--g1-cyan), var(--g1-purple));
    border-radius: 2px;
}
.g1-timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
}
.g1-timeline-item:last-child { margin-bottom: 0; }
.g1-timeline-dot {
    position: absolute;
    right: -2.5rem;
    top: .15rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--g1-bg-dark);
    border: 2px solid var(--g1-blue-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    color: var(--g1-blue-400);
    font-weight: 800;
    box-shadow: 0 0 14px var(--g1-glow);
    z-index: 1;
}
.g1-timeline-item h5 {
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
    margin-bottom: .3rem;
}
.g1-timeline-item p {
    color: var(--g1-muted);
    font-size: .9rem;
    line-height: 1.7;
    margin: 0;
}

/* ---------- ADMIN PANEL GRID ---------- */
.g1-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.g1-admin-item {
    background: var(--g1-bg-card);
    border: 1px solid var(--g1-border);
    border-radius: .75rem;
    padding: 1.2rem;
    text-align: center;
    transition: transform .3s, border-color .3s;
    backdrop-filter: blur(8px);
}
.g1-admin-item:hover {
    transform: translateY(-4px);
    border-color: rgba(59,130,246,.2);
}
.g1-admin-item i {
    font-size: 1.6rem;
    color: var(--g1-blue-400);
    margin-bottom: .6rem;
    display: block;
}
.g1-admin-item span {
    font-weight: 600;
    font-size: .88rem;
    color: var(--g1-text);
}
.g1-admin-item small {
    display: block;
    color: var(--g1-muted);
    font-size: .76rem;
    margin-top: .25rem;
}

/* ---------- CTA FOOTER ---------- */
.g1-cta {
    text-align: center;
    padding: 5rem 1rem;
    position: relative;
    z-index: 1;
}
.g1-cta h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: .8rem;
    color: #fff;
}
.g1-cta p {
    color: var(--g1-muted);
    max-width: 500px;
    margin: 0 auto 2rem;
}

/* Separator line glow */
.g1-sep {
    width: 60px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--g1-blue-500), var(--g1-cyan));
    margin: 0 auto 3rem;
    box-shadow: 0 0 12px var(--g1-glow);
}

/* ---------- PARTICLES (decorative dots) ---------- */
.g1-particles {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
.g1-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--g1-blue-400);
    opacity: 0;
    animation: g1Twinkle var(--dur, 4s) var(--delay, 0s) infinite ease-in-out;
}
@keyframes g1Twinkle {
    0%,100% { opacity: 0; transform: scale(.6); }
    50%     { opacity: .6; transform: scale(1); }
}

/* ---------- SCROLL REVEAL ---------- */
.g1-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .7s ease-out, transform .7s ease-out;
}
.g1-reveal.g1-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- KEYFRAMES ---------- */
@keyframes g1FadeDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    .g1-section  { padding: 3rem 1rem; }
    .g1-title    { font-size: 1.6rem; }
    .g1-float-box { width: 200px; height: 160px; font-size: 3.5rem; }
    .g1-feature-row { gap: 1.5rem; }
    .g1-stats { gap: 1rem; }
    .g1-stat-value { font-size: 2rem; }
    .g1-admin-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
