/* ============================================
   PROJECTS PAGE - Premium Modern Design
   ============================================ */

/* Variables */
:root {
    --projects-primary: #0ea5e9;
    --projects-primary-dark: #0284c7;
    --projects-accent: #f97316;
    --projects-dark: #0c1222;
    --projects-darker: #070b14;
}

/* Hero Section */
.projects-sub-header {
    position: relative;
    width: 100%;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 80px;
    background: var(--projects-darker);
}

.sub-header-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.sub-header-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.4;
    filter: saturate(0.8);
}

.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(14, 165, 233, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(249, 115, 22, 0.1) 0%, transparent 50%),
        linear-gradient(180deg, rgba(12, 18, 34, 0.7) 0%, rgba(7, 11, 20, 0.95) 100%);
    z-index: 1;
}

/* Animated Grid Pattern */
.background-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(14, 165, 233, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 165, 233, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

.projects-sub-header .container {
    position: relative;
    z-index: 2;
}

.sub-header-content {
    text-align: center;
    color: #ffffff;
    padding: 60px 0;
}

/* Breadcrumbs */
.breadcrumbs {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 25px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    margin-bottom: 40px;
    gap: 10px;
    backdrop-filter: blur(10px);
}

.breadcrumbs a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.breadcrumbs a:hover {
    color: var(--projects-primary);
}

.breadcrumbs .separator {
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
}

.breadcrumbs .current {
    color: var(--projects-primary);
    font-weight: 600;
}

/* Title with Gradient */
.sub-header-title {
    font-size: 4.5rem;
    font-weight: 900;
    margin-bottom: 25px;
    line-height: 1.1;
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 50%, var(--projects-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -2px;
}

.sub-header-description {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    max-width: 650px;
    margin: 0 auto 50px;
    line-height: 1.7;
}

/* Return Button */
.return-button-container {
    position: absolute;
    top: 100px;
    left: 40px;
    z-index: 10;
}

.return-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(15px);
}

.return-button:hover {
    background: rgba(14, 165, 233, 0.2);
    border-color: var(--projects-primary);
    color: var(--projects-primary);
    transform: translateX(-5px);
}

.return-button i {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.return-button:hover i {
    transform: translateX(-4px);
}

/* ============================================
   GALLERY HEADER WITH INLINE FILTER
   ============================================ */
.gallery-filter-section {
    background: #ffffff;
    padding: 50px 0;
    border-bottom: 1px solid #e2e8f0;
}

.gallery-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.gallery-info {
    flex-shrink: 0;
}

.gallery-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--projects-dark);
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.gallery-description {
    font-size: 1rem;
    color: #64748b;
    margin: 0;
    max-width: 350px;
    line-height: 1.5;
}

/* Filter Dropdown */
.filter-dropdown-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
}

.filter-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--projects-dark);
    white-space: nowrap;
}

.filter-dropdown {
    position: relative;
    min-width: 280px;
}

.filter-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    width: 100%;
    padding: 16px 22px;
    background: #ffffff;
    border: 2px solid #cbd5e1;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--projects-dark);
}

.filter-dropdown-toggle:hover {
    border-color: var(--projects-primary);
    box-shadow: 0 2px 12px rgba(14, 165, 233, 0.1);
}

.filter-dropdown-toggle.open {
    border-color: var(--projects-primary);
    box-shadow: 0 6px 25px rgba(14, 165, 233, 0.2);
}

.filter-dropdown-toggle .dropdown-arrow {
    width: 20px;
    height: 20px;
    color: #64748b;
    transition: transform 0.3s ease;
}

.filter-dropdown-toggle.open .dropdown-arrow {
    transform: rotate(180deg);
    color: var(--projects-primary);
}

.filter-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
    overflow: hidden;
}

.filter-dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-search {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 2px solid #f1f5f9;
    background: #f8fafc;
}

.dropdown-search i {
    width: 20px;
    height: 20px;
    color: #94a3b8;
    flex-shrink: 0;
}

.dropdown-search input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: var(--projects-dark);
    outline: none;
}

.dropdown-search input::placeholder {
    color: #94a3b8;
}

.dropdown-options {
    max-height: 320px;
    overflow-y: auto;
    padding: 10px;
}

.dropdown-option {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    font-weight: 500;
    color: #475569;
    text-align: left;
    margin-bottom: 4px;
}

.dropdown-option:last-child {
    margin-bottom: 0;
}

.dropdown-option i {
    width: 20px;
    height: 20px;
    color: #94a3b8;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.dropdown-option:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: var(--projects-dark);
}

.dropdown-option:hover i {
    color: var(--projects-primary);
}

.dropdown-option.active {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12) 0%, rgba(14, 165, 233, 0.06) 100%);
    border-color: var(--projects-primary);
    color: var(--projects-primary);
}

.dropdown-option.active i {
    color: var(--projects-primary);
}

.dropdown-option.hidden {
    display: none;
}

.dropdown-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 35px 20px;
    color: #94a3b8;
    text-align: center;
}

.dropdown-no-results i {
    width: 36px;
    height: 36px;
    opacity: 0.5;
}

.dropdown-no-results span {
    font-size: 1rem;
}

/* ============================================
   PROJECTS GRID
   ============================================ */
.rn-portfolio-area {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 80px 0 120px;
    position: relative;
}

/* Decorative Elements */
.rn-portfolio-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(180deg, rgba(14, 165, 233, 0.03) 0%, transparent 100%);
    pointer-events: none;
}

/* ============================================
   PORTFOLIO CARDS - Glass Morphism Style
   ============================================ */
.portfolio-card {
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.04),
        0 10px 40px rgba(0, 0, 0, 0.06);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.portfolio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--projects-primary) 0%, var(--projects-accent) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.portfolio-card:hover {
    transform: translateY(-12px) scale(1.01);
    box-shadow: 
        0 20px 40px rgba(14, 165, 233, 0.15),
        0 30px 70px rgba(0, 0, 0, 0.1);
}

.portfolio-card:hover::before {
    opacity: 1;
}

/* Badge */
.portfolio-badge {
    position: absolute;
    top: 24px;
    left: 24px;
    z-index: 5;
    background: rgba(255, 255, 255, 0.95);
    color: var(--projects-dark);
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.portfolio-card .inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Thumbnail */
.portfolio-card .thumbnail {
    position: relative;
    overflow: hidden;
    height: 300px;
}

.portfolio-card .thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

.portfolio-card:hover .thumbnail img {
    transform: scale(1.12);
}

/* Overlay */
.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.95) 0%, rgba(8, 145, 178, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

.overlay-content {
    color: #ffffff;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    transform: translateY(20px);
    transition: transform 0.4s ease 0.1s;
}

.portfolio-card:hover .overlay-content {
    transform: translateY(0);
}

.overlay-content i {
    width: 56px;
    height: 56px;
    stroke-width: 1.5;
    padding: 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.overlay-content span {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Content */
.portfolio-card .content {
    padding: 32px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
}

.portfolio-card .content .title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--projects-dark);
    margin-bottom: 14px;
    line-height: 1.35;
    letter-spacing: -0.5px;
}

.portfolio-card .content .description {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 24px;
    flex-grow: 1;
}

/* Meta */
.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.rating {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 8px 16px;
    border-radius: 25px;
    color: #b45309;
    font-weight: 700;
    font-size: 0.9rem;
}

.rating i {
    width: 16px;
    height: 16px;
    fill: #f59e0b;
    stroke: #f59e0b;
}

.visit-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--projects-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 10px 20px;
    background: rgba(14, 165, 233, 0.08);
    border-radius: 25px;
    transition: all 0.3s ease;
}

.visit-link:hover {
    background: var(--projects-primary);
    color: #ffffff;
}

.visit-link i {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.visit-link:hover i {
    transform: translateX(3px) translateY(-3px);
}

/* ============================================
   PROJECT ITEM ANIMATIONS
   ============================================ */
.project-item {
    transition: all 0.5s ease;
    opacity: 1;
}

.project-item.hidden {
    display: none !important;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1200px) {
    .gallery-header-row {
        gap: 20px;
    }
    
    .filter-dropdown {
        min-width: 250px;
    }
    
    .filter-label {
        font-size: 1rem;
    }
    
    .filter-dropdown-toggle {
        padding: 14px 18px;
        font-size: 1rem;
    }
}

@media (max-width: 991px) {
    .sub-header-title {
        font-size: 3rem;
        letter-spacing: -1px;
    }
    
    .gallery-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .gallery-info {
        text-align: left;
    }
    
    .gallery-description {
        max-width: 100%;
    }
    
    .filter-dropdown-wrapper {
        width: 100%;
    }
    
    .filter-dropdown {
        flex: 1;
        min-width: unset;
    }
    
    .portfolio-card .thumbnail {
        height: 260px;
    }
}

@media (max-width: 768px) {
    .projects-sub-header {
        min-height: 60vh;
        margin-top: 70px;
    }
    
    .return-button-container {
        top: 90px;
        left: 20px;
    }
    
    .return-button span {
        display: none;
    }
    
    .return-button {
        padding: 12px;
        border-radius: 12px;
        width: 48px;
        height: 48px;
        justify-content: center;
    }
    
    .sub-header-title {
        font-size: 2.5rem;
    }
    
    .sub-header-description {
        font-size: 1.1rem;
        padding: 0 20px;
        margin-bottom: 30px;
    }
    
    .breadcrumbs {
        padding: 8px 20px;
        font-size: 13px;
    }
    
    .gallery-filter-section {
        padding: 35px 0;
    }
    
    .gallery-title {
        font-size: 1.75rem;
    }
    
    .gallery-description {
        font-size: 0.95rem;
    }
    
    .filter-dropdown-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .filter-dropdown {
        width: 100%;
    }
    
    .rn-portfolio-area {
        padding: 50px 0 80px;
    }
    
    .portfolio-card .content {
        padding: 25px;
    }
    
    .portfolio-card .content .title {
        font-size: 1.25rem;
    }
    
    .portfolio-card .thumbnail {
        height: 220px;
    }
    
    .portfolio-badge {
        top: 16px;
        left: 16px;
        padding: 6px 14px;
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    .sub-header-title {
        font-size: 2rem;
    }
    
    .breadcrumbs {
        margin-bottom: 25px;
    }
    
    .gallery-filter-section {
        padding: 30px 0;
    }
    
    .gallery-title {
        font-size: 1.5rem;
    }
    
    .filter-label {
        font-size: 0.95rem;
    }
    
    .filter-dropdown-toggle {
        padding: 14px 16px;
        font-size: 0.95rem;
    }
    
    .dropdown-option {
        padding: 12px 14px;
        font-size: 0.95rem;
    }
    
    .portfolio-card .content .title {
        font-size: 1.15rem;
    }
    
    .portfolio-card .content .description {
        font-size: 0.9rem;
    }
    
    .project-meta {
        flex-direction: column;
        gap: 12px;
    }
    
    .rating, .visit-link {
        width: 100%;
        justify-content: center;
    }
}
