/* POrigins Custom Styles */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* CSS Variables for Theme */
:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #6366f1;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    --dark-color: #1f2937;
    --light-color: #f8fafc;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border-color: #e5e7eb;
    --border-radius: 0.5rem;
    --box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --box-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: #ffffff;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.display-1, .display-2, .display-3, .display-4 {
    font-weight: 700;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

a:hover {
    color: var(--primary-hover);
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: var(--border-radius);
    padding: 0.5rem 1rem;
    transition: all 0.15s ease-in-out;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--box-shadow-lg);
}

.btn-warning {
    background-color: var(--warning-color);
    border-color: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background-color: #d97706;
    border-color: #d97706;
    transform: translateY(-1px);
    box-shadow: var(--box-shadow-lg);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
    border-radius: 0.75rem;
}

/* Cards */
.card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-lg);
}

.card-header {
    background-color: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

/* Navigation */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: background-color 0.15s ease-in-out;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: white;
}

/* Forms */
.form-control {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
}

/* Badges */
.badge {
    font-weight: 500;
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
}

/* Progress */
.progress {
    height: 0.5rem;
    border-radius: 0.25rem;
    background-color: #e5e7eb;
}

.progress-bar {
    border-radius: 0.25rem;
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 1.25rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
}

/* Dropdowns */
.dropdown-menu {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: background-color 0.15s ease-in-out;
}

.dropdown-item:hover {
    background-color: #f8fafc;
}

/* Spinners */
.spinner-border {
    width: 2rem;
    height: 2rem;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Custom Components */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    pointer-events: none;
}

.server-status-card {
    border: none;
    box-shadow: var(--box-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.server-status-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--box-shadow-lg);
}

.news-card {
    border: none;
    box-shadow: var(--box-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--box-shadow-lg);
}

.news-card .card-img-top {
    transition: transform 0.3s ease;
}

.news-card:hover .card-img-top {
    transform: scale(1.05);
}

.stat-item {
    text-align: center;
    padding: 1rem;
}

.stat-item h3, .stat-item h5 {
    margin-bottom: 0.25rem;
}

.changelog-item {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin-bottom: 1.5rem;
}

.changelog-item:last-child {
    margin-bottom: 0;
}

/* ========================================
   NEWS ARTICLE PAGE STYLES
   ======================================== */

/* Article page layout */
.article-card {
    border: none;
    overflow: hidden;
}

.article-card .card-header {
    background: var(--po-gradient-primary) !important;
    border-bottom: none;
    padding: 2rem;
}

.article-card .card-header h1 {
    color: var(--po-white) !important;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.article-meta {
    font-size: 0.875rem;
    opacity: 0.9;
}

.article-meta i {
    margin-right: 0.25rem;
}

.article-category .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    font-weight: 600;
}

.article-tags {
    margin-top: 1rem;
}

.article-tags .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
}

/* Article content styles */
.article-content {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--po-text-primary);
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: var(--po-drab-dark-brown) !important;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.article-content h2 {
    font-size: 1.5rem;
    border-bottom: 2px solid var(--po-satin-sheen-gold);
    padding-bottom: 0.5rem;
}

.article-content h3 {
    font-size: 1.25rem;
    color: var(--po-satin-sheen-gold) !important;
}

.article-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content strong {
    color: var(--po-drab-dark-brown);
    font-weight: 600;
}

.article-content em {
    color: var(--po-text-secondary);
    font-style: italic;
}

/* Timeline and special content */
.timeline-info .card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.timeline-info .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.featured-content {
    background: linear-gradient(135deg, var(--po-gray-light) 0%, #FAFBFC 100%);
    padding: 2rem;
    border-radius: 0.75rem;
    margin: 2rem 0;
}

.feature-card {
    text-align: center;
    padding: 1.5rem;
    background: var(--po-white);
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--po-satin-sheen-gold);
    margin-bottom: 1rem;
}

.feature-card h5 {
    color: var(--po-drab-dark-brown) !important;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--po-text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Roadmap styles */
.roadmap {
    margin: 2rem 0;
}

.roadmap-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--po-white);
    border-left: 4px solid var(--po-satin-sheen-gold);
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.roadmap-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.roadmap-date {
    background: var(--po-gradient-primary);
    color: var(--po-white);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.875rem;
    margin-right: 1.5rem;
    white-space: nowrap;
    min-width: 120px;
    text-align: center;
}

.roadmap-content h5 {
    color: var(--po-drab-dark-brown) !important;
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

.roadmap-content p {
    color: var(--po-text-secondary);
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Call to action sections */
.call-to-action {
    background: var(--po-gradient-featured);
    color: var(--po-white);
    padding: 2.5rem;
    border-radius: 0.75rem;
    margin: 2rem 0;
    text-align: center;
}

.call-to-action h3 {
    color: var(--po-white) !important;
    margin-bottom: 1rem;
}

.call-to-action p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.cta-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    transition: background-color 0.2s ease;
}

.cta-card:hover {
    background: rgba(255, 255, 255, 0.15);
}

.cta-card i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--po-white);
}

.cta-card h5 {
    color: var(--po-white) !important;
    margin-bottom: 0.75rem;
}

.cta-card p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.cta-card .btn {
    border-color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

.cta-card .btn-primary {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--po-white);
}

.cta-card .btn-primary:hover {
    background: var(--po-white);
    color: var(--po-satin-sheen-gold);
}

.cta-card .btn-outline-primary {
    color: var(--po-white);
    border-color: rgba(255, 255, 255, 0.5);
}

.cta-card .btn-outline-primary:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--po-white);
}

/* Thank you section */
.thank-you {
    background: linear-gradient(135deg, var(--po-gray-light) 0%, #FAFBFC 100%);
    padding: 2rem;
    border-radius: 0.75rem;
    text-align: center;
    margin: 2rem 0;
}

.thank-you h3 {
    color: var(--po-drab-dark-brown) !important;
    margin-bottom: 1rem;
}

.thank-you p {
    color: var(--po-text-secondary);
    margin-bottom: 0.5rem;
}

.thank-you em {
    color: var(--po-satin-sheen-gold);
    font-weight: 600;
    font-style: normal;
}

/* Related articles */
.related-article-card {
    border: 1px solid rgba(67, 54, 2, 0.1);
    transition: all 0.3s ease;
}

.related-article-card:hover {
    border-color: var(--po-satin-sheen-gold);
    box-shadow: 0 8px 25px rgba(197, 161, 0, 0.15);
    transform: translateY(-3px);
}

.related-article-card .card-title a {
    color: var(--po-drab-dark-brown);
    text-decoration: none;
    font-weight: 600;
}

.related-article-card .card-title a:hover {
    color: var(--po-satin-sheen-gold);
}

/* Breadcrumb styling */
.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item a {
    color: var(--po-satin-sheen-gold);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb-item a:hover {
    color: var(--po-gold-light);
}

.breadcrumb-item.active {
    color: var(--po-text-secondary);
}

/* ========================================
   CALENDAR STYLES
   ======================================== */

/* Calendar Grid */
.calendar-card {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.calendar-grid {
    background: var(--po-white);
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--po-gray-light);
    border-bottom: 1px solid rgba(67, 54, 2, 0.1);
}

.calendar-day-header {
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
    color: var(--po-drab-dark-brown);
    font-size: 0.875rem;
    border-right: 1px solid rgba(67, 54, 2, 0.05);
}

.calendar-day-header:last-child {
    border-right: none;
}

.calendar-body {
    display: flex;
    flex-direction: column;
}

.calendar-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-bottom: 1px solid rgba(67, 54, 2, 0.05);
}

.calendar-week:last-child {
    border-bottom: none;
}

.calendar-day {
    min-height: 80px;
    padding: 0.5rem;
    border-right: 1px solid rgba(67, 54, 2, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--po-white);
}

.calendar-day:last-child {
    border-right: none;
}

.calendar-day:hover {
    background: rgba(197, 161, 0, 0.05);
}

.calendar-day.selected {
    background: rgba(197, 161, 0, 0.1);
    border-color: var(--po-satin-sheen-gold);
}

.calendar-day.today {
    background: rgba(197, 161, 0, 0.15);
    font-weight: 600;
}

.calendar-day.other-month {
    background: var(--po-gray-light);
    color: var(--po-text-secondary);
}

.calendar-day.has-events {
    background: linear-gradient(135deg, var(--po-white) 0%, rgba(197, 161, 0, 0.05) 100%);
}

.calendar-day-number {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--po-drab-dark-brown);
    margin-bottom: auto;
}

.calendar-day-events {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-top: auto;
    padding-top: 2px;
}

.calendar-event-item {
    background: rgba(197, 161, 0, 0.1);
    border-left: 3px solid var(--po-satin-sheen-gold);
    padding: 1px 3px;
    font-size: 0.65rem;
    line-height: 1.2;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 2px;
    margin-bottom: 1px;
}

.calendar-event-item:hover {
    background: rgba(197, 161, 0, 0.2);
    transform: scale(1.02);
    z-index: 10;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.event-title {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    color: var(--po-drab-dark-brown);
}

.calendar-event-more {
    font-size: 0.6rem;
    color: var(--po-text-secondary);
    text-align: center;
    padding: 1px;
    font-style: italic;
}

/* Event Type Specific Colors */
.event-tournament {
    background: rgba(220, 53, 69, 0.1);
    border-left-color: #dc3545;
}

.event-tournament:hover {
    background: rgba(220, 53, 69, 0.2);
}

.event-maintenance {
    background: rgba(255, 193, 7, 0.1);
    border-left-color: #ffc107;
}

.event-maintenance:hover {
    background: rgba(255, 193, 7, 0.2);
}

.event-community {
    background: rgba(13, 110, 253, 0.1);
    border-left-color: #0d6efd;
}

.event-community:hover {
    background: rgba(13, 110, 253, 0.2);
}

.event-update {
    background: rgba(13, 202, 240, 0.1);
    border-left-color: #0dcaf0;
}

.event-update:hover {
    background: rgba(13, 202, 240, 0.2);
}

.event-special {
    background: rgba(25, 135, 84, 0.1);
    border-left-color: #198754;
}

.event-special:hover {
    background: rgba(25, 135, 84, 0.2);
}

.event-guild {
    background: rgba(33, 37, 41, 0.1);
    border-left-color: #212529;
}

.event-guild:hover {
    background: rgba(33, 37, 41, 0.2);
}

.event-training {
    background: rgba(108, 117, 125, 0.1);
    border-left-color: #6c757d;
}

.event-training:hover {
    background: rgba(108, 117, 125, 0.2);
}

.event-contest {
    background: rgba(233, 30, 99, 0.1);
    border-left-color: #e91e63;
}

.event-contest:hover {
    background: rgba(233, 30, 99, 0.2);
}

.event-meeting {
    background: rgba(248, 249, 250, 0.1);
    border-left-color: #f8f9fa;
}

.event-meeting:hover {
    background: rgba(248, 249, 250, 0.2);
}

.event-celebration {
    background: rgba(197, 161, 0, 0.1);
    border-left-color: var(--po-satin-sheen-gold);
}

.event-celebration:hover {
    background: rgba(197, 161, 0, 0.2);
}

.event-default {
    background: rgba(108, 117, 125, 0.1);
    border-left-color: #6c757d;
}

.event-default:hover {
    background: rgba(108, 117, 125, 0.2);
}

/* Responsive adjustments for event items */
@media (max-width: 768px) {
    .calendar-event-item {
        font-size: 0.6rem;
        padding: 1px 2px;
    }
    
    .calendar-event-more {
        font-size: 0.55rem;
    }
}

@media (max-width: 576px) {
    .calendar-event-item {
        font-size: 0.55rem;
        padding: 0px 2px;
    }
    
    .calendar-event-more {
        font-size: 0.5rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --text-muted: #9ca3af;
        --border-color: #374151;
    }
    
    body {
        background-color: #111827;
        color: var(--text-primary);
    }
    
    .card {
        background-color: #1f2937;
        border-color: var(--border-color);
    }
    
    .card-header {
        background-color: #374151;
    }
}

/* Error Boundary */
.blazor-error-boundary {
    background: var(--danger-color);
    color: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin: 1rem;
    box-shadow: var(--box-shadow-lg);
}

.blazor-error-boundary::after {
    content: "An error has occurred. Please reload the page.";
}

/* Loading States */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-overlay.dark {
    background: rgba(17, 24, 39, 0.8);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Focus styles for accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus,
a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0000ff;
        --text-primary: #000000;
        --border-color: #000000;
    }
    
    .card {
        border: 2px solid var(--border-color);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Utility classes */
.min-vh-50 {
    min-height: 50vh;
}

.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}