/* ========================================= */
/* 1. GLOBAL & HEADER STYLES                 */
/* ========================================= */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #F5F6FA; /* Light Blue-Grey Background */
    color: #333;
}

header {
    background-color: #1A237E; /* Deep Indigo */
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.logo { font-size: 1.5rem; font-weight: bold; }

/* Hidden class for Logic */
.hidden { display: none !important; }

.app-btn-top {
    background: white;
    color: #1A237E; /* Indigo Text */
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 20px;
    font-weight: bold;
    border: 2px solid transparent;
    transition: all 0.3s;
}
.app-btn-top:hover {
    background-color: #E8EAF6; /* Light Blue Hover */
    color: #1A237E;
}

/* ========================================= */
/* 2. LAYOUT WRAPPER (3-Col)                 */
/* ========================================= */
.layout-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.sidebar-ad {
    width: 160px;
    min-width: 160px;
    height: 600px;
}

.ad-sticky {
    position: sticky;
    top: 20px;
}

/* ========================================= */
/* 3. MAIN TOOL CONTAINER                    */
/* ========================================= */
main.container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    text-align: center;
    padding: 20px;
    margin: 0 !important; 
    flex-grow: 1;
    max-width: 800px;
}

/* Upload & Buttons */
.upload-area {
    border: 2px dashed #3949AB; /* Indigo Border */
    background-color: #FAFAFA;
    padding: 40px;
    margin: 20px 0;
    cursor: pointer;
    border-radius: 12px;
}
.upload-area:hover { background-color: #E8EAF6; }

button {
    background-color: #1A237E; /* Deep Indigo */
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 8px;
    margin-top: 10px;
    box-shadow: 0 4px 6px rgba(26, 35, 126, 0.3);
}
button:hover {
    transform: translateY(-2px);
    background-color: #283593; /* Lighter Indigo */
}
button:disabled { background-color: #9FA8DA; cursor: not-allowed; }

.ad-container {
    max-width: 100%;
    margin: 20px auto;
    background: #f0f0f0;
    padding: 5px;
    overflow: hidden;
}

/* ========================================= */
/* 4. RESULTS TABLE                          */
/* ========================================= */
.word-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.95rem;
}

.word-table th {
    background-color: #E8EAF6; /* Very Light Blue */
    color: #1A237E; /* Indigo Text */
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #1A237E; /* Indigo Line */
}

.word-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.sanskrit-word {
    font-weight: bold;
    color: #1A237E; /* Indigo Text */
    font-size: 1.1rem;
}

/* ========================================= */
/* 5. RICH CONTENT (CARDS)                   */
/* ========================================= */
.rich-content {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eee;
    text-align: center; 
    color: #444;
}

.content-header { margin: 0 auto 40px auto; max-width: 700px; }
.content-header h2 { color: #1A237E; font-size: 1.8rem; margin-bottom: 15px; }
.hero-text { font-size: 1.1rem; line-height: 1.6; color: #555; }

.section-title { margin: 40px 0 20px 0; }
.section-title h3 { 
    font-size: 1.4rem; 
    color: #333; 
    border-bottom: 3px solid #1A237E; /* Indigo Underline */
    display: inline-block; 
    padding-bottom: 5px; 
}

/* --- Tech Grid --- */
.tech-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    text-align: left;
    margin-bottom: 40px;
}
.tech-card {
    background: #fff; 
    border: 1px solid #E0E0E0; 
    border-radius: 12px; 
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-top: 4px solid #1A237E; /* Blue Top Border */
}
.tech-card h3 { color: #1A237E; margin-top: 0; }
.card-icon { font-size: 2rem; margin-bottom: 10px; }
.feature-list { padding-left: 20px; color: #666; margin-bottom: 0; }
.feature-list li { margin-bottom: 5px; }

/* --- Audience Grid --- */
.audience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}
.audience-card {
    background: #FFFFFF; /* Pure White */
    padding: 15px; 
    border-radius: 10px;
    text-align: center; 
    border: 1px solid #C5CAE9; /* Light Blue Border */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}
.audience-card:hover {
    transform: translateY(-3px);
    border-color: #1A237E; /* Indigo on Hover */
}
.audience-card .emoji { font-size: 2rem; display: block; margin-bottom: 5px; }
.audience-card h4 { margin: 5px 0; color: #1A237E; font-size: 1rem; } /* Indigo Text */
.audience-card p { font-size: 0.85rem; color: #666; margin: 0; }

/* --- FAQ Grid --- */
.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    text-align: left;
}
.faq-box {
    background: #FAFAFA; 
    padding: 15px; 
    border-radius: 8px; 
    border-left: 4px solid #1A237E; /* Indigo Left Border */
    border-top: 1px solid #eee;
    border-right: 1px solid #eee;
    border-bottom: 1px solid #eee;
}
.faq-box h4 { margin: 0 0 5px 0; color: #333; font-size: 1rem; }
.faq-box p { margin: 0; font-size: 0.9rem; color: #555; }

/* ========================================= */
/* 6. FOOTER & MODAL                         */
/* ========================================= */
footer {
    text-align: center;
    padding: 20px;
    background: #1A237E; /* Indigo Footer */
    color: white;
    margin-top: 40px;
}
footer a { color: #fff; text-decoration: underline; } /* White Links */

.modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex; justify-content: center; align-items: center;
    z-index: 9999;
}
.modal-content {
    background: white; padding: 30px; border-radius: 12px; text-align: center; max-width: 400px;
    border-top: 5px solid #1A237E; /* Indigo Border */
}
.modal-btn {
    display: inline-block; margin-top: 15px; padding: 10px 20px;
    background: #1A237E; color: white; text-decoration: none; border-radius: 5px;
}

/* ========================================= */
/* 7. MOBILE RESPONSIVENESS                  */
/* ========================================= */
@media (max-width: 1100px) {
    .sidebar-ad { display: none !important; } 
    .layout-wrapper { display: block; padding: 0; } 
    main.container { margin: 20px auto !important; max-width: 95%; } 
}

@media (max-width: 768px) {
    /* Stack grid items on mobile */
    .tech-grid, .faq-grid { grid-template-columns: 1fr; } 
    .audience-grid { grid-template-columns: 1fr 1fr; } 
}

/* ========================================= */
/* 8. NEW SECTIONS (How it Works & Table)    */
/* ========================================= */

/* --- How It Works Steps --- */
.steps-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.step-card {
    flex: 1;
    min-width: 200px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #C5CAE9;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}
.step-number {
    background: #1A237E;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0 auto 15px auto; /* Centered */
}
.step-card h4 { color: #1A237E; margin: 10px 0; }
.step-card p { font-size: 0.9rem; color: #666; }

/* --- Comparison Table --- */
.comparison-wrapper {
    overflow-x: auto; /* Scroll on mobile */
    margin-bottom: 40px;
    border-radius: 12px;
    border: 1px solid #C5CAE9;
}
.compare-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px; /* Forces scroll on small phones */
}
.compare-table th {
    background-color: #1A237E;
    color: white;
    padding: 15px;
    text-align: center;
}
.compare-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    text-align: center;
    color: #444;
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:nth-child(even) { background-color: #F8F9FA; }
.check-icon { color: #2E7D32; font-weight: bold; font-size: 1.2rem; } /* Green Check */
.cross-icon { color: #C62828; font-weight: bold; font-size: 1.2rem; } /* Red Cross */

/* Mobile Fix for Steps */
@media (max-width: 768px) {
    .steps-container { flex-direction: column; }
    
    /* ========================================= */
/* 9. NEW CONTENT SECTIONS (Glossary & Apps) */
/* ========================================= */

/* --- Glossary Grid --- */
.glossary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    text-align: left;
}
.glossary-card {
    background: white;
    border: 1px solid #E0E0E0;
    border-left: 4px solid #1A237E; /* Indigo Accent */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
.glossary-card h4 { color: #1A237E; margin: 0 0 10px 0; font-size: 1.1rem; }
.glossary-card p { font-size: 0.9rem; color: #555; margin: 0; line-height: 1.6; }

/* --- Application/Use Case Section --- */
.use-case-block {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid #C5CAE9;
    text-align: left;
}
.use-case-block h3 { color: #1A237E; border-bottom: 1px solid #eee; padding-bottom: 10px; margin-top: 0;}
.use-case-block p { color: #444; line-height: 1.7; margin-bottom: 15px; }
.use-case-block strong { color: #1A237E; }
}