/* Import Poppins font like dooApp */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: #434856;
    background: linear-gradient(135deg, #E1E6F9 0%, #f8fafc 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header - dooApp style */
header {
    text-align: center;
    padding: 30px 0;
    color: #0D1640;
    margin-bottom: 25px;
    position: relative;
}


header h1 {
    font-size: 2.6rem;
    margin-bottom: 10px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 20px;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.stat {
    background: rgba(255, 255, 255, 0.15);
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.stat:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* Main content */
main {
    flex: 1;
}

/* Hero Section - Clean and professional */
.hero-section {
    text-align: center;
    padding: 40px 0;
    margin-bottom: 30px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(225, 230, 249, 0.6) 100%);
    border-radius: 25px;
    border: 1px solid rgba(63, 93, 217, 0.08);
    box-shadow: 0 4px 20px rgba(63, 93, 217, 0.05);
}

.hero-title {
    font-size: 2rem;
    color: #0D1640;
    margin-bottom: 12px;
    font-weight: 700;
    font-family: 'Poppins', Arial, sans-serif;
}

.hero-subtitle {
    font-size: 1rem;
    color: #434856;
    margin-bottom: 30px;
    font-weight: 400;
    opacity: 0.9;
}

/* Search Tips Unified - Compact section with buttons */
.search-tips-unified {
    margin-top: 20px;
    text-align: center;
}

.search-tips-label {
    font-size: 0.9rem;
    color: #434856;
    margin-bottom: 15px;
    font-weight: 500;
}

.search-tips-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 650px;
    margin: 0 auto;
}

.search-tip-btn {
    background: linear-gradient(135deg, #3F5DD9 0%, #8094E6 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: 'Poppins', Arial, sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(63, 93, 217, 0.2);
}

.search-tip-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(63, 93, 217, 0.3);
    background: linear-gradient(135deg, #0D1640 0%, #3F5DD9 100%);
}

/* Section headers */
.section-header {
    text-align: center;
    margin-bottom: 25px;
}

.section-title {
    font-size: 1.6rem;
    color: #0D1640;
    margin-bottom: 6px;
    font-weight: 600;
    font-family: 'Poppins', Arial, sans-serif;
}

.section-subtitle {
    font-size: 0.9rem;
    color: #8094E6;
    font-weight: 400;
    margin: 0;
}

/* Recent FAQs Grid */
.recent-faqs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.recent-faq-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(63, 93, 217, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.recent-faq-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(63, 93, 217, 0.12);
    border-color: rgba(63, 93, 217, 0.15);
}

.faq-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 15px;
}

.faq-number {
    background: linear-gradient(135deg, #3F5DD9 0%, #8094E6 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Poppins', Arial, sans-serif;
    flex-shrink: 0;
}

.faq-badge {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Poppins', Arial, sans-serif;
}

.faq-badge-published {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.faq-badge-updated {
    background: rgba(245, 158, 11, 0.1);
    color: #92400E;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.faq-card-title {
    margin: 0 0 12px 0;
}

.faq-card-title a {
    color: #0D1640;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
    transition: color 0.3s ease;
    display: block;
}

.faq-card-title a:hover {
    color: #3F5DD9;
}

.faq-card-date {
    color: #8094E6;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: right;
    margin-top: 10px;
}

/* Search section - dooApp style */
.search-section {
    margin-bottom: 30px;
}

.search-form {
    margin-bottom: 15px;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    max-width: 700px;
    margin: 0 auto;
    background: white;
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(63, 93, 217, 0.15);
    overflow: hidden;
    border: 1px solid rgba(63, 93, 217, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.search-input-wrapper:focus-within {
    box-shadow: 0 10px 40px rgba(63, 93, 217, 0.25);
    transform: translateY(-2px);
}

.search-input {
    flex: 1;
    padding: 20px 25px;
    padding-right: 50px;
    border: none;
    font-size: 1rem;
    font-family: 'Poppins', Arial, sans-serif;
    outline: none;
    color: #434856;
}

.search-input::placeholder {
    color: #8094E6;
    font-weight: 400;
}

.search-button {
    padding: 20px 25px;
    background: #3F5DD9;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.search-button:hover {
    background: #0D1640;
    transform: scale(1.05);
}

/* Search loading indicator - Subtle in-field spinner */
.search-loading {
    position: absolute;
    right: 75px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    align-items: center;
    justify-content: center;
}

.search-loading.htmx-request {
    display: flex;
}

.search-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(63, 93, 217, 0.2);
    border-top: 2px solid #3F5DD9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Recent FAQs Section */
.recent-faqs-section {
    background: linear-gradient(135deg, rgba(63, 93, 217, 0.03) 0%, rgba(129, 148, 230, 0.01) 100%);
    border: 1px solid rgba(63, 93, 217, 0.08);
    border-radius: 25px;
    padding: 30px;
    margin-bottom: 30px;
    position: relative;
    box-shadow: 0 4px 20px rgba(63, 93, 217, 0.05);
}

.recent-faqs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.recent-faqs-header h2 {
    color: #0D1640;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
}

.dismiss-button {
    background: rgba(63, 93, 217, 0.1);
    border: 1px solid rgba(63, 93, 217, 0.2);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #8094E6;
    font-size: 14px;
    transition: all 0.3s ease;
}

.dismiss-button:hover {
    background: rgba(63, 93, 217, 0.15);
    color: #3F5DD9;
    transform: scale(1.1);
}

.recent-faqs-content {
    display: grid;
    gap: 15px;
}

.recent-faq-item {
    background: white;
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(63, 93, 217, 0.1);
    transition: all 0.3s ease;
}

.recent-faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(63, 93, 217, 0.12);
}

.recent-faq-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.recent-faq-number {
    background: linear-gradient(135deg, #3F5DD9 0%, #8094E6 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.recent-faq-badge {
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
}

.recent-faq-badge.published {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.recent-faq-badge.updated {
    background: rgba(245, 158, 11, 0.1);
    color: #92400E;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.recent-faq-date {
    color: #8094E6;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: auto;
}

.recent-faq-title {
    margin: 0;
}

.recent-faq-title a {
    color: #0D1640;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.recent-faq-title a:hover {
    color: #3F5DD9;
}

/* Results */
.results-container {
    min-height: 0;
    transition: none;
}

.results-container.hidden {
    visibility: hidden;
    height: 0;
    overflow: hidden;
}

.results-container:empty {
    visibility: hidden;
    height: 0;
    overflow: hidden;
}

/* Prevent layout shifts during search */
.hero-section {
    position: relative;
}

.search-tips-compact {
    position: relative;
    z-index: 10;
}

.welcome-message {
    text-align: center;
    padding: 80px 20px;
}

.welcome-message h2 {
    color: #0D1640;
    margin-bottom: 25px;
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Poppins', Arial, sans-serif;
}

.welcome-message p {
    color: #434856;
    font-size: 1.2rem;
    margin-bottom: 50px;
    font-weight: 400;
}

.search-tips {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
    background: white;
    padding: 40px;
    border-radius: 25px;
    box-shadow: 0 10px 40px rgba(63, 93, 217, 0.1);
    border: 1px solid rgba(63, 93, 217, 0.05);
}

.search-tips h3 {
    color: #0D1640;
    margin-bottom: 25px;
    font-weight: 700;
    font-family: 'Poppins', Arial, sans-serif;
}

.search-tips ul {
    list-style: none;
}

.search-tips li {
    padding: 15px 0;
    border-bottom: 1px solid rgba(63, 93, 217, 0.1);
    color: #434856;
    font-weight: 500;
}

.search-tips li:last-child {
    border-bottom: none;
}

.search-tips strong {
    color: #3F5DD9;
    font-weight: 700;
}

/* Results header */
.results-header {
    margin-bottom: 30px;
    text-align: center;
}

.results-header h2 {
    color: #374151;
    margin-bottom: 10px;
}

.search-query {
    color: #6b7280;
    font-style: italic;
}

/* FAQ Grid - Compact dooApp style */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.faq-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(63, 93, 217, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.faq-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(63, 93, 217, 0.12);
    border-color: rgba(63, 93, 217, 0.15);
}

.faq-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 15px;
}

.faq-number {
    background: linear-gradient(135deg, #3F5DD9 0%, #8094E6 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Poppins', Arial, sans-serif;
    flex-shrink: 0;
}

/* New date styles for search results */
.faq-dates {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
}

.faq-date-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
}

.faq-date-item .date-label {
    color: #8094E6;
    font-weight: 500;
}

.faq-date-item .date-value {
    color: #434856;
    font-weight: 600;
    background: rgba(63, 93, 217, 0.05);
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid rgba(63, 93, 217, 0.1);
}

.faq-date-item.faq-updated .date-label {
    color: #F59E0B;
}

.faq-date-item.faq-updated .date-value {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: #92400E;
}

/* Legacy support for old faq-date class */
.faq-date {
    color: #8094E6;
    font-size: 0.85rem;
    font-weight: 500;
}

.faq-card-title {
    margin-bottom: 12px;
    margin-top: 0;
}

.faq-card-link {
    color: #0D1640;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    transition: color 0.3s ease;
    display: block;
}

.faq-card-link:hover {
    color: #3F5DD9;
}

.faq-card-excerpt {
    color: #434856;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-top: 12px;
}

.faq-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: #8094E6;
    margin-bottom: 15px;
}

.faq-numero {
    color: #3F5DD9;
    font-weight: 600;
    font-size: 0.9rem;
}

.faq-date {
    color: #8094E6;
    font-weight: 500;
}

.faq-excerpt {
    color: #434856;
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.faq-footer {
    display: flex;
    justify-content: flex-end;
}

.read-more {
    color: #3F5DD9;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(63, 93, 217, 0.05);
}

.read-more:hover {
    background: #3F5DD9;
    color: white;
    transform: translateX(5px);
}

/* No results */
.no-results {
    text-align: center;
    padding: 60px 20px;
}

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

.no-results h2 {
    color: #374151;
    margin-bottom: 15px;
}

.no-results p {
    color: #6b7280;
    margin-bottom: 30px;
}

.search-suggestions {
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-suggestions h3 {
    color: #374151;
    margin-bottom: 15px;
    text-align: center;
}

.search-suggestions ul {
    list-style: none;
}

.search-suggestions li {
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
    color: #6b7280;
}

.search-suggestions li:last-child {
    border-bottom: none;
}

/* Pagination - dooApp style */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 50px;
    padding: 25px;
}

.page-btn {
    background: #3F5DD9;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Poppins', Arial, sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(63, 93, 217, 0.2);
}

.page-btn:hover {
    background: #0D1640;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(63, 93, 217, 0.3);
}

.page-btn:disabled {
    background: #8094E6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.page-info {
    color: #434856;
    font-weight: 600;
    padding: 12px 20px;
    background: white;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(63, 93, 217, 0.1);
}

/* Footer - dooApp style */
body > .container > footer {
    margin-top: 80px;
    padding: 30px 0;
    text-align: center;
    color: #8094E6;
    border-top: 1px solid rgba(63, 93, 217, 0.08);
    position: relative;
}


body > .container > footer p {
    margin-bottom: 15px;
    font-weight: 500;
    font-size: 0.9rem;
}

body > .container > footer a {
    color: #3F5DD9;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

body > .container > footer a:hover {
    color: #0D1640;
}

/* Footer legal sections */
.footer-legal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.legal-section {
    text-align: left;
}

.legal-section h4 {
    color: #0D1640;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
    font-family: 'Poppins', Arial, sans-serif;
}

.legal-section p {
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

.footer-info {
    text-align: center;
    border-top: 1px solid rgba(63, 93, 217, 0.08);
    padding-top: 20px;
}

.footer-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #8094E6;
}

.footer-branding {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.footer-logo {
    height: 32px;
    width: auto;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-logo:hover {
    opacity: 1;
}

.footer-text {
    text-align: center;
}

.footer-text p {
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    header {
        margin: 0 -15px 30px -15px;
        padding: 30px 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .stats {
        gap: 15px;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .faq-card {
        padding: 16px;
    }
    
    .faq-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .faq-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .faq-dates {
        align-items: flex-start;
        width: 100%;
    }
    
    .faq-date-item {
        font-size: 0.75rem;
    }
    
    .pagination {
        flex-direction: column;
        gap: 15px;
    }
    
    .footer-branding {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .footer-text {
        text-align: center;
    }
    
    .footer-logo {
        height: 28px;
    }
    
    .footer-legal {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .hero-section {
        padding: 40px 20px;
        margin-bottom: 30px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    .search-tips-unified {
        margin-top: 15px;
    }
    
    .search-tips-label {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }
    
    .search-tips-buttons {
        gap: 8px;
        max-width: 100%;
    }
    
    .search-tip-btn {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .recent-faqs-section {
        padding: 25px 20px;
        margin-bottom: 30px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
    }
    
    .recent-faqs-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .recent-faq-card {
        padding: 16px;
    }
    
    .faq-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .faq-badge {
        align-self: flex-start;
    }
    
    .faq-card-date {
        text-align: left;
        margin-top: 8px;
    }
}