/* =============================================
   PROJECTS - Sierra Air Child Theme
   ============================================= */

/* ---- Archive Page ---- */
.projects-page {
    background: #F7F7F7;
}

.projects-header {
    text-align: center;
    padding: 50px 20px 30px;
    background: #08539F;
    color: #fff;
}

.projects-header-title {
    font-size: 2.4rem;
    font-weight: 700;
    margin: 0 0 10px;
    color: #fff;
}

.projects-header-subtitle {
    font-size: 1.1rem;
    opacity: 0.85;
    margin: 0;
}

.projects-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.projects-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.projects-main {
    flex: 1;
    min-width: 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.projects-no-posts {
    text-align: center;
    padding: 80px 20px;
    color: #666;
}

.projects-no-posts i {
    font-size: 3rem;
    color: #08539F;
    margin-bottom: 20px;
    display: block;
}

/* ---- Project Card ---- */
.project-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.project-card-image-link {
    display: block;
    text-decoration: none;
}

.project-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

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

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

.project-card-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #08539F, #0766C2);
    color: #fff;
}

.project-card-placeholder-icon {
    font-size: 3rem;
    opacity: 0.5;
}

.project-card-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(8, 83, 159, 0.9);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.project-card-badge i {
    margin-right: 4px;
}

.project-card-content {
    padding: 20px;
}

.project-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.82rem;
    color: #666;
}

.project-card-meta span i {
    margin-right: 4px;
    color: #08539F;
}

.project-card-type {
    color: #08539F;
    font-weight: 600;
}

.project-card-title {
    font-size: 1.15rem;
    margin: 0 0 10px;
    line-height: 1.3;
}

.project-card-title a {
    color: #222;
    text-decoration: none;
    transition: color 0.2s;
}

.project-card-title a:hover {
    color: #08539F;
}

.project-card-excerpt {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
    margin: 0 0 15px;
}

.project-card-btn {
    display: inline-block;
    font-size: 0.88rem;
    font-weight: 700;
    color: #08539F;
    text-decoration: none;
    transition: color 0.2s;
}

.project-card-btn:hover {
    color: #EF3E30;
}

.project-card-btn i {
    margin-left: 4px;
    transition: transform 0.2s;
}

.project-card-btn:hover i {
    transform: translateX(3px);
}

/* ---- Pagination ---- */
.projects-pagination {
    margin-top: 40px;
    text-align: center;
}

.projects-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.projects-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 4px;
    background: #fff;
    color: #222;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid #ddd;
    transition: background 0.2s, color 0.2s;
}

.projects-pagination .page-numbers.current,
.projects-pagination .page-numbers:hover {
    background: #08539F;
    color: #fff;
    border-color: #08539F;
}

/* ---- Sidebar ---- */
.projects-sidebar {
    width: 320px;
    flex-shrink: 0;
}

.sidebar-widget {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.sidebar-widget-title {
    font-size: 1.1rem;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #08539F;
    color: #222;
}

.sidebar-widget-title i {
    margin-right: 8px;
    color: #08539F;
}

/* Project Types List */
.project-types-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.project-type-item {
    border-bottom: 1px solid #eee;
}

.project-type-item:last-child {
    border-bottom: none;
}

.project-type-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    color: #333;
    text-decoration: none;
    font-size: 0.92rem;
    transition: color 0.2s;
}

.project-type-item a:hover,
.project-type-item-current a {
    color: #08539F;
    font-weight: 600;
}

.project-type-count {
    background: #F0F4F8;
    color: #08539F;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

/* CTA Widget */
.cta-widget {
    background: linear-gradient(135deg, #08539F 0%, #054080 100%);
    color: #fff;
    text-align: center;
}

.cta-widget-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.9;
}

.cta-widget-title {
    color: #fff;
    font-size: 1.2rem;
    margin: 0 0 8px;
}

.cta-widget-text {
    font-size: 0.9rem;
    opacity: 0.85;
    margin: 0 0 16px;
    line-height: 1.5;
}

.cta-phone-btn {
    display: block;
    background: #EF3E30;
    color: #fff;
    padding: 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    transition: background 0.2s;
}

.cta-phone-btn:hover {
    background: #d93325;
    color: #fff;
}

.cta-phone-btn i {
    margin-right: 6px;
}

/* Recent Projects Widget */
.recent-projects-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.recent-project-item {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.recent-project-item:last-child {
    border-bottom: none;
}

.recent-project-item a {
    color: #333;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    transition: color 0.2s;
    display: block;
}

.recent-project-item a:hover {
    color: #08539F;
}

.recent-project-date {
    font-size: 0.78rem;
    color: #999;
}

/* ---- Single Project Page ---- */
.single-project-page {
    background: #F7F7F7;
}

/* Hero */
.project-hero {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.project-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.project-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 60%);
}

.project-hero-no-image {
    background: linear-gradient(135deg, #08539F, #054080);
}

.project-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.project-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.project-meta-badge {
    background: rgba(255,255,255,0.2);
    color: #fff;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.project-meta-badge i {
    margin-right: 5px;
}

.project-hero-title {
    color: #fff;
    font-size: 2.2rem;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Content Layout */
.project-content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.project-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.project-content {
    flex: 1;
    min-width: 0;
    background: #fff;
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.project-content h2,
.project-content h3,
.project-content h4 {
    color: #08539F;
    margin-top: 1.5em;
}

.project-content h2:first-child,
.project-content h3:first-child {
    margin-top: 0;
}

.project-content p {
    line-height: 1.7;
    color: #444;
}

.project-content ul,
.project-content ol {
    padding-left: 20px;
    line-height: 1.7;
    color: #444;
}

/* Project Info Sidebar */
.project-info-card {
    width: 340px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: sticky;
    top: 120px;
}

.project-info-title {
    font-size: 1.15rem;
    margin: 0 0 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid #08539F;
    color: #222;
}

.project-info-title i {
    margin-right: 8px;
    color: #08539F;
}

.project-info-item {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.project-info-item:last-of-type {
    border-bottom: none;
}

.project-info-label {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #999;
    margin-bottom: 4px;
}

.project-info-value {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

.project-info-value i {
    margin-right: 6px;
    color: #08539F;
    width: 16px;
    text-align: center;
}

.project-info-cta {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.project-info-cta p {
    font-size: 0.9rem;
    color: #666;
    margin: 0 0 12px;
}

.project-info-cta .btn-project {
    display: block;
    padding: 12px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    margin-bottom: 10px;
    transition: background 0.2s, color 0.2s;
}

.project-info-cta .btn-project:last-child {
    margin-bottom: 0;
}

.btn-project-primary {
    background: #08539F;
    color: #fff !important;
}

.btn-project-primary:hover {
    background: #054080;
    color: #fff !important;
}

.btn-project-secondary {
    background: #EF3E30;
    color: #fff !important;
}

.btn-project-secondary:hover {
    background: #d93325;
    color: #fff !important;
}

/* ---- Gallery ---- */
.project-gallery-section {
    max-width: 1400px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

.project-gallery-heading {
    font-size: 1.6rem;
    color: #08539F;
    margin: 0 0 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #08539F;
}

.project-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.project-gallery-item {
    position: relative;
    display: block;
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.project-gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-gallery-item:hover .project-gallery-img {
    transform: scale(1.08);
}

.project-gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 83, 159, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.4rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-gallery-item:hover .project-gallery-overlay {
    opacity: 1;
}

/* ---- Lightbox ---- */
.project-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.project-lightbox.active {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.2rem;
    cursor: pointer;
    z-index: 10;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 1.4rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255,255,255,0.3);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

/* ---- Related Projects ---- */
.related-projects-section {
    max-width: 1400px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

.related-projects-title {
    font-size: 1.6rem;
    color: #08539F;
    margin: 0 0 24px;
    text-align: center;
}

.related-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* Service page related projects section */
.service-related-projects {
    padding: 50px 0;
    background: #F7F7F7;
}

.service-related-projects .main {
    max-width: 1480px;
    margin: 0 auto;
    padding: 0 20px;
}

.service-related-projects-title {
    text-align: center;
    font-size: 1.6rem;
    color: #08539F;
    margin: 30px;
}

.service-related-projects-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.service-related-projects-grid .project-card {
    width: calc(33.333% - 20px);
    min-width: 300px;
    max-width: 380px;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .projects-layout,
    .project-layout {
        flex-direction: column;
    }

    .projects-sidebar,
    .project-info-card {
        width: 100%;
        position: static;
    }

    .project-info-card {
        order: -1;
    }
}

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

    .project-hero {
        min-height: 300px;
    }

    .project-hero-title {
        font-size: 1.6rem;
    }

    .projects-header-title {
        font-size: 1.8rem;
    }

    .project-content {
        padding: 20px;
    }

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

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .project-gallery-grid {
        grid-template-columns: 1fr;
    }
}
