﻿/* ==========================================================================
   News Search Page - Professional & Responsive Design
   ========================================================================== */

/* Reset ve Genel Stiller */
body {
    background-color: #ffffff;
    color: #333333;
}

/* Category Bar Override - Search sayfası için özel renk */
.category-bar {
    background-color: #FFA914 !important;
}

/* ==========================================================================
   1. Search Header
   ========================================================================== */

.search-header {
    background: #ffffff;
    padding: 2rem 0 1.5rem;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 2rem;
    text-align: center;
}

.search-page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #191919;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.search-description {
    font-size: 1.1rem;
    color: #666666;
    margin-bottom: 0;
    line-height: 1.5;
}

.search-term {
    color: #FFA914;
    font-weight: 600;
}

.search-category {
    color: #888888;
    font-style: italic;
}

/* ==========================================================================
   2. Search Form
   ========================================================================== */

.search-form-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.search-form-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    align-items: end;
}

.search-input-group {
    min-width: 0;
}

.search-input-wrapper {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    outline: none;
    border-color: #FFA914;
    box-shadow: 0 0 0 3px rgba(255, 169, 20, 0.1);
}

.search-input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 1.1rem;
    pointer-events: none;
}

.search-category-select {
    padding: 0.875rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    color: #333333;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.search-category-select:focus {
    outline: none;
    border-color: #FFA914;
    box-shadow: 0 0 0 3px rgba(255, 169, 20, 0.1);
}

.search-submit-btn {
    padding: 0.875rem 1.5rem;
    background: #FFA914;
    border: 2px solid #FFA914;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(255, 169, 20, 0.3);
}

.search-submit-btn:hover {
    background: #E6950F;
    border-color: #E6950F;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 169, 20, 0.4);
}

.search-submit-btn:active {
    transform: translateY(0);
}

.search-actions {
    margin-top: 1rem;
    text-align: center;
}

.search-clear-btn {
    color: #6c757d;
    background: transparent;
    border: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.search-clear-btn:hover {
    color: #dc3545;
    background: #f8f9fa;
}

/* ==========================================================================
   3. Search Results
   ========================================================================== */

.search-results-section {
    margin-bottom: 3rem;
}

.search-results-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.search-results-info {
    font-size: 0.95rem;
    color: #666666;
}

.results-count {
    font-weight: 600;
    color: #333333;
}

.results-pagination {
    margin-left: 0.5rem;
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.search-result-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #f1f3f4;
}

.search-result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.search-result-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.search-result-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.search-result-item:hover .search-result-image img {
    transform: scale(1.03);
}

.search-result-content {
    padding: 1.25rem;
}

.search-result-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    color: #191919;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-meta {
    margin-bottom: 0.75rem;
}

.search-result-date {
    font-size: 0.85rem;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-result-summary {
    font-size: 0.9rem;
    color: #555555;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   4. Pagination
   ========================================================================== */

.search-pagination-section {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.search-pagination {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.pagination-list {
    display: flex;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
    align-items: center;
}

.pagination-item {
    margin: 0;
}

.pagination-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    text-decoration: none;
    color: #333333;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.pagination-link:hover {
    background: #f8f9fa;
    color: #FFA914;
    text-decoration: none;
}

.pagination-current {
    background: #FFA914;
    color: white;
    border-color: #FFA914;
}

.pagination-prev,
.pagination-next {
    font-weight: 600;
}

.pagination-dots span {
    color: #6c757d;
    padding: 0.5rem;
}

/* ==========================================================================
   5. No Results State
   ========================================================================== */

.search-no-results {
    text-align: center;
    padding: 3rem 0;
}

.no-results-content {
    max-width: 500px;
    margin: 0 auto;
}

.no-results-icon {
    font-size: 4rem;
    color: #e9ecef;
    margin-bottom: 1.5rem;
}

.search-no-results h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333333;
    margin-bottom: 1rem;
}

.search-no-results p {
    font-size: 1rem;
    color: #666666;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.no-results-suggestions {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: left;
}

.no-results-suggestions h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333333;
    margin-bottom: 1rem;
}

.no-results-suggestions ul {
    margin: 0;
    padding-left: 1.5rem;
}

.no-results-suggestions li {
    color: #555555;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

/* ==========================================================================
   6. Search Tips
   ========================================================================== */

.search-tips-section {
    margin-top: 2rem;
}

.search-tips {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
}

.search-tips h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333333;
    margin-bottom: 1.5rem;
    text-align: center;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.tip-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.tip-icon {
    font-size: 2rem;
    color: #FFA914;
    margin-bottom: 1rem;
}

.tip-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333333;
    margin-bottom: 0.5rem;
}

.tip-content p {
    font-size: 0.9rem;
    color: #666666;
    margin: 0;
    line-height: 1.4;
}

/* ==========================================================================
   7. Responsive Design
   ========================================================================== */

/* Mobile Phones (up to 767px) */
@media (max-width: 767px) {
    .search-header {
        padding: 1.5rem 0 1rem;
    }

    .search-page-title {
        font-size: 1.8rem;
    }

    .search-description {
        font-size: 1rem;
    }

    .search-form-container {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .search-form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .search-category-select {
        min-width: 100%;
    }

    .search-submit-btn {
        width: 100%;
        justify-content: center;
    }

    .search-results-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .search-result-item {
        border-radius: 8px;
    }

    .search-result-image {
        height: 160px;
    }

    .search-result-content {
        padding: 1rem;
    }

    .search-result-title {
        font-size: 1rem;
    }

    .pagination-list {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem;
    }

    .pagination-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.9rem;
    }

    .tips-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .tip-item {
        padding: 1rem;
    }
}

/* Tablets (768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .search-form-row {
        grid-template-columns: 1fr auto;
        gap: 1rem;
    }

    .search-filter-group {
        grid-column: 1 / -1;
        margin-top: 0.5rem;
    }

    .search-button-group {
        grid-column: 1 / -1;
        justify-self: center;
        margin-top: 0.5rem;
    }

    .search-submit-btn {
        width: auto;
    }

    .search-results-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tips-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop (992px and up) */
@media (min-width: 992px) {
    .search-results-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .search-result-image {
        height: 180px;
    }
}

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
    .search-page-title {
        font-size: 3rem;
    }

    .search-description {
        font-size: 1.2rem;
    }

    .search-form-container {
        padding: 2.5rem;
    }

    .search-input,
    .search-category-select,
    .search-submit-btn {
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
    }

    .search-results-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }

    .search-result-title {
        font-size: 1.2rem;
    }
}

/* ==========================================================================
   8. Animation & Interactions
   ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-result-item {
    animation: fadeInUp 0.4s ease forwards;
}

.search-result-item:nth-child(1) { animation-delay: 0.1s; }
.search-result-item:nth-child(2) { animation-delay: 0.2s; }
.search-result-item:nth-child(3) { animation-delay: 0.3s; }
.search-result-item:nth-child(4) { animation-delay: 0.4s; }
.search-result-item:nth-child(5) { animation-delay: 0.5s; }
.search-result-item:nth-child(6) { animation-delay: 0.6s; }

/* Focus States for Accessibility */
.search-input:focus,
.search-category-select:focus,
.search-submit-btn:focus,
.pagination-link:focus {
    outline: 2px solid #FFA914;
    outline-offset: 2px;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .search-result-item,
    .search-result-image img,
    .search-submit-btn,
    .pagination-link {
        animation: none;
        transition: none;
    }

    .search-result-item:hover,
    .search-submit-btn:hover {
        transform: none;
    }

    .search-result-item:hover .search-result-image img {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .search-form-container,
    .search-pagination-section,
    .search-tips-section {
        display: none;
    }

    .search-results-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .search-result-item {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
