/* Library Page Specific Styles - library.css */

/* CSS Variables - inherit from main theme */
:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #f59e0b;
    --text-dark: #1f2937;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --border-light: #e2e8f0;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
}

/* Base Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Header Styles */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 80px 0 50px;
    text-align: center;
    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 1200 600"><polygon fill="rgba(255,255,255,0.1)" points="0,600 400,400 800,500 1200,300 1200,600"/></svg>');
    background-size: cover;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.breadcrumb {
    background: transparent;
    padding: 0;
    justify-content: center;
}

.breadcrumb-item a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--accent-color);
}

/* Content Section */
.content-section {
    padding: 60px 0;
}

/* Info Cards */
.info-card {
    background: var(--white);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border-left: 5px solid var(--secondary-color);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    border-left-color: var(--accent-color);
}

.info-card h4 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-card h4 i {
    color: var(--accent-color);
    font-size: 1.2em;
}

/* Statistics Cards */
.stat-card {
    background: var(--white);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    margin-bottom: 30px;
    border-top: 4px solid var(--secondary-color);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.stat-card:nth-child(1) { border-top-color: var(--primary-color); }
.stat-card:nth-child(2) { border-top-color: var(--success-color); }
.stat-card:nth-child(3) { border-top-color: var(--info-color); }
.stat-card:nth-child(4) { border-top-color: var(--warning-color); }

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 1rem;
    color: #6b7280;
    font-weight: 500;
}

/* Schedule Styling */
.schedule-box {
    background: linear-gradient(135deg, var(--light-bg), var(--white));
    border-radius: 10px;
    padding: 20px;
    border: 2px solid var(--border-light);
}

.schedule-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.schedule-day {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.schedule-time {
    background: var(--accent-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
}

/* Access List */
.access-list {
    list-style: none;
    padding: 0;
}

.access-list li {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.access-list li:last-child {
    border-bottom: none;
}

.access-list li i {
    margin-right: 12px;
    width: 20px;
}

/* Table Styling */
.members-table {
    margin-top: 15px;
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.members-table .table {
    margin-bottom: 0;
    border-collapse: collapse;
}

.members-table .table th {
    background: var(--primary-color);
    color: white;
    border: none;
    font-weight: 600;
    padding: 15px;
    text-align: center;
    white-space: nowrap;
    position: sticky;
    top: 0;
}

.members-table .table td {
    padding: 12px 15px;
    border: 1px solid var(--border-light);
    vertical-align: middle;
}

.members-table .table tbody tr:nth-child(even) {
    background-color: var(--light-bg);
}

.members-table .table tbody tr:hover {
    background-color: #e2e8f0;
    transition: background-color 0.3s ease;
}

.serial-col {
    width: 60px;
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
}

/* Resource Count Styling */
.resource-count {
    display: inline-block;
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Rule Lists */
.rule-list {
    list-style: none;
    padding: 0;
}

.rule-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    line-height: 1.6;
}

.rule-list li::before {
    content: "📋";
    position: absolute;
    left: 0;
    top: 0;
}

.instruction-list {
    list-style: none;
    padding: 0;
}

.instruction-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
    line-height: 1.6;
}

.instruction-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* Penalty Box */
.penalty-box {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid var(--danger-color);
}

.penalty-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #fca5a5;
}

.penalty-item:last-child {
    border-bottom: none;
}

.penalty-type {
    font-weight: 600;
    color: var(--text-dark);
}

.penalty-amount {
    background: var(--danger-color);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Badges */
.badge {
    font-size: 0.8rem;
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.badge.bg-primary { background-color: var(--primary-color) !important; }
.badge.bg-success { background-color: var(--success-color) !important; }
.badge.bg-info { background-color: var(--info-color) !important; }
.badge.bg-warning { background-color: var(--warning-color) !important; }

/* Alerts */
.alert {
    border-radius: 12px;
    border: none;
    padding: 20px;
    margin-bottom: 20px;
}

.alert-info {
    background: linear-gradient(135deg, #e1f5fe, #b3e5fc);
    color: #01579b;
    border-left: 4px solid var(--info-color);
}

.alert-success {
    background: linear-gradient(135deg, #e8f5e8, #c8e6c8);
    color: #1b5e20;
    border-left: 4px solid var(--success-color);
}

.alert-warning {
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
    color: #e65100;
    border-left: 4px solid var(--warning-color);
}

.alert-heading {
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.alert-heading i {
    margin-right: 8px;
}

/* Facility Cards */
.facility-card {
    background: var(--white);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
    height: 100%;
}

.facility-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    border-color: var(--secondary-color);
}

.facility-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.facility-card h6 {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 10px;
}

.facility-card p {
    color: #6b7280;
    margin-bottom: 0;
}

/* Email Links */
.members-table a[href^="mailto:"] {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
}

.members-table a[href^="mailto:"]:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.stat-number {
    animation: pulse 2s infinite;
}

/* Responsive Design */
@media (max-width: 991px) {
    .stat-card {
        margin-bottom: 20px;
    }
    
    .facility-card {
        margin-bottom: 20px;
    }
    
    .schedule-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .penalty-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2.5rem;
    }
    
    .info-card {
        padding: 20px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .members-table {
        overflow-x: auto;
    }
    
    .members-table .table th,
    .members-table .table td {
        font-size: 0.85rem;
        padding: 10px 8px;
        white-space: nowrap;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-icon {
        font-size: 2rem;
    }
    
    .facility-icon {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
    }
    
    .content-section {
        padding: 40px 0;
    }
    
    .info-card {
        padding: 15px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .members-table .table th,
    .members-table .table td {
        font-size: 0.8rem;
        padding: 8px 6px;
    }
    
    .badge {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    
    .resource-count {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
}

/* Print Styles */
@media print {
    .page-header,
    .navbar,
    .footer {
        display: none !important;
    }
    
    .info-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
        margin-bottom: 20px;
    }
    
    .stat-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    
    .members-table .table th {
        background: #f5f5f5 !important;
        color: black !important;
    }
    
    .fade-in-up {
        animation: none;
    }
    
    .stat-number {
        animation: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .alert {
        border: 1px solid #ddd !important;
        background: white !important;
        color: black !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .info-card {
        border: 2px solid var(--text-dark);
    }
    
    .stat-card {
        border: 2px solid var(--text-dark);
    }
    
    .facility-card {
        border: 2px solid var(--text-dark);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .info-card,
    .stat-card,
    .facility-card {
        transition: none;
    }
    
    .fade-in-up {
        animation: none;
    }
    
    .stat-number {
        animation: none;
    }
    
    .info-card:hover,
    .stat-card:hover,
    .facility-card:hover {
        transform: none;
    }
}

/* Dark Mode Support (if implemented) */
@media (prefers-color-scheme: dark) {
    :root {
        --white: #1f2937;
        --light-bg: #374151;
        --text-dark: #f9fafb;
        --border-light: #4b5563;
    }
    
    .info-card,
    .stat-card,
    .facility-card {
        background: var(--white);
        color: var(--text-dark);
    }
    
    .members-table .table tbody tr:nth-child(even) {
        background-color: var(--light-bg);
    }
}

/* Focus States for Accessibility */
.info-card:focus-within,
.stat-card:focus-within,
.facility-card:focus-within {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.members-table a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Custom Scrollbar */
.members-table::-webkit-scrollbar {
    height: 8px;
}

.members-table::-webkit-scrollbar-track {
    background: var(--light-bg);
    border-radius: 4px;
}

.members-table::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

.members-table::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}