/* Projects Container */
.projects-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.projects-container *,
.projects-container *::before,
.projects-container *::after {
    box-sizing: border-box;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    gap: 30px;
}

.projects-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.projects-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.projects-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Project Card */
.project-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Project Thumbnail */
.project-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.project-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-card:hover .project-thumbnail img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(41, 151, 170, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.view-project-btn {
    padding: 12px 28px;
    background: #ffffff;
    color: #2997AA !important;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none !important;
    transition: all 0.3s ease;
}

.view-project-btn:hover {
    background: #0f172a;
    color: #ffffff !important;
}

/* Project Content */
.project-content {
    padding: 24px;
}

.project-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
}

.project-client {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0 0 12px 0;
}

/* Project Status */
.project-status {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
}

.status-completed {
    background: #dcfce7;
    color: #166534;
}

.status-in_progress {
    background: #fef3c7;
    color: #92400e;
}

.status-pending {
    background: #fee2e2;
    color: #991b1b;
}

/* Show Projects Button */
.projects-button-wrapper {
    text-align: center;
    padding: 20px;
}

.show-projects-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 36px;
    background: linear-gradient(135deg, #2997AA, #227d8a);
    color: #ffffff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(41, 151, 170, 0.3);
}

.show-projects-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(41, 151, 170, 0.4);
}

.show-projects-btn svg {
    transition: transform 0.3s ease;
}

.show-projects-btn:hover svg {
    transform: translateX(5px);
}

/* Popup Overlay */
.projects-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.projects-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Popup */
.projects-popup {
    background: #f8fafc;
    border-radius: 20px;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    padding: 40px;
}

.projects-popup-overlay.active .projects-popup {
    transform: scale(1);
}

.close-popup-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    font-size: 28px;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

.close-popup-btn:hover {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.popup-title {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
    margin: 0 0 30px 0;
}

/* No Projects */
.no-projects {
    text-align: center;
    color: #64748b;
    font-size: 1.1rem;
    padding: 60px 20px;
}

/* Responsive */
@media (max-width: 1024px) {
    .projects-grid.columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {

    .projects-grid.columns-3,
    .projects-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects-popup {
        padding: 30px 20px;
    }

    .popup-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {

    .projects-grid.columns-2,
    .projects-grid.columns-3,
    .projects-grid.columns-4 {
        grid-template-columns: 1fr;
    }

    .show-projects-btn {
        width: 100%;
        justify-content: center;
    }

    .project-content {
        padding: 20px;
    }
}

/* ============================================
   CATEGORY CARDS STYLES
   ============================================ */

.categories-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.categories-container *,
.categories-container *::before,
.categories-container *::after {
    box-sizing: border-box;
}

.categories-grid {
    display: grid;
    gap: 30px;
}

.categories-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.categories-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.categories-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Category Card */
.category-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 36px 32px;
    border: 1px solid #e2e8f0;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2997AA, #227d8a);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(41, 151, 170, 0.15);
    border-color: #2997AA;
}

.category-card:hover::before {
    transform: scaleX(1);
}

/* Category Icon */
.category-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #2997AA, #227d8a);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    transition: all 0.3s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 30px rgba(41, 151, 170, 0.4);
}

.category-icon svg {
    width: 32px;
    height: 32px;
    stroke: #ffffff;
}

/* Category Content */
.category-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 12px 0;
}

.category-description {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 16px 0;
}

.category-count {
    display: inline-block;
    padding: 6px 16px;
    background: #e6f7f9;
    color: #2997AA;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 20px;
}

.category-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: #2997AA;
    color: #ffffff !important;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none !important;
    transition: all 0.3s ease;
}

.category-link:hover {
    background: #227d8a;
    transform: translateY(-2px);
    color: #ffffff !important;
}

.category-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.category-link:hover svg {
    transform: translateX(4px);
}

/* Category Header */
.category-projects-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.category-header {
    text-align: center;
    margin-bottom: 50px;
}

.category-main-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 16px 0;
}

.category-main-description {
    font-size: 1.1rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ============================================
   MINI PROJECT CARDS STYLES (For Services Pages)
   ============================================ */

.mini-projects-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.mini-projects-container *,
.mini-projects-container *::before,
.mini-projects-container *::after {
    box-sizing: border-box;
}

.mini-project-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.mini-project-card:last-child {
    margin-bottom: 0;
}

.mini-project-card:hover {
    transform: translateX(8px);
    box-shadow: 0 10px 30px rgba(41, 151, 170, 0.1);
    border-color: #2997AA;
}

/* Mini Project Image */
.mini-project-image {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.mini-project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mini Project Info */
.mini-project-info {
    flex: 1;
    min-width: 0;
}

.mini-project-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-project-client {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0 0 8px 0;
}

.mini-project-status {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
}

/* Mini Project Link */
.mini-project-link {
    width: 48px;
    height: 48px;
    background: #e6f7f9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-decoration: none !important;
    transition: all 0.3s ease;
}

.mini-project-link svg {
    width: 20px;
    height: 20px;
    stroke: #2997AA;
    transition: all 0.3s ease;
}

.mini-project-link:hover {
    background: #2997AA;
}

.mini-project-link:hover svg {
    stroke: #ffffff;
    transform: translateX(3px);
}

/* ============================================
   RESPONSIVE STYLES FOR NEW COMPONENTS
   ============================================ */

@media (max-width: 1024px) {
    .categories-grid.columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {

    .categories-grid.columns-3,
    .categories-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-card {
        padding: 28px 24px;
    }

    .category-main-title {
        font-size: 2rem;
    }

    .mini-project-card {
        padding: 16px;
        gap: 16px;
    }

    .mini-project-image {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 480px) {

    .categories-grid.columns-2,
    .categories-grid.columns-3,
    .categories-grid.columns-4 {
        grid-template-columns: 1fr;
    }

    .category-icon {
        width: 60px;
        height: 60px;
    }

    .category-icon svg {
        width: 26px;
        height: 26px;
    }

    .mini-project-card {
        flex-wrap: wrap;
    }

    .mini-project-info {
        flex: 1 1 calc(100% - 100px);
    }

    .mini-project-link {
        width: 40px;
        height: 40px;
    }
}