/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f1f5f9;
}

h1, h2, h3, h4, h5 {
    font-family: 'Playfair Display', serif;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 .5rem;
}

a {
    color: #6c5ce7;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #4834d4;
}

/* Header Styles */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    padding: 0.1rem 0.1rem 0.6rem .8rem; 
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.header-content {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    gap: 1rem; 
}

.logo {
    display: flex;
    flex-direction: column; 
    align-items: flex-start; 
    flex-shrink: 0; 
    position: relative; 
    padding-left: 45px; 
    text-decoration: none;
}

.logo::before {
    content: "";
    position: absolute;
    left: -12px; 
    top: 42px;
    transform: translateY(-50%);
    width: 52px; 
    height: 52px; 
    background-image: url('/web-app-manifest-512x512.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1; 
    opacity: 0.8; 
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.logo:hover::before {
    opacity: 1;
    transform: translateY(-50%) scale(1.05);
}

.logo h1 {
    font-size: 2.4rem; 
    font-weight: 700;
    margin: 2px 5px 2px 0;  
    color: #1e293b;
    position: relative; 
    z-index: 1;
    transition: color 0.3s ease;
}

.logo:hover h1 {
    color: #6c5ce7; 
}

.love-accent {
    color: #FF6B6B;
    transition: color 0.3s ease;
}

.logo:hover .love-accent {
    color: #e63939; 
}

.tagline {
    font-size: 0.85rem; 
    color: #64748b;
    font-weight: 400;
    margin: 0;
    margin: 0px 5px 0px 0px; 
    position: relative; 
    z-index: 1;
    transition: color 0.3s ease;
}

.logo:hover .tagline {
    color: #1e293b; 
}

.main-nav {
    position: fixed;
    top: 0;
    right: -300px; 
    width: 250px; 
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    padding-top: 80px; 
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: right 0.3s ease-in-out;
    z-index: 999; 
    overflow-y: auto; 
}

.main-nav.active {
    right: 0; 
}

.nav-link {
    color: #334155; 
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 0; 
    border-bottom: 1px solid #e2e8f0; 
}

.nav-link:last-child {
    border-bottom: none; 
}

.nav-link:hover {
    color: #6c5ce7; 
}

.mobile-menu-toggle {
    display: block; 
    cursor: pointer;
    font-size: 1.5rem;
    color: #64748b;
    z-index: 1001; 
}

.mobile-menu-toggle:hover {
    color: #6c5ce7;
}

.menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998; 
    display: none; 
}

.menu-backdrop.active {
    display: block;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    color: white;
    padding: 5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" fill-opacity="1" d="M0,96L48,106.7C96,117,192,139,288,154.7C384,171,480,181,576,165.3C672,149,768,107,864,101.3C960,96,1056,128,1152,138.7C1248,149,1344,139,1392,133.3L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    background-position: center;
    opacity: 0.6;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 2.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 1.0rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-benefits {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.benefit {
    display: flex;
    align-items: center;
    font-weight: 500;
    gap: 0.5rem;
}

.benefit i {
    font-size: 1.2rem;
    color: #ffeaa7;
}

.hero-cta {
    background-color: white;
    color: #6c5ce7;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    background-color: #f8f9fa;
}

.hero-cta i {
    transition: transform 0.3s;
}

.hero-cta:hover i {
    transform: translateX(4px);
}

/* Main Analysis Section */
.analysis-section {
    padding: 5rem 1.5rem;
    background-color: #f1f5f9;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.1rem;
    color: #1e293b;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: #64748b;
    max-width: 700px;
    margin: 0 auto;
}

.form-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.05);
    padding: .75rem;
    position: relative;
}

.sample-data-container {
    position: absolute;
    top: -40px;
    right: 0;
}

.sample-data-link {
    display: inline-flex;
    align-items: center;
    background: #e2e8f0;
    color: #64748b;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    gap: 0.5rem;
    font-weight: 500;
    transition: all 0.3s;
}

.sample-data-link:hover {
    background: #cbd5e1;
    color: #334155;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group label i {
    color: #6c5ce7;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    resize: none;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6c5ce7;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.submit-btn {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    color: white;
    border: none;
    width: 100%;
    padding: 1rem;
    margin-top: 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.4);
}

/* Loading Animation */
.hidden {
    display: none;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(108, 92, 231, 0.1);
    border-top: 4px solid #6c5ce7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1.5rem;
}

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

.loading-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.loading-content p {
    color: #64748b;
}

/* Results Section */
.results-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.05);
    padding: 2.5rem;
}

#resultContent {
    margin-bottom: 2rem;
}

#resultContent h2 {
    font-size: 2rem;
    color: #1e293b;
    margin-bottom: 1.5rem;
    text-align: center;
}

.first-insight-line {
    font-size: 1.2rem;
    color: #6c5ce7;
    font-weight: 500;
    margin-bottom: 1.5rem;
    font-style: italic;
}

#resultContent p {
    margin-bottom: 1rem;
}

#resultContent h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #334155;
}

#resultContent ul,
#resultContent ol {
    margin-bottom: 1rem;
    padding-left: 20px;
}

#resultContent li {
    margin-bottom: 0.5rem;
}

/* Chatbot Styles */
#chatbotContainer {
    margin-top: 3rem;
    border-top: 1px solid #e2e8f0;
    padding-top: 2rem;
}

.chat-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.chat-header h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.chat-header p {
    color: #64748b;
}

#chatDisplay {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 1rem;
    padding: .25rem;
    background: #f8fafc;
    border-radius: 8px;
}

.chat-message {
    margin-bottom: 1rem;
    padding: .33rem;
    border-radius: 8px;
    max-width: 95%;
    word-wrap: break-word;
    font-size: .9rem;
}

.chat-message ul,
.chat-message ol {
    margin-left: .5rem;
    padding-left: .5rem;
    margin-bottom: 0.5rem;
}

.chat-message li {
    margin-bottom: 0.4rem;
}

.bot-message {
    background: #e9f2ff;
    border-left: 4px solid #6c5ce7;
    align-self: flex-start;
}

.user-message {
    background: #e2e8f0;
    border-right: 4px solid #64748b;
    align-self: flex-end;
    margin-left: auto;
}

#chatInputArea {
    display: flex;
    gap: 0.5rem;
}

#chatInput {
    flex: 1;
    padding: 0.25rem .25rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: .9rem;
    resize: none;
    min-height: 60px;
}

#chatInput:focus {
    outline: none;
    border-color: #6c5ce7;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

#sendChatBtn {
    background: #6c5ce7;
    color: white;
    border: none;
    width: 60px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

#sendChatBtn:hover {
    background: #5d4adf;
}

.send-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
}

.secondary-btn {
    background: #e2e8f0;
    color: #64748b;
    border: none;
    padding: 0.75rem 1.5rem;
    margin-top: 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.secondary-btn:hover {
    background: #cbd5e1;
    color: #334155;
}

/* Footer Styles */
.site-footer {
    background: #1e293b;
    color: #e2e8f0;
    padding: 3rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.footer-disclaimer {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #ffa502;
}

.footer-disclaimer h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    font-size: 0.9rem;
}

.footer-links a {
    color: #a29bfe;
}

.footer-links a:hover {
    color: #6c5ce7;
}

.footer-divider {
    color: #4a5568;
}

.footer-copyright {
    color: #718096;
}

.footer-crisis {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

.footer-crisis strong {
    margin-right: 0.5rem;
    color: #ffa502;
}

/* Legal Pages Styles */
.legal-page {
    background: #f1f5f9;
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.legal-header {
    margin-bottom: 2.5rem;
}

.legal-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.last-updated {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: #6c5ce7;
    font-weight: 500;
}

.legal-content {
    max-width: 800px;
    background: white;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.05);
    margin: 0 auto;
}

/* Knowledge Library Styles */
.library-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.library-hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.library-hero-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: #667eea;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.cta-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.knowledge-articles {
    padding: 4rem 1.5rem;
    background: #f8fafc;
}

.articles-intro {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.articles-intro h2 {
    font-size: 2.2rem;
    color: #1e293b;
    margin-bottom: 1rem;
}

.knowledge-article {
    max-width: 900px;
    margin: 0 auto 5rem auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.article-header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 2.5rem;
    text-align: center;
}

.article-header h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.reading-time,
.framework-tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.framework-tag {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.article-content {
    padding: 3rem;
    line-height: 1.8;
}

.article-content h3 {
    color: #1e293b;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.article-content h4 {
    color: #334155;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.article-content p {
    margin-bottom: 1.2rem;
    color: #374151;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.75rem;
    color: #374151;
}

.cta-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
    margin: 3rem 0;
}

.cta-box h4 {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.cta-box p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.article-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: #667eea;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.article-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.library-summary {
    background: white;
    padding: 4rem;
    border-radius: 20px;
    text-align: center;
    margin: 4rem auto;
    max-width: 900px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.library-summary h2 {
    font-size: 2rem;
    color: #1e293b;
    margin-bottom: 1.5rem;
}

.library-summary > p {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

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

.benefit-item {
    text-align: center;
}

.benefit-item i {
    font-size: 3rem;
    color: #6c5ce7;
    margin-bottom: 1rem;
}

.benefit-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.benefit-item p {
    color: #64748b;
    font-size: 0.9rem;
}

.final-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    color: white;
    padding: 1.25rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.final-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.4);
}

/* Knowledge Teaser Section */
.knowledge-teaser {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 4rem 2rem;
}

.teaser-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.teaser-content h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: white;
}

.teaser-content > p {
    font-size: 1.1rem;
    margin-bottom: 3rem;
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.framework-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.framework-item {
    background: rgba(255, 255, 255, 0.15);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s;
}

.framework-item:hover {
    transform: translateY(-5px);
}

.framework-item i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.framework-item h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: white;
}

.framework-item p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

.teaser-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.secondary-link,
.primary-link {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.secondary-link {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.secondary-link:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.primary-link {
    background: white;
    color: #f5576c;
    font-size: 1.1rem;
}

.primary-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.or-divider {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

/* Responsive Design for Knowledge Library */
@media (max-width: 768px) {
    .framework-preview {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    
    .teaser-actions {
        gap: 1.5rem;
    }
    
    .secondary-link,
    .primary-link {
        width: 100%;
        justify-content: center;
        max-width: 300px;
    }
    
    .library-hero-content h1 {
        font-size: 2rem;
    }
    
    .article-content {
        padding: 2rem;
    }
    
    .cta-box {
        padding: 2rem;
    }
    
    .library-summary {
        padding: 2.5rem;
    }
}

@media (max-width: 480px) {
    .framework-preview {
        grid-template-columns: 1fr;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}