:root {
    --primary:       #1A237E;
    --primary-light: #3949AB;
    --accent:        #FF6F00;
    --accent-light:  #FFA040;
    --success:       #2E7D32;
    --bg-light:      #F5F7FA;
    --text-dark:     #1C1C2E;
    --text-muted:    #6B7280;
    --white:         #FFFFFF;
    --border:        #E5E7EB;
    --shadow:        0 4px 24px rgba(26,35,126,0.10);
    --shadow-lg:     0 8px 40px rgba(26,35,126,0.15);
}

/* ── BASE ── */
* { box-sizing: border-box; }
html { overflow-x: hidden; max-width: 100%; }
body { font-family: 'Inter', sans-serif; color: var(--text-dark); background: var(--bg); overflow-x: hidden; max-width: 100%; }
h1,h2,h3,h4,h5,h6 { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; }
a { text-decoration: none; color: inherit; }
.fw-800 { font-weight: 800; }
.fw-700 { font-weight: 700; }
.fw-600 { font-weight: 600; }
.text-accent { color: var(--accent) !important; }
.text-primary { color: var(--primary) !important; }
.bg-primary-cz { background: var(--primary); }
.bg-accent { background: var(--accent); }

/* ── NAVBAR ── */
#mainNav {
    background: var(--primary) !important;
    background-color: var(--primary) !important;
    opacity: 1 !important;
    box-shadow: 0 2px 20px rgba(0,0,0,0.15);
    padding: 10px 0;
    transition: padding 0.3s, box-shadow 0.3s;
}
#mainNav .navbar-brand { font-size: 1.4rem; letter-spacing: -0.5px; }
#mainNav .nav-link { font-weight: 500; font-size: 0.92rem; padding: 0.5rem 0.75rem !important; opacity: 0.9; transition: opacity 0.2s; }
#mainNav .nav-link:hover { opacity: 1; }
.btn-accent { background: var(--accent); color: #fff; border: none; font-weight: 600; }
.btn-accent:hover { background: var(--accent-light); color: #fff; }
.dropdown-menu-wide { min-width: 280px; padding: 8px; border: none; box-shadow: var(--shadow-lg); border-radius: 12px; }
.dropdown-item { border-radius: 8px; padding: 8px 12px; font-size: 0.9rem; }
.dropdown-item:hover { background: var(--bg-light); color: var(--primary); }

/* ── HERO ── */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 60%, #5C6BC0 100%);
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute; inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff10" d="M0,160L48,176C96,192,192,224,288,213.3C384,203,480,149,576,138.7C672,128,768,160,864,181.3C960,203,1056,213,1152,197.3C1248,181,1344,139,1392,117.3L1440,96L1440,320L0,320Z"/></svg>') no-repeat bottom;
    background-size: cover;
}
.hero-title { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.15; color: #fff; }
.hero-subtitle { font-size: 1.15rem; color: rgba(255,255,255,0.85); max-width: 560px; }
.hero-search { background: #fff; border-radius: 50px; padding: 6px 6px 6px 20px; max-width: 480px; display: flex; gap: 8px; }
.hero-search input { border: none; outline: none; flex: 1; font-size: 0.95rem; background: transparent; }
.hero-badge { background: rgba(255,255,255,0.15); backdrop-filter: blur(8px); color: #fff; border-radius: 50px; padding: 6px 16px; font-size: 0.8rem; display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,0.25); }
.hero-stats { display: flex; gap: 2rem; flex-wrap: wrap; }
.hero-stat-num { font-size: 1.8rem; font-weight: 800; color: #fff; line-height: 1; }
.hero-stat-label { font-size: 0.8rem; color: rgba(255,255,255,0.75); }

/* ── SECTION STYLES ── */
.section-title { font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--text-dark); }
.section-subtitle { color: var(--text-muted); font-size: 1rem; max-width: 540px; margin: 0 auto; }
.section-badge { background: rgba(26,35,126,0.08); color: var(--primary); border-radius: 50px; padding: 4px 16px; font-size: 0.8rem; font-weight: 600; display: inline-block; margin-bottom: 12px; }

/* ── SERVICE CARDS ── */
.service-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s;
    background: var(--white);
    position: relative;
    overflow: hidden;
    height: 100%;
}
.service-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}
.service-icon {
    width: 56px; height: 56px;
    background: rgba(26,35,126,0.08);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: var(--primary);
    margin-bottom: 16px;
}
.service-card .badge-custom {
    position: absolute; top: 16px; right: 16px;
    background: var(--accent); color: #fff;
    font-size: 0.72rem; font-weight: 700;
    padding: 3px 10px; border-radius: 50px;
}
.price-tag { color: var(--primary); font-size: 1.3rem; font-weight: 800; }
.price-original { color: var(--text-muted); font-size: 0.85rem; text-decoration: line-through; }
.delivery-chip { background: var(--bg-light); color: var(--text-muted); font-size: 0.78rem; padding: 3px 10px; border-radius: 50px; }

/* ── CATEGORY TABS ── */
.cat-tab-btn {
    border: 1.5px solid var(--border);
    background: var(--white);
    color: var(--text-muted);
    border-radius: 50px;
    padding: 7px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.cat-tab-btn.active, .cat-tab-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ── STATS ── */
.stats-section { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.stat-card-inner { text-align: center; padding: 32px 16px; }
.stat-number { font-size: 2.5rem; font-weight: 800; color: #fff; }
.stat-label { color: rgba(255,255,255,0.8); font-size: 0.9rem; }

/* ── HOW IT WORKS ── */
.step-card { text-align: center; padding: 32px 20px; }
.step-num { width: 56px; height: 56px; background: var(--primary); color: #fff; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 800; margin-bottom: 16px; }
.step-connector { position: relative; }
.step-connector::after { content: '→'; position: absolute; right: -20px; top: 50%; transform: translateY(-50%); color: var(--primary); font-size: 1.5rem; }

/* ── TESTIMONIALS ── */
.testimonial-card { background: var(--white); border-radius: 16px; padding: 28px; border: 1px solid var(--border); }
.testimonial-card .stars { color: #FFC107; }
.testimonial-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: var(--bg-light); }

/* ── CTA BANNER ── */
.cta-section { background: linear-gradient(135deg, var(--accent), #E65100); border-radius: 24px; }

/* ── FOOTER ── */
.footer { background: #0D1B2A; }
.footer-links li { margin-bottom: 8px; }
.footer-links a, .footer-links li { color: rgba(255,255,255,0.6); font-size: 0.9rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }
.social-link { width: 38px; height: 38px; background: rgba(255,255,255,0.08); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.7); font-size: 0.9rem; transition: all 0.2s; }
.social-link:hover { background: var(--accent); color: #fff; }

/* ── WHATSAPP BUTTON ── */
.whatsapp-float {
    position: fixed; bottom: 24px; right: 24px;
    background: #25D366; color: #fff;
    width: 58px; height: 58px;
    border-radius: 50%;
    font-size: 28px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 20px rgba(37,211,102,0.4);
    z-index: 9999;
    transition: transform 0.2s;
}
.whatsapp-float:hover { transform: scale(1.1); color: #fff; }

/* ── DASHBOARD ── */
.dashboard-sidebar { background: var(--primary); min-height: calc(100vh - 70px); padding: 0; }
.sidebar-nav .nav-link { color: rgba(255,255,255,0.75); padding: 12px 20px; border-radius: 8px; margin: 2px 8px; font-size: 0.9rem; font-weight: 500; }
.sidebar-nav .nav-link:hover, .sidebar-nav .nav-link.active { background: rgba(255,255,255,0.12); color: #fff; }
.sidebar-nav .nav-link i { width: 22px; }
.stat-widget { background: var(--white); border-radius: 16px; padding: 24px; border: 1px solid var(--border); }
.stat-widget .icon { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }

/* ── ORDER TIMELINE ── */
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.timeline-item { position: relative; margin-bottom: 24px; }
.timeline-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--border); position: absolute; left: -20px; top: 3px; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--border); }
.timeline-dot.done { background: var(--success); box-shadow: 0 0 0 2px rgba(46,125,50,0.3); }
.timeline-dot.active { background: var(--primary); box-shadow: 0 0 0 2px rgba(26,35,126,0.3); animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 2px rgba(26,35,126,0.3); } 50% { box-shadow: 0 0 0 6px rgba(26,35,126,0.1); } }

/* ── ADMIN (legacy — new styles in layout.php) ── */
.admin-sidebar { background: #0D1226; min-height: 100vh; }
.table-custom { border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.table-custom thead { background: var(--bg-light); }
.table-custom th { font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }

/* ── FORMS ── */
.form-control, .form-select {
    border-radius: 10px;
    border: 1.5px solid var(--border);
    padding: 10px 14px;
    font-size: 0.92rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,35,126,0.08);
}
.btn-primary { background: var(--primary); border-color: var(--primary); font-weight: 600; border-radius: 10px; }
.btn-primary:hover { background: var(--primary-light); border-color: var(--primary-light); }

/* ── AUTH PAGES ── */
.auth-card { max-width: 440px; margin: 60px auto; background: var(--white); border-radius: 20px; padding: 40px; box-shadow: var(--shadow-lg); }
.auth-logo { text-align: center; margin-bottom: 28px; }

/* ── UTILITIES ── */
.bg-light-cz { background: var(--bg-light); }
.rounded-xl { border-radius: 16px !important; }
.rounded-2xl { border-radius: 24px !important; }
.shadow-cz { box-shadow: var(--shadow); }

/* ══════════════════════════════════════════
   RESPONSIVE — GLOBAL MOBILE FIXES
══════════════════════════════════════════ */

/* ── Tablet (≤991px) ── */
@media (max-width: 991px) {
    .hero-section       { min-height: 60vh; }
    .dashboard-sidebar  { min-height: auto; }
    .admin-sidebar      { min-height: auto; }
    .stat-number        { font-size: 2rem; }
}

/* ── Mobile (≤768px) ── */
@media (max-width: 768px) {
    /* Typography scale-down */
    .section-title      { font-size: 1.5rem !important; }
    .section-subtitle   { font-size: 0.92rem; }
    .hero-title         { font-size: clamp(1.6rem, 6vw, 2.2rem) !important; }
    .hero-subtitle      { font-size: 0.95rem; }
    h1 { font-size: clamp(1.6rem, 6vw, 2.4rem) !important; }
    h2 { font-size: clamp(1.3rem, 5vw, 1.9rem) !important; }
    h3 { font-size: clamp(1.1rem, 4vw, 1.5rem) !important; }

    /* Hero padding */
    .hero-section       { min-height: auto; padding: 60px 0 40px !important; }
    .pro-hero           { padding: 70px 0 50px !important; }
    .detail-hero        { padding: 70px 0 50px !important; }

    /* Stats */
    .hero-stats         { gap: 1rem; }
    .hero-stat-num      { font-size: 1.4rem; }
    .stat-card-inner    { padding: 20px 10px; }
    .stat-number        { font-size: 1.8rem; }

    /* Tables — scroll inside wrapper, not full page */
    .table-responsive, .table-responsive-wrap,
    .table-custom       { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
    table               { min-width: unset; max-width: 100%; }

    /* Cards padding */
    .service-card       { padding: 18px; }
    .stat-widget        { padding: 16px; }
    .testimonial-card   { padding: 20px; }

    /* Auth */
    .auth-card          { margin: 12px; padding: 24px 18px; }

    /* Dashboard main content */
    .col-lg-10.py-4.px-4 { padding: 16px !important; }

    /* FAB stack — handled in footer.php styles */

    /* Category pills — horizontal scroll instead of wrap */
    .cat-pills-scroll   { display: flex; overflow-x: auto; gap: 8px; padding-bottom: 8px; flex-wrap: nowrap !important; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .cat-pills-scroll::-webkit-scrollbar { display: none; }
    .cat-tab-btn        { white-space: nowrap; flex-shrink: 0; padding: 6px 14px; font-size: 0.82rem; }

    /* Sticky sidebar on detail pages — stack below on mobile */
    .detail-sidebar-sticky { position: static !important; }

    /* Step connector arrows — hide on mobile */
    .step-connector::after { display: none; }

    /* Grid fixes */
    .row.g-5           { --bs-gutter-y: 2rem; }

    /* CTA section */
    .careers-cta,
    .wj-cta            { padding: 36px 20px !important; }
}

/* ── Small mobile (≤480px) ── */
@media (max-width: 480px) {
    .hero-title         { font-size: 1.5rem !important; }
    .container          { padding-left: 16px; padding-right: 16px; }
    .pro-hero           { padding: 60px 0 40px !important; }

    /* Auth card full width */
    .auth-card          { margin: 8px; padding: 20px 16px; border-radius: 16px; }

    /* Buttons full width in forms */
    .btn-block-mobile   { width: 100% !important; }

    /* Stat widgets — 2 columns */
    .col-sm-4           { flex: 0 0 50%; max-width: 50%; }

    /* Table font smaller */
    table               { font-size: 0.82rem; }

    /* Service detail card padding */
    .detail-card        { padding: 20px 16px !important; }

    /* Contact info cards stack */
    .contact-info-card  { margin-bottom: 12px; }
}
