/* Main Container Width */
.body_wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 0 0;
    position: relative;
    z-index: 1;
}

/* Background Styles */
body {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(45deg, rgba(255,255,255,.1) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255,255,255,.1) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255,255,255,.1) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.1) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    z-index: 0;
    opacity: 0.5;
}

/* Search Section Styles */
.search-section {
    width: 100%;
    padding: 35px 50px;
    margin: 0 auto 40px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    border-radius: 25px;
    box-shadow: 
        0 20px 40px rgba(102, 126, 234, 0.1),
        0 8px 16px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: slideDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.search-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.3), transparent);
}

.search-section::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.05) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Search Toggle Button Styles */
.search-toggle-container {
    position: fixed;
    top: 100px;
    right: 30px;
    z-index: 1000;
}

.search-toggle-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50px;
    color: #fff;
    cursor: pointer;
    padding: 15px;
    font-size: 16px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.search-toggle-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.search-toggle-btn:hover::before {
    left: 100%;
}

.search-toggle-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.search-toggle-btn:active {
    transform: translateY(-1px) scale(1.02);
}

.search-toggle-btn i {
    font-size: 24px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.search-container {
    max-width: 1200px;
    margin: 0 auto;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.search-form {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    position: relative;
}

.search-select {
    width: 140px;
    padding: 16px 24px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    color: #4a5568;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.search-select:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.search-input {
    flex: 1;
    max-width: 600px;
    padding: 16px 24px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 15px;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.search-input::placeholder {
    color: #a0aec0;
    font-style: italic;
}

.search-button {
    padding: 16px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 15px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.search-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.search-button:hover::before {
    left: 100%;
}

.search-button:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.search-button:active {
    transform: translateY(-1px);
}

.search-button i {
    font-size: 20px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Grid Layout */
.grid { 
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.grid:after {
    content: '';
    display: block;
    clear: both;
}

.grid-item {   
    margin: 1%;
    float: left;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
}

.grid-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(31, 38, 135, 0.15);
    background: rgba(255, 255, 255, 1);
}

.grid-item .thumb {
    width: 100%;
    height: 280px;
    position: relative;
    overflow: hidden;
    border-radius: 15px 15px 0 0;
}

.grid-item .thumb::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.4) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.grid-item:hover .thumb::after {
    opacity: 1;
}

.grid-item .content {
    background: #fff;
}

.grid-item .title {
    margin-bottom: 15px;
    padding: 10px;
}

.grid-item .title h3 {
    font-size: 17px;
    line-height: 1.5;
    margin: 0;
    color: #2c3e50;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.3s ease;
}

.grid-item .foot {
    padding: 15px 15px;
    border-top: 1px solid rgba(0,0,0,0.05);
    background: #fafafa;
}

.grid-item .stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #666;
}

.grid-item .stats span {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    transition: color 0.3s ease;
}

.grid-item .stats i {
    font-size: 16px;
}

/* Responsive Grid Layout */
@media (min-width: 1400px) {
    .grid-item {
        width: calc(19.5% - 0.5%);
        margin: 0.5%;
    }
    .grid-item .thumb {
        height: 280px;
    }
    .grid {
        padding: 0 15px;
    }
}
/* Responsive Grid Layout */
@media (min-width: 1200px) and (max-width: 1399px) {
    .grid-item {
        width: calc(24% - 0.5%);
        margin: 0.5%;
    }
    .grid-item .thumb {
        height: 280px;
    }
    .grid {
        padding: 0 15px;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .grid-item {
        width: calc(24% - 0.5%);
        margin: 0.5%;
    }
    .grid-item .thumb {
        height: 280px;
    }
    .grid {
        padding: 0 15px;
    }
}

@media (min-width: 600px) and (max-width: 767px) {
    .grid-item {
        width: calc(33% - 1%);
        margin: 0.5%;
    }
    .grid-item .thumb {
        height: 260px;
    }
    .grid {
        padding: 0 10px;
    }
}

@media (min-width: 375px) and (max-width: 599px) {
    .grid-item {
        width: calc(49% - 0.5%);
        margin: 0.5%;
    }
    .grid-item .thumb {
        height: 240px;
    }
    .grid {
        padding: 0 10px;
    }
}
@media (max-width: 375px) {
  .grid-item {
      width: calc(99% - 0.5%);
      margin: 0.5%;
  }
  .grid-item .thumb {
      height: 220px;
  }
  .grid {
      padding: 0 10px;
  }
}

/* Search Form Responsive */
@media (max-width: 767px) {
    .search-section {
        padding: 25px 20px;
        margin-bottom: 20px;
        border-radius: 20px;
    }
    
    .search-form {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-select,
    .search-input,
    .search-button {
        width: 100%;
        margin: 0;
        padding: 14px 20px;
        border-radius: 12px;
    }
    
    .search-select {
        width: 100%;
        text-align: center;
    }
    
    .search-button {
        padding: 14px 24px;
        font-size: 16px;
    }
    
    .search-button i {
        font-size: 18px;
    }
}

/* Responsive search toggle button */
@media (max-width: 768px) {
    .search-toggle-container {
        top: 80px;
        right: 20px;
    }
    
    .search-toggle-btn {
        width: 50px;
        height: 50px;
        padding: 12px;
    }
    
    .search-toggle-btn i {
        font-size: 20px;
    }
}

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

.grid-loading {
    position: relative;
    min-height: 300px;
}

.grid-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(31, 38, 135, 0.1);
    border-top: 3px solid #00a854;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Empty State */
.grid-empty {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    text-align: center;
    padding: 60px 20px;
    color: #666;
    margin: 20px;
}

.grid-empty i {
    font-size: 48px;
    color: #e1e1e1;
    margin-bottom: 20px;
}

.grid-empty p {
    font-size: 16px;
    margin: 0;
}
