/* Main Styles for Road Signs Website */
:root {
    --primary-color: #1a237e;
    --secondary-color: #0d47a1;
    --accent-color: #ffc107;
    --light-bg: #f5f5f5;
    --dark-text: #212121;
    --light-text: #f5f5f5;
    --card-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Base Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--dark-text);
    line-height: 1.6;
    padding-top: 56px; /* For fixed navbar */
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Navigation */
.navbar {
    background-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 0.8rem 0;
}

.navbar-brand {
    font-weight: 700;
    color: var(--light-text) !important;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 0;
    margin-bottom: 2rem;
    text-align: center;
    border-radius: 0 0 10px 10px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
}

/* Search and Filter */
.search-container {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.25);
}

/* Card Styles */
.card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Loading Skeleton */
.skeleton {
    position: relative;
    overflow: hidden;
    background-color: #e0e0e0;
}

.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.2) 20%, 
        rgba(255, 255, 255, 0.5) 60%, 
        rgba(255, 255, 255, 0));
    animation: shimmer 2s infinite;
    z-index: 1;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

.skeleton-card {
    height: 350px;
    width: 100%;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.skeleton-img {
    height: 180px;
    width: 100%;
    background-color: #e0e0e0;
    margin-bottom: 1rem;
    border-radius: 8px 8px 0 0;
}

.skeleton-title {
    height: 24px;
    width: 80%;
    margin: 0.5rem auto;
    background-color: #e0e0e0;
    border-radius: 4px;
}

.skeleton-text {
    height: 16px;
    width: 90%;
    margin: 0.5rem auto;
    background-color: #e0e0e0;
    border-radius: 4px;
}

.skeleton-text:last-child {
    width: 60%;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .back-to-top {
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
        bottom: 1.5rem;
        right: 1.5rem;
    }
}

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

.card-img-top {
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.card-text {
    color: #555;
    font-size: 0.95rem;
    flex-grow: 1;
}

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

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .card {
        margin-bottom: 1.5rem;
    }
}

/* Footer */
.footer {
    background-color: var(--dark-text);
    color: var(--light-text);
    padding: 2rem 0;
    margin-top: 3rem;
    align-content: center;
    text-align: center;
    align-items: center;
}

.footer a {
    color: var(--accent-color);
    text-decoration: none;
    align-content: center;
    text-align: center;
    align-items: center;
}

.footer a:hover {
    text-decoration: underline;
    align-content: center;
    text-align: center;
    align-items: center;
}

/* Utility Classes */
.shadow-sm {
    box-shadow: var(--card-shadow);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}
