/**
 * SC Attendance - Public Pages Shared Styles
 * Used by: landing, about, contact, all-features, tutorials
 * Light Mode (default) + Dark Mode toggle
 */

:root {
    --primary: #0983e2;
    --primary-dark: #0769b8;
    --secondary: #6c5ce6;
    --accent: #6c5ce6;
    --success: #10b981;
    --info: #06b6d4;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1a1a3e;
    --light: #f8fafc;

    /* Theme-aware */
    --bg-body: #f8fafc;
    --bg-section-1: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
    --bg-section-2: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.06);
    --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 25px 60px rgba(0, 0, 0, 0.1);
    --section-badge-bg: linear-gradient(135deg, rgba(9, 131, 226, 0.1), rgba(30, 122, 158, 0.1));
    --section-badge-color: var(--primary);
    --divider: rgba(0, 0, 0, 0.06);
}

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

body {
    font-family: 'Tajawal', sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    overflow-x: hidden;
    transition: background 0.4s ease, color 0.4s ease;
}

/* ===== Theme Toggle ===== */
.theme-toggle {
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.04);
    color: var(--dark);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.15rem;
    padding: 0;
}

.theme-toggle:hover { background: rgba(0, 0, 0, 0.08); transform: scale(1.1); }
.theme-toggle .fa-moon { display: inline-block; }
.theme-toggle .fa-sun { display: none; }

/* ===== Navbar ===== */
.navbar-glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 15px 0;
    position: fixed; width: 100%; top: 0; z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-glass.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.navbar-brand img { height: 45px; transition: all 0.3s ease; }
.navbar-toggler { border-color: rgba(0, 0, 0, 0.15); }

.nav-link-modern {
    color: var(--dark) !important;
    font-weight: 600;
    padding: 12px 20px !important;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link-modern::after {
    content: '';
    position: absolute; bottom: 5px; left: 50%;
    width: 0; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link-modern:hover::after { width: 60%; }
.nav-link-modern.active::after { width: 60%; }

.btn-gradient {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white !important;
    padding: 12px 28px !important;
    border-radius: 50px;
    font-weight: 700;
    border: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(9, 131, 226, 0.3);
}

.btn-gradient:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(9, 131, 226, 0.4);
}

/* ===== Page Hero ===== */
.page-hero {
    min-height: 50vh;
    background: linear-gradient(135deg, #0a3d5c 0%, #145a7a 30%, #0769b8 60%, #0983e2 100%);
    position: relative;
    display: flex; align-items: center;
    padding: 140px 0 80px;
    overflow: hidden;
    text-align: center;
}

.page-hero > .container { position: relative; z-index: 2; }

.page-hero .hero-bg-shapes {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    overflow: hidden; z-index: 1;
}

.page-hero .shape {
    position: absolute; border-radius: 50%;
    filter: blur(80px); opacity: 0.5;
    animation: floatShape 20s infinite;
}

.page-hero .shape-1 {
    width: 400px; height: 400px;
    background: linear-gradient(135deg, rgba(9, 131, 226, 0.4), rgba(139, 92, 246, 0.3));
    top: -10%; right: -10%;
}

.page-hero .shape-2 {
    width: 300px; height: 300px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.3), rgba(59, 130, 246, 0.3));
    bottom: -5%; left: -5%;
    animation-delay: -5s;
}

@keyframes floatShape {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(30px, -30px) rotate(90deg); }
    50% { transform: translate(-20px, 20px) rotate(180deg); }
    75% { transform: translate(10px, -10px) rotate(270deg); }
}

.page-hero-badge {
    display: inline-flex; align-items: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 24px;
    border-radius: 50px;
    margin-bottom: 20px;
    color: white;
    font-size: 0.95rem;
}

.page-hero-badge i { margin-left: 8px; color: #fbbf24; }

.page-hero h1 {
    font-size: 3.5rem; font-weight: 900;
    margin-bottom: 20px; line-height: 1.2;
    background: linear-gradient(135deg, #fff 0%, #c4b5fd 50%, #f0abfc 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-hero p {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ===== Section Header ===== */
.section-header { text-align: center; margin-bottom: 80px; }

.section-badge {
    display: inline-block;
    background: var(--section-badge-bg);
    color: var(--section-badge-color);
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 20px;
    transition: all 0.4s ease;
}

.section-title-modern {
    font-size: 3rem; font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 20px;
    transition: color 0.4s ease;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
    transition: color 0.4s ease;
}

/* ===== Common Sections ===== */
.section-alt-1 {
    padding: 100px 0;
    background: var(--bg-section-1);
    position: relative; overflow: hidden;
    transition: background 0.4s ease;
}

.section-alt-2 {
    padding: 100px 0;
    background: var(--bg-section-2);
    position: relative; overflow: hidden;
    transition: background 0.4s ease;
}

.section-alt-1 > .container,
.section-alt-2 > .container {
    position: relative; z-index: 1;
}

/* ===== Common Card ===== */
.feature-card-public {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 35px 25px;
    text-align: center;
    height: 100%;
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.feature-card-public:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-shadow-hover);
    border-color: var(--primary);
}

.feature-card-icon {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: white;
    box-shadow: 0 10px 30px rgba(9, 131, 226, 0.25);
}

.feature-card-public h4 {
    font-weight: 800; font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 12px;
    transition: color 0.4s ease;
}

.feature-card-public p {
    color: var(--text-secondary);
    line-height: 1.8; font-size: 0.95rem;
    transition: color 0.4s ease;
}

/* ===== Buttons ===== */
.btn-hero-primary {
    background: linear-gradient(135deg, #fff, #f0f0f0);
    color: var(--dark) !important;
    padding: 18px 40px;
    font-size: 1.15rem; font-weight: 700;
    border-radius: 60px; border: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.btn-hero-primary:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    color: var(--primary) !important;
}

/* ===== CTA ===== */
.cta-section {
    padding: 120px 0;
    background: var(--bg-section-1);
    transition: background 0.4s ease;
}

.cta-box-modern {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 40px;
    padding: 80px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-box-modern h2 {
    font-size: 3rem; font-weight: 900;
    color: white; margin-bottom: 20px;
    position: relative;
}

.cta-box-modern p {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    position: relative;
}

.btn-cta-modern {
    background: white;
    color: var(--primary) !important;
    padding: 20px 50px;
    font-size: 1.25rem; font-weight: 800;
    border-radius: 60px; border: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    position: relative;
}

.btn-cta-modern:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
}

.cta-orb {
    position: absolute; border-radius: 50%;
    filter: blur(80px); pointer-events: none;
}

.cta-orb-1 {
    width: 300px; height: 300px;
    background: rgba(255, 255, 255, 0.15);
    top: -100px; right: -100px;
}

.cta-orb-2 {
    width: 250px; height: 250px;
    background: rgba(255, 255, 255, 0.1);
    bottom: -80px; left: -80px;
}

/* ===== Footer ===== */
.footer-modern {
    background: #0f0a1f;
    color: white;
    padding: 80px 0 40px;
    position: relative; overflow: hidden;
}

.footer-modern > .container { position: relative; z-index: 1; }
.footer-brand img { height: 50px; margin-bottom: 25px; }

.footer-text {
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.9; max-width: 300px;
}

.footer-heading { font-weight: 700; font-size: 1.2rem; margin-bottom: 25px; }
.footer-links-modern { list-style: none; padding: 0; }
.footer-links-modern li { margin-bottom: 15px; }

.footer-links-modern a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links-modern a:hover { color: white; transform: translateX(-5px); }

.footer-bottom-modern {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 40px; margin-top: 60px;
    text-align: center;
    color: rgba(255, 255, 255, 0.35);
}

/* ===== Category Title ===== */
.category-section-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: color 0.4s ease;
}

.category-section-title i { color: var(--primary); font-size: 1.4rem; }

.category-section-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 40px;
    transition: color 0.4s ease;
}

/* ===== Step Card (tutorials) ===== */
.step-guide-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: flex-start;
    gap: 20px;
    transition: all 0.3s ease;
    border: 1px solid var(--card-border);
}

.step-guide-card:hover {
    transform: translateX(-5px);
    box-shadow: var(--card-shadow-hover);
}

.step-guide-number {
    width: 50px; height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 1.3rem; font-weight: 800;
    flex-shrink: 0;
}

.step-guide-content h4 {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 1.1rem;
    transition: color 0.4s ease;
}

.step-guide-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
    font-size: 0.95rem;
    transition: color 0.4s ease;
}

/* ===== Stats Counter ===== */
.stat-counter {
    text-align: center;
    padding: 30px 15px;
}

.stat-counter-number {
    font-size: 3.5rem; font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-counter-label {
    color: var(--text-secondary);
    font-size: 1.1rem; font-weight: 600;
    transition: color 0.4s ease;
}


/* ================================================================
   DARK MODE
   ================================================================ */

body[data-theme="dark"] {
    --bg-body: #0a0a1a;
    --bg-section-1: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --bg-section-2: linear-gradient(180deg, #0f172a 0%, #1a1a2e 100%);
    --text-primary: #e2e8f0;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-muted: rgba(255, 255, 255, 0.4);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    --card-shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.3);
    --section-badge-bg: rgba(255, 255, 255, 0.06);
    --section-badge-color: rgba(255, 255, 255, 0.85);
    --divider: rgba(255, 255, 255, 0.06);
    background: #0a0a1a;
    color: #e2e8f0;
}

/* Dark: Navbar */
body[data-theme="dark"] .navbar-glass {
    background: rgba(10, 10, 26, 0.7);
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

body[data-theme="dark"] .navbar-glass.scrolled {
    background: rgba(10, 10, 26, 0.92);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

body[data-theme="dark"] .nav-link-modern { color: rgba(255, 255, 255, 0.8) !important; }
body[data-theme="dark"] .nav-link-modern:hover { color: white !important; }
body[data-theme="dark"] .nav-link-modern::after { background: linear-gradient(90deg, var(--primary), #8b5cf6); }
body[data-theme="dark"] .navbar-toggler { border-color: rgba(255, 255, 255, 0.15); }
body[data-theme="dark"] .navbar-toggler-icon { filter: invert(1); }

body[data-theme="dark"] .btn-gradient {
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

/* Dark: Toggle */
body[data-theme="dark"] .theme-toggle {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: white;
}
body[data-theme="dark"] .theme-toggle:hover { background: rgba(255, 255, 255, 0.12); }
body[data-theme="dark"] .theme-toggle .fa-moon { display: none; }
body[data-theme="dark"] .theme-toggle .fa-sun { display: inline-block; }

/* Dark: Hero */
body[data-theme="dark"] .page-hero {
    background: linear-gradient(135deg, #0a0a1a 0%, #0f172a 30%, #1a1a2e 60%, #16213e 100%);
}

body[data-theme="dark"] .page-hero h1 {
    background: linear-gradient(135deg, #fff 0%, #7dd3fc 40%, #c4b5fd 70%, #f0abfc 100%);
    -webkit-background-clip: text; background-clip: text;
}

/* Dark: Badge */
body[data-theme="dark"] .section-badge {
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Dark: Cards */
body[data-theme="dark"] .feature-card-public {
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

body[data-theme="dark"] .feature-card-public:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

body[data-theme="dark"] .feature-card-icon {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

body[data-theme="dark"] .feature-card-icon i {
    background: linear-gradient(135deg, #7dd3fc, #c4b5fd);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; color: transparent;
}

/* Dark: Step Guide */
body[data-theme="dark"] .step-guide-card {
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-color: rgba(255, 255, 255, 0.06);
}

body[data-theme="dark"] .step-guide-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .step-guide-number {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Dark: CTA */
body[data-theme="dark"] .cta-box-modern {
    background: rgba(9, 131, 226, 0.06);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .cta-box-modern p { color: rgba(255, 255, 255, 0.6); }

body[data-theme="dark"] .btn-cta-modern {
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: white !important;
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.3);
}

body[data-theme="dark"] .btn-cta-modern:hover {
    box-shadow: 0 25px 60px rgba(139, 92, 246, 0.5);
    color: white !important;
}

body[data-theme="dark"] .cta-orb-1 { background: rgba(139, 92, 246, 0.12); }
body[data-theme="dark"] .cta-orb-2 { background: rgba(9, 131, 226, 0.12); }

/* Dark: Hero Primary Button */
body[data-theme="dark"] .btn-hero-primary {
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: white !important;
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.3);
}

body[data-theme="dark"] .btn-hero-primary:hover {
    box-shadow: 0 20px 50px rgba(139, 92, 246, 0.5);
    color: white !important;
}

/* Dark: Footer */
body[data-theme="dark"] .footer-modern { background: linear-gradient(180deg, #0a0a1a, #050510); }
body[data-theme="dark"] .footer-links-modern a:hover { color: #7dd3fc; }

/* Dark: Mesh orbs for sections */
body[data-theme="dark"] .section-alt-1::before,
body[data-theme="dark"] .section-alt-2::before {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(9, 131, 226, 0.1) 0%, transparent 70%);
    top: -100px; right: -100px;
    border-radius: 50%;
    filter: blur(80px);
}

body[data-theme="dark"] .section-alt-1::after {
    content: '';
    position: absolute;
    width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
    bottom: -80px; left: -80px;
    border-radius: 50%;
    filter: blur(80px);
}

/* Dark: Category titles */
body[data-theme="dark"] .category-section-title i { color: #7dd3fc; }


/* ===== Responsive ===== */
@media (max-width: 991px) {
    .page-hero h1 { font-size: 2.5rem; }
    .page-hero p { font-size: 1.1rem; }
    .section-title-modern { font-size: 2.3rem; }
}

@media (max-width: 767px) {
    .page-hero { padding: 120px 0 60px; min-height: 40vh; }
    .page-hero h1 { font-size: 2rem; }
    .cta-box-modern { padding: 50px 25px; }
    .cta-box-modern h2 { font-size: 2rem; }
    .section-title-modern { font-size: 1.8rem; }
    .section-desc { font-size: 1.05rem; }
    .section-header { margin-bottom: 50px; }
    .section-alt-1, .section-alt-2, .cta-section { padding: 80px 0; }

    .feature-card-public { padding: 30px 20px; }
    .feature-card-icon { width: 65px; height: 65px; font-size: 1.6rem; }

    .step-guide-card { flex-direction: column; text-align: center; }
    .step-guide-number { margin: 0 auto; }

    body[data-theme="dark"] .feature-card-public,
    body[data-theme="dark"] .step-guide-card,
    body[data-theme="dark"] .cta-box-modern {
        backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    }
}

@media (max-width: 575px) {
    .category-section-title { font-size: 1.4rem; }
}
