/**
 * ShowMeTheCase Premium Front Page Stylesheet
 * Inspired by CSS Design Awards WOTD Winners
 */

/* Scope everything under body.home to preserve subpages styling */
body.home {
    background-color: #0c0c0d !important;
    color: #f5f5f7 !important;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    overflow-x: hidden;
}

body.home #page {
    background-color: #0c0c0d !important;
}

/* Header & Navigation Adjustments */
body.home #masthead {
    background-color: #0c0c0d !important;
    padding: 15px 0 !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

body.home .site-branding .site-title a {
    color: #ffffff !important;
    font-weight: 800;
    letter-spacing: -1px;
}

body.home #primary-menu a {
    color: #f5f5f7 !important;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s ease;
}

body.home #primary-menu a:hover,
body.home #primary-menu li.current-menu-item a {
    color: #e5b869 !important;
}

body.home .site-content {
    background-color: transparent !important;
    padding-top: 0 !important;
}

/* Cover Block Overrides */
body.home .wp-block-cover {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 40px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

body.home h2.wp-block-heading {
    color: #ffffff !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 800 !important;
    font-size: 2.2rem !important;
    letter-spacing: -0.5px;
    margin-bottom: 25px !important;
}

/* Showcase Section */
.frontend-showcase-section {
    padding: 20px 0 80px 0;
}

.showcase-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Filter Bar styles */
.frontend-filter-bar {
    background: rgba(22, 22, 24, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid #232326;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 5;
}

/* Search Box styling */
.filter-search-wrap {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.filter-search-wrap .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #86868b;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.filter-search-wrap .search-icon svg {
    pointer-events: none;
}

.filter-search-wrap input[type="text"] {
    width: 100%;
    background-color: #161618 !important;
    border: 1px solid #232326 !important;
    border-radius: 12px !important;
    padding: 14px 20px 14px 48px !important;
    font-size: 16px !important;
    color: #ffffff !important;
    font-family: 'Outfit', sans-serif !important;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1) !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2) !important;
}

.filter-search-wrap input[type="text"]:focus {
    outline: none !important;
    border-color: #e5b869 !important;
    box-shadow: 0 0 0 4px rgba(229, 184, 105, 0.15), inset 0 2px 4px rgba(0,0,0,0.2) !important;
}

.search-clear-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #86868b;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.search-clear-btn:hover {
    color: #ffffff;
}

/* Controls layout */
.filter-controls-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin-top: 16px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #86868b;
    font-weight: 700;
    min-width: 60px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Filter pills (Buttons) */
.filter-pill {
    background-color: #161618;
    color: #f5f5f7;
    border: 1px solid #232326;
    border-radius: 30px;
    padding: 8px 18px;
    font-size: 14px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.filter-pill:hover {
    background-color: #232326;
    border-color: #3a3a3c;
    color: #ffffff;
    transform: translateY(-1px);
}

.filter-pill.active {
    background-color: #e5b869;
    border-color: #e5b869;
    color: #0c0c0d;
    box-shadow: 0 4px 15px rgba(229, 184, 105, 0.3);
}

/* Select element styling */
.custom-select-wrapper {
    position: relative;
}

.custom-select-wrapper select {
    background-color: #161618 !important;
    color: #f5f5f7 !important;
    border: 1px solid #232326 !important;
    border-radius: 30px !important;
    padding: 8px 36px 8px 18px !important;
    font-size: 14px !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    transition: all 0.3s ease !important;
}

.custom-select-wrapper select:focus {
    outline: none !important;
    border-color: #e5b869 !important;
}

.custom-select-wrapper::after {
    content: "▼";
    font-size: 10px;
    color: #86868b;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Count bar styling */
.results-count-bar {
    margin-bottom: 24px;
    padding: 0 8px;
}

#results-count-text {
    font-size: 15px;
    font-weight: 600;
    color: #e5b869;
    letter-spacing: 0.5px;
}

/* Showcase Grid Layout */
.showcase-grid-wrap {
    position: relative;
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}

/* Individual Project Card */
.project-card {
    background-color: #161618;
    border: 1px solid #232326;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: rgba(229, 184, 105, 0.4);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 0 2px rgba(229, 184, 105, 0.05);
}

/* Card image and overlay container */
.card-thumbnail-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background-color: #0c0c0d;
}

.card-img-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

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

/* Hover overlay */
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 12, 13, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
    transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 2;
}

.project-card:hover .card-overlay {
    opacity: 1;
}

/* Overlay Top badges */
.overlay-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.overlay-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-badge {
    background-color: rgba(229, 184, 105, 0.2);
    border: 1px solid rgba(229, 184, 105, 0.3);
    color: #e5b869;
    max-width: 75%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.year-badge {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

/* Overlay play button */
.overlay-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.play-btn-overlay, .view-btn-overlay {
    background-color: #e5b869;
    color: #0c0c0d;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 20px rgba(229, 184, 105, 0.4);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform: scale(0.9);
}

.play-btn-overlay:hover, .view-btn-overlay:hover {
    transform: scale(1.05);
    background-color: #ffffff;
    box-shadow: 0 6px 25px rgba(255, 255, 255, 0.5);
}

.play-icon-svg, .view-icon-svg {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Overlay bottom details link */
.overlay-bottom {
    display: flex;
    justify-content: center;
    width: 100%;
}

.details-link-overlay {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s ease;
}

.details-link-overlay:hover {
    color: #e5b869;
}

.details-link-overlay .arrow-right {
    transition: transform 0.3s ease;
}

.details-link-overlay:hover .arrow-right {
    transform: translateX(4px);
}

/* Card details (below image) */
.card-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    margin: 0 0 10px 0 !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
}

.card-title a {
    color: #ffffff !important;
    transition: color 0.3s ease;
}

.card-title a:hover {
    color: #e5b869 !important;
}

.card-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
    flex-grow: 1;
}

.card-brand {
    font-size: 12px;
    font-weight: 700;
    color: #e5b869;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-entrant {
    font-size: 13px;
    color: #86868b;
    font-weight: 500;
}

/* Award tags styles */
.card-awards {
    display: flex;
    margin-top: auto;
}

.award-tag {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
}

.award-grand-prix {
    background-color: rgba(229, 184, 105, 0.2);
    border: 1px solid rgba(229, 184, 105, 0.4);
    color: #e5b869;
    box-shadow: 0 2px 10px rgba(229, 184, 105, 0.1);
}

.award-gold {
    background-color: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #d4af37;
}

.award-silver {
    background-color: rgba(192, 192, 192, 0.1);
    border: 1px solid rgba(192, 192, 192, 0.25);
    color: #c0c0c0;
}

.award-bronze {
    background-color: rgba(205, 127, 50, 0.1);
    border: 1px solid rgba(205, 127, 50, 0.25);
    color: #cd7f32;
}

.award-shortlist {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #86868b;
}

/* No results message */
.no-results-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #86868b;
    font-size: 16px;
    font-weight: 500;
    border: 1px dashed #232326;
    border-radius: 16px;
    background-color: #161618;
}

/* Loader & load more wrappers */
.grid-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
    width: 100%;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(229, 184, 105, 0.1);
    border-top: 3px solid #e5b869;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.load-more-btn {
    background-color: transparent;
    color: #e5b869;
    border: 1.5px solid #e5b869;
    border-radius: 30px;
    padding: 14px 36px;
    font-size: 15px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(229, 184, 105, 0.05);
}

.load-more-btn:hover {
    background-color: #e5b869;
    color: #0c0c0d;
    box-shadow: 0 6px 20px rgba(229, 184, 105, 0.25);
    transform: translateY(-2px);
}

/* Lightbox Modal styles */
.afi-video-lightbox {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 999999 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    background-color: rgba(12, 12, 13, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    
    /* Smooth CSS fade transition */
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease !important;
}

.afi-video-lightbox.active {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.afi-lightbox-content {
    position: relative !important;
    width: 90% !important;
    max-width: 960px !important;
    background-color: #000 !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8) !important;
    border-radius: 12px !important;
    border: 1px solid #232326 !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.afi-lightbox-video-wrapper {
    position: relative !important;
    width: 100% !important;
    padding-top: 56.25% !important; /* 16:9 Aspect Ratio */
    height: 0 !important;
    overflow: hidden !important;
    display: block !important;
}

.afi-lightbox-video-wrapper iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

.afi-lightbox-close {
    position: absolute !important;
    top: -45px !important;
    right: 0 !important;
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 36px !important;
    cursor: pointer !important;
    padding: 0 !important;
    line-height: 1 !important;
    transition: color 0.3s ease !important;
}

.afi-lightbox-close:hover {
    color: #e5b869 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .filter-controls-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-pill {
        padding: 6px 14px;
        font-size: 13px;
    }
    
    .lightbox-close {
        top: 10px;
        right: 15px;
        background: rgba(0, 0, 0, 0.5);
        width: 32px;
        height: 32px;
        border-radius: 50%;
        font-size: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Muted standard WordPress elements on frontpage footer */
body.home .site-footer {
    background-color: #0c0c0d !important;
    border-top: 1px solid #1c1c1f !important;
}

body.home #site-bottom {
    background-color: #0c0c0d !important;
    border-top: 1px solid #1c1c1f !important;
}

body.home .site-info, 
body.home .site-info a,
body.home .footer-nav a {
    color: #5a6065 !important;
}

body.home .site-info a:hover,
body.home .footer-nav a:hover {
    color: #e5b869 !important;
}

/* Apply dark theme to single post pages */
body.single {
    background-color: #0c0c0d !important;
    color: #f5f5f7 !important;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}
body.single #page,
body.single #masthead,
body.single .site-content,
body.single #main,
body.single .content-area {
    background-color: #0c0c0d !important;
}
body.single #masthead {
    padding: 15px 0 !important;
    border-bottom: none !important;
    box-shadow: none !important;
}
body.single .site-branding .site-title a {
    color: #ffffff !important;
}
body.single #primary-menu a {
    color: #a1a1aa !important;
}
body.single #primary-menu a:hover,
body.single #primary-menu li.current-menu-item a {
    color: #ffffff !important;
}
body.single .site-footer,
body.single #site-bottom {
    background-color: #0c0c0d !important;
    border-top: 1px solid #1c1c1f !important;
}
body.single .site-info, 
body.single .site-info a,
body.single .footer-nav a {
    color: #5a6065 !important;
}
body.single .site-info a:hover,
body.single .footer-nav a:hover {
    color: #e5b869 !important;
}
body.single #primary, body.single #secondary {
    background-color: #0c0c0d !important;
}

/* Standard Buttons on Single Pages */
body.single button,
body.single input[type="button"],
body.single input[type="reset"],
body.single input[type="submit"],
body.single .button {
    background: #e62117 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 30px !important;
    padding: 12px 25px !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    cursor: pointer !important;
    transition: transform 0.2s ease, background 0.2s ease !important;
    box-shadow: 0 4px 10px rgba(230, 33, 23, 0.3) !important;
}
body.single button:hover,
body.single input[type="submit"]:hover,
body.single .button:hover {
    background: #c51d14 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 15px rgba(230, 33, 23, 0.4) !important;
}

/* Inputs and Textareas on Single Pages */
body.single input[type="text"],
body.single input[type="email"],
body.single input[type="url"],
body.single input[type="search"],
body.single input[type="password"],
body.single textarea {
    background-color: #121214 !important;
    border: 1px solid #232326 !important;
    color: #f4f4f5 !important;
    border-radius: 8px !important;
    padding: 12px 15px !important;
}
body.single input:focus,
body.single textarea:focus {
    border-color: #3f3f46 !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(63, 63, 70, 0.5) !important;
}
