/* ============================================================================
   PAGE HEADER
   ============================================================================ */

main {
    margin-top: 90px; /* Account for fixed header */
}

.page-header {
    background: linear-gradient(135deg, var(--white) 0%, var(--light-accent) 100%);
    padding: 8rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: rgba(109, 0, 26, 0.05);
    border-radius: 50%;
}

.page-header h1 {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.3rem;
    color: var(--secondary-dark);
    margin-bottom: 2.5rem;
}

.header-nav {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.header-nav-link {
    padding: 0.75rem 2rem;
    border: 2px solid var(--primary);
    border-radius: 50px;
    color: var(--primary);
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.header-nav-link:hover {
    background: var(--primary-light);
    color: white;
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.header-nav-link.active {
    background: var(--primary);
    color: white;
}

/* ============================================================================
   PORTFOLIO GRID SECTION
   ============================================================================ */

.portfolio-grid-section {
    padding: 5rem 0;
    background: white;
    min-height: 500px; /* Ensure section has height */
}

.portfolio-simple-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    width: 100%;
    margin: 0 auto;
}

/* Portfolio Cards */
.portfolio-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    min-height: 400px;
    opacity: 1; /* Ensure visible */
    visibility: visible; /* Ensure visible */
}

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

.portfolio-card-image {
    position: relative;
    height: 280px;
    overflow: hidden;
    background: var(--light);
}

.portfolio-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.portfolio-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(109, 0, 26, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.portfolio-card:hover .portfolio-card-overlay {
    opacity: 1;
}

.view-btn {
    background: white;
    color: var(--primary);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.view-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

.portfolio-card-content {
    padding: 2rem 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-tag {
    display: inline-block;
    background: rgba(112, 128, 144, 0.1);
    color: var(--secondary);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    width: fit-content;
}

.card-tag.webapp {
    background: rgba(109, 0, 26, 0.1);
    color: var(--primary);
}

.portfolio-card-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.portfolio-card-content p {
    font-size: 1rem;
    color: var(--secondary-dark);
    line-height: 1.6;
    margin-bottom: auto;
}

.card-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.card-tech span {
    background: rgba(109, 0, 26, 0.05);
    color: var(--secondary-dark);
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(109, 0, 26, 0.1);
}

/* ============================================================================
   CTA SECTION
   ============================================================================ */

.cta-simple-section {
    background: var(--light-accent);
    padding: 5rem 0;
}

.cta-simple {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-simple h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.cta-simple p {
    font-size: 1.2rem;
    color: var(--secondary-dark);
    margin-bottom: 2.5rem;
}

/* ============================================================================
   VIEW MORE BUTTON (for homepage)
   ============================================================================ */

.view-more-container {
    text-align: center;
    margin-top: 3rem;
}

.view-more-container.centered {
    margin: 4rem 0;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 992px) {
    .portfolio-simple-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .page-header h1 {
        font-size: 2.8rem;
    }
    
    .page-header p {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .portfolio-simple-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .page-header {
        padding: 6rem 0 3rem;
    }
    
    .page-header h1 {
        font-size: 2.2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .header-nav {
        flex-direction: column;
        align-items: center;
    }
    
    .header-nav-link {
        width: 80%;
        text-align: center;
    }
    
    .portfolio-card-image {
        height: 240px;
    }
    
    .cta-simple h2 {
        font-size: 2rem;
    }
    
    .cta-simple p {
        font-size: 1.05rem;
    }
}

@media (max-width: 576px) {
    .page-header {
        padding: 5rem 0 2.5rem;
    }
    
    .page-header h1 {
        font-size: 1.9rem;
    }
    
    .portfolio-card-image {
        height: 200px;
    }
    
    .portfolio-card-content {
        padding: 1.5rem 1.2rem;
    }
    
    .portfolio-card-content h3 {
        font-size: 1.2rem;
    }
    
    .portfolio-card-content p {
        font-size: 0.95rem;
    }
    
    .card-tech {
        gap: 0.4rem;
    }
    
    .card-tech span {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
}

/* ============================================================================
   SMOOTH SCROLL
   ============================================================================ */

html {
    scroll-behavior: smooth;
}
