/* Base styles for Gematria Search Engine */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'David', 'Tahoma', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    direction: rtl;
}

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

/* Header */
header {
    background: linear-gradient(135deg, #1a5f7a 0%, #2c5f7a 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

header a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

header a:hover {
    opacity: 0.9;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background-color 0.3s;
}

.nav-links a:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Navigation Search Widget */
.nav-search {
    display: flex;
    align-items: center;
}

.search-widget {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
}

.search-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    width: 100%;
}

.search-input-group input[type="text"] {
    padding: 0.6rem 1rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    font-size: 0.95rem;
    background: rgba(255,255,255,0.15);
    color: white;
    min-width: 250px;
    flex: 1;
    transition: all 0.3s;
    direction: rtl;
}

.search-input-group input[type="text"]::placeholder {
    color: rgba(255,255,255,0.7);
}

.search-input-group input[type="text"]:focus {
    outline: none;
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.1);
}

.search-btn {
    background: #dc3545;
    color: white;
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.search-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

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

/* Consent checkbox in navigation search */
.consent-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.9);
    cursor: pointer;
    user-select: none;
    margin-top: 0.5rem;
    white-space: nowrap;
}

.consent-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #dc3545;
    flex-shrink: 0;
}

.consent-checkbox:hover {
    color: white;
}

/* Consent label in forms */
.consent-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #2c3e50;
    cursor: pointer;
    user-select: none;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.consent-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #1a5f7a;
    flex-shrink: 0;
}

.consent-label:hover {
    background: #e9ecef;
}

/* Mobile responsive for search widget */
@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-search {
        width: 100%;
    }
    
    .search-widget {
        width: 100%;
    }
    
    .search-input-group {
        flex-direction: column;
        width: 100%;
    }
    
    .search-input-group input[type="text"] {
        flex: 1;
        min-width: 0;
        width: 100%;
    }
    
    .search-btn {
        width: 100%;
    }
    
    .consent-checkbox {
        white-space: normal;
        font-size: 0.8rem;
    }
}

/* Main content */
main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Hero section */
.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.5rem;
    color: #1a5f7a;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.hero .subtitle {
    font-size: 1.2rem;
    color: #666;
}

/* Main content grid */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

/* Cards */
.calculator-card,
.search-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.calculator-card:hover,
.search-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.15);
}

.calculator-card h2,
.search-card h2 {
    color: #1a5f7a;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.form-group textarea,
.form-group input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    direction: rtl;
    resize: vertical;
    transition: border-color 0.3s;
}

.form-group textarea:focus,
.form-group input[type="text"]:focus {
    outline: none;
    border-color: #1a5f7a;
    box-shadow: 0 0 0 3px rgba(26, 95, 122, 0.1);
}

/* Source checkboxes */
.sources-label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.sources-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: #2c3e50;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #1a5f7a;
    flex-shrink: 0;
}

.checkbox-label:hover {
    color: #1a5f7a;
}

.checkbox-label input[type="checkbox"]:checked + span {
    font-weight: 600;
}

/* Buttons */
button {
    background: linear-gradient(135deg, #1a5f7a 0%, #2c5f7a 100%);
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

button:hover {
    background: linear-gradient(135deg, #2c5f7a 0%, #1a5f7a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 95, 122, 0.3);
}

button:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #1a5f7a 0%, #2c5f7a 100%);
}

.btn-secondary {
    background: #f4a460;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    margin-left: 0.5rem;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background: #d4af37;
    transform: translateY(-1px);
}

/* Results */
.result-card {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border: 2px solid #1a5f7a;
}

.result-card h3 {
    margin-bottom: 1rem;
    color: #1a5f7a;
    font-size: 1.3rem;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.result-item {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.result-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.result-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a5f7a;
}

/* Search results */
.search-results {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    border-right: 3px solid #1a5f7a;
}

.search-result-item a {
    color: #1a5f7a;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.search-result-item a:hover {
    text-decoration: underline;
}

.search-result-meta {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
}

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

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 0.8;
}

.footer-keywords {
    margin-top: 1rem;
    text-align: center;
    opacity: 0.8;
}

.footer-keywords-text {
    font-size: 0.9rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

/* Term page */
.term-page h1 {
    font-size: 2.5rem;
    color: #1a5f7a;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
}

.term-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s;
}

.info-card:hover {
    transform: translateY(-3px);
}

.info-card h2 {
    font-size: 1rem;
    color: #666;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.info-card .value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a5f7a;
}

.info-card .value-link {
    color: #1a5f7a;
    text-decoration: none;
    transition: color 0.3s, opacity 0.3s;
    display: inline-block;
}

.info-card .value-link:hover {
    color: #2c5f7a;
    opacity: 0.8;
    text-decoration: underline;
}

.info-card .value-link:active {
    opacity: 0.7;
}

.sources {
    margin-bottom: 2rem;
}

.sources h2 {
    color: #1a5f7a;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.source-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    background: linear-gradient(135deg, #d4af37 0%, #f4a460 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.badge-small {
    background: #f4a460;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: 0.25rem;
}

.matches, .related {
    margin-bottom: 2rem;
}

.matches h2, .related h2 {
    color: #1a5f7a;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.term-list {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.term-item {
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
}

.term-item:hover {
    background-color: #f8f9fa;
}

.term-item:last-child {
    border-bottom: none;
}

.term-item a {
    color: #1a5f7a;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: color 0.3s;
}

.term-item a:hover {
    color: #2c5f7a;
    text-decoration: underline;
}

.term-item .meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #666;
    align-items: center;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.pagination-info {
    font-weight: 600;
    color: #1a5f7a;
}

.pagination-link {
    padding: 0.5rem 1rem;
    background: #1a5f7a;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.3s;
    font-weight: 600;
}

.pagination-link:hover {
    background: #2c5f7a;
}

.matches-info {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    text-align: center;
}

.view-all-link {
    margin-top: 1.5rem;
    text-align: center;
}

.view-all-link a {
    color: #1a5f7a;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.view-all-link a:hover {
    text-decoration: underline;
}

/* Source filters */
.source-filters {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.source-filters h3 {
    color: #1a5f7a;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.filter-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #1a5f7a 0%, #2c5f7a 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.filter-btn:hover {
    background: linear-gradient(135deg, #2c5f7a 0%, #1a5f7a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 95, 122, 0.3);
}

.source-filter-active {
    margin-bottom: 2rem;
    padding: 1rem;
    background: #e9ecef;
    border-radius: 8px;
    border-right: 4px solid #1a5f7a;
}

.clear-filter {
    color: #1a5f7a;
    text-decoration: none;
    font-weight: 600;
    margin-top: 0.5rem;
    display: inline-block;
}

.clear-filter:hover {
    text-decoration: underline;
}

/* Clean Minimal Filters */
.filters-clean {
    margin-bottom: 1.5rem;
    padding: 0;
}

.filter-row-single {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.5rem 0;
}

.filter-tags-clean {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.filter-controls-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: nowrap;
    flex-shrink: 0;
    margin-right: auto;
}

/* Clean Tags */
.filter-tags-clean {
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap;
    align-items: center;
}

.tag-clean {
    padding: 0.25rem 0.625rem;
    background: transparent;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1.3;
    width: auto;
}

.tag-clean:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
}

.tag-clean.tag-active {
    background: #0f172a;
    color: white;
    border-color: #0f172a;
    font-weight: 500;
}

.tag-clean.tag-active:hover {
    background: #1e293b;
    border-color: #1e293b;
}

/* Clean Input Group */
.filter-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.filter-input-label {
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 400;
    white-space: nowrap;
}

/* Clean Input */
.input-clean {
    padding: 0.375rem 0.75rem;
    background: white;
    color: #334155;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 400;
    transition: all 0.15s ease;
    font-family: inherit;
    width: 100px;
    min-width: 80px;
    flex-shrink: 0;
}

.input-clean::placeholder {
    color: #94a3b8;
    font-size: 0.75rem;
}

.input-clean:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.input-clean:focus {
    outline: none;
    border-color: #0f172a;
    background: white;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.05);
}

.input-clean:focus::placeholder {
    opacity: 0.5;
}

/* Clean Buttons */
.btn-filter-apply,
.btn-filter-clear {
    padding: 0.25rem 0.625rem !important;
    border-radius: 4px !important;
    font-size: 0.75rem !important;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.3;
    width: auto !important;
    background: none;
}

.btn-filter-apply {
    background: #0f172a !important;
    color: white !important;
}

.btn-filter-apply:hover {
    background: #1e293b !important;
    transform: none !important;
    box-shadow: none !important;
}

.btn-filter-clear {
    background: transparent !important;
    color: #64748b !important;
    border: 1px solid #e2e8f0 !important;
}

.btn-filter-clear:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #475569 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .filter-row-single {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .filter-tags-clean {
        width: 100%;
        justify-content: flex-start;
    }
    
    .filter-controls-right {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
        margin-right: 0;
    }
    
    .filter-input-group {
        flex: 1;
        min-width: 120px;
    }
    
    .input-clean {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .tag-clean {
        padding: 0.2rem 0.5rem;
        font-size: 0.7rem;
    }
    
    .input-clean {
        width: 100%;
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
    }
    
    .btn-filter-apply,
    .btn-filter-clear {
        padding: 0.2rem 0.5rem !important;
        font-size: 0.7rem !important;
    }
    
    .filter-input-label {
        font-size: 0.7rem;
    }
}

.view-all-section {
    margin: 2rem 0;
    text-align: center;
}

.view-all-link {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #d4af37 0%, #f4a460 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.view-all-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.source-section h2 {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.term-count {
    font-size: 0.9rem;
    color: #666;
    font-weight: normal;
}

.source-link {
    font-size: 0.85rem;
    color: #1a5f7a;
    text-decoration: none;
    margin-right: auto;
    padding: 0.25rem 0.75rem;
    border: 1px solid #1a5f7a;
    border-radius: 6px;
    transition: all 0.3s;
}

.source-link:hover {
    background: #1a5f7a;
    color: white;
}

.gematria-link {
    color: #1a5f7a;
    text-decoration: none;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: all 0.3s;
}

.gematria-link:hover {
    background: #1a5f7a;
    color: white;
}

.filter-link {
    color: #1a5f7a;
    text-decoration: none;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: all 0.3s;
    cursor: pointer;
}

.filter-link:hover {
    background: #1a5f7a;
    color: white;
}

.source-links-section {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.source-links-section h4 {
    color: #1a5f7a;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.source-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.source-links .source-link {
    margin-right: 0;
}

.related-values {
    margin-top: 3rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.related-values h3 {
    color: #1a5f7a;
    margin-bottom: 1rem;
}

.related-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.related-link {
    padding: 0.75rem 1.5rem;
    background: #f8f9fa;
    color: #1a5f7a;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    border: 2px solid #1a5f7a;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.related-link:hover {
    background: #1a5f7a;
    color: white;
}

.related-link .arrow {
    font-size: 1.2em;
    line-height: 1;
    display: inline-block;
    transition: transform 0.2s;
}

.related-link:hover .arrow {
    transform: scale(1.2);
}

/* Gematria value page */
.gematria-value-page h1 {
    color: #1a5f7a;
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
}

.subtitle {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

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

.source-section h2 {
    color: #1a5f7a;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #1a5f7a;
    font-size: 1.3rem;
    font-weight: 600;
}

/* Statistics Dashboard */
.stats-dashboard {
    margin: 2rem 0 3rem 0;
    padding: 2rem 0;
}

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

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s, box-shadow 0.3s;
    border-right: 4px solid #1a5f7a;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.15);
}

.stat-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1a5f7a;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
}

/* Gematria Connections Section - Demonstrates Power */
.connections-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 16px;
    margin: 3rem 0;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.3);
}

.connections-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.connections-section .section-title {
    color: white;
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.connections-icon {
    font-size: 2rem;
    animation: rotate 3s linear infinite;
}

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

.connections-description {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.15rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.connections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.connection-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
}

.connection-card:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.connection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.connection-value {
    text-align: center;
    flex: 1;
}

.connection-value-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: white;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.connection-value-label {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.connection-count {
    text-align: center;
    flex: 1;
    border-right: 2px solid rgba(255, 255, 255, 0.3);
    padding-right: 1rem;
}

.connection-count-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #ffd700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.connection-count-label {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
}

.connection-terms {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.connection-term {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 8px;
    padding: 1rem;
    text-decoration: none;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.connection-term:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
    border-color: rgba(255, 255, 255, 0.4);
}

.connection-term-text {
    font-size: 1.3rem;
    font-weight: 600;
    direction: rtl;
    flex: 1;
}

.connection-term-sources {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-right: 1rem;
}

.connection-source-badge {
    background: rgba(255, 255, 255, 0.3);
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.connection-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
}

.connection-link {
    display: inline-block;
    background: white;
    color: #667eea;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.connection-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: #ffd700;
    color: #667eea;
}

/* Featured Gematria Section */
.featured-section {
    background: linear-gradient(135deg, #1a5f7a 0%, #2c5f7a 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 16px;
    margin: 3rem 0;
    box-shadow: 0 8px 30px rgba(26, 95, 122, 0.3);
}

.featured-header {
    text-align: center;
    margin-bottom: 2rem;
}

.featured-section .section-title {
    color: white;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.featured-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.featured-content {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    align-items: start;
}

.featured-value-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.featured-value-number {
    font-size: 4rem;
    font-weight: 700;
    color: white;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.featured-value-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
}

.featured-link {
    display: inline-block;
    background: white;
    color: #1a5f7a;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    margin-top: 1rem;
}

.featured-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.featured-terms {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.featured-term-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.featured-term-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
}

.featured-term-text {
    font-size: 1.2rem;
    font-weight: 600;
    direction: rtl;
}

.featured-term-sources {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.featured-source-badge {
    background: rgba(255, 255, 255, 0.25);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Trending Section */
.trending-section {
    background: linear-gradient(135deg, #fff5e6 0%, #ffe8cc 100%);
    padding: 2.5rem;
    border-radius: 16px;
    margin: 3rem 0;
    border: 2px solid #f4a460;
}

.trending-section .section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #1a5f7a;
}

.trending-icon {
    font-size: 1.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.trending-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(244, 164, 96, 0.2);
    transition: all 0.3s;
    border-top: 3px solid #f4a460;
}

.trending-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(244, 164, 96, 0.3);
}

.trending-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.trending-term {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a5f7a;
    text-align: center;
    margin-bottom: 1rem;
    direction: rtl;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.trending-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.trending-gematria {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.trending-label {
    color: #666;
    font-size: 0.9rem;
}

.trending-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a5f7a;
}

.trending-stats {
    text-align: center;
}

.trending-searches {
    color: #f4a460;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Section styles for home page */
.section {
    margin-top: 3rem;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.8rem;
    color: #1a5f7a;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-align: center;
}

.section-description {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* Term grid for recently searched */
.term-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.term-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.term-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.term-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.term-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a5f7a;
    margin-bottom: 0.5rem;
    text-align: center;
    direction: rtl;
}

.term-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: center;
    font-size: 0.85rem;
    color: #666;
}

.gematria-value {
    font-weight: 600;
    color: #1a5f7a;
}

.source-badge {
    background: #f4a460;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    display: inline-block;
}

/* Sources grid */
.sources-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 2.5rem;
    border-radius: 16px;
    margin: 3rem 0;
}

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

.source-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    border-top: 4px solid #1a5f7a;
}

.source-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.15);
}

.source-header {
    margin-bottom: 1rem;
}

.source-title {
    font-size: 1.3rem;
    color: #1a5f7a;
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-align: center;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e9ecef;
}

.source-browse-link {
    display: block;
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    text-decoration: none;
    margin-top: 0.5rem;
    transition: color 0.3s;
}

.source-browse-link:hover {
    color: #1a5f7a;
}

.source-terms {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.source-term-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.3s;
    direction: rtl;
}

.source-term-link:hover {
    background: #e9ecef;
}

.term-name {
    font-weight: 600;
    color: #1a5f7a;
    font-size: 1rem;
}

.term-gematria {
    color: #666;
    font-size: 0.9rem;
    font-weight: 600;
}

.source-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 2px solid #e9ecef;
}

.source-view-all {
    display: block;
    text-align: center;
    color: #1a5f7a;
    text-decoration: none;
    font-weight: 600;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    transition: all 0.3s;
}

.source-view-all:hover {
    background: #1a5f7a;
    color: white;
    transform: translateY(-1px);
}

/* Examples grid */
.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.example-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.example-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.15);
}

.example-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.example-term {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a5f7a;
    text-align: center;
    margin-bottom: 1rem;
    direction: rtl;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.example-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.example-gematria {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.example-gematria .label {
    color: #666;
    font-size: 0.9rem;
}

.example-gematria .value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a5f7a;
}

.example-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.source-tag {
    background: #f4a460;
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 968px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .sources-grid {
        grid-template-columns: 1fr;
    }
    
    .term-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .examples-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .featured-content {
        grid-template-columns: 1fr;
    }
    
    .featured-value-card {
        margin-bottom: 1.5rem;
    }
    
    .trending-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    
    .connections-grid {
        grid-template-columns: 1fr;
    }
    
    .connection-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .connection-count {
        border-right: none;
        border-top: 2px solid rgba(255, 255, 255, 0.3);
        padding-right: 0;
        padding-top: 1rem;
    }
    
    .connection-term {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .connection-term-sources {
        margin-right: 0;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero .subtitle {
        font-size: 1rem;
    }
    
    .calculator-card,
    .search-card {
        padding: 1.5rem;
    }
    
    .term-info {
        grid-template-columns: 1fr;
    }
    
    .term-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .nav-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .result-grid {
        grid-template-columns: 1fr;
    }
}

/* Legal Pages (Terms of Service, Privacy Policy) */
.legal-page {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    direction: ltr; /* Legal pages in English, LTR */
    text-align: left;
}

.legal-page h1 {
    font-size: 2.5rem;
    color: #1a5f7a;
    margin-bottom: 0.5rem;
    border-bottom: 3px solid #1a5f7a;
    padding-bottom: 1rem;
}

.legal-page .last-updated {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    font-style: italic;
}

.legal-page .legal-section {
    margin-bottom: 2.5rem;
}

.legal-page .legal-section h2 {
    font-size: 1.8rem;
    color: #2c5f7a;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.legal-page .legal-section h3 {
    font-size: 1.3rem;
    color: #1a5f7a;
    margin-top: 1.2rem;
    margin-bottom: 0.8rem;
}

.legal-page .legal-section p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: #333;
}

.legal-page .legal-section ul,
.legal-page .legal-section ol {
    margin: 1rem 0;
    padding-right: 2rem;
    line-height: 1.8;
}

.legal-page .legal-section li {
    margin-bottom: 0.8rem;
    color: #333;
}

.legal-page .legal-section strong {
    color: #1a5f7a;
    font-weight: 600;
}

.legal-page .legal-note {
    margin-top: 3rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-right: 4px solid #1a5f7a;
    border-radius: 6px;
}

.legal-page .legal-note p {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .legal-page {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .legal-page h1 {
        font-size: 2rem;
    }
    
    .legal-page .legal-section h2 {
        font-size: 1.5rem;
    }
    
    .legal-page .legal-section h3 {
        font-size: 1.2rem;
    }
}
