/* ============================================
   ServicePro CMS - Main Stylesheet
   ============================================ */

:root {
    --primary: #0d6efd;
    --primary-dark: #0a58ca;
    --secondary: #6c757d;
    --accent: #0dcaf0;
    --dark: #212529;
    --light-bg: #f8f9fa;
    --card-shadow: 0 0.125rem 0.5rem rgba(0,0,0,0.08);
    --card-hover-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.12);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #333;
}

/* ---- Navbar ---- */
.navbar-brand { font-size: 1.3rem; }

/* ---- Hero Section ---- */
.hero-section {
    background: linear-gradient(135deg, rgba(13,110,253,0.92) 0%, rgba(10,88,202,0.95) 100%);
    color: #fff;
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}
.hero-section.has-bg {
    background-size: cover;
    background-position: center;
}
.hero-section .hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(13,110,253,0.88) 0%, rgba(10,88,202,0.92) 100%);
}
.hero-section .container { position: relative; z-index: 2; }
.hero-section h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}
.hero-section p.lead {
    font-size: 1.25rem;
    opacity: 0.92;
    max-width: 650px;
}

/* ---- Section Spacing ---- */
.section { padding: 5rem 0; }
.section-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.section-subtitle {
    color: var(--secondary);
    margin-bottom: 3rem;
}

/* ---- Service Cards ---- */
.service-card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--card-hover-shadow);
}
.service-card .card-body { padding: 1.75rem; }
.service-card .service-icon {
    width: 60px;
    height: 60px;
    border-radius: 0.75rem;
    background: rgba(13,110,253,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}
.service-card .card-title {
    font-weight: 700;
    font-size: 1.15rem;
}
.service-card .card-text {
    color: var(--secondary);
    font-size: 0.95rem;
}

/* ---- About Section ---- */
.about-section { background-color: var(--light-bg); }

/* ---- CTA Section ---- */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 4rem 0;
}
.cta-section h2 { font-weight: 700; }

/* ---- Contact Info ---- */
.contact-info-card {
    background: var(--light-bg);
    border-radius: 0.75rem;
    padding: 2rem;
}
.contact-info-card .info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}
.contact-info-card .info-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(13,110,253,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-right: 1rem;
}

/* ---- Page Header ---- */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 3.5rem 0;
}
.page-header h1 {
    font-weight: 700;
    font-size: 2.25rem;
}

/* ---- Service Detail ---- */
.service-detail-img {
    border-radius: 0.75rem;
    box-shadow: var(--card-shadow);
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

/* ---- Forms ---- */
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(13,110,253,0.15);
}

/* ---- Footer ---- */
footer a:hover { color: #fff !important; }

/* ---- Admin Panel ---- */
.admin-sidebar {
    min-height: 100vh;
    background: #1e293b;
    color: #fff;
    width: 260px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}
.admin-sidebar .sidebar-brand {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 1.15rem;
    font-weight: 700;
}
.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.65);
    padding: 0.65rem 1.5rem;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}
.admin-sidebar .nav-link i {
    width: 22px;
    margin-right: 0.75rem;
    font-size: 1.05rem;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.06);
    border-left-color: var(--primary);
}
.admin-content {
    margin-left: 260px;
    padding: 1.5rem 2rem;
    min-height: 100vh;
    background: #f1f5f9;
}
.admin-topbar {
    background: #fff;
    padding: 0.75rem 2rem;
    margin: -1.5rem -2rem 1.5rem -2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ---- Stat Cards ---- */
.stat-card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}
.stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}
.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}
.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--secondary);
}

/* ---- Admin Cards ---- */
.admin-card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: var(--card-shadow);
    background: #fff;
}

/* ---- Login Page ---- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}
.login-card {
    max-width: 420px;
    width: 100%;
    border-radius: 1rem;
    box-shadow: 0 1rem 3rem rgba(0,0,0,0.2);
}

/* ---- Badge ---- */
.badge-status-new { background-color: #0d6efd; }
.badge-status-progress { background-color: #ffc107; color: #000; }
.badge-status-completed { background-color: #198754; }

/* ---- Responsive ---- */
@media (max-width: 992px) {
    .hero-section h1 { font-size: 2.25rem; }
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.show { transform: translateX(0); }
    .admin-content { margin-left: 0; }
}

/* ---- Featured image in cards ---- */
.service-card .card-img-top {
    height: 200px;
    object-fit: cover;
    border-radius: 0.75rem 0.75rem 0 0;
}

/* ---- Utility ---- */
.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Page Header ---- */
.page-header {
    background: linear-gradient(135deg, rgba(13,110,253,0.92) 0%, rgba(10,88,202,0.95) 100%);
    color: #fff;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}
.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}
.page-header .container {
    position: relative;
    z-index: 2;
}
.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.page-header .breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
}
.page-header .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: rgba(255,255,255,0.6);
    font-weight: bold;
}
.page-header .breadcrumb-item a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.2s;
}
.page-header .breadcrumb-item a:hover {
    color: #fff;
}

/* ---- Page Content ---- */
.page-content {
    background: #fff;
    border-radius: 1rem;
    box-shadow: var(--card-shadow);
    padding: 2.5rem;
    margin-bottom: 2rem;
}
.content-wrapper {
    line-height: 1.7;
    color: #333;
}
.content-wrapper h1,
.content-wrapper h2,
.content-wrapper h3,
.content-wrapper h4,
.content-wrapper h5,
.content-wrapper h6 {
    color: var(--dark);
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
}
.content-wrapper h1 { font-size: 2rem; }
.content-wrapper h2 { font-size: 1.75rem; }
.content-wrapper h3 { font-size: 1.5rem; }
.content-wrapper h4 { font-size: 1.25rem; }
.content-wrapper p {
    margin-bottom: 1.25rem;
}
.content-wrapper ul,
.content-wrapper ol {
    margin-bottom: 1.25rem;
    padding-left: 2rem;
}
.content-wrapper li {
    margin-bottom: 0.5rem;
}
.content-wrapper blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--secondary);
}
.content-wrapper img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
    box-shadow: var(--card-shadow);
}
.content-wrapper table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}
.content-wrapper th,
.content-wrapper td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}
.content-wrapper th {
    background-color: var(--light-bg);
    font-weight: 600;
    color: var(--dark);
}
.content-wrapper a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}
.content-wrapper a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ---- Page Footer ---- */
.page-footer {
    background: var(--light-bg);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-top: 2rem;
}

/* ---- Responsive for Pages ---- */
@media (max-width: 768px) {
    .page-header {
        padding: 3rem 0;
    }
    .page-header h1 {
        font-size: 2rem;
    }
    .page-content {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    .content-wrapper h1 { font-size: 1.75rem; }
    .content-wrapper h2 { font-size: 1.5rem; }
    .content-wrapper h3 { font-size: 1.25rem; }
}
