/* Global Styles */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --dark-color: #212529;
    --light-color: #f8f9fa;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
}

/* Navbar Styles */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

.nav-link.active {
    color: var(--primary-color) !important;
}

/* Carousel Styles */
.carousel-item {
    transition: transform 1s ease-in-out;
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 30px;
}

.carousel-caption h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
}

/* Card Hover Effects */
.hover-card {
    transition: all 0.3s ease;
    border: none;
}

.hover-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
}

.hover-card img {
    transition: transform 0.3s ease;
}

.hover-card:hover img {
    transform: scale(1.05);
}

/* Button Styles */
.btn {
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #0d6efd, #0a58ca);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0a58ca, #084298);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.4);
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.3);
}

/* Badge Styles */
.badge {
    padding: 0.5rem 1rem;
    font-weight: 500;
    font-size: 0.85rem;
}

/* Z-index Helper */
.z-index-1 {
    z-index: 1;
}

/* Feature Icon Styles */
.feature-icon {
    transition: all 0.3s ease;
}

.feature-icon:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Page Header */
.page-header {
    border-bottom: 3px solid var(--primary-color);
}

.page-header h1 {
    color: var(--dark-color);
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-size: 1.2rem;
}

/* Filter Card */
.form-label {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* Spec Items */
.spec-item {
    transition: all 0.3s ease;
}

.spec-item:hover {
    background-color: #e7f3ff !important;
    transform: translateX(5px);
}

/* Footer Styles */
footer {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
}

footer a {
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--primary-color) !important;
    transform: translateX(5px);
}

footer .social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

footer .social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-5px) scale(1.1);
}

/* Sticky Top */
.sticky-top {
    transition: all 0.3s ease;
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 10px;
    padding: 1rem 1.5rem;
}

/* Card Header */
.card-header {
    border: none;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .carousel-caption h1 {
        font-size: 2rem;
    }
    
    .carousel-caption p {
        font-size: 1rem;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background: var(--primary-color);
    color: white;
}

/* Top Bar */
.top-bar {
    font-size: 0.9rem;
}

.top-bar a {
    transition: all 0.3s ease;
}

.top-bar a:hover {
    opacity: 0.8;
}

/* Admin Panel Specific */
.sidebar {
    min-height: 100vh;
    background: linear-gradient(180deg, #2d2d2d, #1a1a1a);
}

.sidebar .nav-link {
    color: #ffffff;
    padding: 1rem 1.5rem;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: rgba(13, 110, 253, 0.1);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

.sidebar .nav-link i {
    width: 20px;
    margin-right: 10px;
}

/* Table Styles */
.table {
    background: white;
}

.table thead {
    background: var(--primary-color);
    color: white;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
    cursor: pointer;
}

/* Dashboard Cards */
.dashboard-card {
    border: none;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.dashboard-card .card-body {
    padding: 2rem;
}

.dashboard-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

/* Image Preview */
.image-preview {
    max-width: 200px;
    max-height: 200px;
    object-fit: cover;
    border-radius: 5px;
    border: 2px solid #e0e0e0;
}

/* Form Validation */
.is-invalid {
    border-color: var(--danger-color) !important;
}

.invalid-feedback {
    display: block;
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Modal Styles */
.modal-header {
    background: var(--primary-color);
    color: white;
}

.modal-header .btn-close {
    filter: invert(1);
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-color);
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Utility Classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shadow-hover {
    transition: box-shadow 0.3s ease;
}

.shadow-hover:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
}