/* Partners Section */
.partners-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    min-height: 100vh;
}

.partners-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Search Section */
.search-section {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    margin-bottom: 50px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.search-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #C8141F, #008B45);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-filters {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.filter-group {
    position: relative;
}

.filter-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.filter-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: #ffffff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23333' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
}

.filter-select:focus {
    outline: none;
    border-color: #C8141F;
    box-shadow: 0 0 0 3px rgba(200, 20, 31, 0.1);
}

.filter-select:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

.search-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.search-btn {
    padding: 12px 35px;
    background: linear-gradient(135deg, #C8141F, #008B45);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(200, 20, 31, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(200, 20, 31, 0.4);
}

.search-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.reset-btn {
    padding: 12px 25px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Loading Spinner */
.loading-spinner {
    display: none;
}

.loading-spinner::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Results Section */
.results-section {
    margin-top: 30px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.results-count {
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
}

.results-count strong {
    color: #C8141F;
}

.view-toggle {
    display: flex;
    gap: 10px;
    background: #f8f9fa;
    padding: 5px;
    border-radius: 10px;
}

.view-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.view-btn.active {
    background: #C8141F;
    color: white;
    box-shadow: 0 2px 5px rgba(200, 20, 31, 0.3);
}

/* Partners Grid */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 30px;
}

.partners-grid.list-view {
    grid-template-columns: 1fr;
}

.partners-grid.list-view .partner-card {
    display: flex;
    height: auto;
    /* max-height: 280px; */
}

.partners-grid.list-view .partner-image {
    width: 280px;
    height: 100%;
    flex-shrink: 0;
}

.partners-grid.list-view .partner-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Partner Card */
.partner-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.partner-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.partner-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.partner-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.partner-card:hover .partner-image img {
    transform: scale(1.1);
}

.partner-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.partner-header {
    position: relative;
    margin-bottom: 15px;
}

.partner-type {
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(135deg, #C8141F, #008B45);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.partner-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.3;
    padding-right: 100px;
}

.partner-address {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.partner-address::before {
    content: '📍';
    font-size: 0.8rem;
}

.partner-description {
    color: #555;
    line-height: 1.6;
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.partner-contact {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #333;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-item::before {
    font-size: 0.8rem;
    opacity: 0.7;
}

.phone::before {
    content: '📞';
}

.email::before {
    content: '✉️';
}

.website::before {
    content: '🌐';
}

.partner-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.view-details {
    background: linear-gradient(135deg, #C8141F, #008B45);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.view-details:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(200, 20, 31, 0.3);
    color: white;
}

.discount-badge {
    background: #ff6b6b;
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Modern Communication Styling */
.communication-info {
    background: #f0f7ff;
    border-left: 4px solid #4dabf7;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.communication-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #333;
    line-height: 1.5;
}

.communication-info strong {
    color: #C8141F;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #666;
    grid-column: 1 / -1;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

/* Animation for cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.partner-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.partner-card:nth-child(1) { animation-delay: 0.1s; }
.partner-card:nth-child(2) { animation-delay: 0.2s; }
.partner-card:nth-child(3) { animation-delay: 0.3s; }
.partner-card:nth-child(4) { animation-delay: 0.4s; }
.partner-card:nth-child(5) { animation-delay: 0.5s; }
.partner-card:nth-child(6) { animation-delay: 0.6s; }

/* Responsive Design */
@media (max-width: 1200px) {
    .search-filters {
        grid-template-columns: repeat(2, 1fr);
    }

    .partners-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

@media (max-width: 768px) {
    .partners-section {
        padding: 60px 0;
    }

    .search-section {
        padding: 30px 20px;
    }

    .search-filters {
        grid-template-columns: 1fr;
    }

    .partners-grid {
        grid-template-columns: 1fr;
    }

    .search-actions {
        flex-direction: column;
    }

    .search-btn, .reset-btn {
        width: 100%;
    }

    .results-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .view-toggle {
        align-self: flex-end;
    }

    .partners-grid.list-view .partner-card {
        flex-direction: column;
        max-height: none;
    }

    .partners-grid.list-view .partner-image {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .partners-container {
        padding: 0 15px;
    }

    .search-title {
        font-size: 1.5rem;
    }

    .partner-card {
        margin: 0;
    }

    .partner-name {
        padding-right: 0;
        font-size: 1.2rem;
    }

    .partner-type {
        position: static;
        display: inline-block;
        margin-bottom: 10px;
    }
}

/* Pagination wrapper */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 36px;
  margin-bottom: 12px;
}

/* Bootstrap pagination reset/target */
.pagination {
  display: inline-flex;
  gap: 10px;
  list-style: none;
  padding: 6px;
  margin: 0;
  align-items: center;
  background: linear-gradient(90deg, rgba(8,40,20,0.03), rgba(8,40,20,0.02));
  border-radius: 40px;
  box-shadow: 0 8px 30px rgba(8,40,20,0.04);
  padding: 8px;
}

/* Page links styling */
.pagination .page-item .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: #2b3a36;
  font-weight: 600;
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease, color .14s ease;
  box-shadow: none;
}

/* Hover / focus */
.pagination .page-item .page-link:hover,
.pagination .page-item .page-link:focus {
  transform: translateY(-4px);
  background: linear-gradient(90deg, rgba(200,20,31,0.08), rgba(0,143,74,0.06));
  color: #0b2b1a;
  outline: none;
  box-shadow: 0 8px 18px rgba(8,40,20,0.06);
}

/* Active page (current) — gradient fill */
.pagination .page-item.active .page-link {
  color: #ffffff;
  background: linear-gradient(90deg, #C8141F 0%, #008B45 100%);
  box-shadow: 0 12px 30px rgba(8,40,20,0.12);
  transform: translateY(-2px);
}

/* Disabled */
.pagination .page-item.disabled .page-link {
  opacity: 0.45;
  cursor: default;
  transform: none;
}

/* Prev/Next arrows slightly different size */
.pagination .page-item .page-link .visually-hidden {
  display: none;
}

/* smaller screens: compact */
@media (max-width: 576px) {
  .pagination .page-item .page-link {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 14px;
  }

  .pagination-wrapper { margin-top: 20px; }

  /* .pagination-wrapper {
    position: sticky;
    bottom: 18px;
    z-index: 30;
    padding: 8px 12px;
  } */
}

@media (max-width: 768px) {
    .view-toggle {
        display: none !important;
    }
}
