/* WhyBuyIt App Styles */

/* Main Layout */
.whybuyit-main {
    padding: 120px 1rem 2rem;
}

.page-title {
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-size: 2.5rem;
}

.page-subtitle {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-size: 1.3rem;
    font-weight: 400;
}

.subtitle {
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.app-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 1200px;
    margin: 0 auto;
}

/* Benefits Section */
.benefits-section {
    background: linear-gradient(135deg, rgba(132, 184, 76, 0.08), rgba(132, 184, 76, 0.05));
    border-left: 4px solid var(--accent-color);
    padding: 1.5rem;
    border-radius: 6px;
    margin-top: 3rem;
    margin-bottom: 2rem;
    text-align: left;
}

.benefits-heading {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-align: left;
}

.benefits-intro {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    text-align: left;
}

.benefits-list {
    display: flex;
    flex-direction: column;
    gap: 0.1875rem;
}

.benefit-item {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-dark);
    padding-top: 6px;
    padding-bottom: 6px;
    padding-left: 1.75rem;
    position: relative;
    text-align: left;
    display: block;
}

.benefit-item::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 6px;
    color: var(--accent-color);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.5;
}

.benefit-item strong {
    color: var(--primary-color);
    font-weight: 600;
    display: inline;
}

/* SEO Content Section */
.seo-content {
    margin-bottom: 1.5rem;
    text-align: left;
}

.seo-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dark);
}

/* Status Text */
.status-text {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.75rem;
    margin-bottom: 0;
}

/* Input Form */
.input-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem;
    border: 1px solid #4a7898;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.input-form label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.input-form textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.input-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.char-counter {
    text-align: right;
    font-size: 0.9rem;
    color: var(--text-light);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 4px 8px rgba(74, 120, 152, 0.25);
    transition: all 0.3s ease;
}

.btn-large:hover {
    box-shadow: 0 6px 12px rgba(74, 120, 152, 0.35);
    transform: translateY(-2px);
}

/* Results */
.results-container {
    margin-top: 3rem;
    animation: fadeIn 0.5s ease;
}

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

.result-section {
    margin-bottom: 2rem;
}

.result-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.user-input-box,
.ai-response-box {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 4px solid var(--accent-color);
    line-height: 1.8;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.ai-response-box {
    border-left-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(74, 120, 152, 0.05), rgba(132, 184, 76, 0.05));
}

.result-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: slideUp 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f0f0f0;
    border: none;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background: #e0e0e0;
}

.modal-content h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-block {
    width: 100%;
}

.message-box {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 6px;
    display: none;
}

.message-box.success {
    background: rgba(132, 184, 76, 0.1);
    border: 1px solid rgba(132, 184, 76, 0.4);
    color: #2d5016;
    display: block;
}

.message-box.error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.4);
    color: #721c24;
    display: block;
}

.modal-footer {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--text-light);
}

/* Custom Alert Modal */
.custom-alert-modal {
    max-width: 500px;
}

.custom-alert-modal h2 {
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.custom-alert-modal p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-line;
}

.custom-alert-modal .modal-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    align-items: center;
}

.custom-alert-modal .modal-footer .btn {
    min-width: 100px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.spinner-container {
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.loading-text {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Error Messages */
.error-message {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.4);
    color: #721c24;
    padding: 0.75rem;
    border-radius: 6px;
    margin-top: 1rem;
}

/* Testimonials Section */
.testimonials-section {
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.section-heading {
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 2rem;
}

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

.testimonial-card {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.testimonial-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-style: italic;
}

.testimonial-author {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

/* FAQ Section */
.faq-section {
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.faq-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    transition: box-shadow 0.3s ease;
}

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

.faq-question {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.faq-answer {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dark);
    margin: 0;
}

/* Responsive Design */
@media (min-width: 900px) {
    .page-subtitle {
        max-width:620px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .app-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 1200px;
    margin: 0 auto;
}

    .result-actions {
        flex-direction: column;
    }

    .result-actions button {
        width: 100%;
    }

    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .section-heading {
        font-size: 1.2rem;
    }

    .faq-question {
        font-size: 1rem;
    }
}


/* Motivations Card Layout Styling */
.motivations-product-title {
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
}

.motivations-tagline {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}

/* Card Container */
.motivations-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
}

/* Individual Card */
.motivation-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.motivation-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Card Header */
.card-header {
    background: linear-gradient(135deg, #4a7898, #5a8aaa);
    color: white;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.card-rank {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    min-width: 40px;
    text-align: center;
}

.card-title-wrapper {
    flex: 1;
}

.card-motivation-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.3;
    color: white;
}

.rank-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-color);
    background: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.5rem;
}

/* Card Sections */
.card-section {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f0f0f0;
}

.card-section:last-child {
    border-bottom: none;
}

.section-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.underlying-drive {
    color: var(--text-dark);
    font-size: 0.9rem;
    font-style: italic;
}

.why-sells {
    color: var(--text-dark);
    font-size: 1rem;
    line-height: 1.6;
}

/* Bullet Section - Highlighted */
.bullet-section {
    background: linear-gradient(135deg, rgba(132, 184, 76, 0.08), rgba(132, 184, 76, 0.05));
    border-left: 4px solid var(--accent-color);
}

.bullet-example {
    background: white;
    padding: 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.char-count-info {
    font-size: 0.8rem;
    color: var(--text-light);
    text-align: right;
    font-style: italic;
}

/* Power Words */
.power-words {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Responsive Card Styling */
@media (max-width: 768px) {
    .card-header {
        padding: 0.75rem 1rem;
    }

    .card-rank {
        font-size: 1.5rem;
        min-width: 30px;
    }

    .card-motivation-title {
        font-size: 1.1rem;
    }

    .card-section {
        padding: 0.75rem 1rem;
    }

    .section-label {
        font-size: 0.8rem;
    }

    .why-sells,
    .bullet-example {
        font-size: 0.9rem;
    }

    .motivations-cards {
        gap: 1rem;
    }
}
