/* Recent Projects Page Styles - C369SL Theme */

/* Hero */
.projects-hero {
    background: linear-gradient(135deg, #003D61 0%, #46afcf 100%);
    padding: 80px 20px;
    position: relative;
    overflow: hidden;
}
.projects-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}
.projects-hero .container { position: relative; z-index: 1; }
.projects-hero h1 { margin-bottom: 15px; text-shadow: 2px 2px 4px rgba(0,0,0,0.3); }
.projects-hero .lead { font-size: 1.2rem; opacity: 0.95; }

@media (max-width: 576px) {
    .projects-hero { padding: 50px 15px; }
    .projects-hero h1 { font-size: 1.8rem; }
    .projects-hero .lead { font-size: 1rem; }
}

/* Filter */
.filter-section { background-color: #f8f9fa; border-bottom: 2px solid #e0e0e0; }
.filter-label { color: #003D61; font-weight: 600; margin: 0; }
.filter-label i { color: #46afcf; margin-right: 8px; }
.filter-dropdown {
    border: 2px solid #46afcf;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 1rem;
    color: #003D61;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.filter-dropdown:focus { border-color: #003D61; box-shadow: 0 0 0 0.2rem rgba(70,175,207,0.25); }
.filter-dropdown:hover { border-color: #003D61; }

/* Projects Container */
.projects-container { background-color: #fff; }

/* Project Card */
.project-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,61,97,0.1);
    margin-bottom: 50px;
    overflow: hidden;
    transition: box-shadow 0.4s ease, transform 0.4s ease;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}
.project-card:hover {
    box-shadow: 0 8px 25px rgba(0,61,97,0.2);
    transform: translateY(-5px);
}
@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

/* Alternating layout */
.project-card.media-left .row { flex-direction: row; }
.project-card.media-right .row { flex-direction: row-reverse; }

/* Media column — fixed height, clip overflow */
.project-media {
    padding: 0;
    position: relative;
    background: #000;
    height: 450px;
}

/* Carousel fills the fixed-height media column */
.project-carousel,
.project-carousel .carousel-inner {
    height: 100%;
}

/* Every slide is exactly the same height as the column */
.project-carousel .carousel-item {
    height: 450px;
    overflow: hidden;
    background: #000;
}

/* Images fill the slide, cropped to cover */
.project-carousel .carousel-item img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Videos fill the slide, letterboxed (no crop) */
.project-carousel .carousel-item video {
    width: 100%;
    height: 450px;
    object-fit: contain;
    object-position: center;
    display: block;
    background: #000;
}

/* Carousel controls */
.project-carousel .carousel-control-prev,
.project-carousel .carousel-control-next {
    width: 44px;
    height: 44px;
    background-color: rgba(0,61,97,0.75);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.85;
    transition: opacity 0.3s ease, background-color 0.3s ease;
    z-index: 10;
}
.project-carousel .carousel-control-prev { left: 12px; }
.project-carousel .carousel-control-next { right: 12px; }
.project-carousel .carousel-control-prev:hover,
.project-carousel .carousel-control-next:hover {
    opacity: 1;
    background-color: rgba(0,61,97,0.95);
}

/* Indicators */
.project-carousel .carousel-indicators {
    bottom: 12px;
    z-index: 10;
    gap: 5px;
}
.project-carousel .carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    border: 2px solid rgba(255,255,255,0.8);
    flex: unset;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.project-carousel .carousel-indicators button.active {
    background-color: #46afcf;
    border-color: #46afcf;
    transform: scale(1.25);
}

/* Video play overlay */
.video-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.35);
    transition: background 0.3s ease;
    cursor: pointer;
    z-index: 5;
}
.video-play-overlay.playing { background: transparent; }
.video-play-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.9);
    background: rgba(0,61,97,0.75);
    color: #fff;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
    padding-left: 4px;
}
.video-play-overlay.playing .video-play-btn { opacity: 0; pointer-events: none; }
.video-play-overlay.playing:hover { background: rgba(0,0,0,0.2); }
.video-play-overlay.playing:hover .video-play-btn { opacity: 1; pointer-events: auto; }
.video-play-btn:hover { background: rgba(0,61,97,1); transform: scale(1.1); }

/* Media badge */
.media-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background-color: rgba(0,61,97,0.88);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 7px;
    backdrop-filter: blur(4px);
}

/* Content column */
.project-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.project-badge {
    display: inline-block;
    background: linear-gradient(135deg, #46afcf, #003D61);
    color: white;
    padding: 7px 18px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
}
.project-title {
    font-size: 1.9rem;
    font-weight: bold;
    color: #003D61;
    margin-bottom: 15px;
    line-height: 1.3;
}
.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 2px solid #e0e0e0;
}
.meta-item {
    display: flex;
    align-items: center;
    color: #7E8F9A;
    font-size: 0.92rem;
}
.meta-item i { color: #46afcf; margin-right: 7px; font-size: 1rem; }
.meta-item strong { color: #003D61; margin-left: 4px; }
.project-description {
    color: #555;
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: 22px;
}
.project-highlights {
    background-color: #f8f9fa;
    padding: 18px 20px;
    border-left: 4px solid #46afcf;
    border-radius: 8px;
}
.project-highlights h5 {
    color: #003D61;
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 1rem;
}
.project-highlights ul { list-style: none; padding: 0; margin: 0; }
.project-highlights li {
    padding: 6px 0 6px 26px;
    color: #555;
    position: relative;
    font-size: 0.95rem;
}
.project-highlights li::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    color: #46afcf;
}

/* CTA */
.gradient-text {
    background: linear-gradient(135deg, #46afcf, #003D61);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

/* Fade helpers */
.fade-out { opacity: 0; transition: opacity 0.3s ease; }
.fade-in  { opacity: 1; transition: opacity 0.3s ease; }

/* TABLET (<=991px) */
@media (max-width: 991px) {
    .project-media { height: 380px; }
    .project-carousel .carousel-item,
    .project-carousel .carousel-item img,
    .project-carousel .carousel-item video { height: 380px; }
    .project-content { padding: 30px 25px; }
    .project-title { font-size: 1.6rem; }
}

/* MOBILE (<=767px) */
@media (max-width: 767px) {
    .project-card.media-left .row,
    .project-card.media-right .row { flex-direction: column !important; }

    .project-media { height: auto; }

    .project-carousel .carousel-item,
    .project-carousel .carousel-item img,
    .project-carousel .carousel-item video {
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .project-carousel .carousel-item img { object-fit: cover; }
    .project-carousel .carousel-item video { object-fit: contain; }

    .project-content { padding: 24px 18px; }
    .project-title { font-size: 1.35rem; }
    .project-description { font-size: 0.95rem; }
    .project-meta { flex-direction: column; gap: 8px; }
    .video-play-btn { width: 52px; height: 52px; font-size: 1.1rem; }
    .project-carousel .carousel-control-prev,
    .project-carousel .carousel-control-next { width: 36px; height: 36px; }
    .media-badge { font-size: 0.75rem; padding: 5px 11px; top: 10px; left: 10px; }
}

@media (max-width: 400px) {
    .project-title { font-size: 1.2rem; }
    .project-content { padding: 18px 14px; }
}