/* Variables del portafolio */
:root {
    --primary-color: #111111;
    --secondary-color: #333333;
    --accent-color: #666666;
    --text-dark: #111111;
    --text-light: #666666;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 4px 15px rgba(0,0,0,0.08);
    --shadow-hover: 0 15px 40px rgba(0,0,0,0.15);
}

.portfolio-section {
    padding: 80px 0;
    background: #ffffff;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.portfolio-filter {
    margin-bottom: 40px;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-light);
    padding: 10px 20px;
    margin: 0 5px;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.project-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s ease;
    position: relative;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.project-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-icons {
    display: flex;
    gap: 15px;
}

.project-icons a {
    width: 50px;
    height: 50px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.project-icons a:hover {
    background: var(--secondary-color);
    color: var(--white);
    transform: scale(1.1);
}

.project-content {
    padding: 25px;
}

.project-category {
    display: inline-block;
    background: var(--bg-light);
    color: var(--primary-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 15px;
}

.project-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.project-card:hover .project-title {
    color: var(--primary-color);
}

.project-description {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--accent-color);
}

.project-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Modal Styles */
.modal-content {
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.modal-header {
    background: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
}

.modal-title {
    color: #2d3748;
    font-weight: 600;
}

.close {
    color: #718096;
    opacity: 1;
    font-size: 2rem;
    font-weight: normal;
}

.close:hover {
    color: #2d3748;
}

.project-detail-images img {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.project-detail-info .badge {
    font-size: 0.9rem;
    padding: 8px 15px;
}

.project-metrics {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
}

.project-metrics .col-6 {
    font-size: 0.9rem;
}

.project-full-description h5 {
    color: #2d3748;
    font-weight: 600;
    margin: 25px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.project-full-description ul {
    padding-left: 20px;
}

.project-full-description li {
    margin-bottom: 8px;
    color: #4a5568;
}

/* CTA Section */
.cta-section {
    background: var(--primary-color);
    color: var(--white);
    padding: 100px 0;
    text-align: center;
    margin-top: 80px;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.cta-content .lead {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cta-buttons .btn {
    padding: 15px 35px;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-outline-light {
    border-width: 2px;
}

.btn-outline-light:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

/* Responsive Design */
@media (max-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .portfolio-section {
        padding: 60px 0;
    }
    
    .filter-btn {
        padding: 8px 15px;
        margin: 3px;
        font-size: 0.9rem;
    }
    
    .project-image {
        height: 200px;
    }
    
    .project-content {
        padding: 20px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 80%;
        max-width: 300px;
    }
}

@media (max-width: 576px) {
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .project-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .project-icons {
        gap: 10px;
    }
    
    .project-icons a {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .cta-content h2 {
        font-size: 1.8rem;
    }
    
    .cta-content .lead {
        font-size: 1rem;
    }
}

/* Animation Classes */
.project-card {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading States */
.loading-placeholder {
    background: linear-gradient(90deg, var(--bg-light) 25%, var(--border-color) 50%, var(--bg-light) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Accessibility Improvements */
.project-card:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.filter-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .project-overlay,
    .project-icons,
    .cta-section {
        display: none;
    }
    
    .project-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Force lightbox image to be large */
.lightbox .lb-image {
  height: 100% !important;
  width: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
}
