/* ============================= */
/* TIER 3 & TIER 4 ENHANCEMENTS  */
/* ============================= */

/* ========== BREADCRUMB NAVIGATION ========== */

.breadcrumb {
    background-color: transparent;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 1.5rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "?";
    padding: 0 0.5rem;
    color: #0066cc;
}

.breadcrumb-item a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: #005599;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #6c757d;
}

@media (max-width: 576px) {
    .breadcrumb {
        font-size: 0.85rem;
    }

    .breadcrumb-item + .breadcrumb-item::before {
        padding: 0 0.25rem;
    }
}

/* ========== BACK TO TOP BUTTON ========== */

#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #0066cc 0%, #2196F3 100%);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.4);
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

#backToTop:hover {
    background: linear-gradient(135deg, #005599 0%, #1976D2 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 102, 204, 0.5);
}

#backToTop:active {
    transform: translateY(-1px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 576px) {
    #backToTop {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 1.2rem;
    }
}

/* ========== TOAST NOTIFICATIONS ========== */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    max-width: 400px;
}

.toast {
    background: white;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideInRight 0.3s ease-out;
    backdrop-filter: blur(10px);
}

.toast i {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast.toast-success {
    border-left: 4px solid #28a745;
    background: linear-gradient(135deg, #f0f9ff 0%, #e8f5e9 100%);
}

.toast.toast-success i {
    color: #28a745;
}

.toast.toast-error {
    border-left: 4px solid #dc3545;
    background: linear-gradient(135deg, #f0f9ff 0%, #ffebee 100%);
}

.toast.toast-error i {
    color: #dc3545;
}

.toast.toast-warning {
    border-left: 4px solid #ffc107;
    background: linear-gradient(135deg, #f0f9ff 0%, #fff8e1 100%);
}

.toast.toast-warning i {
    color: #ffc107;
}

.toast.toast-info {
    border-left: 4px solid #0066cc;
    background: linear-gradient(135deg, #f0f9ff 0%, #e3f2fd 100%);
}

.toast.toast-info i {
    color: #0066cc;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

.toast.removing {
    animation: slideOutRight 0.3s ease-out forwards;
}

@media (max-width: 576px) {
    .toast-container {
        left: 10px;
        right: 10px;
        top: 10px;
        max-width: none;
    }

    .toast {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* ========== LAZY LOADING IMAGES ========== */

.lazy-image {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    min-height: 200px;
    border-radius: 8px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.lazy-image img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-image img.loaded {
    opacity: 1;
}

/* ========== PAGINATION ========== */

.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.5rem;
}

.page-item {
    display: inline-flex;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: #0066cc;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95rem;
}

.page-link:hover {
    background-color: #f8f9fa;
    border-color: #0066cc;
    color: #005599;
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #0066cc 0%, #2196F3 100%);
    border-color: #0066cc;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.page-item.disabled .page-link {
    color: #6c757d;
    background-color: #e9ecef;
    border-color: #dee2e6;
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination-info {
    color: #6c757d;
    font-size: 0.95rem;
    text-align: center;
    margin: 1rem 0;
}

@media (max-width: 576px) {
    .page-link {
        min-width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }

    .pagination {
        gap: 0.25rem;
    }
}

/* ========== ANALYTICS DASHBOARD STYLES ========== */

.analytics-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #0066cc;
    transition: all 0.3s ease;
}

.analytics-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.analytics-card h4 {
    color: #0066cc;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.analytics-value {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.analytics-label {
    color: #6c757d;
    font-size: 0.85rem;
}

.analytics-trend {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.analytics-trend.up {
    background-color: #d4edda;
    color: #155724;
}

.analytics-trend.down {
    background-color: #f8d7da;
    color: #721c24;
}

/* ========== SEO OPTIMIZATIONS ========== */

.schema-markup {
    display: none;
}

/* Open Graph Meta Tags are in HTML head */

/* ========== LAZY LOAD PLACEHOLDER ========== */

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

.skeleton.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton.skeleton-image {
    height: 200px;
    border-radius: 8px;
}

.skeleton.skeleton-card {
    height: 250px;
    border-radius: 10px;
}

/* ========== ADMIN DASHBOARD STYLES ========== */

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

.admin-stat-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-top: 3px solid #0066cc;
}

.admin-stat-card h5 {
    color: #6c757d;
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
}

.admin-stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0066cc;
}

.admin-recent-activity {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.activity-item {
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0066cc;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.activity-time {
    color: #6c757d;
    font-size: 0.85rem;
}

/* ========== RESPONSIVE ADJUSTMENTS ========== */

@media (max-width: 768px) {
    .analytics-card,
    .admin-stat-card {
        padding: 1rem;
    }

    .analytics-value {
        font-size: 1.5rem;
    }

    .admin-stat-value {
        font-size: 1.8rem;
    }
}

/* ========== DARK MODE SUPPORT ========== */

@media (prefers-color-scheme: dark) {
    .analytics-card,
    .admin-stat-card {
        background-color: #1e1e1e;
        color: #e0e0e0;
    }

    .analytics-card h4,
    .admin-stat-card h5 {
        color: #64b5f6;
    }

    .analytics-value,
    .admin-stat-value {
        color: #e0e0e0;
    }

    .analytics-label,
    .activity-time {
        color: #9e9e9e;
    }

    .activity-title {
        color: #e0e0e0;
    }

    .toast {
        background: #2a2a2a;
        color: #e0e0e0;
    }

    .pagination-info {
        color: #9e9e9e;
    }
}

/* ========== PRINT STYLES ========== */

@media print {
    #backToTop,
    .toast-container,
    .pagination-container {
        display: none !important;
    }

    .breadcrumb {
        border: none;
    }
}
