/* ============================================
   V4 HUB PAGE STYLES - PREMIUM DESIGN
   ============================================ */

/* HIDE WORDPRESS DEFAULT PAGE TITLE */
.hub-wrapper + .entry-title,
.entry-header .entry-title,
.page-header .entry-title,
.page-title,
article .entry-title,
.post-title,
h1.entry-title,
.entry-content > h1:first-child,
article > h1:first-child,
.page .entry-header,
.type-page .entry-header {
    display: none !important;
}

/* Hide any H1 before hub-wrapper */
h1:not(.hub-wrapper h1) {
    display: none !important;
}

/* BASE STYLES */
.hub-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ================== HERO SECTION ================== */
.hub-hero {
    background: linear-gradient(135deg, #7C4DFF 0%, #9575FF 50%, #08B2A5 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hub-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
}

.hub-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 300px;
    height: 300px;
    background: rgba(8, 178, 165, 0.2);
    border-radius: 50%;
    pointer-events: none;
}

.hub-hero-content {
    position: relative;
    z-index: 1;
}

.hub-hero h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.hub-hero-subtitle {
    font-size: 1.25rem;
    margin: 0 0 2rem 0;
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hub-hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    display: block;
    margin-bottom: 0.5rem;
}

.hero-stat-label {
    font-size: 0.95rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* ================== STATS DASHBOARD ================== */
.stats-section {
    background: #F8F9FA;
    padding: 3rem 2rem;
}

.stats-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(124, 77, 255, 0.15);
}

.stat-icon {
    font-size: 3rem;
    line-height: 1;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F3F0FF 0%, #E8F5E9 100%);
    border-radius: 12px;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: #7C4DFF;
    display: block;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 500;
    margin-top: 0.25rem;
}

/* ================== FILTER BAR ================== */
.filter-section {
    background: white;
    padding: 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.filter-bar {
    max-width: 1400px;
    margin: 0 auto;
}

.search-box {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #E2D5FF;
    border-radius: 50px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #7C4DFF;
    box-shadow: 0 0 0 4px rgba(124, 77, 255, 0.1);
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    pointer-events: none;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.6rem 1.1rem;
    border: 2px solid #E2D5FF;
    background: white;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    color: #64748b;
    white-space: nowrap;
}

.filter-btn:hover {
    background: #F3F0FF;
    border-color: #7C4DFF;
    color: #7C4DFF;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #7C4DFF 0%, #9575FF 100%);
    border-color: #7C4DFF;
    color: white;
    box-shadow: 0 4px 12px rgba(124, 77, 255, 0.3);
}

/* ================== TOP 5 FEATURED SECTION ================== */
.top-5-section {
    background: linear-gradient(135deg, #F3F0FF 0%, #E8F5E9 100%);
    padding: 4rem 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 1rem 0;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

.top-5-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* ================== PHARMACY CARDS ================== */
.pharmacy-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pharmacy-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(124, 77, 255, 0.2);
}

.rank-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1a1a1a;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.rank-badge-1 {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
}

.rank-badge-2 {
    background: linear-gradient(135deg, #C0C0C0 0%, #A8A8A8 100%);
}

.rank-badge-3 {
    background: linear-gradient(135deg, #CD7F32 0%, #B8732B 100%);
}

.pharmacy-logo-container {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    background: #F8F9FA;
    border-radius: 12px;
    padding: 1rem;
}

.pharmacy-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.pharmacy-logo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.pharmacy-logo-placeholder-icon {
    font-size: 2rem;
}

.pharmacy-logo-placeholder-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: #7C4DFF;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pharmacy-name {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 1rem 0;
    text-align: center;
}

.pharmacy-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1rem;
    min-height: 32px;
}

.badge-pill {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-budget {
    background: #FFF9E6;
    color: #B8860B;
    border: 1px solid #FFE082;
}

.badge-fast {
    background: #E3F2FD;
    color: #1976D2;
    border: 1px solid #90CAF9;
}

.badge-transparent {
    background: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #A5D6A7;
}

.badge-discount {
    background: #FCE4EC;
    color: #C2185B;
    border: 1px solid #F48FB1;
}

.badge-trusted {
    background: #F3E5F5;
    color: #7B1FA2;
    border: 1px solid #CE93D8;
}

.pharmacy-rating {
    text-align: center;
    margin-bottom: 1.5rem;
}

.star-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.star {
    font-size: 1.25rem;
    line-height: 1;
}

.star-full {
    color: #FFB300;
}

.star-half {
    color: #FFB300;
    opacity: 0.6;
}

.star-empty {
    color: #E0E0E0;
}

.rating-number {
    margin-left: 0.5rem;
    font-weight: 600;
    color: #64748b;
    font-size: 0.95rem;
}

.pharmacy-price {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #F3F0FF 0%, #E8F5E9 100%);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.price-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.price-amount {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: #08B2A5;
    display: block;
    line-height: 1;
}

.price-period {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.pharmacy-info-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.pharmacy-info-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: #64748b;
}

.info-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.pharmacy-card-cta {
    margin-top: auto;
}

.card-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    border-radius: 50px;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #08B2A5 0%, #10B981 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(8, 178, 165, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #069B8F 0%, #0EA572 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(8, 178, 165, 0.4);
}

.btn-secondary {
    background: white;
    color: #7C4DFF;
    border: 2px solid #7C4DFF;
}

.btn-secondary:hover {
    background: #7C4DFF;
    color: white;
}

/* ================== ALL PHARMACIES GRID ================== */
.all-pharmacies-section {
    padding: 4rem 2rem;
    background: white;
}

.pharmacies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.pharmacy-card[data-category] {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pharmacy-card.hidden {
    display: none;
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-results h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

/* ================== COMPARISON TABLE SECTION ================== */
.comparison-section {
    background: #F8F9FA;
    padding: 4rem 2rem;
}

.comparison-table-wrapper {
    overflow-x: auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    max-width: 1400px;
    margin: 0 auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.comparison-table thead {
    background: linear-gradient(135deg, #7C4DFF 0%, #9575FF 100%);
    color: white;
}

.comparison-table th {
    padding: 1.25rem 1rem;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    user-select: none;
}

.comparison-table th:hover {
    background: rgba(255, 255, 255, 0.1);
}

.comparison-table tbody tr {
    border-bottom: 1px solid #E2D5FF;
    transition: background 0.2s;
}

.comparison-table tbody tr:hover {
    background: #F3F0FF;
}

.comparison-table td {
    padding: 1.25rem 1rem;
}

.price-cell {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #08B2A5;
    font-size: 1.1rem;
}

.price-cell.cheapest {
    color: #16A34A;
    background: #E8F5E9;
}

/* ================== RESPONSIVE ================== */
@media (max-width: 768px) {
    .hub-hero {
        padding: 3rem 1.5rem;
    }
    
    .hub-hero h1 {
        font-size: 2rem;
    }
    
    .hub-hero-subtitle {
        font-size: 1rem;
    }
    
    .hub-hero-stats {
        gap: 1.5rem;
    }
    
    .hero-stat-number {
        font-size: 2rem;
    }
    
    .stats-section {
        padding: 2rem 1rem;
    }
    
    .stats-dashboard {
        grid-template-columns: 1fr;
    }
    
    .filter-section {
        padding: 1.5rem 1rem;
    }
    
    .filter-buttons {
        flex-direction: column;
    }
    
    .filter-btn {
        width: 100%;
    }
    
    .top-5-section,
    .all-pharmacies-section,
    .comparison-section {
        padding: 3rem 1rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .top-5-grid,
    .pharmacies-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-table {
        font-size: 0.85rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem 0.5rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .top-5-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pharmacies-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}