/* ==========================================================================
   Google Sheets Cloud Apps Hub Stylesheet - Ahmed Elshemy Portfolio
   Dark Glassmorphism, Emerald & Cyan Accents, Zero-CLS, Fully Responsive
   ========================================================================== */

html, body {
    margin: 0 !important;
    padding: 0 !important;
    background-color: #070e1b !important;
    color: #f8fafc;
}

:root {
    --as-bg: #070e1b;
    --as-bg-alt: #0a1628;
    --as-card-bg: rgba(13, 27, 46, 0.72);
    --as-card-hover: rgba(18, 36, 62, 0.92);
    --as-border: rgba(255, 255, 255, 0.09);
    --as-border-hover: rgba(16, 185, 129, 0.5);
    --as-text-main: #f8fafc;
    --as-text-muted: #94a3b8;
    --as-emerald: #10b981;
    --as-cyan: #38bdf8;
    --as-amber: #f59e0b;
    --as-indigo: #818cf8;
    --as-radius-lg: 22px;
    --as-radius-md: 14px;
    --as-radius-sm: 10px;
    --as-transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Neutralize global negative margins from bundle.min.css */
.appsheet-page a {
    margin: 0 !important;
    text-decoration: none;
}

.appsheet-page code {
    background: rgba(16, 185, 129, 0.14);
    color: #34d399;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.88em;
    border: 1px solid rgba(16, 185, 129, 0.28);
    direction: ltr;
    display: inline-block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.appsheet-page {
    background-color: var(--as-bg);
    color: var(--as-text-main);
    min-height: 100vh;
    overflow-x: hidden;
    direction: rtl;
    font-family: 'Cairo', sans-serif;
}

/* ==========================================================================
   1. Hero Section
   ========================================================================== */
.appsheet-hero {
    position: relative;
    padding: 72px 0 54px;
    background:
        radial-gradient(circle at 80% 10%, rgba(16, 185, 129, 0.16) 0%, transparent 50%),
        radial-gradient(circle at 15% 20%, rgba(56, 189, 248, 0.14) 0%, transparent 50%),
        linear-gradient(180deg, #070e1b 0%, #0a1628 100%);
    border-bottom: 1px solid var(--as-border);
    text-align: center;
}

.appsheet-hero-inner {
    max-width: 960px;
    margin: 0 auto;
}

.appsheet-breadcrumbs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    font-size: 0.88rem;
    color: var(--as-text-muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--as-border);
    padding: 6px 16px;
    border-radius: 50px;
    backdrop-filter: blur(8px);
}

.appsheet-breadcrumbs a {
    color: #cbd5e1 !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--as-transition);
}

.appsheet-breadcrumbs a:hover {
    color: var(--as-emerald) !important;
}

.appsheet-breadcrumbs .sep {
    font-size: 0.72rem;
    color: #64748b;
}

.appsheet-breadcrumbs .current {
    color: var(--as-emerald);
    font-weight: 700;
}

.appsheet-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 20px;
    border-radius: 50px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
    font-size: 0.92rem;
    font-weight: 800;
    margin-bottom: 20px;
    backdrop-filter: blur(8px);
}

.appsheet-hero h1 {
    font-size: clamp(2rem, 4.2vw, 3rem);
    font-weight: 900;
    line-height: 1.35;
    margin-bottom: 18px;
    background: linear-gradient(135deg, #ffffff 25%, #34d399 65%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.appsheet-hero-desc {
    color: #cbd5e1;
    font-size: 1.12rem;
    line-height: 1.85;
    margin: 0 auto 30px;
    max-width: 820px;
}

.appsheet-stats-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.appsheet-stat-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--as-border);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #e2e8f0;
    backdrop-filter: blur(10px);
    transition: var(--as-transition);
}

.appsheet-stat-item:hover {
    border-color: var(--as-emerald);
    transform: translateY(-2px);
}

.appsheet-stat-item i {
    color: var(--as-emerald);
    font-size: 1rem;
}

/* ==========================================================================
   2. How It Works Workflow Strip
   ========================================================================== */
.appsheet-steps-section {
    padding: 45px 0 25px;
    background: var(--as-bg-alt);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.appsheet-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.appsheet-step-card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius-md);
    padding: 22px 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    position: relative;
    transition: var(--as-transition);
}

.appsheet-step-card:hover {
    border-color: rgba(56, 189, 248, 0.35);
    transform: translateY(-3px);
}

.appsheet-step-num {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(56, 189, 248, 0.2));
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
    font-size: 1.15rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.appsheet-step-content h2 {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 6px;
}

.appsheet-step-content p {
    font-size: 0.9rem;
    color: var(--as-text-muted);
    line-height: 1.7;
    margin: 0;
}

/* ==========================================================================
   3. Filter & Search Controls
   ========================================================================== */
.appsheet-controls-section {
    padding: 35px 0 18px;
    background: var(--as-bg-alt);
}

.appsheet-controls-wrap {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.appsheet-search-box {
    position: relative;
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
}

.appsheet-search-box i.search-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 1.05rem;
    pointer-events: none;
    transition: var(--as-transition);
}

.appsheet-search-input {
    width: 100%;
    padding: 14px 48px 14px 44px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50px;
    color: #ffffff;
    font-size: 0.98rem;
    font-family: 'Cairo', sans-serif;
    outline: none;
    transition: var(--as-transition);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.appsheet-search-input:focus {
    border-color: var(--as-emerald);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18);
}

.appsheet-search-input:focus ~ i.search-icon {
    color: var(--as-emerald);
}

.appsheet-search-clear {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 1.05rem;
    cursor: pointer;
    display: none;
    padding: 4px;
}

.appsheet-search-clear:hover {
    color: #ffffff;
}

.appsheet-tabs-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.appsheet-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--as-border);
    color: var(--as-text-muted);
    font-size: 0.9rem;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: var(--as-transition);
    white-space: nowrap;
}

.appsheet-tab-btn:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
}

.appsheet-tab-btn.active {
    background: linear-gradient(135deg, #059669 0%, #0d9488 100%);
    border-color: #34d399;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}

.appsheet-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 0.78rem;
    background: rgba(0, 0, 0, 0.32);
    color: #e2e8f0;
}

.appsheet-tab-btn.active .appsheet-tab-count {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.appsheet-results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    color: var(--as-text-muted);
    font-size: 0.92rem;
    flex-wrap: wrap;
    gap: 10px;
}

.appsheet-results-info strong {
    color: #34d399;
}

/* ==========================================================================
   4. Apps Cards Grid
   ========================================================================== */
.appsheet-grid-section {
    padding: 30px 0 75px;
    background: var(--as-bg);
}

.appsheet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 28px;
}

.appsheet-card {
    background: var(--as-card-bg);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--as-transition);
    backdrop-filter: blur(14px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    position: relative;
}

.appsheet-card.is-hidden {
    display: none !important;
}

.appsheet-card:hover {
    transform: translateY(-7px);
    background: var(--as-card-hover);
    border-color: var(--card-accent, var(--as-emerald));
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.5), 0 0 28px rgba(16, 185, 129, 0.14);
}

.appsheet-card-banner {
    padding: 22px 24px 18px;
    background:
        radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--card-accent, #10b981) 24%, transparent), transparent 65%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(10, 22, 40, 0.9) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.appsheet-card-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.appsheet-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: 50px;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.38);
    color: #34d399;
    font-size: 0.78rem;
    font-weight: 800;
}

.appsheet-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.28);
    animation: appsheetPulse 2s infinite;
}

@keyframes appsheetPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}

.appsheet-sheet-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #e2e8f0;
    font-size: 0.78rem;
    font-weight: 700;
}

.appsheet-sheet-badge i {
    color: #22c55e;
}

.appsheet-card-identity {
    display: flex;
    align-items: center;
    gap: 16px;
}

.appsheet-app-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--card-accent, #10b981), var(--card-accent-2, #38bdf8));
    color: #ffffff;
    font-size: 1.55rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.appsheet-app-meta {
    min-width: 0;
}

.appsheet-cat-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.appsheet-cat-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--card-accent, #38bdf8);
}

.appsheet-version-tag {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
}

.appsheet-card-banner h3 {
    font-size: 1.24rem;
    font-weight: 800;
    line-height: 1.45;
    color: #ffffff;
    margin: 0;
}

.appsheet-card-body {
    padding: 22px 24px 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.appsheet-card-desc {
    color: #cbd5e1;
    font-size: 0.94rem;
    line-height: 1.75;
    margin-bottom: 18px;
}

.appsheet-modules-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 18px;
}

.appsheet-module-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: #cbd5e1;
    font-size: 0.78rem;
    font-weight: 600;
}

.appsheet-module-chip i {
    color: var(--card-accent, #38bdf8);
    font-size: 0.72rem;
}

.appsheet-highlights {
    list-style: none;
    margin: 0 0 22px 0;
    padding: 15px 0 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    flex-direction: column;
    gap: 9px;
    flex-grow: 1;
}

.appsheet-highlights li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: #cbd5e1;
    font-size: 0.87rem;
    line-height: 1.55;
}

.appsheet-highlights li i {
    color: #10b981;
    margin-top: 4px;
    flex-shrink: 0;
}

.appsheet-card-footer {
    display: flex;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
}

.appsheet-btn-demo {
    flex: 1 1 200px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px 18px;
    border-radius: var(--as-radius-sm);
    background: linear-gradient(135deg, #059669 0%, #0284c7 100%);
    color: #ffffff !important;
    font-weight: 800;
    font-size: 0.94rem;
    transition: var(--as-transition);
    border: 1px solid rgba(52, 211, 153, 0.35);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.28);
}

.appsheet-btn-demo:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(16, 185, 129, 0.4);
    filter: brightness(1.06);
}

.appsheet-btn-connect {
    flex: 0 1 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: var(--as-radius-sm);
    background: rgba(37, 211, 102, 0.12);
    border: 1px solid rgba(37, 211, 102, 0.38);
    color: #4ade80 !important;
    font-weight: 800;
    font-size: 0.9rem;
    transition: var(--as-transition);
}

.appsheet-btn-connect:hover {
    background: #25d366;
    color: #070e1b !important;
    transform: translateY(-2px);
}

.appsheet-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 55px 20px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px dashed var(--as-border);
    border-radius: var(--as-radius-lg);
    display: none;
}

.appsheet-empty-icon {
    font-size: 3rem;
    color: #475569;
    margin-bottom: 16px;
}

.appsheet-empty-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 8px;
}

.appsheet-empty-text {
    color: var(--as-text-muted);
    margin-bottom: 22px;
}

.appsheet-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 50px;
    background: var(--as-emerald);
    color: #070e1b;
    font-weight: 800;
    font-family: 'Cairo', sans-serif;
    border: none;
    cursor: pointer;
}

/* ==========================================================================
   5. Cloud Architecture & FAQ Sections
   ========================================================================== */
.appsheet-faq-section {
    padding: 70px 0;
    background: linear-gradient(180deg, #070e1b 0%, #0a1628 100%);
    border-top: 1px solid var(--as-border);
}

.appsheet-section-head {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 42px;
}

.appsheet-section-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 50px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: var(--as-cyan);
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.appsheet-section-head h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 12px;
}

.appsheet-section-head p {
    color: var(--as-text-muted);
    font-size: 1.02rem;
    line-height: 1.8;
}

.appsheet-faq-grid {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.appsheet-faq-item {
    background: var(--as-card-bg);
    border: 1px solid var(--as-border);
    border-radius: var(--as-radius-md);
    overflow: hidden;
    transition: var(--as-transition);
}

.appsheet-faq-item.active {
    border-color: var(--as-emerald);
    background: rgba(15, 23, 42, 0.92);
}

.appsheet-faq-trigger {
    width: 100%;
    padding: 18px 22px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.04rem;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    text-align: right;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    cursor: pointer;
}

.appsheet-faq-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: var(--as-emerald);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.appsheet-faq-item.active .appsheet-faq-icon {
    transform: rotate(180deg);
    background: var(--as-emerald);
    color: #070e1b;
}

.appsheet-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.appsheet-faq-answer-inner {
    padding: 14px 22px 20px;
    color: #cbd5e1;
    font-size: 0.96rem;
    line-height: 1.85;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   6. Bottom CTA Banner
   ========================================================================== */
.appsheet-cta-section {
    padding: 65px 0 90px;
    background: var(--as-bg);
}

.appsheet-cta-card {
    background:
        radial-gradient(circle at 100% 0%, rgba(16, 185, 129, 0.18) 0%, transparent 50%),
        radial-gradient(circle at 0% 100%, rgba(56, 189, 248, 0.14) 0%, transparent 50%),
        linear-gradient(135deg, #0d1b2e 0%, #08101d 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--as-radius-lg);
    padding: 48px 36px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.appsheet-cta-card h2 {
    font-size: clamp(1.65rem, 3.2vw, 2.3rem);
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 14px;
}

.appsheet-cta-card p {
    color: #cbd5e1;
    font-size: 1.06rem;
    max-width: 680px;
    margin: 0 auto 30px;
    line-height: 1.85;
}

.appsheet-cta-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.appsheet-cta-wa {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    border-radius: 50px;
    background: #25d366;
    color: #070e1b !important;
    font-size: 1.02rem;
    font-weight: 800;
    transition: var(--as-transition);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
}

.appsheet-cta-wa:hover {
    background: #22c55e;
    transform: translateY(-3px);
}

.appsheet-cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--as-border);
    color: #ffffff !important;
    font-size: 1rem;
    font-weight: 700;
    transition: var(--as-transition);
}

.appsheet-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-3px);
}

/* ==========================================================================
   7. Responsive Breakpoints
   ========================================================================== */
@media (max-width: 992px) {
    .appsheet-steps-grid {
        grid-template-columns: 1fr;
    }
    .appsheet-grid {
        grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    }
}

@media (max-width: 768px) {
    .appsheet-hero {
        padding: 50px 0 36px;
    }
    .appsheet-tabs-wrapper {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 8px;
        scrollbar-width: none;
    }
    .appsheet-tabs-wrapper::-webkit-scrollbar {
        display: none;
    }
    .appsheet-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .appsheet-card-footer {
        flex-direction: column;
    }
    .appsheet-btn-demo,
    .appsheet-btn-connect {
        width: 100%;
    }
    .appsheet-cta-card {
        padding: 34px 20px;
    }
    .appsheet-cta-actions {
        flex-direction: column;
    }
    .appsheet-cta-wa,
    .appsheet-cta-secondary {
        width: 100%;
        justify-content: center;
    }
}
