/* Global styles - Scholar style */
:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: #0ea5e9;
    --accent: #0284c7;
    --dark: #1e293b;
    --gray: #64748b;
    --light: #f8fafc;
    --error: #ef4444;
    --warning: #f59e0b;
    --success: #10b981;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.5;
    color: var(--dark);
    background-color: #f1f5f9;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Custom focus states */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Form elements styling */
input, select, textarea {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    background-color: #ffffff;
}

    input:focus, select:focus, textarea:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
    }

/* Button styles */
button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    background-color: var(--primary);
    color: white;
    border: none;
}

    button:hover, .btn:hover {
        background-color: var(--primary-hover);
    }

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid rgba(203, 213, 225, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Custom card styles - Scholar style */
.card {
    background-color: #ffffff;
    border-radius: 0.375rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.2s ease;
}

    .card:hover {
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    }

.card-header {
    padding: 1rem 1.25rem;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    padding: 1rem 1.25rem;
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

/* Image container aspect ratios */
.aspect-ratio-16-9 {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}

.aspect-ratio-9-16 {
    position: relative;
    padding-bottom: 177.78%; /* 9:16 */
    height: 0;
    overflow: hidden;
}

.aspect-ratio-1-1 {
    position: relative;
    padding-bottom: 100%; /* 1:1 */
    height: 0;
    overflow: hidden;
}

.aspect-ratio-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Animation for transitions */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* Custom tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

    .tooltip .tooltip-text {
        visibility: hidden;
        width: 120px;
        background-color: #333;
        color: #fff;
        text-align: center;
        border-radius: 6px;
        padding: 5px;
        position: absolute;
        z-index: 1;
        bottom: 125%;
        left: 50%;
        margin-left: -60px;
        opacity: 0;
        transition: opacity 0.3s;
    }

    .tooltip:hover .tooltip-text {
        visibility: visible;
        opacity: 1;
    }

/* Image gallery styles - Scholar style */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
}

.image-item {
    overflow: hidden;
    border-radius: 0.375rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background-color: white;
}

    .image-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    }

/* Admin panel specific styles - Scholar style */
.admin-card {
    background-color: white;
    border-radius: 0.375rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    overflow: hidden;
}

    .admin-card:hover {
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    }

/* Notification badges - Scholar style */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    color: white;
    background-color: var(--primary);
    border-radius: 9999px;
}

/* Progress bar - Scholar style */
.progress-container {
    width: 100%;
    height: 0.5rem;
    background-color: #e2e8f0;
    border-radius: 0.25rem;
    overflow: hidden;
    margin: 1rem 0;
    position: relative;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary);
    border-radius: 0.25rem;
    transition: width 0.3s ease;
}

/* Full-page overlay progress */
.fullpage-progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.fullpage-progress-container {
    width: 80%;
    max-width: 500px;
    background-color: #e2e8f0;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.fullpage-progress-bar {
    height: 8px;
    background-color: var(--primary);
    border-radius: 1rem;
    transition: width 0.5s ease;
    width: 0%;
}

.fullpage-progress-text {
    margin-top: 1rem;
    font-size: 1rem;
    color: var(--dark);
    text-align: center;
}

.fullpage-progress-icon {
    margin-bottom: 1.5rem;
    font-size: 3rem;
    color: var(--primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive fixes */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .image-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
}
