/* ============================================================
   Public / Landing Page CSS — with Dark/Light Mode
   ============================================================ */

/* ─── CSS Variables ──────────────────────────────────────── */
:root {
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --secondary: #06b6d4;
    --radius: 12px;
    --shadow: 0 4px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 48px rgba(0,0,0,0.14);
    --transition: 0.3s ease;
}

/* ─── Light Mode (default) ───────────────────────────────── */
[data-theme="light"], :root {
    --bg:           #ffffff;
    --bg-alt:       #f8fafc;
    --bg-card:      #ffffff;
    --text:         #334155;
    --text-muted:   #64748b;
    --text-heading: #0f172a;
    --border:       #e2e8f0;
    --footer-bg:    #0f172a;
    --footer-text:  rgba(255,255,255,0.75);
    --footer-head:  #ffffff;
    --footer-muted: rgba(255,255,255,0.5);
    --footer-border:#ffffff1a;
    --nav-scrolled: rgba(15,23,42,0.95);
    --input-bg:     #ffffff;
    --input-border: #e2e8f0;
    --badge-bg:     rgba(79,70,229,0.1);
    --badge-color:  #4f46e5;
}

/* ─── Dark Mode ──────────────────────────────────────────── */
[data-theme="dark"] {
    --bg:           #0f172a;
    --bg-alt:       #1e293b;
    --bg-card:      #1e293b;
    --text:         #cbd5e1;
    --text-muted:   #94a3b8;
    --text-heading: #f1f5f9;
    --border:       #334155;
    --footer-bg:    #020617;
    --footer-text:  rgba(255,255,255,0.65);
    --footer-head:  #f1f5f9;
    --footer-muted: rgba(255,255,255,0.4);
    --footer-border:#ffffff12;
    --nav-scrolled: rgba(2,6,23,0.97);
    --input-bg:     #1e293b;
    --input-border: #334155;
    --badge-bg:     rgba(79,70,229,0.2);
    --badge-color:  #818cf8;
}

/* ─── Base ───────────────────────────────────────────────── */
* { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    overflow-x: hidden;
    transition: background var(--transition), color var(--transition);
}

/* ─── Theme Toggle Button ────────────────────────────────── */
.theme-toggle {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(79,70,229,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(79,70,229,0.5);
}

/* ─── Navbar ─────────────────────────────────────────────── */
#mainNav {
    background: transparent;
    transition: all 0.3s ease;
    padding: 1rem 0;
}
#mainNav.scrolled {
    background: var(--nav-scrolled);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.5rem 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
#mainNav .nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    transition: color 0.2s;
}
#mainNav .nav-link:hover { color: #fff !important; }

/* ─── Hero ───────────────────────────────────────────────── */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 40%, #312e81 100%);
    position: relative;
    display: flex;
    align-items: center;
}
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%234f46e5' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 50%, rgba(79,70,229,0.15) 0%, transparent 70%);
}
.text-white-75 { color: rgba(255,255,255,0.75) !important; }
.bg-primary-soft { background-color: var(--badge-bg) !important; }
.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}
.hero-scroll a { color: rgba(255,255,255,0.5); font-size: 1.5rem; text-decoration: none; }
@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(8px); }
}

/* ─── Sections ───────────────────────────────────────────── */
.section-padding { padding: 5rem 0; }
.bg-white  { background: var(--bg) !important; }
.bg-light  { background: var(--bg-alt) !important; }

.section-badge {
    display: inline-block;
    background: var(--badge-bg);
    color: var(--badge-color);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.35rem 1rem;
    border-radius: 50px;
    margin-bottom: 1rem;
}
.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 1rem;
    line-height: 1.3;
}

/* ─── About ──────────────────────────────────────────────── */
.about-image-wrapper {
    background: linear-gradient(135deg, var(--bg-alt), var(--bg-card));
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.stat-number { font-size: 1.75rem; font-weight: 800; color: var(--primary); }
.stat-label  { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }

/* ─── Services ───────────────────────────────────────────── */
.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}
.service-icon {
    width: 56px; height: 56px;
    background: var(--badge-bg);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; color: var(--primary);
    margin-bottom: 1.25rem;
}

/* ─── Portfolio ──────────────────────────────────────────── */
.portfolio-card {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
    background: var(--bg-card);
}
.portfolio-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.portfolio-img { width: 100%; height: 200px; object-fit: cover; }
.portfolio-img-placeholder {
    width: 100%; height: 200px;
    background: linear-gradient(135deg, var(--bg-alt), var(--bg-card));
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem; color: var(--primary);
}
.portfolio-body { padding: 1.25rem; }
.portfolio-body h6 { color: var(--text-heading); }

/* ─── Team ───────────────────────────────────────────────── */
.team-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}
.team-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.team-card h6 { color: var(--text-heading); }
.team-avatar {
    width: 80px; height: 80px;
    border-radius: 50%; object-fit: cover;
    border: 3px solid var(--primary);
}
.team-avatar-placeholder {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: #fff; margin: 0 auto;
}

/* ─── Testimonials ───────────────────────────────────────── */
.testimonial-card {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius);
    padding: 2rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.testimonial-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.1rem; flex-shrink: 0;
}

/* ─── Contact ────────────────────────────────────────────── */
.contact-item {
    display: flex; align-items: flex-start;
    gap: 1rem; margin-bottom: 1.5rem;
}
.contact-icon {
    width: 44px; height: 44px;
    background: var(--badge-bg);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary); font-size: 1rem; flex-shrink: 0;
}
.contact-info h6 { color: var(--text-heading); }
.contact-form .form-control {
    border-radius: 8px;
    border-color: var(--input-border);
    background: var(--input-bg);
    color: var(--text);
    padding: 0.65rem 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.contact-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.15);
    background: var(--input-bg);
    color: var(--text);
}
.contact-form .form-control::placeholder { color: var(--text-muted); }
.contact-form label { color: var(--text); }

/* ─── Footer ─────────────────────────────────────────────── */
.footer {
    background: var(--footer-bg) !important;
    color: var(--footer-text) !important;
}
.footer h5,
.footer h6 {
    color: var(--footer-head) !important;
}
.footer p,
.footer small,
.footer .text-muted {
    color: var(--footer-text) !important;
}
.footer a.text-muted,
.footer a.text-decoration-none {
    color: var(--footer-text) !important;
    text-decoration: none;
    transition: color 0.2s;
}
.footer a.text-muted:hover,
.footer a.text-decoration-none:hover {
    color: #fff !important;
}
.footer hr {
    border-color: var(--footer-border) !important;
    opacity: 1;
}
.footer .social-links a {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    color: rgba(255,255,255,0.7) !important;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.footer .social-links a:hover {
    background: var(--primary);
    color: #fff !important;
}

/* ─── Text helpers ───────────────────────────────────────── */
.text-muted { color: var(--text-muted) !important; }
h1,h2,h3,h4,h5,h6 { color: var(--text-heading); }
p { color: var(--text); }

/* ─── Alert ──────────────────────────────────────────────── */
.alert-success {
    background: rgba(16,185,129,0.12);
    color: #065f46;
    border: 1px solid rgba(16,185,129,0.3);
    border-radius: var(--radius);
}
[data-theme="dark"] .alert-success {
    background: rgba(16,185,129,0.15);
    color: #6ee7b7;
    border-color: rgba(16,185,129,0.25);
}
.alert-danger {
    background: rgba(239,68,68,0.1);
    color: #991b1b;
    border: 1px solid rgba(239,68,68,0.25);
    border-radius: var(--radius);
}
[data-theme="dark"] .alert-danger {
    background: rgba(239,68,68,0.15);
    color: #fca5a5;
    border-color: rgba(239,68,68,0.25);
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .section-padding { padding: 3rem 0; }
    .section-title   { font-size: 1.6rem; }
    .hero-section    { padding-top: 80px; }
    .theme-toggle    { bottom: 1rem; right: 1rem; }
}

/* ─── Footer (override Bootstrap bg-dark) ───────────────── */
.footer {
    background: var(--footer-bg) !important;
}
.footer h5,
.footer h6,
.footer .fw-bold {
    color: var(--footer-head) !important;
}
.footer p,
.footer li,
.footer small,
.footer-copy {
    color: var(--footer-text) !important;
}
.footer-nav a {
    color: var(--footer-text) !important;
    text-decoration: none;
    display: block;
    padding: 0.15rem 0;
    transition: color 0.2s, padding-left 0.2s;
}
.footer-nav a:hover {
    color: #fff !important;
    padding-left: 4px;
}
.footer-hr {
    border-color: var(--footer-border) !important;
    opacity: 1;
}
.footer .social-links a {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.12);
    border-radius: 8px;
    color: rgba(255,255,255,0.8) !important;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.footer .social-links a:hover {
    background: var(--primary);
    color: #fff !important;
}

/* ─── Theme Toggle Button ────────────────────────────────── */
.theme-toggle {
    position: fixed !important;
    bottom: 1.5rem !important;
    right: 1.5rem !important;
    z-index: 99999 !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    border: 2px solid rgba(255,255,255,0.2) !important;
    background: var(--primary) !important;
    color: #fff !important;
    font-size: 1.1rem !important;
    cursor: pointer !important;
    box-shadow: 0 4px 20px rgba(79,70,229,0.5) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
    outline: none !important;
    padding: 0 !important;
}
.theme-toggle:hover {
    transform: scale(1.12) !important;
    box-shadow: 0 6px 28px rgba(79,70,229,0.65) !important;
}

@media (max-width: 768px) {
    .theme-toggle { bottom: 1rem !important; right: 1rem !important; }
}
