
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #374151;
    --secondary-dark: #1f2937;
    --success: #059669;
    --danger: #dc2626;
    --warning: #d97706;
    --info: #0891b2;
    --light: #f8fafc;
    --dark: #1e293b;
    --gray-light: #f1f5f9;
    --gray: #64748b;
    --gray-dark: #475569;
    --border: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8fafc;
    color: var(--dark);
    line-height: 1.6;
    font-size: 16px;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
/* Dashboard Styles */
.dashboard-header {
    text-align: center;
    margin-bottom: 2rem;
}

.dashboard-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.action-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.action-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: inherit;
    text-decoration: none;
}

.action-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.action-card h3 {
    margin-bottom: 0.5rem;
    color: var(--secondary-dark);
}

.action-card p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Badge styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-info {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-secondary {
    background-color: #f3f4f6;
    color: #374151;
}
/* Loading overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading-spinner {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.loading-text {
    font-size: 1.2rem;
    color: var(--dark);
}

/* ===== HEADER STYLES ===== */
header {
    background: linear-gradient(135deg, var(--secondary-dark), var(--dark));
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    text-decoration: none;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    flex-wrap: wrap;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.auth-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.user-welcome {
    color: white;
    font-weight: 600;
    margin-right: 1rem;
}

/* ===== BUTTON STYLES ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--secondary);
    color: white;
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-warning {
    background-color: var(--warning);
    color: white;
}

.btn-info {
    background-color: var(--info);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, var(--primary), var(--secondary-dark));
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== SECTION STYLES ===== */
.section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--secondary-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary);
}

/* ===== FORM STYLES ===== */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--secondary-dark);
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: white;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* ===== TABLE STYLES ===== */
.table-responsive {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.projects-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.projects-table th,
.projects-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.projects-table th {
    background-color: var(--gray-light);
    font-weight: 700;
    color: var(--secondary-dark);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.projects-table tr:hover {
    background-color: var(--gray-light);
}

/* ===== CARD STYLES ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.project-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.project-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary-dark);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.project-card p {
    color: var(--gray-dark);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.project-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}
/* Projects Page Styles */
.projects-header {
    text-align: center;
    margin-bottom: 2rem;
}

.projects-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.section-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-box {
    display: flex;
    gap: 0.5rem;
}

.search-box input {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    width: 300px;
    max-width: 100%;
}

.project-description {
    color: var(--gray-dark);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-details {
    margin-bottom: 1rem;
}

.project-details p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Branch badges */
.branch-communications {
    background-color: #e8f4fd;
    color: #2980b9;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.branch-computer {
    background-color: #e8f6f3;
    color: #27ae60;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.branch-control {
    background-color: #fef9e7;
    color: #f39c12;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.branch-power {
    background-color: #fdedec;
    color: #e74c3c;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.branch-mechatronics {
    background-color: #f4ecf7;
    color: #8e44ad;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* ===== SUPERVISOR STYLES ===== */
.supervisors-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.supervisors-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.supervisors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.supervisor-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
}

.supervisor-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.supervisor-card h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary-dark);
    margin-bottom: 1rem;
}

.supervisor-card p {
    color: var(--gray-dark);
    margin-bottom: 0.5rem;
}

.supervisor-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* ===== MODAL STYLES ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.large-modal {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    margin: 0;
    color: var(--secondary-dark);
    font-size: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: var(--danger);
    background-color: var(--gray-light);
}

.modal-body {
    padding: 1.5rem;
}

/* ===== ALERT STYLES ===== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
    font-weight: 500;
}

.alert-success {
    color: #065f46;
    background-color: #d1fae5;
    border-color: #a7f3d0;
}

.alert-danger {
    color: #7f1d1d;
    background-color: #fee2e2;
    border-color: #fecaca;
}

.alert-error {
    color: #7f1d1d;
    background-color: #fee2e2;
    border-color: #fecaca;
}

/* ===== STUDENT ENTRY STYLES ===== */
.student-entry {
    background: var(--gray-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.student-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.student-entry-header h4 {
    margin: 0;
    color: var(--secondary-dark);
}

.add-student-btn {
    background-color: var(--success);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    margin-bottom: 1rem;
    font-weight: 600;
}

.remove-student {
    background-color: var(--danger);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.8rem;
}

/* ===== UTILITY CLASSES ===== */
.text-center {
    text-align: center;
}

.no-data {
    text-align: center;
    padding: 3rem;
    color: var(--gray);
}

.no-data i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--border);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

/* ===== FOOTER ===== */
footer {
    background-color: var(--secondary-dark);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    nav ul {
        justify-content: center;
        gap: 0.5rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .supervisors-grid {
        grid-template-columns: 1fr;
    }
    
    .supervisors-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-actions {
        justify-content: stretch;
    }
    
    .form-actions .btn {
        flex: 1;
        min-width: auto;
    }
    
    .modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .section {
        padding: 1.5rem;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .auth-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .auth-buttons .btn {
        width: 100%;
    }
}
/* Search Results Styling */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.table-responsive {
    overflow-x: auto;
    margin-bottom: 20px;
}

.projects-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.projects-table th {
    background: #2c5aa0;
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
}

.projects-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.projects-table tr:hover {
    background: #f8f9fa;
}

/* Progress Bar */
.progress-bar {
    width: 100px;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #28a745;
    transition: width 0.3s ease;
}

/* Status Badges */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-proposed { background: #6c757d; color: white; }
.status-approved { background: #17a2b8; color: white; }
.status-in_progress { background: #ffc107; color: #212529; }
.status-completed { background: #28a745; color: white; }
.status-defended { background: #007bff; color: white; }

/* Branch Badges */
.branch-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.branch-communications { background: #e83e8c; color: white; }
.branch-computer { background: #6f42c1; color: white; }
.branch-control { background: #fd7e14; color: white; }
.branch-power { background: #20c997; color: white; }
.branch-mechatronics { background: #6610f2; color: white; }

/* Loading States */
.loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.loading i {
    font-size: 48px;
    margin-bottom: 15px;
}
/* Enhanced Pagination Styles with Safari Fixes */
.pagination-container {
    margin-top: 30px;
    padding: 0;
}

.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
    gap: 20px;
    border: 1px solid #e9ecef;
    /* Safari fix for flexbox */
    -webkit-box-align: center;
    -webkit-box-pack: justify;
}

.pagination-info {
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
    min-width: 180px;
    /* Safari fix for text rendering */
    -webkit-font-smoothing: antialiased;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    justify-content: center;
    /* Safari fix for flexbox */
    -webkit-box-align: center;
    -webkit-box-pack: center;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid #007bff;
    background: white;
    color: #007bff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 100px;
    justify-content: center;
    /* Safari specific fixes */
    -webkit-appearance: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    /* Ensure proper box model */
    box-sizing: border-box;
    line-height: 1.4;
    /* Fix font rendering */
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.pagination-btn:hover:not(:disabled) {
    background: #007bff;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #6c757d;
    color: #6c757d;
    /* Safari disabled state fix */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.pagination-btn:disabled:hover {
    background: white;
    color: #6c757d;
    transform: none;
    box-shadow: none;
}

/* Safari specific focus styles */
.pagination-btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.pagination-btn::-moz-focus-inner {
    border: 0;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 8px;
    /* Safari flexbox fix */
    -webkit-box-align: center;
}

.page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    /* Safari specific fixes */
    -webkit-appearance: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
    line-height: 1;
    /* Fix font rendering */
    -webkit-font-smoothing: antialiased;
}

.page-btn:hover:not(.active) {
    background: #e9ecef;
    border-color: #007bff;
    color: #007bff;
}

.page-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

.page-btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 1px;
}

.page-dots {
    padding: 0 8px;
    color: #6c757d;
    font-weight: 500;
    /* Safari font fix */
    -webkit-font-smoothing: antialiased;
}

.pagination-size {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 14px;
    min-width: 160px;
    justify-content: flex-end;
    /* Safari flexbox fix */
    -webkit-box-align: center;
}

.pagination-size label {
    margin: 0;
    font-weight: 500;
    /* Safari font fix */
    -webkit-font-smoothing: antialiased;
}

.pagination-size select {
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    /* Safari select styling */
    -webkit-appearance: menulist;
    -moz-appearance: menulist;
    appearance: menulist;
}

.pagination-size select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Search Pagination Specific Styles */
#search-pagination-container .pagination-wrapper {
    background: #fff;
    border: 1px solid #dee2e6;
    padding: 15px;
}

#search-pagination-container .pagination-btn {
    padding: 8px 12px;
    min-width: 90px;
    font-size: 13px;
}

#search-pagination-container .page-btn {
    min-width: 35px;
    height: 35px;
    font-size: 13px;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
    padding: 0 10px;
    /* Safari flexbox fix */
    -webkit-box-align: center;
    -webkit-box-pack: justify;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pagination-wrapper {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 15px;
        /* Safari flexbox fix */
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
    }
    
    .pagination-controls {
        order: 1;
        /* Safari flexbox fix */
        -webkit-box-ordinal-group: 2;
    }
    
    .pagination-info {
        order: 2;
        text-align: center;
        /* Safari flexbox fix */
        -webkit-box-ordinal-group: 3;
    }
    
    .pagination-size {
        order: 3;
        justify-content: center;
        /* Safari flexbox fix */
        -webkit-box-ordinal-group: 4;
    }
    
    .pagination-btn {
        min-width: 80px;
        padding: 8px 12px;
    }
    
    .page-numbers {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        /* Safari flexbox fix */
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
    }
}

@media (max-width: 480px) {
    .pagination-controls {
        flex-direction: column;
        gap: 10px;
        /* Safari flexbox fix */
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
    }
    
    .page-numbers {
        order: -1;
        /* Safari flexbox fix */
        -webkit-box-ordinal-group: 0;
    }
    
    .pagination-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .pagination-btn span {
        display: inline-block;
    }
}

/* Additional Safari-specific media query */
@media not all and (min-resolution:.001dpcm) { 
    @supports (-webkit-appearance:none) {
        .pagination-btn, .page-btn {
            background-image: none;
        }
        
        .pagination-btn:active:not(:disabled) {
            transform: scale(0.98);
        }
        
        .page-btn:active:not(.active) {
            transform: scale(0.95);
        }
    }
}

/* Fix for Safari button text alignment */
.pagination-btn, .page-btn {
    vertical-align: middle;
}

/* Ensure consistent button heights in Safari */
.pagination-btn {
    height: auto;
    min-height: 44px; /* Better touch targets for mobile Safari */
}

.page-btn {
    height: 44px; /* Consistent height for better touch */
}
.regular-link {
    color:  #FFFFFF !important; /* Dark gray like normal text */
    text-decoration: none;
    cursor: pointer;
}

.regular-link:hover {
    color: #333333 !important; /* Stay dark */
    text-decoration: underline;
    background-color: #FFFFFF;
}
/* Project Card Action Buttons */
.project-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}

.project-actions .btn-sm {
    padding: 5px 10px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.project-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0e0e0;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}