/* Component-specific styles */

/* Loading states */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Alert components */
.alert {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 6px;
    border: 1px solid transparent;
}

.alert-info {
    background-color: #eff6ff;
    border-color: #3b82f6;
    color: #1e40af;
}

.alert-success {
    background-color: #f0fdf4;
    border-color: #22c55e;
    color: #15803d;
}

.alert-warning {
    background-color: #fffbeb;
    border-color: #f59e0b;
    color: #d97706;
}

.alert-error {
    background-color: #fef2f2;
    border-color: #ef4444;
    color: #dc2626;
}

/* Card components */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.card-title {
    margin: 0;
    color: #1e40af;
}

.card-content {
    margin-bottom: 1rem;
}

.card-footer {
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
    margin-top: 1rem;
}

/* Form components */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Event card component */
.event-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #2563eb;
}

.event-date {
    font-size: 0.875rem;
    color: #666;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.event-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #1e40af;
}

.event-description {
    color: #4b5563;
    margin-bottom: 1rem;
}

.event-location {
    font-size: 0.875rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Blog post component */
.blog-post-preview {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-post-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.blog-post-category {
    display: inline-block;
    background-color: #eff6ff;
    color: #1e40af;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.blog-post-title {
    margin-bottom: 0.5rem;
}

.blog-post-title a {
    color: #1e40af;
    text-decoration: none;
}

.blog-post-title a:hover {
    text-decoration: underline;
}

.blog-post-excerpt {
    color: #4b5563;
    margin-bottom: 1rem;
}

.blog-post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #666;
}

.blog-post-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Navigation enhancements */
.nav-menu.active .nav-link {
    opacity: 0;
    animation: fadeInUp 0.3s ease forwards;
}

.nav-menu.active .nav-link:nth-child(1) {
    animation-delay: 0.1s;
}

.nav-menu.active .nav-link:nth-child(2) {
    animation-delay: 0.2s;
}

.nav-menu.active .nav-link:nth-child(3) {
    animation-delay: 0.3s;
}

.nav-menu.active .nav-link:nth-child(4) {
    animation-delay: 0.4s;
}

.nav-menu.active .nav-link:nth-child(5) {
    animation-delay: 0.5s;
}

.nav-menu.active .nav-link:nth-child(6) {
    animation-delay: 0.6s;
}

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

/* Hamburger animation */
.nav-toggle[aria-expanded="true"] .hamburger {
    background-color: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Scroll indicators */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
    transform-origin: left;
    transform: scaleX(0);
    z-index: 1000;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

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

.back-to-top:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
}

/* Utility classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }

.hidden {
    display: none;
}

.fade-in {
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}
