/* Projects Page Styles */

/* Page Header */
.page-header {
    position: relative;
    padding-top: 120px;
    background-color: var(--light-gray);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.filter-btn {
    padding: 8px 16px;
    background-color: transparent;
    border: 1px solid #ddd;
    border-radius: 30px;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    z-index: -1;
    opacity: 0.1;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn:hover::before {
    width: 100%;
}

.filter-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.filter-btn.active::before {
    width: 100%;
    opacity: 0;
}

/* Animation for portfolio items */
.portfolio-item {
    animation: fadeIn 0.5s ease-in-out;
}

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

/* Project Cards */
.portfolio-item {
    height: 100%;
    transition: var(--transition);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.portfolio-img {
    height: 200px;
    background-size: cover !important;
    background-position: center !important;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.portfolio-img-link {
    display: block;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.portfolio-img-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(130, 189, 66, 0.8), rgba(107, 166, 53, 0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-img-link::after {
    content: '\f06e';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: white;
    font-size: 1.5rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease;
    z-index: 2;
}

.portfolio-img-link:hover::before {
    opacity: 1;
}

.portfolio-img-link:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.05);
}

/* Badge styles */
.badge.bg-primary {
    background-color: var(--primary-color) !important;
}

.badge.bg-success {
    background-color: #28a745 !important;
}

/* Card body styles */
.card-body {
    padding: 1.25rem;
}

.card-title {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--dark-gray);
}

.card-text {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* Button styles */
.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Single Project View */
.single-project-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

.card-img-top {
    height: 400px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

.project-details {
    background-color: var(--light-gray);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

/* Card styles for single project */
.card.border-0.shadow-sm {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    transition: var(--transition);
}

.card.border-0.shadow-sm:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
}

/* Back button */
.btn-outline-primary i {
    transition: var(--transition);
}

.btn-outline-primary:hover i {
    transform: translateX(-5px);
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .filter-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }

    .filter-btn {
        margin-bottom: 8px;
    }

    .card-img-top,
    .single-project-image {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .filter-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
    }

    .filter-btn {
        width: auto;
        margin: 0 5px 10px;
        font-size: 13px;
        padding: 6px 12px;
    }

    .card-img-top,
    .single-project-image {
        height: 250px;
    }

    .portfolio-img {
        height: 180px;
    }

    .card-title {
        font-size: 1.1rem;
    }

    .card-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .page-header {
        padding-top: 100px;
    }

    .display-4 {
        font-size: 2rem;
    }

    .lead {
        font-size: 1rem;
    }

    .card-img-top,
    .single-project-image {
        height: 200px;
    }

    .project-details {
        padding: 15px;
    }

    .filter-btn {
        padding: 5px 10px;
        font-size: 12px;
        margin: 0 3px 8px;
    }
}

/* Project Navigation Styles */
.project-navigation {
    background: var(--light-gray);
    border-radius: 10px;
    padding: 20px;
    margin-top: 30px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.project-navigation .btn {
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    min-height: 60px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.project-navigation .btn-outline-secondary {
    border-color: #dee2e6;
    color: #6c757d;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.project-navigation .btn-outline-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.project-navigation .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(130, 189, 66, 0.3);
}

.project-navigation .btn-primary:hover {
    background-color: #6ba635;
    border-color: #6ba635;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(130, 189, 66, 0.4);
}

.project-navigation .fw-bold {
    font-size: 0.9rem;
    line-height: 1.2;
}

.project-navigation small {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Keyboard hint styling */
kbd {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), inset 0 0 0 2px #fff;
    color: #495057;
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    padding: 2px 4px;
    white-space: nowrap;
}

/* Single project view enhancements */
.project-details .row {
    border-bottom: 1px solid #f1f3f4;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
}

.project-details .row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Navigation responsive adjustments */
@media (max-width: 768px) {
    .project-navigation {
        padding: 15px;
    }

    .project-navigation .btn {
        min-height: 50px;
        font-size: 0.85rem;
        margin-bottom: 10px;
    }

    .project-navigation .fw-bold {
        font-size: 0.8rem;
    }

    .project-navigation .col-md-4:last-child .btn {
        margin-bottom: 0;
    }

    .project-navigation .text-end {
        text-align: start !important;
    }

    .project-navigation .justify-content-end {
        justify-content: start !important;
    }
}

/* Clickable project cards */
.card-link {
    color: inherit;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
}

.card-link:hover {
    color: inherit;
    text-decoration: none;
    transform: translateY(-2px);
}

.card-link .card {
    transition: all 0.3s ease;
}

.card-link:hover .card {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-link .card-title {
    transition: color 0.3s ease;
}

.card-link:hover .card-title {
    color: var(--primary-color) !important;
}

.card-link .btn {
    pointer-events: none; /* Prevent double-click on button */
}

/* Magazine-Style Gallery */
.project-gallery {
    margin-top: 3rem;
}

.gallery-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 2rem;
    position: relative;
}

.gallery-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
}

.gallery-section {
    margin-bottom: 4rem;
    padding: 2rem 0;
    border-bottom: 1px solid #eee;
}

.gallery-section:last-child {
    border-bottom: none;
}

.gallery-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-image-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.gallery-image-magazine {
    width: 100%;
    height: auto;
    min-height: 300px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-image-container:hover .gallery-image-magazine {
    transform: scale(1.05);
}

.gallery-content {
    padding: 1rem;
}

.gallery-number {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary-color);
    opacity: 0.3;
    line-height: 1;
    margin-bottom: 1rem;
    font-family: 'Arial', sans-serif;
}

.gallery-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.gallery-description {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 0;
}

/* Responsive adjustments for magazine layout */
@media (max-width: 991.98px) {
    .gallery-section.image-right .row {
        flex-direction: column-reverse;
    }

    .gallery-content {
        text-align: center;
        margin-bottom: 2rem;
    }

    .gallery-number {
        font-size: 2.5rem;
    }

    .gallery-subtitle {
        font-size: 1.3rem;
    }

    .gallery-image-magazine {
        min-height: 250px;
    }
}

@media (max-width: 767.98px) {
    .gallery-title {
        font-size: 1.5rem;
    }

    .gallery-number {
        font-size: 2rem;
    }

    .gallery-subtitle {
        font-size: 1.2rem;
    }

    .gallery-description {
        font-size: 0.95rem;
    }

    .gallery-image-magazine {
        min-height: 200px;
    }

    .gallery-section {
        margin-bottom: 3rem;
        padding: 1rem 0;
    }
}

/* Project Sidebar Styles */
.project-sidebar {
    padding-left: 2rem;
}

.sidebar-widget {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.sidebar-widget:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.widget-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

/* Related Projects Widget */
.related-project-item {
    padding: 0.75rem;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.related-project-item:hover {
    background-color: #f8f9fa;
}

.related-project-img {
    height: 60px;
    width: 100%;
    object-fit: cover;
}

.related-project-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.related-project-desc {
    font-size: 0.8rem;
    color: var(--text-color);
    margin-bottom: 0;
    line-height: 1.4;
}

/* Category List Widget */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    text-decoration: none;
    color: var(--dark-color);
    transition: all 0.3s ease;
}

.category-item:hover {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
}

.category-item:hover .badge {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

/* Contact CTA Widget */
.contact-cta {
    background: linear-gradient(135deg, var(--primary-color), #6fa832);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.contact-cta h5 {
    color: white;
    margin-bottom: 1rem;
}

.contact-cta p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

.contact-cta .btn {
    background-color: white;
    color: var(--primary-color);
    border: none;
    font-weight: 600;
}

.contact-cta .btn:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

/* Widget Content Styles */
.widget-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.widget-image {
    text-align: center;
}

/* Responsive Sidebar */
@media (max-width: 991.98px) {
    .project-sidebar {
        padding-left: 0;
        margin-top: 3rem;
    }

    .sidebar-widget {
        margin-bottom: 2rem;
    }
}

@media (max-width: 767.98px) {
    .sidebar-widget {
        padding: 1rem;
    }

    .widget-title {
        font-size: 1.1rem;
    }

    .related-project-title {
        font-size: 0.85rem;
    }

    .related-project-desc {
        font-size: 0.75rem;
    }
}
