/**
 * Vibhanchal - Main Stylesheet
 * PHP 8 + MySQL
 */

/* ===== Global Styles ===== */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --text-color: #333;
    --border-color: #dee2e6;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: #fff;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
    opacity: 0.8;
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.25);
}

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

/* ===== Top Bar ===== */
.top-bar {
    background-color: var(--dark-color);
    color: #fff;
    padding: 10px 0;
    font-size: 14px;
}

.top-bar-info span {
    margin-right: 20px;
}

.top-bar-info i {
    margin-right: 5px;
}

.top-bar-social a {
    color: #fff;
    margin-left: 15px;
    font-size: 14px;
}

.top-bar-social a:hover {
    color: var(--primary-color);
}

/* ===== Navigation ===== */
.navbar {
    box-shadow: var(--shadow);
    padding: 15px 0;
}

.navbar-brand {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color) !important;
}

.navbar-brand span {
    color: var(--dark-color);
}

.navbar-brand i {
    margin-right: 10px;
}

.nav-link {
    font-weight: 500;
    color: var(--dark-color) !important;
    padding: 10px 15px !important;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

.navbar-auth .btn {
    padding: 8px 20px;
    border-radius: 5px;
}

/* ===== Hero Section ===== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    color: #fff;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::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 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    background-position: bottom;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-btn {
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-btn-primary {
    background-color: #fff;
    color: var(--primary-color);
}

.hero-btn-primary:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

.hero-btn-secondary {
    background-color: transparent;
    color: #fff;
    border: 2px solid #fff;
    margin-left: 15px;
}

.hero-btn-secondary:hover {
    background-color: #fff;
    color: var(--primary-color);
}

/* ===== Search Section ===== */
.search-section {
    background-color: var(--light-color);
    padding: 40px 0;
    margin-top: -50px;
    position: relative;
    z-index: 2;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.search-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-tab {
    padding: 10px 20px;
    border: none;
    background: #fff;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.search-tab.active,
.search-tab:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.search-form {
    display: none;
}

.search-form.active {
    display: block;
}

.search-form .form-control,
.search-form .form-select {
    border-radius: 5px;
    padding: 12px;
}

.search-btn {
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
}

/* ===== Section Styles ===== */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.section-title p {
    color: var(--secondary-color);
    font-size: 16px;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 20px auto 0;
}

/* ===== Card Styles ===== */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.card-text {
    color: var(--secondary-color);
    font-size: 14px;
    margin-bottom: 15px;
}

.card-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.card-rating {
    color: var(--warning-color);
    margin-bottom: 10px;
}

.card-location {
    color: var(--secondary-color);
    font-size: 13px;
    margin-bottom: 10px;
}

.card-location i {
    margin-right: 5px;
}

/* ===== Service Cards ===== */
.service-card {
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-icon {
    width: 80px;
    height: 80px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 20px;
}

.service-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
}

.service-card p {
    color: var(--secondary-color);
    font-size: 14px;
}

/* ===== Footer ===== */
.footer {
    background-color: var(--dark-color);
    color: #fff;
    padding: 60px 0 0;
}

.footer h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #fff;
}

.footer p {
    color: #adb5bd;
    font-size: 14px;
    margin-bottom: 15px;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #adb5bd;
    font-size: 14px;
}

.footer-links ul li a:hover {
    color: #fff;
    padding-left: 5px;
}

.footer-contact ul {
    list-style: none;
}

.footer-contact ul li {
    margin-bottom: 15px;
    color: #adb5bd;
    font-size: 14px;
}

.footer-contact ul li i {
    margin-right: 10px;
    color: var(--primary-color);
}

.footer-social {
    margin-top: 20px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 50%;
    margin-right: 10px;
    transition: var(--transition);
}

.footer-social a:hover {
    background-color: var(--primary-color);
}

.footer-bottom {
    background-color: #1a1d20;
    padding: 20px 0;
    margin-top: 40px;
}

.footer-bottom p {
    margin: 0;
    font-size: 14px;
}

.footer-bottom a {
    color: #adb5bd;
    font-size: 14px;
}

.footer-bottom a:hover {
    color: #fff;
}

/* ===== Back to Top Button ===== */
.btn-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    z-index: 999;
}

.btn-back-to-top:hover {
    background-color: #0056b3;
    transform: translateY(-5px);
}

.btn-back-to-top.show {
    display: flex;
}

/* ===== Auth Pages ===== */
.auth-page {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

.auth-box {
    background: #fff;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.auth-header i {
    margin-right: 10px;
}

.auth-header p {
    color: var(--secondary-color);
    font-size: 14px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    margin-bottom: 10px;
    font-size: 14px;
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 500;
}

/* ===== Dashboard Styles ===== */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background-color: var(--dark-color);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h4 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 5px;
}

.sidebar-header p {
    color: #adb5bd;
    font-size: 12px;
}

.sidebar-nav {
    padding: 20px 0;
}

.sidebar-nav .nav {
    padding: 0 10px;
    display: block !important;
}

.sidebar-nav .nav-item {
    margin-bottom: 5px;
}

.sidebar-nav .nav-link {
    color: #fff !important;
    padding: 12px 15px;
    border-radius: 5px;
    display: flex !important;
    align-items: center;
    transition: var(--transition);
}

.sidebar-nav .nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background-color: var(--primary-color);
    color: #fff;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.main-content {
    margin-left: 280px;
    flex: 1;
    padding: 30px;
    background-color: var(--light-color);
}

.dashboard-header {
    background: #fff;
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.primary {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
}

.stat-icon.success {
    background-color: rgba(25, 135, 84, 0.1);
    color: var(--success-color);
}

.stat-icon.warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
}

.stat-icon.danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

.stat-info h3 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.stat-info p {
    color: var(--secondary-color);
    font-size: 14px;
    margin: 0;
}

/* ===== Table Styles ===== */
.table-container {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.table-container h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.table thead th {
    background-color: var(--light-color);
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

.table tbody tr:hover {
    background-color: var(--light-color);
}

/* ===== Form Styles ===== */
.form-container {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.form-container h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.form-label {
    font-weight: 500;
    margin-bottom: 8px;
}

.form-control,
.form-select {
    border-radius: 5px;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
}

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

/* ===== Badge Styles ===== */
.badge {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
}

/* ===== Pagination ===== */
.pagination {
    margin-top: 20px;
}

.pagination-link {
    padding: 8px 16px;
    margin: 0 5px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    text-decoration: none;
    color: var(--dark-color);
    transition: var(--transition);
}

.pagination-link:hover,
.pagination-link.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* ===== Responsive Styles ===== */
@media (min-width: 992px) {
    .sidebar {
        transform: translateX(0) !important;
        display: block !important;
        visibility: visible !important;
        position: fixed !important;
        left: 0 !important;
    }

    .main-content {
        margin-left: 280px !important;
    }
}

@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
        transition: var(--transition);
        display: block !important;
        visibility: visible !important;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .hero-content h1 {
        font-size: 36px;
    }
}

@media (max-width: 767px) {
    .top-bar {
        display: none;
    }
    
    .hero-content h1 {
        font-size: 28px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .section {
        padding: 50px 0;
    }
    
    .section-title h2 {
        font-size: 28px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575px) {
    .auth-box {
        padding: 30px 20px;
    }

    .search-tabs {
        flex-wrap: wrap;
    }

    .search-tab {
        flex: 1;
        min-width: 100px;
        text-align: center;
    }
}

/* ===== Loading Overlay ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
