/* Portfolio Page Styles */

.portfolio-hero {
    padding: 160px 20px 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 500px;
}

.hero-collage {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(15, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 5px;
    padding: 10px;
    transform: rotate(-2deg) scale(1.1);
}

.hero-collage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    filter: brightness(0.6);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.portfolio-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: white;
    font-weight: 800;
}

.portfolio-hero p {
    font-size: 1.35rem;
    color: rgba(255, 255, 255, 0.95);
    max-width: 700px;
    margin: 0 auto 30px;
    font-weight: 300;
}

.portfolio-note {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: 50px;
    color: white;
    font-size: 0.9rem;
    max-width: 700px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.portfolio-note svg {
    flex-shrink: 0;
}

.portfolio-stats {
    padding: 60px 0;
    background: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.stat-box {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px;
    border: 1px solid rgba(0,113,227,0.1);
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,113,227,0.15);
    border-color: rgba(0,113,227,0.3);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #0071E3 0%, #005BB5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 0.95rem;
    color: #6B7280;
    font-weight: 500;
}

.portfolio-filter-section {
    padding: 40px 0 20px;
    background: white;
    position: sticky;
    top: 80px;
    z-index: 100;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.filter-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 28px;
    background: white;
    border: 2px solid #e5e7eb;
    color: #6B7280;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.filter-btn:hover {
    border-color: #0071E3;
    color: #0071E3;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #0071E3 0%, #005BB5 100%);
    border-color: #0071E3;
    color: white;
    box-shadow: 0 4px 15px rgba(0,113,227,0.3);
}

.portfolio-section {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.portfolio-section.hidden {
    display: none;
}

.portfolio-section {
    max-width: 1200px;
    margin: 100px auto;
    padding: 0 20px;
}

.portfolio-section h2 {
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #0A0A0A;
    font-weight: 700;
    position: relative;
    padding-bottom: 20px;
}

.portfolio-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #0071E3, #005BB5);
    border-radius: 2px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.portfolio-card,
.portfolio-item {
    border-radius: 16px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.portfolio-item {
    cursor: default;
}

.portfolio-item.expanded {
    grid-column: 1 / -1;
    box-shadow: 0 8px 30px rgba(0,113,227,0.15);
}

.portfolio-preview {
    width: 100%;
    height: 350px;
    overflow: hidden;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    position: relative;
    cursor: pointer;
}

.portfolio-preview::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.05) 100%);
    pointer-events: none;
}

.preview-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

.portfolio-preview:hover .preview-arrow {
    opacity: 1;
}

.preview-arrow:hover {
    background: rgba(0,113,227,0.9);
    transform: translateY(-50%) scale(1.1);
}

.preview-arrow-prev {
    left: 10px;
}

.preview-arrow-next {
    right: 10px;
}

.portfolio-card .portfolio-preview::before {
    content: 'View Screenshots';
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0,0,0,0.75);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    z-index: 2;
    pointer-events: none;
}

.portfolio-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-card:hover .portfolio-preview img {
    transform: scale(1.08);
}

.portfolio-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.portfolio-info h3,
.portfolio-item h3 {
    margin: 0;
    font-size: 1.35rem;
    color: #0A0A0A;
    font-weight: 700;
}

.portfolio-item h3 {
    padding: 24px 24px 12px;
}

.view-site-btn {
    display: inline-block;
    padding: 14px 28px;
    background: linear-gradient(135deg, #0071E3 0%, #005BB5 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,113,227,0.3);
}

.view-site-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,113,227,0.4);
}

.expand-btn {
    margin: 0 24px 24px;
    padding: 12px 24px;
    background: white;
    border: 2px solid #0071E3;
    color: #0071E3;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,113,227,0.1);
}

.expand-btn:hover {
    background: #0071E3;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,113,227,0.3);
}

.expand-btn.active {
    background: linear-gradient(135deg, #0071E3 0%, #005BB5 100%);
    color: white;
    border-color: #005BB5;
}

.portfolio-gallery {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 0 24px 24px;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.portfolio-gallery.active {
    display: grid;
}

.portfolio-gallery > div {
    position: relative;
}

.portfolio-gallery img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.portfolio-gallery > div::before {
    content: '🖼️';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.portfolio-gallery > div::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,113,227,0.8);
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.portfolio-gallery > div:hover::before,
.portfolio-gallery > div:hover::after {
    opacity: 1;
}

.portfolio-gallery > div:hover img {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.portfolio-cta-section {
    padding: 100px 20px;
    background: linear-gradient(135deg, #0071E3 0%, #005BB5 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.portfolio-cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    font-size: 3rem;
    color: white;
    margin-bottom: 20px;
    font-weight: 800;
}

.cta-content p {
    font-size: 1.35rem;
    color: rgba(255,255,255,0.95);
    margin-bottom: 40px;
    font-weight: 300;
}

.whatsapp-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 36px;
    background: #25D366;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.15rem;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.whatsapp-cta-btn:hover {
    background: #20BA5A;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.5);
}

/* Modal Styles */
.portfolio-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    overflow-y: auto;
    padding: 20px;
}

.modal-content {
    position: relative;
    margin: 60px auto;
    padding: 40px;
    max-width: 1200px;
    background: white;
    border-radius: 12px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    font-weight: bold;
    color: #6B7280;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #0A0A0A;
}

#modalTitle {
    margin: 0 0 30px 0;
    font-size: 2rem;
    color: #0A0A0A;
    font-weight: 700;
}

.carousel-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.carousel-image {
    width: 100%;
    aspect-ratio: 16/10;
    background: #F3F4F6;
    border-radius: 8px;
    overflow: hidden;
}

.carousel-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 10;
}

.carousel-btn:hover {
    background: rgba(0,0,0,0.9);
}

.prev-btn {
    left: -60px;
}

.next-btn {
    right: -60px;
}

.carousel-counter {
    text-align: center;
    margin: 20px 0;
    font-size: 1rem;
    color: #6B7280;
}

.carousel-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
    justify-content: center;
}

.carousel-thumbnails img {
    width: 80px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    border: 2px solid transparent;
}

.carousel-thumbnails img:hover,
.carousel-thumbnails img.active {
    opacity: 1;
    border-color: #0071E3;
}

/* Responsive */
@media (max-width: 768px) {
    .portfolio-hero {
        padding: 140px 20px 80px;
    }
    
    .portfolio-hero h1 {
        font-size: 2.25rem;
    }
    
    .portfolio-hero p {
        font-size: 1.1rem;
    }
    
    .portfolio-note {
        font-size: 0.8rem;
        padding: 10px 20px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
    }
    
    .portfolio-filter-section {
        top: 60px;
        padding: 20px 0 15px;
    }
    
    .filter-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    
    .portfolio-section {
        margin: 60px auto;
    }
    
    .portfolio-section h2 {
        font-size: 2rem;
    }
    
    .category-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 15px;
    }
    
    .category-logo {
        width: 60px;
        height: 60px;
    }
    
    .category-info h2 {
        font-size: 1.5rem;
    }
    
    .category-info p {
        font-size: 0.9rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
    
    .cta-content p {
        font-size: 1.1rem;
    }
    
    .whatsapp-cta-btn {
        padding: 16px 28px;
        font-size: 1rem;
    }
    
    .modal-content {
        margin: 20px auto;
        padding: 30px 20px;
    }
    
    .modal-close {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }
    
    #modalTitle {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .prev-btn {
        left: 10px;
    }
    
    .next-btn {
        right: 10px;
    }
    
    .carousel-thumbnails img {
        width: 60px;
        height: 40px;
    }
}
