/* Main Styles for Neo Search */

/* General Styling */
:root {
    --primary-color: #6366f1;
    --secondary-color: #ec4899;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-600: #475569;
    --gray-900: #0f172a;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

main {
    flex: 1;
}

/* Logo Styling */
.logo-text {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

/* Hero Section */
.hero-section {
    padding: 4rem 0 3rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #e0f2fe 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23e2e8f0" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
    z-index: 0;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
    line-height: 1.1;
}

.hero-section .lead {
    font-size: 1.35rem;
    color: var(--gray-600);
    font-weight: 500;
    margin-bottom: 3rem;
}

/* Search Input Styling */
#search-input {
    border-radius: 24px 0 0 24px;
    height: 60px;
    border: 2px solid var(--gray-200);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.1);
    font-size: 1.1rem;
    padding: 0 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

#search-input:focus {
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.2);
    border-color: var(--primary-color);
    outline: none;
    background: white;
    transform: translateY(-2px);
}

#search-form .btn {
    border-radius: 0 24px 24px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    height: 60px;
    padding: 0 2rem;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3);
}

#search-form .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.4);
}

#search-form .btn:active {
    transform: translateY(0);
}

/* Search Filters */
.search-filters {
    margin-top: 20px;
}

.search-filters .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.search-filters .form-check-label {
    font-weight: 500;
    color: var(--gray-600);
    margin-left: 0.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.search-filters .form-check-input:checked + .form-check-label {
    color: var(--primary-color);
}

/* Services Section */
.services-section {
    padding: 3rem 0 4rem;
    background: white;
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.service-card {
    background: white;
    padding: 2rem 1.5rem;
    border-radius: 20px;
    text-decoration: none;
    color: var(--dark-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--gray-200);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.3s;
    transform-origin: left;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15);
    text-decoration: none;
    color: var(--dark-color);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
}

.service-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    opacity: 0.1;
    z-index: 1;
    transition: opacity 0.3s;
}

.service-card:hover .service-icon::before {
    opacity: 0.2;
}

.service-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    transition: transform 0.3s;
    position: relative;
    z-index: 2;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(2deg);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.25);
}

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

.service-card h5 {
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--gray-900);
    font-size: 1.1rem;
}

.service-card p {
    color: var(--gray-600);
    margin-bottom: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Blog Section */
.blog-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--gray-100) 0%, white 100%);
    position: relative;
}

.blog-section h2 {
    font-weight: 800;
    color: var(--gray-900);
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
}

.blog-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.blog-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 30px;
    height: 100%;
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    background: white;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.blog-card .card-img-top {
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.blog-card .card-body {
    padding: 1.5rem;
}

.blog-card .card-title {
    color: var(--gray-900);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.blog-card .card-text {
    color: var(--gray-600);
    line-height: 1.6;
    font-size: 0.95rem;
}

.blog-card .card-footer {
    background: var(--gray-100);
    border: none;
    padding: 1rem 1.5rem;
}

.blog-card .btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 12px;
    transition: all 0.3s;
}

.blog-card .btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Search Results Page */
.search-header {
    background: white !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.search-header .search-input-group {
    max-width: 600px;
    margin: 0 auto;
}

.search-header #search-input {
    height: 48px;
    border-radius: 20px 0 0 20px;
    border: 2px solid var(--gray-200);
    font-size: 1rem;
}

.search-header #search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
}

.search-header .btn {
    height: 48px;
    border-radius: 0 20px 20px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    font-weight: 600;
}

.search-header .search-filters {
    text-align: center;
    margin-top: 1rem;
}

.search-result-item {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item .result-title {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    line-height: 1.4;
}

.search-result-item .result-title:hover {
    text-decoration: underline;
    color: var(--secondary-color);
}

.search-result-item .result-url {
    color: var(--success-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.search-result-item .result-snippet {
    color: var(--gray-600);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Image Results Styling */
.image-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.image-result-item {
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.image-result-item:hover {
    transform: scale(1.03);
}

.image-result-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    cursor: pointer;
}

.image-result-item .image-caption {
    padding: 8px;
    font-size: 0.8rem;
    color: #333;
    background-color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* News Results Styling */
.news-result-item {
    display: flex;
    margin-bottom: 1.5rem;
}

.news-result-item .news-image {
    width: 120px;
    height: 80px;
    object-fit: cover;
    margin-right: 15px;
    border-radius: 4px;
}

.news-result-item .news-content {
    flex: 1;
}

.news-result-item .news-title {
    color: #1a0dab;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.news-result-item .news-source {
    color: #006621;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.news-result-item .news-date {
    color: #70757a;
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.news-result-item .news-snippet {
    color: #545454;
    font-size: 0.85rem;
}

/* Pagination Styling */
.pagination .page-link {
    color: var(--primary-color);
    border-color: #dfe1e5;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0 1.5rem;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
        letter-spacing: -1px;
    }
    
    .hero-section .lead {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    #search-input {
        height: 50px;
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    #search-form .btn {
        height: 50px;
        padding: 0 1.5rem;
        font-size: 1rem;
    }
    
    .services-section {
        padding: 2rem 0 3rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .service-card {
        padding: 1.5rem 1rem;
        text-align: center;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        margin: 0 auto 1rem;
        border-radius: 16px;
    }
    
    .service-icon img {
        border-radius: 12px;
    }
    
    .service-card h5 {
        font-size: 1rem;
    }
    
    .service-card p {
        font-size: 0.85rem;
    }
    
    .blog-section h2 {
        font-size: 2rem;
    }
    
    .blog-card .card-img-top {
        height: 180px;
    }
    
    .news-result-item {
        flex-direction: column;
    }
    
    .news-result-item .news-image {
        width: 100%;
        height: 150px;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .image-results {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    #search-input {
        border-radius: 20px 0 0 20px;
    }
    
    #search-form .btn {
        border-radius: 0 20px 20px 0;
    }
}