/**
 * Grammar Guru - Help Page CSS
 * Styling for the help center with FAQ, contact forms, and resources
 */

/* Help Header */
.help-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 8rem 0 4rem;
    color: white;
    text-align: center;
}

.help-header-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.help-header-content p {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Help Search */
.help-search {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.help-search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    color: white;
    font-size: 1.1rem;
    border-radius: 50px;
    outline: none;
}

.help-search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.help-search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.help-search-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.05);
}

/* Quick Help */
.quick-help {
    padding: 4rem 0;
    background: #f8fafc;
}

.quick-help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.quick-help-item {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.quick-help-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.quick-help-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    height: 80px;
    width: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.quick-help-item h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
}

.quick-help-item p {
    color: #718096;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.quick-help-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.quick-help-link:hover {
    color: #5a67d8;
    transform: translateX(3px);
}

.quick-help-link::after {
    content: '→';
    transition: transform 0.3s ease;
}

.quick-help-link:hover::after {
    transform: translateX(3px);
}

/* FAQ Section */
.faq-section {
    padding: 4rem 0;
    background: white;
}

.faq-section h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 3rem;
}

.faq-category {
    margin-bottom: 3rem;
    background: #f8fafc;
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid #e2e8f0;
}

.faq-category h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #667eea;
    display: inline-block;
}

.faq-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.faq-question {
    padding: 1.5rem 2rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: #f8fafc;
}

.faq-question h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
    flex: 1;
}

.faq-toggle {
    width: 30px;
    height: 30px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
    background: #f56565;
}

.faq-answer {
    padding: 0 2rem 1.5rem;
    color: #4a5568;
    line-height: 1.7;
    border-top: 1px solid #e2e8f0;
    display: none;
    animation: fadeIn 0.3s ease;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-answer p {
    margin-bottom: 1rem;
}

.faq-answer ol,
.faq-answer ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.faq-answer li {
    margin-bottom: 0.5rem;
}

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

/* Contact Support */
.contact-support {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1rem;
}

.contact-info p {
    color: #718096;
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.contact-methods {
    display: grid;
    gap: 1.5rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    flex-shrink: 0;
}

.contact-details h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 0.25rem 0;
}

.contact-details p {
    color: #667eea;
    font-weight: 500;
    margin: 0 0 0.25rem 0;
}

.contact-details span {
    color: #718096;
    font-size: 0.9rem;
}

/* Contact Form */
.contact-form-container {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-form h3 {
    font-size: 1.6rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 2rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn:active {
    transform: translateY(0);
}

/* Resources Section */
.resources-section {
    padding: 4rem 0;
    background: white;
}

.resources-section h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 3rem;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.resource-item {
    text-align: center;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.resource-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    background: white;
}

.resource-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.resource-item h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.75rem;
}

.resource-item p {
    color: #718096;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.resource-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.resource-link:hover {
    color: #5a67d8;
    transform: translateX(3px);
}

.resource-link::after {
    content: '→';
    transition: transform 0.3s ease;
}

.resource-link:hover::after {
    transform: translateX(3px);
}

/* Search Results */
.search-results {
    padding: 2rem 0;
    background: #f8fafc;
    border-radius: 12px;
    margin: 2rem 0;
    display: none;
}

.search-results.active {
    display: block;
}

.search-results h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
    text-align: center;
}

.search-result-item {
    padding: 1rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-result-item:hover {
    background: #f8fafc;
    border-color: #667eea;
}

.search-result-title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.search-result-snippet {
    color: #718096;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .help-header {
        padding: 6rem 0 3rem;
    }
    
    .help-header-content h1 {
        font-size: 2.2rem;
    }
    
    .help-header-content p {
        font-size: 1.1rem;
    }
    
    .quick-help {
        padding: 3rem 0;
    }
    
    .quick-help-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .quick-help-item {
        padding: 2rem 1.5rem;
    }
    
    .faq-section {
        padding: 3rem 0;
    }
    
    .faq-category {
        padding: 1.5rem;
    }
    
    .faq-question {
        padding: 1rem 1.5rem;
    }
    
    .faq-answer {
        padding: 0 1.5rem 1rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .contact-form-container {
        padding: 2rem 1.5rem;
    }
    
    .resources-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .resource-item {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .help-header-content h1 {
        font-size: 1.8rem;
    }
    
    .help-search {
        margin: 0 1rem;
    }
    
    .quick-help-item {
        padding: 1.5rem 1rem;
    }
    
    .quick-help-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .faq-category {
        padding: 1rem;
    }
    
    .faq-question {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .faq-answer {
        padding: 0 1rem 1rem;
    }
    
    .contact-form-container {
        padding: 1.5rem 1rem;
    }
    
    .contact-method {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading States */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-left: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Success/Error Messages */
.message {
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-weight: 500;
}

.message.success {
    background: #f0fff4;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.message.error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #feb2b2;
}

/* Print Styles */
@media print {
    .help-header,
    .contact-support,
    .resources-section {
        background: white !important;
        color: black !important;
    }
    
    .btn,
    .help-search,
    .contact-form {
        display: none;
    }
    
    .faq-item {
        break-inside: avoid;
    }
    
    .faq-answer {
        display: block !important;
    }
}
