/* ════════════════════════════════════════════════════
   AbookFX — Main Stylesheet
   ════════════════════════════════════════════════════ */

/* ── Reset / Base ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size:   16px;
    line-height: 1.6;
    margin:      0;
}

img { max-width: 100%; height: auto; }

/* ── Navbar ─────────────────────────────────────── */
.abfx-navbar {
    background-color: var(--clr-nav-bg);
    box-shadow:       var(--shadow-md);
    padding:          0.75rem 0;
    position:         sticky;
    top:              0;
    z-index:          1000;
    transition:       background-color var(--transition);
}

.abfx-navbar .navbar-brand {
    font-weight: 800;
    font-size:   1.5rem;
    color:       var(--clr-accent) !important;
    letter-spacing: -0.5px;
}
.abfx-navbar .navbar-brand span { color: #ffffff; }

.abfx-navbar .nav-link {
    color:         var(--clr-nav-link) !important;
    font-weight:   500;
    padding:       0.5rem 0.85rem !important;
    border-radius: var(--radius-sm);
    transition:    color var(--transition), background var(--transition);
}
.abfx-navbar .nav-link:hover,
.abfx-navbar .nav-link.active {
    color:      var(--clr-nav-link-hover) !important;
    background: rgba(215,246,92,0.1);
}

/* Dropdown */
.abfx-navbar .dropdown-menu {
    background:    var(--clr-surface);
    border:        1px solid var(--clr-border);
    border-radius: var(--radius-md);
    box-shadow:    var(--shadow-md);
    padding:       0.5rem;
}
.abfx-navbar .dropdown-item {
    color:         var(--clr-text);
    border-radius: var(--radius-sm);
    padding:       0.45rem 1rem;
    font-size:     0.9rem;
    transition:    background var(--transition);
}
.abfx-navbar .dropdown-item:hover {
    background: var(--clr-bg-alt);
    color:      var(--clr-primary);
}

/* ── Buttons ────────────────────────────────────── */
.btn-abfx-primary {
    background:    var(--clr-btn-primary-bg);
    color:         var(--clr-btn-primary-text);
    border:        none;
    border-radius: var(--radius-sm);
    font-weight:   700;
    padding:       0.55rem 1.4rem;
    transition:    background var(--transition), transform 0.15s;
}
.btn-abfx-primary:hover {
    background: var(--clr-accent-hover);
    color:      var(--clr-btn-primary-text);
    transform:  translateY(-1px);
}

.btn-abfx-outline {
    background:    transparent;
    color:         var(--clr-btn-outline-text);
    border:        2px solid var(--clr-btn-outline-border);
    border-radius: var(--radius-sm);
    font-weight:   600;
    padding:       0.5rem 1.35rem;
    transition:    all var(--transition);
}
.btn-abfx-outline:hover {
    background: var(--clr-btn-outline-border);
    color:      #fff;
}

/* ── Cards ──────────────────────────────────────── */
.abfx-card {
    background:    var(--clr-surface);
    border:        1px solid var(--clr-border);
    border-radius: var(--radius-md);
    box-shadow:    var(--shadow-sm);
    padding:       1.75rem;
    transition:    box-shadow var(--transition), transform var(--transition);
}
.abfx-card:hover {
    box-shadow: var(--shadow-md);
    transform:  translateY(-3px);
}

/* ── Section helpers ────────────────────────────── */
.section-py  { padding: 80px 0; }
.section-py-sm { padding: 50px 0; }

.section-heading {
    font-size:   2rem;
    font-weight: 800;
    color:       var(--clr-primary);
}
[data-theme="dark"] .section-heading { color: var(--clr-accent); }

.section-subheading {
    font-size:  1.05rem;
    color:      var(--clr-text-muted);
    max-width:  600px;
    margin:     0 auto;
}

.accent-divider {
    width:      60px;
    height:     4px;
    background: var(--clr-accent);
    border:     none;
    margin:     1rem auto 2rem;
    border-radius: 2px;
}

/* ── Hero ───────────────────────────────────────── */
.abfx-hero {
    background:   var(--clr-primary);
    padding:      100px 0 80px;
    color:        #fff;
    overflow:     hidden;
    position:     relative;
}
.abfx-hero::after {
    content:    '';
    position:   absolute;
    bottom:     -2px;
    left:       0;
    right:      0;
    height:     60px;
    background: var(--clr-bg);
    clip-path:  ellipse(55% 100% at 50% 100%);
}
.abfx-hero h1 {
    font-size:   3rem;
    font-weight: 900;
    line-height: 1.15;
}
.abfx-hero h1 span { color: var(--clr-accent); }
.abfx-hero p.lead { opacity: 0.85; font-size: 1.15rem; }




/* ── Stats bar ──────────────────────────────────── */
.stats-bar {
    background: var(--clr-surface);
    border-bottom: 1px solid var(--clr-border);
    padding: 1.25rem 0;
}
.stat-item { text-align: center; }
.stat-item .stat-num {
    font-size:   1.75rem;
    font-weight: 800;
    color:       var(--clr-primary);
    display:     block;
}
[data-theme="dark"] .stat-item .stat-num { color: var(--clr-accent); }
.stat-item .stat-label {
    font-size: 0.82rem;
    color:     var(--clr-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Features grid ──────────────────────────────── */
.feature-icon {
    width:         52px;
    height:        52px;
    border-radius: var(--radius-md);
    background:    rgba(6,72,61,0.1);
    display:       flex;
    align-items:   center;
    justify-content: center;
    font-size:     1.4rem;
    margin-bottom: 1rem;
    color:         var(--clr-primary);
}
[data-theme="dark"] .feature-icon {
    background: rgba(215,246,92,0.1);
    color:      var(--clr-accent);
}

/* ── Footer ─────────────────────────────────────── */
.abfx-footer {
    background: var(--clr-footer-bg);
    color:      var(--clr-footer-text);
    padding:    60px 0 30px;
}
.abfx-footer a {
    color:      var(--clr-footer-text);
    transition: color var(--transition);
}
.abfx-footer a:hover { color: var(--clr-accent); }
.abfx-footer .footer-brand {
    font-size:   1.6rem;
    font-weight: 800;
    color:       var(--clr-accent) !important;
}
.abfx-footer hr { border-color: rgba(255,255,255,0.1); }

/* ── AJAX page loader overlay ───────────────────── */
#page-loader {
    position:   fixed;
    inset:      0;
    background: var(--clr-bg);
    display:    flex;
    align-items: center;
    justify-content: center;
    z-index:    9999;
    transition: opacity 0.3s;
}
#page-loader.hidden { opacity: 0; pointer-events: none; }

.abfx-spinner {
    width:  44px;
    height: 44px;
    border: 4px solid var(--clr-border);
    border-top-color: var(--clr-accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Misc ───────────────────────────────────────── */
.text-accent { color: var(--clr-accent) !important; }
.bg-primary-brand { background: var(--clr-primary) !important; }
.border-accent { border-color: var(--clr-accent) !important; }

@media (max-width: 767.98px) {
    .abfx-hero h1 { font-size: 2rem; }
    .section-py   { padding: 50px 0; }
    .section-heading { font-size: 1.6rem; }
}
