.projects-section {
    min-height: 100vh;
    background: #ffffff;
    padding: 40px 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title-wrapper {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 48px;
    font-weight: 700;
    color: #085DC5;
    margin: 0;
    letter-spacing: -1px;
}

.search-wrapper {
    margin-bottom: 40px;
}

.search-bar {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 12px 16px;
    transition: all 0.3s ease;
}

.search-bar:focus-within {
    background: #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-icon {
    color: #64748b;
    font-size: 20px;
    margin-right: 12px;
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 15px;
    color: #1e293b;
    width: 100%;
}

.search-input::placeholder {
    color: #64748b;
}

.search-clear-btn {
    background: #cbd5e1;
    border: none;
    padding: 0;
    margin-left: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 0;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    opacity: 0.8;
    position: relative;
}

.search-clear-btn:hover {
    background: #94a3b8;
    color: #ffffff;
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.search-clear-btn:active {
    transform: scale(0.95);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.search-clear-btn i {
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.search-clear-btn:hover i {
    transform: rotate(90deg);
}

.projects-grid {
    margin-bottom: 60px;
}

/* Bootstrap grid override - ensure proper spacing */
#productsGrid.row {
    margin-bottom: 0;
}

.project-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.project-image {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 3:2 aspect ratio */
    overflow: hidden;
    background: #e2e8f0;
}

.project-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-description {
    font-size: 15px;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 20px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #085DC5;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: auto;
}

.project-link:hover {
    color: #064a9a;
    gap: 10px;
}

.project-link i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.project-link:hover i {
    transform: translateX(4px);
}

.projects-skeleton {
    margin-bottom: 60px;
}

.skeleton-grid {
    /* Using Bootstrap grid now */
}

.skeleton-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.skeleton-image {
    width: 100%;
    padding-top: 66.67%; /* 3:2 aspect ratio */
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

.skeleton-content {
    padding: 24px;
}

.skeleton-title-line {
    height: 20px;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    margin-bottom: 12px;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

.skeleton-title-line:first-child {
    width: 80%;
}

.skeleton-title-line:last-child {
    width: 60%;
}

.skeleton-description {
    height: 15px;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    margin-bottom: 8px;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

.skeleton-description:nth-child(1) {
    width: 100%;
}

.skeleton-description:nth-child(2) {
    width: 95%;
}

.skeleton-description:nth-child(3) {
    width: 85%;
}

.skeleton-link {
    width: 140px;
    height: 20px;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

.skeleton-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.skeleton-favorite {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.projects-empty {
    text-align: center;
    padding: 60px 0;
    color: #1e293b;
    font-size: 18px;
}

.projects-error {
    text-align: center;
    padding: 60px 0;
    width: 100%;
}

.error-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    padding: 60px 40px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.error-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ef4444 0%, #f87171 50%, #ef4444 100%);
    background-size: 200% 100%;
    animation: error-shimmer 2s ease-in-out infinite;
}

@keyframes error-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.error-icon {
    font-size: 72px;
    color: #ef4444;
    margin-bottom: 4px;
    animation: error-pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(239, 68, 68, 0.2));
}

@keyframes error-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.error-title {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    letter-spacing: -0.5px;
}

.error-message {
    font-size: 16px;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
    padding: 0 10px;
}

.retry-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #085DC5 0%, #064a9a 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 12px;
    box-shadow: 0 4px 14px rgba(8, 93, 197, 0.25);
    position: relative;
    overflow: hidden;
}

.retry-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.retry-button:hover::before {
    width: 300px;
    height: 300px;
}

.retry-button:hover {
    background: linear-gradient(135deg, #064a9a 0%, #053d7a 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(8, 93, 197, 0.35);
}

.retry-button:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 10px rgba(8, 93, 197, 0.3);
}

.retry-button i {
    font-size: 20px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.retry-button:hover i {
    transform: rotate(360deg);
}

.retry-button span {
    position: relative;
    z-index: 1;
}

.projects-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination-btn {
    padding: 10px 16px;
    background: #f1f5f9;
    color: #1e293b;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: #085DC5;
    color: #ffffff;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn.active {
    background: #085DC5;
    color: #ffffff;
}

.pagination-info {
    color: #1e293b;
    font-size: 14px;
    margin: 0 16px;
}

/* Responsive */
/* Tablet - 2 columns (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 24px;
    }

    .skeleton-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 24px;
    }

    .section-title {
        font-size: 40px;
    }
}

/* Mobile - 1 column (up to 768px) */
@media (max-width: 768px) {
    .projects-section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 32px;
    }

    .search-wrapper {
        margin-bottom: 32px;
    }

    .search-bar {
        max-width: 100%;
        padding: 10px 14px;
    }

    .search-icon {
        font-size: 18px;
        margin-right: 10px;
    }

    .search-input {
        font-size: 14px;
    }

    .projects-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .skeleton-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .project-content {
        padding: 20px;
    }

    .skeleton-content {
        padding: 20px;
    }

    .project-title {
        font-size: 18px;
    }

    .project-description {
        font-size: 14px;
    }

    .projects-error {
        padding: 40px 0;
    }

    .error-content {
        padding: 40px 20px;
        gap: 16px;
    }

    .error-icon {
        font-size: 56px;
    }

    .error-title {
        font-size: 22px;
    }

    .error-message {
        font-size: 14px;
        padding: 0;
    }

    .retry-button {
        padding: 12px 24px;
        font-size: 14px;
        gap: 8px;
    }

    .retry-button i {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 28px;
    }

    .project-content {
        padding: 16px;
    }
}

