/* ========================================
   Projects / Portfolio Page
   ======================================== */

/* Hero */
.prj-hero {
    position: relative;
    background: linear-gradient(135deg, #4a8ac4 0%, #5b9bd5 40%, #7db8e8 100%);
    padding: 150px 0 90px;
    overflow: hidden;
    color: #ffffff;
    text-align: center;
}

.prj-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(91, 155, 213, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 30%, rgba(0, 217, 255, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 60% 80%, rgba(91, 155, 213, 0.08) 0%, transparent 40%);
    pointer-events: none;
}

/* Geometric grid pattern */
.prj-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.prj-hero .container {
    position: relative;
    z-index: 2;
}

.prj-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
    backdrop-filter: blur(4px);
}

.prj-hero h1 {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
}

.prj-hero p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.75);
    max-width: 550px;
    margin: 0 auto 32px;
}

/* Hero stats row */
.prj-hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 8px;
}

.prj-hero-stat {
    text-align: center;
}

.prj-hero-stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
}

.prj-hero-stat-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   Content Layout (Main + Sidebar)
   ======================================== */

.prj-grid-section {
    padding: 40px 0 80px;
    background: #f8f9fa;
}

.prj-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 36px;
    align-items: start;
}

/* Toolbar */
.prj-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.prj-search {
    position: relative;
    flex: 1;
    max-width: 360px;
}

.prj-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.9rem;
}

.prj-search input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.9rem;
    background: #ffffff;
    color: #1e293b;
    outline: none;
    transition: border-color 0.2s;
}

.prj-search input:focus {
    border-color: #5b9bd5;
    box-shadow: 0 0 0 3px rgba(91, 155, 213, 0.1);
}

.prj-results-count {
    font-size: 0.82rem;
    color: #94a3b8;
    white-space: nowrap;
}

/* Project Grid - 2 columns in main area */
.prj-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* Project Card */
.prj-card {
    background: #ffffff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    border: 1px solid #eef2f7;
}

.prj-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(91, 155, 213, 0.12);
    border-color: rgba(91, 155, 213, 0.2);
}

.prj-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #e8f0fe, #d5e4f4);
}

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

.prj-card:hover .prj-card-image img {
    transform: scale(1.05);
}

.prj-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #5b9bd5, #4a8ac4);
    color: #ffffff;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.prj-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.prj-card-category-label {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #5b9bd5;
    margin-bottom: 6px;
}

.prj-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #3a7cbd;
    margin-bottom: 6px;
    line-height: 1.35;
}

.prj-card-client {
    font-size: 0.8rem;
    color: #6c7a8a;
    font-weight: 500;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.prj-card-client i {
    font-size: 0.75rem;
    color: #5b9bd5;
}

.prj-card-excerpt {
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.6;
    flex: 1;
    margin-bottom: 14px;
}

.prj-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid #f0f3f7;
    margin-top: auto;
}

.prj-card-techs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.prj-tech-tag {
    padding: 2px 8px;
    background: #f0f4f8;
    color: #495057;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 500;
}

.prj-card-view {
    font-size: 0.78rem;
    font-weight: 600;
    color: #5b9bd5;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s ease;
}

.prj-card:hover .prj-card-view {
    gap: 8px;
}

/* ========================================
   Sidebar
   ======================================== */

.prj-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 100px;
}

.prj-sidebar-card {
    background: #ffffff;
    border-radius: 4px;
    padding: 24px;
    border: 1px solid #eef2f7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.prj-sidebar-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #3a7cbd;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f4f8;
}

.prj-sidebar-title i {
    color: #5b9bd5;
    font-size: 1rem;
}

/* Technology pills */
.prj-sidebar-techs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.prj-sidebar-tech-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
}

.prj-sidebar-tech-pill:hover {
    border-color: #5b9bd5;
    color: #5b9bd5;
    background: rgba(91, 155, 213, 0.05);
}

.prj-sidebar-tech-pill.active {
    background: #5b9bd5;
    border-color: #5b9bd5;
    color: #ffffff;
}

.prj-sidebar-tech-pill.active .prj-sidebar-tech-count {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.prj-sidebar-tech-count {
    background: #e9ecef;
    color: #6c757d;
    font-size: 0.68rem;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 600;
}

/* Clients list */
.prj-sidebar-clients {
    list-style: none;
    padding: 0;
    margin: 0;
}

.prj-sidebar-clients li {
    margin-bottom: 2px;
}

.prj-sidebar-client-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.prj-sidebar-client-btn i {
    font-size: 0.7rem;
    color: #ced4da;
    transition: color 0.2s, transform 0.2s;
}

.prj-sidebar-client-btn:hover {
    background: #f8f9fa;
    color: #5b9bd5;
}

.prj-sidebar-client-btn:hover i {
    color: #5b9bd5;
    transform: translateX(2px);
}

.prj-sidebar-client-btn.active {
    background: rgba(91, 155, 213, 0.08);
    color: #5b9bd5;
    font-weight: 600;
}

.prj-sidebar-client-btn.active i {
    color: #5b9bd5;
}

/* Featured project */
.prj-sidebar-featured-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.prj-sidebar-featured-link:hover {
    opacity: 0.9;
}

.prj-sidebar-featured-img {
    width: 100%;
    height: 140px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.prj-sidebar-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.prj-sidebar-featured-link h5 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #3a7cbd;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.prj-sidebar-featured-client {
    font-size: 0.8rem;
    color: #5b9bd5;
    font-weight: 500;
}

/* CTA card */
.prj-sidebar-cta {
    background: linear-gradient(135deg, #4a8ac4 0%, #5b9bd5 100%);
    border: none;
    color: #ffffff;
    text-align: center;
}

.prj-sidebar-cta-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.25rem;
}

.prj-sidebar-cta h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.prj-sidebar-cta p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.prj-sidebar-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: #5b9bd5;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.prj-sidebar-cta-btn:hover {
    background: #4a8ac4;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(91, 155, 213, 0.3);
    color: #ffffff;
}

/* ========================================
   Pagination
   ======================================== */

.prj-pagination {
    display: flex;
    justify-content: center;
    padding-top: 40px;
}

.prj-pagination .page-link {
    color: #5b9bd5;
    border-color: #dee2e6;
    border-radius: 4px;
    margin: 0 2px;
    font-size: 0.9rem;
    padding: 8px 14px;
    transition: all 0.2s ease;
}

.prj-pagination .page-link:hover {
    background: rgba(91, 155, 213, 0.08);
    border-color: #5b9bd5;
    color: #4a8ac4;
}

.prj-pagination .page-link:focus {
    box-shadow: 0 0 0 3px rgba(91, 155, 213, 0.15);
}

.prj-pagination .page-item.active .page-link {
    background: #5b9bd5;
    border-color: #5b9bd5;
    color: #ffffff;
}

.prj-pagination .page-item.disabled .page-link {
    color: #adb5bd;
    border-color: #dee2e6;
}

/* Empty State */
.prj-empty {
    text-align: center;
    padding: 60px 20px;
}

.prj-empty i {
    font-size: 3rem;
    color: #dee2e6;
    display: block;
    margin-bottom: 12px;
}

.prj-empty h3 {
    font-size: 1.3rem;
    color: #495057;
    margin-bottom: 8px;
}

.prj-empty p {
    color: #6c757d;
    font-size: 0.95rem;
}

/* ========================================
   Single Project Detail Page
   ======================================== */

/* Detail Hero */
.prj-detail-hero {
    position: relative;
    background: linear-gradient(135deg, #4a8ac4 0%, #5b9bd5 40%, #7db8e8 100%);
    padding: 150px 0 80px;
    overflow: hidden;
    color: #ffffff;
}

.prj-detail-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 40%, rgba(91, 155, 213, 0.12) 0%, transparent 60%),
        radial-gradient(circle at 70% 60%, rgba(0, 217, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.prj-detail-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.prj-detail-hero .container {
    position: relative;
    z-index: 2;
}

.prj-detail-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 20px;
    transition: color 0.2s;
}

.prj-detail-back:hover {
    color: #ffffff;
}

.prj-detail-hero .prj-hero-tag {
    margin-bottom: 16px;
}

.prj-detail-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    max-width: 700px;
}

.prj-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 20px;
}

.prj-detail-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.prj-detail-meta-item i {
    color: rgba(255, 255, 255, 0.5);
}

.prj-detail-meta-item a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.prj-detail-meta-item a:hover {
    text-decoration: underline;
}

/* Detail Featured Image */
.prj-detail-image-section {
    background: #f8f9fa;
    padding: 0;
}

.prj-detail-featured-image {
    max-width: 960px;
    margin: -40px auto 0;
    position: relative;
    z-index: 3;
}

.prj-detail-featured-image img {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* Detail Content + Sidebar Layout */
.prj-detail-content {
    padding: 48px 0 80px;
    background: #f8f9fa;
}

.prj-detail-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 36px;
    align-items: start;
}

.prj-detail-main {
    min-width: 0;
}

.prj-detail-summary {
    font-size: 1.1rem;
    color: #495057;
    line-height: 1.7;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e9ecef;
    font-weight: 500;
}

/* Description content styles */
.prj-description {
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
}

.prj-description h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #3a7cbd;
    margin-top: 32px;
    margin-bottom: 14px;
}

.prj-description h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #3a7cbd;
    margin-top: 28px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f4f8;
}

.prj-description p {
    margin-bottom: 16px;
    color: #4a5568;
}

.prj-description img {
    max-width: 100%;
    border-radius: 4px;
    margin: 20px 0;
}

.prj-description ul,
.prj-description ol {
    margin-bottom: 20px;
    padding-left: 0;
    list-style: none;
}

.prj-description ul li {
    position: relative;
    padding: 6px 0 6px 24px;
    color: #4a5568;
    line-height: 1.7;
}

.prj-description ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: #5b9bd5;
}

.prj-description ol {
    counter-reset: item;
    padding-left: 0;
}

.prj-description ol li {
    counter-increment: item;
    position: relative;
    padding: 6px 0 6px 32px;
    color: #4a5568;
}

.prj-description ol li::before {
    content: counter(item);
    position: absolute;
    left: 0;
    top: 6px;
    width: 22px;
    height: 22px;
    background: #5b9bd5;
    color: #fff;
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prj-description blockquote {
    border-left: 4px solid #5b9bd5;
    padding: 16px 24px;
    background: rgba(91, 155, 213, 0.05);
    border-radius: 0 4px 4px 0;
    margin: 24px 0;
    font-style: italic;
    color: #555;
}

/* Detail Sidebar */
.prj-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 100px;
}

/* Project info list */
.prj-detail-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.prj-detail-info-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f4f8;
}

.prj-detail-info-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.prj-detail-info-label {
    font-size: 0.82rem;
    color: #6c757d;
    font-weight: 500;
}

.prj-detail-info-value {
    font-size: 0.85rem;
    color: #3a7cbd;
    font-weight: 600;
    text-align: right;
}

.prj-detail-info-link {
    font-size: 0.82rem;
    color: #5b9bd5;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.prj-detail-info-link:hover {
    color: #4a8ac4;
}

/* Detail tech tags */
.prj-detail-tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.prj-detail-tech-tag {
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(91, 155, 213, 0.08), rgba(0, 217, 255, 0.05));
    color: #3a7cbd;
    border-radius: 4px;
    font-size: 0.82rem;
    font-weight: 500;
    border: 1px solid rgba(91, 155, 213, 0.15);
}

/* Related Projects */
.prj-related {
    padding: 80px 0;
    background: #ffffff;
}

.prj-related h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #3a7cbd;
    text-align: center;
    margin-bottom: 40px;
}

.prj-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* CTA Section */
.prj-cta {
    padding: 80px 0;
    background: linear-gradient(135deg, #4a8ac4 0%, #5b9bd5 100%);
    text-align: center;
    color: #ffffff;
}

.prj-cta h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.prj-cta p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 28px;
}

.prj-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: #5b9bd5;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: none;
}

.prj-btn-primary:hover {
    background: #4a8ac4;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(91, 155, 213, 0.35);
    color: #ffffff;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1199px) {
    .prj-layout {
        grid-template-columns: 1fr 280px;
        gap: 28px;
    }
}

@media (max-width: 991px) {
    .prj-layout,
    .prj-detail-layout {
        grid-template-columns: 1fr;
    }

    .prj-sidebar,
    .prj-detail-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .prj-sidebar-cta {
        grid-column: 1 / -1;
    }

    .prj-grid,
    .prj-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .prj-hero h1,
    .prj-detail-hero h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 767px) {
    .prj-grid,
    .prj-related-grid {
        grid-template-columns: 1fr;
    }

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

    .prj-hero,
    .prj-detail-hero {
        padding: 130px 0 60px;
    }

    .prj-hero h1 {
        font-size: 1.8rem;
    }

    .prj-hero-stats {
        gap: 24px;
    }

    .prj-hero-stat-number {
        font-size: 1.35rem;
    }

    .prj-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .prj-search {
        max-width: 100%;
    }

    .prj-results-count {
        text-align: center;
    }

    .prj-detail-hero h1 {
        font-size: 1.75rem;
    }

    .prj-detail-meta {
        flex-direction: column;
        gap: 12px;
    }

    .prj-detail-sidebar {
        grid-template-columns: 1fr;
    }

    .prj-card-image {
        height: 180px;
    }
}
