/* Resources Page Styles - International Design */

/* Global reset and international typography */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: #f7fafc;
    padding-top: 80px; /* Add padding to account for fixed navbar */
}

/* Modern header with clean international style */
.resources-header {
    background: linear-gradient(135deg, #3498db 0%, #2c3e50 100%);
    color: white;
    padding: 4rem 0 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.resources-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.05"><circle cx="30" cy="30" r="2"/></g></g></svg>');
    opacity: 0.5;
}

.resources-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.025em;
    position: relative;
    z-index: 2;
}

.resources-header .subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
    font-weight: 400;
    position: relative;
    z-index: 2;
}

/* Modern search box */
.search-box {
    max-width: 500px;
    margin: 0 auto 2rem;
    position: relative;
    z-index: 2;
}

.search-box input {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 1.25rem;
    border-radius: 12px;
    border: none;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    color: #2d3748;
}

.search-box input::placeholder {
    color: #a0aec0;
}

.search-box input:focus {
    outline: none;
    background: white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.search-box button {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #667eea;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 4px;
    border-radius: 6px;
}

.search-box button:hover {
    background: rgba(52, 152, 219, 0.1);
    transform: translateY(-50%) scale(1.05);
}

/* Modern filter tags */
.filter-tags {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.filter-tag {
    padding: 0.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.01em;
}

.filter-tag:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.3);
}

.filter-tag.active {
    background: white;
    color: #3498db;
    border-color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Clean section styling */
.resources-section {
    padding: 4rem 0;
    background: white;
}

.resources-section:nth-child(even) {
    background: #f7fafc;
}

.section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 3rem;
}

.section-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #3498db, #2c3e50);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #2d3748;
    letter-spacing: -0.025em;
}

.section-header p {
    font-size: 1rem;
    color: #718096;
    max-width: 600px;
    line-height: 1.6;
}

/* Modern card grid */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* International style resource cards - Optimized for Performance */
.resource-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    will-change: transform;
}

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

.resource-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2c3e50);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.resource-card:hover::before {
    opacity: 1;
}

.resource-logo {
    width: 60px;
    height: 60px;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.5rem 1.5rem 0;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.resource-logo img {
    max-width: 32px;
    max-height: 32px;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.resource-card:hover .resource-logo img {
    transform: scale(1.05);
}

.resource-content {
    flex: 1;
    padding: 1rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
}

.resource-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2d3748;
    letter-spacing: -0.025em;
    line-height: 1.3;
}

.resource-content p {
    color: #718096;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;
    font-size: 0.9rem;
}

/* Modern tags - Simplified */
.resource-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    padding: 0.25rem 0.75rem;
    background: #f1f5f9;
    border-radius: 20px;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    border: 1px solid #e2e8f0;
    transition: background-color 0.2s ease;
}

.resource-card:hover .tag {
    background: #e2e8f0;
}

/* Clean metadata - Simplified */
.resource-meta {
    display: flex;
    justify-content: space-between;
    color: #a0aec0;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.meta-item svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Modern button - Optimized */
.resource-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    align-self: flex-start;
    letter-spacing: 0.025em;
    will-change: transform;
}

.resource-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Modern suggestion section */
.suggestion-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    text-align: center;
    color: white;
}

.suggestion-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.025em;
}

.suggestion-section p {
    font-size: 1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.suggestion-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.suggestion-form input {
    flex: 1;
    min-width: 250px;
    padding: 0.875rem 1.25rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 0.9rem;
    background: white;
    color: #2d3748;
}

.suggestion-form input::placeholder {
    color: #a0aec0;
}

.suggestion-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.suggestion-form button {
    padding: 0.875rem 1.5rem;
    background: white;
    color: #2d3748;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.suggestion-form button:hover {
    background: #f7fafc;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Updated responsive design */
@media (max-width: 992px) {
    .resources-header h1 {
        font-size: 2rem;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    .resources-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .resources-header {
        padding: 3rem 0 2rem;
    }

    .resources-header h1 {
        font-size: 1.75rem;
    }

    .resources-header .subtitle {
        font-size: 1rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .resources-grid {
        grid-template-columns: 1fr;
    }

    .filter-tags {
        gap: 0.5rem;
    }

    .filter-tag {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }

    .suggestion-section h2 {
        font-size: 1.75rem;
    }

    .suggestion-form {
        flex-direction: column;
    }

    .resource-card {
        transition: none;
    }
    
    .resource-card:hover {
        transform: none;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    }
    
    .resource-button:hover {
        transform: none;
        box-shadow: none;
    }
}

@media (max-width: 480px) {
    .resources-header {
        padding: 2.5rem 0 1.5rem;
    }

    .resources-header h1 {
        font-size: 1.5rem;
    }

    .search-box input {
        font-size: 0.9rem;
    }

    .section-header h2 {
        font-size: 1.375rem;
    }

    .resource-content h3 {
        font-size: 1rem;
    }

    .suggestion-section h2 {
        font-size: 1.5rem;
    }

    .suggestion-form button {
        font-size: 0.85rem;
    }
}

/* Back Navigation Styles */
.back-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.back-button svg {
    transition: transform 0.3s ease;
}

.back-button:hover svg {
    transform: translateX(-3px);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: white;
}

.breadcrumb .separator {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0.25rem;
}

.breadcrumb .current {
    color: white;
    font-weight: 600;
}

/* Quick Navigation Section */
.quick-navigation {
    padding: 4rem 0;
    background: #f8f9fa;
}

.quick-navigation h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.nav-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.nav-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: #3498db;
}

.nav-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.nav-card h4 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.nav-card p {
    color: #666;
    font-size: 0.9rem;
}

/* Mobile Navigation Styles */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
        z-index: 1001;
        transition: all 0.3s ease;
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
        color: #333;
    }

    .mobile-menu-toggle.active {
        transform: rotate(90deg);
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        padding: 1rem 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
        opacity: 0;
        transform: translateY(-10px);
    }

    .nav-menu.active {
        display: flex;
        opacity: 1;
        transform: translateY(0);
    }

    .nav-menu a {
        padding: 0.75rem 1.5rem;
        border-bottom: 1px solid #f0f0f0;
        transition: all 0.3s ease;
        text-decoration: none;
        color: #333;
        font-weight: 500;
    }

    .nav-menu a:last-child {
        border-bottom: none;
    }

    .nav-menu a:hover {
        background: #f8f9fa;
        transform: translateX(5px);
        color: #3498db;
    }

    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }
}

/* Enhanced Navigation Bar for Resources Page */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3498db, #2c3e50);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.nav-tagline {
    font-size: 0.85rem;
    color: #666;
    display: block;
    margin-top: 2px;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    transform: translateY(-2px);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
}

/* Empty state and loading state styles */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 500px;
    margin: 0 auto;
}

.empty-state .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2d3748;
}

.empty-state p {
    color: #718096;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.clear-search {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.clear-search:hover {
    transform: translateY(-1px);
}

/* Loading state animation */
@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

.loading-skeleton {
    animation: shimmer 1.2s ease-in-out infinite;
    background: linear-gradient(90deg, #f1f3f4 25%, #e9ecef 50%, #f1f3f4 75%);
    background-size: 1000px 100px;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .resource-card:hover {
        transform: none;
    }
    
    .resource-button:hover {
        transform: none;
    }
}

/* Improved focus states for accessibility */
.search-box input:focus,
.filter-tag:focus,
.resource-button:focus,
.clear-search:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .resource-card {
        border: 2px solid #000;
    }
    
    .tag {
        border: 1px solid #000;
    }
}

/* Star Rating Styles */
.rating-item {
    display: flex;
    align-items: center;
}

.star-rating {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stars {
    display: flex;
    align-items: center;
    gap: 1px;
}

.star {
    font-size: 14px;
    color: #ddd;
    transition: color 0.2s ease;
    position: relative;
    display: inline-block;
}

.star.filled {
    color: #FFD700; /* Gold color for filled stars */
    text-shadow: 0 1px 2px rgba(255, 215, 0, 0.3);
}

.star.half-filled {
    color: #ddd;
}

.star.half-filled::before {
    content: "★";
    position: absolute;
    left: 0;
    color: #FFD700;
    width: 50%;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(255, 215, 0, 0.3);
}

.rating-text {
    font-size: 13px;
    font-weight: 600;
    color: #1a202c;
    white-space: nowrap;
}

/* Enhanced meta item styling */
.meta-item.rating-item {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 215, 0, 0.05));
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.1);
}

/* Hover effects */
.resource-card:hover .star.filled {
    color: #FFA500; /* Orange-gold on hover */
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
    transform: scale(1.05);
}

.resource-card:hover .star.half-filled::before {
    color: #FFA500;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.resource-card:hover .meta-item.rating-item {
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.2);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .rating-text {
        color: #e2e8f0;
    }
    
    .meta-item.rating-item {
        background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.08));
        border-color: rgba(255, 215, 0, 0.3);
    }
}

/* Filter badges */
.category-tag {
    color: #3498db;
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.suggestion-form .form-group:focus-within .form-icon {
    border-color: #3498db;
}