/* Reset et base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background-color: #f9fafb;
    scroll-behavior: smooth;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Projects Section */
.projects-section {
    padding: 5rem 0;
    min-height: 100vh;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 1rem;
}

.icon-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 1rem;
    margin-bottom: 1.5rem;
}

.icon-container i {
    font-size: 2rem;
    color: white;
}

/* Title Section */
.title-section {
    text-align: center;
    margin-bottom: 4rem;
}

.main-title {
    font-size: 3rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.25rem;
    color: #6b7280;
    max-width: 32rem;
    margin: 0 auto;
}

/* Category Filter */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    border: 1px solid #e5e7eb;
    background: white;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    color: #3b82f6;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.filter-btn.active {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border-color: transparent;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 350px));
    justify-content: center;
    gap: 2rem;
}

/* Project Card */
.project-card {
    width: 350px;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 1;
    transform: scale(1);
}

.project-card:hover {
    transform: scale(1.05);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.project-card.hidden {
    display: none !important;
}

.project-image-container {
    position: relative;
    overflow: hidden;
}

.project-image {
    width: 100%;
    height: 12rem;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}

.project-card:hover .image-overlay {
    opacity: 1;
}

.overlay-icons {
    display: flex;
    gap: 0.5rem;
}

.overlay-icons i {
    color: white;
    font-size: 1.25rem;
}

/* Project Content */
.project-content {
    padding: 1.5rem;
}

.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.project-category {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #3b82f6;
    background: #dbeafe;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.project-date {
    font-size: 0.875rem;
    color: #6b7280;
}

.project-advertiser {
    font-size: 1.25rem;
    font-weight: 700;
    color: #3b82f6;
    margin-bottom: 0.75rem;
    transition: color 0.2s ease;
}

.project-card:hover .project-advertiser {
    color: #2563eb;
}

.project-description {
    color: #6b7280;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.format-type {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #374151;
    font-weight: 500;
}

.format-type i {
    color: #6b7280;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    font-size: 0.75rem;
    background: #f3f4f6;
    color: #374151;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
}

.tech-tag.more {
    background: #f3f4f6;
    color: #374151;
}

/* Pagination */
.pagination-container {
    margin-top: 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.pagination-info {
    color: #6b7280;
    font-size: 0.875rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid #e5e7eb;
    background: white;
    color: #374151;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination-btn:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #d1d5db;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    gap: 0.5rem;
}

.page-number {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    background: white;
    color: #374151;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.page-number:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.page-number.active {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border-color: transparent;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 1rem;
    max-width: 64rem;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    position: relative;
}

.modal-image {
    width: 100%;
    height: 16rem;
    object-fit: cover;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.close-btn:hover {
    background: white;
}

.close-btn i {
    font-size: 1.5rem;
    color: #374151;
}

/* Modal Body */
.modal-body {
    padding: 2rem;
}

.modal-title-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.modal-title-info h3 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.modal-advertiser {
    font-size: 1.875rem;
    font-weight: 700;
    color: #3b82f6;
}

.modal-format {
    font-size: 1.5rem;
    font-weight: 500;
    color: #111827;
    margin-bottom: 0.75rem;
}

.modal-category {
    color: #3b82f6;
    background: #dbeafe;
    text-transform: uppercase;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-block;
}

.modal-actions {
    display: flex;
    gap: 1rem;
}

.btn-primary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: box-shadow 0.2s ease;
}

.btn-primary:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid #d1d5db;
    color: #111827;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: border-color 0.2s ease;
}

.btn-secondary:hover {
    border-color: #9ca3af;
}

/* Modal Info Grid */
.modal-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.info-item i {
    font-size: 1.25rem;
}

.text-blue {
    color: #3b82f6;
}

.info-label {
    font-size: 0.875rem;
    color: #6b7280;
}

.info-value {
    font-weight: 600;
    color: #111827;
}

/* Modal Sections */
.modal-description,
.modal-technologies {
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
}

.description-text {
    color: #6b7280;
    line-height: 1.7;
}

.modal-technologies .tech-tags {
    gap: 0.75rem;
}

.modal-technologies .tech-tag {
    background: linear-gradient(135deg, #dbeafe, #e0e7ff);
    color: #1e40af;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.125rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .pagination-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .pagination-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .modal-title-section {
        flex-direction: column;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .modal-image {
        height: 12rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .projects-section {
        padding: 3rem 0;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .category-filter {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Smooth transitions for filtering */
.project-card {
    transition: all 0.3s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #3b82f6, #8b5cf6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #2563eb, #7c3aed);
}

/* Footer Administration */
.admin-footer {
    background: #1e293b;
    padding: 2rem 0;
    margin-top: 4rem;
}

.admin-link-container {
    text-align: center;
}

.admin-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.admin-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    color: white;
    text-decoration: none;
}

.admin-link i {
    font-size: 1.1rem;
}