/* Estilos específicos para la página de proyectos */

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    padding: 10rem 0 4rem; /* Increased top padding for modern navbar */
    position: relative;
    overflow: hidden;
    min-height: 60vh;
    display: flex;
    align-items: center;
    margin-top: 0; /* Remove margin since we have padding */
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.page-header-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 800px;
    margin: 0 auto;
}

.page-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.page-title i {
    font-size: 3rem;
    opacity: 0.9;
}

.page-description {
    font-size: 1.2rem;
    line-height: 1.7;
    margin-bottom: 3rem;
    opacity: 0.95;
}

.page-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.page-stats .stat-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-stats .stat-item h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.page-stats .stat-item p {
    font-size: 1rem;
    opacity: 1;
    color: #ffffff;
}

.page-stats .stat-item .stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 1;
    color: #ffffff;
}

.header-decoration {
    position: absolute;
    right: -10%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.1;
    font-size: 0.8rem;
    z-index: 1;
}

.floating-code {
    animation: float 6s ease-in-out infinite;
}

/* Projects Tools Section */
.projects-tools {
    padding: 3rem 0;
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 70px;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.tools-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.search-box {
    position: relative;
    max-width: 300px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: 2rem;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.project-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.7rem 1.2rem;
    border: 2px solid var(--border-color);
    border-radius: 2rem;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: var(--primary-green);
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary-green);
}

.filter-btn.active {
    background: var(--primary-green);
    border-color: var(--primary-green);
    color: white;
}

.filter-btn .count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.filter-btn.active .count {
    background: rgba(255, 255, 255, 0.3);
}

.sort-options select {
    padding: 0.8rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: pointer;
    min-width: 180px;
}

.sort-options select:focus {
    outline: none;
    border-color: var(--primary-green);
}

/* Projects Showcase */
.projects-showcase {
    padding: 1rem 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: start;
}

/* Enhanced Project Cards */
.project-card {
    background: var(--surface-color);
    border-radius: 1.5rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.4s ease;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(16, 185, 129, 0.15);
    border-color: var(--primary-green);
}

.project-card.featured {
    border: 2px solid var(--primary-green);
    background: linear-gradient(135deg, var(--surface-color) 0%, rgba(16, 185, 129, 0.05) 100%);
}

.project-header {
    position: relative;
}

.project-body {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-info {
    flex: 1;
}

.project-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
}

.project-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.project-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-links {
    display: flex;
    gap: 0.75rem;
}

.project-status {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.4rem 0.8rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.project-status.completed {
    background: rgba(34, 197, 94, 0.9);
    color: white;
}

.project-status.in-progress {
    background: rgba(249, 115, 22, 0.9);
    color: white;
}

.project-featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    z-index: 10;
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-icon {
    font-size: 3rem;
    color: white;
    opacity: 0.9;
}



.overlay-buttons {
    display: flex;
    gap: 1rem;
}

.overlay-btn {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--primary-green);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.overlay-btn:hover {
    background: var(--light-green);
    transform: scale(1.1);
}

.project-content {
    padding: 1.5rem;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.project-header h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    flex: 1;
}

.project-rating {
    display: flex;
    gap: 0.2rem;
    margin-left: 1rem;
}

.project-rating i {
    color: #FFD700;
    font-size: 0.9rem;
}

.project-features {
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.feature i {
    color: var(--primary-green);
    font-size: 0.8rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tech-tag {
    padding: 0.3rem 0.8rem;
    background: var(--border-color);
    color: var(--text-muted);
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tech-tag.primary {
    background: var(--primary-green);
    color: white;
}

.tech-tag:hover {
    background: var(--primary-green);
    color: white;
    transform: translateY(-2px);
}

.project-metrics {
    display: flex;
    justify-content: space-between;
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(16, 185, 129, 0.05);
    border-radius: 0.5rem;
}

.metric {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.metric i {
    color: var(--primary-green);
}

/* Load More Section */
.load-more-section {
    text-align: center;
    padding: 2rem 0;
}

.load-more-text {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Projects CTA */
.projects-cta {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    padding: 4rem 0;
    text-align: center;
    color: white;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.cta-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.cta-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.cta-stat i {
    font-size: 1.1rem;
}

/* Project Modal */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.project-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--surface-color);
    border-radius: 1rem;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    margin: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(50px);
    transition: all 0.3s ease;
}

.project-modal.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--text-muted);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--danger-color);
    transform: scale(1.1);
}

.modal-body {
    padding: 2rem;
}

.modal-header h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-green);
}

.modal-header p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.modal-features,
.modal-tech,
.modal-challenge {
    margin: 2rem 0;
}

.modal-features h3,
.modal-tech h3,
.modal-challenge h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.features-list i {
    color: var(--primary-green);
}

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-badge {
    padding: 0.5rem 1rem;
    background: var(--primary-green);
    color: white;
    border-radius: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.modal-challenge h4 {
    margin: 1rem 0 0.5rem;
    color: var(--secondary-green);
}

.modal-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* No Results */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.no-results-content i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-results-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(-50%) translateX(10px); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(30px);
    }
}

@keyframes fadeOutUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-30px);
    }
}

/* Dark Theme Overrides */
[data-theme="dark"] .page-header {
    background: linear-gradient(135deg, var(--primary-green) 0%, #064e3b 100%);
}

[data-theme="dark"] .projects-tools {
    background: var(--surface-color);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .project-card {
    background: var(--surface-color);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .project-card:hover {
    box-shadow: 0 12px 40px rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .modal-content {
    background: var(--surface-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .tools-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .project-filters {
        justify-content: center;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
    
    .project-card.featured {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 9rem 0 4rem;
        margin-top: 1rem;
    }
    
    .page-title {
        font-size: 2.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .page-stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .project-filters {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        min-width: 200px;
        justify-content: center;
    }
    
    .project-metrics {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .modal-content {
        margin: 1rem;
        max-height: 95vh;
    }
    
    .modal-links {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 10rem 0 3rem;
        margin-top: 1.5rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .project-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .project-rating {
        margin-left: 0;
    }
    
    .overlay-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .overlay-btn {
        width: 2.5rem;
        height: 2.5rem;
    }
}