/* Work Page Styles */
#contact-hero.page-hero {
    background: var(--dark-bg);
    color: white;
    padding: 160px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
}

#contact-hero.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 100%);
    z-index: 1;
}

#contact-hero.page-hero .container {
    position: relative;
    z-index: 2;
}

#contact-hero.page-hero .page-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

#contact-hero.page-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none; /* Ensure no shadow dulls the gradient */
    line-height: 1.2; /* Explicitly match base heading line-height */
    animation: fadeInUp 0.8s ease-out;
}

#contact-hero.page-hero p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    animation: fadeInUp 0.8s ease-out 0.2s;
    animation-fill-mode: both;
}

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

.section-header h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-weight: 600;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Services Section */
.services-section {
    padding: 5rem 0;
    background: #f8fafc;
}

/* Tech Section */
.tech-section {
    padding: 5rem 0;
    background: var(--white);
}

/* Grid Layout */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Work Item */
.work-item {
    background: white;
    border-radius: 1rem;
    overflow: hidden; /* Re-enable overflow hidden */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    /* height: 100%; */ /* Let content or min-height define height */
    display: flex;
    flex-direction: column;
    min-height: 320px !important; /* Ensure cards have a minimum height */
    opacity: 1 !important;        /* Ensure cards are not transparent */
    visibility: visible !important; /* Ensure cards are visible */
    /* border: 3px solid red !important; */ /* REMOVE DEBUG BORDER */
}

.work-item:hover {
    /* transform: scale(1.02) translateY(0); */ /* Removed transform to prevent any positional shift */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15); /* Refined shadow for a lift effect */
}
.work-item-image-container {
    position: relative; /* For potential absolute positioning of badges */
    width: 100%;    
    min-height: 1px; /* Ensure it doesn't collapse if image fails - good to keep */
    /* border: 3px dotted blue !important; */ /* REMOVE DEBUG */
    /* background-color: rgba(173, 216, 230, 0.5) !important; */ /* REMOVE DEBUG */
}

.work-item-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block; /* Remove extra space below image if it's inline */
}

.work-item-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Helps push button to bottom if content is short */
    min-height: 50px; /* Ensure content area has some minimum height - good to keep */
    /* border: 3px dotted darkorange !important; */ /* REMOVE DEBUG */
    /* background-color: rgba(255, 228, 181, 0.5) !important; */ /* REMOVE DEBUG */
}

.work-item-title {
    font-size: 1.25rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-dark, #333); /* Ensure text color is set */
}

.work-item-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary-color);
    color: white;
    border-radius: 1rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    color: white; /* Ensure text color is set for category */
    align-self: flex-start; /* Ensure it doesn't stretch if container is flex */
}

.work-item-description {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem; /* Add some space before a button if description is present */
}

.portfolio-featured-badge {
    position: absolute;
    top: 0.75rem; /* Adjusted for a tighter position */
    left: 0.75rem; /* Adjusted for a tighter position */
    background-color: var(--primary-color);
    color: white;
    width: 1.75rem; /* Set width for the badge */
    height: 1.75rem; /* Set height for the badge */
    border-radius: 50%; /* Make it circular */
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center; /* Center the star icon */
}

.view-project-btn {
    display: inline-block;
    margin-top: auto; /* Pushes to the bottom of flex container .work-item-content */
    padding: 0.6rem 1.2rem;
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 2rem; /* Match filter buttons */
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center; /* Center text if it wraps */
    cursor: pointer;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary-color);
    border-radius: 2rem;
    background: transparent;
    color: var(--primary-color);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-light);
}

.loading-spinner i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* No Items Message */
.no-items {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.no-items i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.no-items h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

/* Error Message */
.error-message {
    text-align: center;
    padding: 3rem;
    color: #dc3545;
}

.error-message i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.error-message h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Work Modal */
.work-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 2rem;
}

.work-modal.active {
    display: flex;
}

.modal-content {
    position: relative;
    background: white;
    width: 90%;
    max-width: 1000px;
    margin: 2rem auto;
    border-radius: 1rem;
    overflow: hidden;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    z-index: 1;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: rotate(90deg);
}

.work-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.work-image {
    height: 100%;
    min-height: 400px;
}

.work-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.work-info {
    padding: 2rem;
}

.work-info h2 {
    font-size: 1.75rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.work-info .category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary-color);
    color: white;
    border-radius: 1rem;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.work-info p {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1rem;
}

/* Contact Section */
.contact-section {
    padding: 5rem 0;
    background: var(--white);
    text-align: center;
}

.contact-section .section-header h2 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.contact-section .section-header p {
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.contact-cta {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.contact-cta .btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-cta .btn-primary {
    background: var(--primary-color);
    color: var(--white);
    border: 2px solid var(--primary-color);
}

.contact-cta .btn-primary:hover {
    background: transparent;
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--hover-shadow);
}

.contact-cta .btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.contact-cta .btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--hover-shadow);
}

/* Responsive Design */
@media (max-width: 768px) {
    .work-page .page-hero {
        padding: 80px 0;
    }

    .work-page .page-hero h1 {
        font-size: 2.5rem;
    }

    .work-page .page-hero p {
        font-size: 1.1rem;
    }

    .work-page .section-header h2 {
        font-size: 2rem;
    }

    .filter-buttons {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    .work-details {
        grid-template-columns: 1fr;
    }

    .work-image {
        min-height: 300px;
    }

    .work-info {
        padding: 1.5rem;
    }

    .modal-content {
        width: 95%;
        margin: 1rem auto;
    }

    .contact-cta {
        flex-direction: column;
        align-items: center;
    }

    .contact-cta .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .work-page .page-hero {
        padding: 60px 0;
    }

    .work-page .page-hero h1 {
        font-size: 2rem;
    }

    .work-page .section-header h2 {
        font-size: 1.75rem;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .work-item-image {
        height: 200px;
    }
} 
