/* Philippine Development Plan 2022-2025 Framework Styles */

.pdp-framework-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #dee2e6;
}

.framework-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #007cba;
}

.framework-header h3 {
    color: #007cba;
    font-size: 1.8em;
    margin-bottom: 10px;
    font-weight: 600;
}

.framework-header p {
    color: #6c757d;
    font-size: 1.1em;
    margin-bottom: 20px;
}

/* Search Mode Toggle */
.search-mode-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 160px;
    height: 40px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #28a745, #20c997);
    transition: .4s;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.toggle-text-off,
.toggle-text-on {
    color: white;
    font-weight: 600;
    font-size: 0.9em;
    transition: opacity 0.3s ease;
}

.toggle-text-off {
    opacity: 1;
}

.toggle-text-on {
    opacity: 0.5;
}

input:checked + .slider {
    background: linear-gradient(135deg, #007cba, #0056b3);
}

input:checked + .slider .toggle-text-off {
    opacity: 0.5;
}

input:checked + .slider .toggle-text-on {
    opacity: 1;
}

.toggle-label {
    color: #495057;
    font-weight: 500;
}

/* Pillars Grid */
.pillars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.pillar-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #e0e0e0;
}

.pillar-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-color: #007cba;
}

.pillar-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
    padding-left: 10px;
    border-radius: 8px;
}

.pillar-icon {
    font-size: 2.5em;
    line-height: 1;
    margin-top: 5px;
}

.pillar-info {
    flex: 1;
}

.pillar-title {
    color: #2c3e50;
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
}

.pillar-description {
    color: #6c757d;
    font-size: 0.95em;
    line-height: 1.4;
    margin: 0;
}

.pillar-stats {
    display: flex;
    justify-content: space-around;
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5em;
    font-weight: 600;
    color: #007cba;
}

.stat-label {
    font-size: 0.9em;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pillar-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.pillar-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pillar-btn.primary {
    background: linear-gradient(135deg, #007cba, #0056b3);
    color: white;
}

.pillar-btn.secondary {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
}

.pillar-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* Statistics Section */
.pdp-statistics {
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.pdp-statistics h4 {
    color: #007cba;
    margin-bottom: 20px;
    font-size: 1.3em;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    border-left: 4px solid;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-card.primary {
    border-color: #007cba;
}

.stat-card.success {
    border-color: #28a745;
}

.stat-card.warning {
    border-color: #ffc107;
}

.stat-card.info {
    border-color: #17a2b8;
}

.stat-card .stat-icon {
    font-size: 1.8em;
    margin-bottom: 8px;
}

.stat-card .stat-value {
    font-size: 1.6em;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-card .stat-label {
    font-size: 0.9em;
    color: #6c757d;
    font-weight: 500;
}

.stat-card .stat-sublabel {
    font-size: 0.8em;
    color: #adb5bd;
    margin-top: 3px;
}

/* Pillar Breakdown */
.pillar-breakdown {
    margin-top: 20px;
}

.pillar-breakdown h5 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.breakdown-bars {
    space-y: 10px;
}

.breakdown-item {
    margin-bottom: 12px;
}

.breakdown-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.breakdown-icon {
    margin-right: 8px;
}

.breakdown-title {
    flex: 1;
    color: #495057;
    font-weight: 500;
}

.breakdown-count {
    color: #6c757d;
    font-weight: 600;
}

.breakdown-bar {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.breakdown-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Active Filters */
.active-filters {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    border: 1px solid #e0e0e0;
}

.active-filters h5 {
    margin-bottom: 10px;
    color: #495057;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.filter-tag {
    background: linear-gradient(135deg, #007cba, #0056b3);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-tag.pillar {
    background: linear-gradient(135deg, #28a745, #1e7e34);
}

.remove-filter {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
}

.remove-filter:hover {
    background: rgba(255, 255, 255, 0.5);
}

.clear-filters-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s ease;
}

.clear-filters-btn:hover {
    background: #c82333;
}

/* Enhanced Search Results */
.enhanced-search-results {
    margin-top: 20px;
}

.results-header {
    background: linear-gradient(135deg, #007cba, #0056b3);
    color: white;
    padding: 15px 20px;
    border-radius: 10px 10px 0 0;
}

.results-header h4 {
    margin: 0 0 5px 0;
    font-size: 1.2em;
}

.results-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    opacity: 0.9;
}

.results-list {
    background: white;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 10px 10px;
    overflow: hidden;
}

.result-item {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s ease;
}

.result-item:hover {
    background: #f8f9fa;
}

.result-item:last-child {
    border-bottom: none;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.result-title {
    margin: 0;
    flex: 1;
}

.result-link {
    color: #007cba;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
    line-height: 1.3;
}

.result-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.result-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    font-size: 0.9em;
    color: #6c757d;
}

.result-year {
    background: #e9ecef;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.relevance-score {
    background: #28a745;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8em;
}

.result-pillars {
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pillars-label {
    font-size: 0.9em;
    color: #495057;
    font-weight: 500;
}

.pillar-tag {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-left: 3px solid;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    color: #495057;
}

.result-content {
    margin: 10px 0;
}

.result-excerpt {
    color: #495057;
    line-height: 1.5;
    margin: 0;
}

.matched-terms {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.terms-label {
    font-size: 0.9em;
    color: #6c757d;
    font-weight: 500;
}

.matched-keyword {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8em;
    color: #856404;
    font-weight: 500;
}

/* Search Highlighting */
.search-highlight {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    padding: 1px 3px;
    border-radius: 2px;
    font-weight: 600;
    color: #856404;
}

.exact-phrase-highlight {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    padding: 1px 3px;
    border-radius: 2px;
    font-weight: 600;
    color: #155724;
    border: 1px solid #b3d7ff;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.no-results-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.no-results h5 {
    color: #495057;
    margin-bottom: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pdp-framework-section {
        padding: 15px;
        margin: 15px 0;
    }
    
    .pillars-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .pillar-card {
        padding: 15px;
    }
    
    .pillar-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .pillar-actions {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .search-mode-toggle {
        flex-direction: column;
        gap: 10px;
    }
    
    .toggle-switch {
        width: 140px;
        height: 35px;
    }
    
    .results-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .result-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .result-pillars {
        justify-content: center;
    }
}