/* ==========================================================================
   Group Projects Page Styles
   ========================================================================== */

/* ==========================================================================
   Logo Image Styling
   ========================================================================== */
.logo-image {
    max-width: 80px; /* Make logo smaller */
    height: auto;
    object-fit: contain;
    transition: var(--transition-all);
}

.logo-image:hover {
    transform: scale(1.05);
}

/* Responsive logo sizing */
@media (max-width: 768px) {
    .logo-image {
        max-width: 100px; /* Smaller on tablets */
    }
}

@media (max-width: 480px) {
    .logo-image {
        max-width: 80px; /* Even smaller on mobile */
    }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.group-projects-hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(63, 83, 72, 0.2), rgba(243, 153, 43, 0.1)), url('../../images/IMG_7013.JPG');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--color-white);
    padding-top: 80px; /* Account for fixed header */
}

/* Responsive padding for mobile */
@media (max-width: 768px) {
    .group-projects-hero {
        padding-top: 70px; /* Slightly less on mobile */
        min-height: 60vh;
    }
}

@media (max-width: 480px) {
    .group-projects-hero {
        padding-top: 60px; /* Even less on small mobile */
        min-height: 50vh;
    }
}

.group-projects-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(63, 83, 72, 0.85), rgba(243, 153, 43, 0.75));
    z-index: 1;
}

.group-projects-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.group-projects-hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.group-projects-hero .highlight {
    color: var(--color-white);
    position: relative;
    display: inline-block;
}

.group-projects-hero .highlight::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--color-accent);
    border-radius: 2px;
    animation: highlightGrow 1s ease-out 0.5s both;
}

.hero-description {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 3rem;
    opacity: 0.95;
    font-family: var(--font-body);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem 2rem;
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-accent);
    display: block;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.stat-label {
    font-size: 1rem;
    color: var(--color-white);
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    font-family: var(--font-body);
}

/* ==========================================================================
   Filter Section - SEARCH BAR REMOVED
   ========================================================================== */
.projects-filters {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border-light);
    padding: 1.5rem 0;
    position: static;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
}

.filter-controls {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.filter-controls h3 {
    font-size: 1.2rem;
    font-weight: 600;
    /* margin-bottom: 1.5rem; */
    color: var(--color-text-heading);
    font-family: var(--font-heading);
    text-align: center;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0; /* Removed margin since search box is gone */
}

.filter-btn {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-light);
    color: var(--color-text-body);
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius-md);
    font-family: var(--font-body);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-all);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
}

.filter-btn:hover {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(243, 153, 43, 0.3);
}

.filter-btn.active {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(243, 153, 43, 0.3);
}

.filter-btn i {
    font-size: 0.9rem;
}

/* Search Box - REMOVED ALL SEARCH RELATED STYLES */

/* ==========================================================================
   Loading States
   ========================================================================== */
.projects-loading,
.projects-error,
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--color-medium-gray);
}

.projects-loading h3,
.projects-error h3,
.no-results h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem 0;
    color: var(--color-text-heading);
    font-family: var(--font-heading);
}

.projects-loading p,
.projects-error p,
.no-results p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--color-text-body);
    font-family: var(--font-body);
}

.projects-error i,
.no-results i {
    font-size: 4rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    display: block;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--color-light-gray);
    border-top: 5px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem auto;
}

/* ==========================================================================
   Projects Grid
   ========================================================================== */
.group-projects-main {
    padding: 3rem 0;
    background: var(--color-bg-primary);
    min-height: 50vh;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* ==========================================================================
   Project Cards
   ========================================================================== */
.project-card {
    background: var(--color-white);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: var(--transition-all);
    cursor: pointer;
    border: 1px solid var(--color-border-light);
    animation: fadeInUp 0.6s ease forwards;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.project-card-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

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

.project-card:hover .project-card-image img {
    transform: scale(1.1);
}

.project-card-placeholder {
    width: 100%;
    height: 100%;
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-size: 3rem;
}

.project-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(63, 83, 72, 0.8), rgba(243, 153, 43, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.project-card-overlay i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.project-card-content {
    padding: 2rem;
}

.project-card-header {
    margin-bottom: 1.5rem;
}

.project-card-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-text-heading);
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
    line-height: 1.3;
}

.project-card-program {
    display: inline-block;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: var(--font-body);
}

.project-card-description {
    color: var(--color-text-body);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-family: var(--font-body);
}

.project-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border-light);
}

.project-card-team {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-medium-gray);
    font-size: 0.9rem;
    font-family: var(--font-body);
}

.project-card-date {
    color: var(--color-medium-gray);
    font-size: 0.9rem;
    font-family: var(--font-body);
}

.project-card-technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: var(--color-bg-secondary);
    color: var(--color-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    font-family: var(--font-body);
    border: 1px solid var(--color-border-light);
}

/* ==========================================================================
   Load More
   ========================================================================== */
.load-more-container {
    text-align: center;
    margin-top: 3rem;
}

.load-more-btn {
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--border-radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-all);
    font-family: var(--font-body);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.load-more-btn:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243, 153, 43, 0.3);
}

/* ==========================================================================
   Project Modal
   ========================================================================== */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 2rem;
}

.project-modal.active {
    opacity: 1;
    visibility: visible;
}

.project-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg-overlay);
    cursor: pointer;
}

.project-modal-content {
    position: relative;
    background: var(--color-white);
    border-radius: var(--border-radius-xl);
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-2xl);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.project-modal.active .project-modal-content {
    transform: scale(1);
}

.project-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: var(--color-white);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: var(--border-radius-full);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.project-modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.project-modal-header {
    padding: 2rem 2rem 1rem 2rem;
    border-bottom: 1px solid var(--color-border-light);
}

.project-modal-header h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--color-text-heading);
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.project-modal-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.project-program {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: var(--font-body);
}

.project-date {
    color: var(--color-medium-gray);
    font-size: 0.9rem;
    font-family: var(--font-body);
}

.project-modal-body {
    padding: 2rem;
}

.project-modal-gallery {
    margin-bottom: 2rem;
}

.project-modal-info {
    display: grid;
    gap: 2rem;
}

.project-modal-info h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-text-heading);
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.project-description {
    color: var(--color-text-body);
    line-height: 1.7;
    font-family: var(--font-body);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tech-tags .tech-tag {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: var(--font-body);
    border: none;
}

.team-members {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.team-member {
    background: var(--color-bg-secondary);
    padding: 1rem;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--color-border-light);
}

.team-member-name {
    font-weight: 600;
    color: var(--color-text-heading);
    margin-bottom: 0.25rem;
    font-family: var(--font-body);
}

.team-member-email {
    color: var(--color-medium-gray);
    font-size: 0.9rem;
    font-family: var(--font-body);
}

.team-leader {
    border-color: var(--color-primary);
    background: rgba(243, 153, 43, 0.1);
}

.team-leader .team-member-name::after {
    content: ' (Leader)';
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-link {
    background: #3f5348;
    color: var(--color-white);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-lg);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-all);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
}

.project-link:hover {
    background: #2d3b32;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(63, 83, 72, 0.3);
}

/* ==========================================================================
   Gallery Modal
   ========================================================================== */
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.gallery-modal.active {
    opacity: 1;
    visibility: visible;
}

.gallery-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.gallery-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.gallery-modal.active .gallery-modal-content {
    transform: scale(1);
}

.gallery-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    color: var(--color-white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.gallery-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: var(--color-white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.5rem;
}

.gallery-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.gallery-prev {
    left: -70px;
}

.gallery-next {
    right: -70px;
}

.gallery-image-container {
    position: relative;
    text-align: center;
}

#gallery-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-2xl);
}

.gallery-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: var(--color-white);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-family: var(--font-body);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
    .hero-stats {
        gap: 1.5rem;
        flex-wrap: wrap;
    }
    
    .stat-item {
        padding: 1rem 1.5rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .projects-filters {
        padding: 1rem 0;
    }
    
    .filter-controls h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .filter-buttons {
        gap: 0.5rem;
        margin-bottom: 0; /* No search box to account for */
    }
    
    .filter-btn {
        flex: 1;
        min-width: calc(50% - 0.25rem);
        justify-content: center;
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .project-modal {
        padding: 1rem;
    }
    
    .project-modal-header {
        padding: 1.5rem;
    }
    
    .project-modal-body {
        padding: 1.5rem;
    }
    
    .team-members {
        grid-template-columns: 1fr;
    }
    
    .project-links {
        flex-direction: column;
    }
    
    .gallery-nav {
        display: none;
    }
    
    .gallery-counter {
        position: static;
        transform: none;
        margin-top: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-item {
        padding: 1rem;
    }
    
    .filter-btn {
        min-width: 100%;
        font-size: 0.8rem;
    }
    
    .project-card-content {
        padding: 1.5rem;
    }
    
    .project-modal-header h2 {
        font-size: 1.5rem;
    }
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes highlightGrow {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

/* Staggered animations for project cards */
.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; }
.project-card:nth-child(5) { animation-delay: 0.5s; }
.project-card:nth-child(6) { animation-delay: 0.6s; }

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
    .project-modal,
    .gallery-modal,
    .projects-filters,
    .load-more-container {
        display: none;
    }
    
    .project-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--color-border);
    }
    
    .project-card:hover {
        transform: none;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}