/* Home page styles */

/* Hero Section */
.hero-section {
    padding: 5rem 2rem 4rem 2rem;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.hero-mascot {
    width: 180px;
    height: 180px;
    margin: 0 auto 1.5rem auto;
    display: block;
    transition: transform 0.3s ease;
}

.hero-mascot:hover {
    transform: scale(1.05) rotate(5deg);
}

.hero-title {
    color: var(--text-primary);
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.15rem;
    margin: 0 0 2.5rem 0;
    font-weight: 400;
}

.hero-search-box {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    z-index: 10;
}

.filter-icon-btn {
    position: absolute;
    left: 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
    border-radius: 6px;
}

.filter-icon-btn:hover {
    color: var(--accent-primary);
    background: rgba(77, 164, 160, 0.1);
}

.filter-icon-btn.active {
    color: var(--accent-primary);
}

.filter-icon-btn .filter-count {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--accent-primary);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.1rem 0.35rem;
    border-radius: 8px;
    min-width: 16px;
    text-align: center;
    line-height: 1.2;
}

.hero-search-box input {
    flex: 1;
    width: 100%;
    padding: 1rem 1.5rem 1rem 3.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: border-color 0.2s;
}

.hero-search-box input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.hero-search-box input::placeholder {
    color: var(--text-secondary);
}

.btn-hero-search {
    background: var(--accent-primary);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-hero-search:hover {
    background: var(--accent-hover);
}

.btn-hero-search:active {
    transform: scale(0.98);
}

/* Filter Panel - Desktop (Dropdown) */
.filter-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    margin-top: -1px;
    background: var(--bg-card);
    border: 1px solid var(--accent-primary);
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    overflow: hidden;
    animation: expandDown 0.2s ease-out;
    transform-origin: top;
}

@keyframes expandDown {
    from {
        opacity: 0;
        transform: scaleY(0.95);
    }
    to {
        opacity: 1;
        transform: scaleY(1);
    }
}

/* When filter panel is open, adjust search input styling */
#planSearchInput.filter-active {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-color: var(--accent-primary);
}

.filter-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    padding-bottom: 0;
    border-radius: 0;
}

.filter-panel-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-close-filters {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.btn-close-filters:hover {
    color: var(--text-primary);
}

.filter-panel-content {
    padding: 1.25rem;
}

.filter-section {
    margin-bottom: 1rem;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: left;
}

@media (max-width: 768px) {
    .filter-section label {
        text-align: center;
    }
}

.filter-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.2s;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.filter-panel-footer {
    padding: 1rem 1.25rem;
    display: flex;
    gap: 0.75rem;
    border-radius: 0 0 8px 8px;
}

.btn-clear-filters {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    background: var(--bg-primary);
    color: var(--text-secondary);
    transition: all 0.2s;
}

.btn-clear-filters:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.btn-apply-filters {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    background: var(--accent-primary);
    color: white;
    transition: all 0.2s;
}

.btn-apply-filters:hover {
    background: var(--accent-hover);
}

.filter-overlay {
    display: none;
}

/* Mobile: dark overlay */
@media (max-width: 768px) {
    .filter-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        animation: fadeIn 0.3s ease-out;
    }
}

.search-results {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.search-results h3 {
    color: var(--text-primary);
    margin: 0 0 1.5rem 0;
    font-size: 0.95rem;
    font-weight: 500;
}

.see-all-results-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.5rem;
}

.see-all-results-link:hover {
    color: var(--accent-hover);
    gap: 0.5rem;
}

.see-all-results-link i {
    font-size: 0.85rem;
    transition: transform 0.2s;
}

.see-all-results-link:hover i {
    transform: translateX(2px);
}

/* Section Styling */
.search-results-section {
    margin-bottom: 2rem;
}

.search-results-section:last-child {
    margin-bottom: 0;
}

.section-title {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.7;
}

.section-title i {
    font-size: 0.85rem;
}

/* Base Card Styling */
.search-result-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: var(--bg-primary);
    margin-bottom: 0.75rem;
    transition: all 0.2s;
    border-left: 4px solid transparent;
}

.search-result-card.plan-card {
    cursor: pointer;
}

.search-result-card.issuer-card {
    cursor: pointer;
}


.search-result-card:hover {
    transform: translateX(2px);
}

.search-result-card:last-child {
    margin-bottom: 0;
}

.search-result-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.home-action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1rem;
    opacity: 0.7;
    transition: all 0.2s;
    flex-shrink: 0;
    margin-left: 1rem;
}

.search-result-card:hover .home-action-icon {
    opacity: 1;
    color: var(--accent-primary);
}

.home-action-icon i.fa-check {
    color: #4CAF50;
    opacity: 1;
}

.result-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.result-icon-image {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    object-fit: contain;
    flex-shrink: 0;
    padding: 0;
}

.result-content {
    flex: 1;
}

.result-content h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
}

.result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.result-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.result-meta i {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Issuer Card Styling */
.issuer-card {
    border-left-color: #4CAF50;
    cursor: pointer;
}

.issuer-icon {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.btn-view-issuer {
    background: #4CAF50;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-view-issuer:hover {
    background: #43A047;
}

/* Product Card Styling */
.product-card {
    border-left-color: #2196F3;
}

.product-icon {
    background: rgba(33, 150, 243, 0.1);
    color: #2196F3;
}

.btn-view-product {
    background: #2196F3;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-view-product:hover {
    background: #1E88E5;
}

/* Plan Card Styling */
.plan-card {
    border-left-color: #9C27B0;
}

.plan-icon {
    background: rgba(156, 39, 176, 0.1);
    color: #9C27B0;
}

.search-error {
    margin-top: 1rem;
    padding: 1rem;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    color: #c33;
    text-align: left;
}

/* Insurance Companies Section */
.insurance-companies-section {
    padding: 3rem 2rem;
}

.insurance-companies-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.insurance-companies-title {
    color: var(--accent-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
}

.insurance-companies-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 400;
    margin: 1.5rem 0 0 0;
    opacity: 0.8;
}

.insurance-logos-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
}

.insurance-logo-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    min-width: 180px;
}

.insurance-logo-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.insurance-logo {
    max-width: 150px;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Request Tile Styling */
.insurance-logo-item.request-tile {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-hover) 100%);
    border: none;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.insurance-logo-item.request-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.insurance-logo-item.request-tile:hover::before {
    opacity: 1;
}

.insurance-logo-item.request-tile:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 20px rgba(126, 87, 194, 0.3);
}

.request-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-align: center;
}

.request-content i {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.request-content span {
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.3;
}

.request-content .request-subtitle {
    font-size: 0.8rem;
    opacity: 0.9;
    font-weight: 400;
}

.btn-add-to-my-plans {
    background: #9C27B0;
    color: white;
    padding: 0;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-add-to-my-plans:hover {
    background: #8E24AA;
    transform: scale(1.05);
}

.btn-add-to-my-plans:active {
    transform: scale(0.95);
}

.btn-view-all-results {
    background: var(--accent-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-view-all-results:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(77, 164, 160, 0.3);
}

/* Request Plan Card on Home Page */
.request-plan-card-home {
    border-left-color: var(--accent-primary) !important;
    background: var(--bg-card);
    cursor: pointer;
    justify-content: space-between;
}

.request-plan-card-home:hover {
    transform: translateX(2px);
}

.request-plan-card-home .result-content h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.request-plan-card-home .result-content .result-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.request-card-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.request-plan-card-home:hover .request-card-arrow {
    transform: translateX(4px);
}

.request-plan-card-home .btn-view-plan {
    background: var(--accent-primary);
    color: white;
    padding: 0;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.request-plan-card-home .btn-view-plan:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

.btn-view-plan {
    background: #9C27B0;
    color: white;
    padding: 0;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-decoration: none;
}

.btn-view-plan:hover {
    background: #8E24AA;
    transform: scale(1.05);
}

.btn-view-plan:active {
    transform: scale(0.95);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 1.5rem;
    }
    
    /* Mobile Bottom Sheet */
    .filter-panel {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        min-width: 100%;
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
        animation: slideUp 0.3s ease-out;
        z-index: 1000;
        border: 2px solid var(--accent-primary);
        border-bottom: none;

    }
    
    @keyframes slideUp {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
    
    .filter-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        animation: fadeIn 0.3s ease-out;
    }
    
    @keyframes fadeIn {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }

    .hero-mascot {
        width: 90px;
        height: 90px;
        margin-bottom: 1.25rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .hero-search-box {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .search-input-wrapper {
        width: 100%;
    }
    
    .filter-icon-btn {
        left: 0.75rem;
    }

    .btn-hero-search {
        width: 100%;
        justify-content: center;
    }

    .search-result-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
    }

    .search-result-info {
        width: 100%;
    }

    .result-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .result-icon-image {
        width: 56px;
        height: 56px;
        padding: 0;
    }

    .result-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn-view-issuer,
    .btn-view-product {
        width: 100%;
        justify-content: center;
    }
    
    .btn-add-to-my-plans,
    .btn-view-plan {
        width: 40px;
        height: 40px;
    }
    
    .section-title {
        font-size: 0.85rem;
    }
    
    .insurance-companies-section {
        padding: 2rem 1.5rem;
    }
    
    .insurance-companies-title {
        font-size: 1.25rem;
    }
    
    .insurance-companies-subtitle {
        font-size: 0.85rem;
    }
    
    .insurance-logos-grid {
        gap: 1.5rem;
    }
    
    .insurance-logo-item {
        min-width: 150px;
        padding: 1.25rem;
    }
    
    .insurance-logo {
        max-width: 120px;
        max-height: 50px;
    }
    
    .request-content i {
        font-size: 1.5rem;
    }
    
    .request-content span {
        font-size: 0.85rem;
    }
    
    .request-content .request-subtitle {
        font-size: 0.75rem;
    }
}

/* User Organizations Section */
.user-organizations-section {
    background: var(--bg-secondary);
    padding: 4rem 2rem;
    margin: 2rem 0;
}

.user-organizations-content {
    max-width: 1200px;
    margin: 0 auto;
}

.organizations-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.organizations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.organization-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    display: block;
}

.organization-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.organization-card-image,
.organization-card-placeholder {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.organization-card-placeholder {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
}

.organization-card-content {
    padding: 1.5rem;
}

.organization-card-content h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
    font-size: 1.3rem;
}

.organization-card-description {
    color: var(--text-secondary);
    margin: 0 0 1rem 0;
    line-height: 1.5;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.organization-card-role {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .user-organizations-section {
        padding: 3rem 1rem;
    }
    
    .organizations-title {
        font-size: 1.5rem;
    }
    
    .organizations-grid {
        grid-template-columns: 1fr;
    }
}

/* Demo Video Section */
.demo-video-section {
    padding: 3rem 2rem;
    margin-bottom: 4rem;
    text-align: center;
}

.demo-video-section h2 {
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 600;
    margin: 0 0 2rem 0;
}

.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    background: var(--bg-card);
}

.video-wrapper iframe,
.video-wrapper #youtube-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-wrapper #youtube-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 768px) {
    .demo-video-section {
        padding: 2rem 1.5rem;
        margin-bottom: 3rem;
    }
    
    .demo-video-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .video-wrapper {
        border-radius: 8px;
    }
}

