@font-face {
    font-family: 'ClassicNosh';
    src: url('../fonts/ClassicNosh-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body {
    margin: 0;
    font-family: 'Source Sans Pro', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
}

.header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 0.25rem 0; /* Reduced from 0.5rem */
    margin-bottom: 0;
    padding-bottom: 0;
}

.header h1 {
    font-family: 'ClassicNosh', serif !important;
    font-size: 5em;
    text-align: center;
    margin: 0;
    line-height: 1.2;
    position: relative;
    z-index: 1;
    color: #333;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.02em;
}

.main-nav {
    text-align: center;
    padding: 5px 0; /* Reduced from 10px */
    margin: 0;
    font-family: "Tahoma", sans-serif;
    width: 100%;
    display: flex;
    justify-content: center;
}

.main-nav a:link, 
.main-nav a:visited {
    float: left;
    font-size: 0.8em;
    line-height: 14px;
    font-weight: bold;
    padding: 0 12px 6px 12px;
    text-decoration: none;
    color: #3333ff;
    background-color: #ffffff;
    font-family: "Tahoma", sans-serif;
}

.main-nav a:hover {
    text-decoration: underline;
    color: #0000cc;
}

/* Remove old nav styles */
.main-nav a {
    text-transform: none;
    letter-spacing: normal;
    margin: 0;
}

.header-separator {
    width: 80%;
    border: none;
    border-top: 1px solid #6B6BE6;
    margin: 0 auto 10px auto; /* Reduced bottom margin from 20px */
}

.logo-search-container {
    position: relative;
    max-width: 1200px; /* Match the new content width */
    margin: 0.5rem auto;
    padding: 0 2rem;
    text-align: left; /* Changed from center to left */
    display: block;
}

.logo-search-container h1 {
    font-family: "Tahoma", sans-serif !important;
    font-size: 2.8em;
    text-align: left; /* Changed from center to left */
    margin: 0;
    line-height: 1;  /* Reduced from 1.2 */
    position: relative;
    z-index: 1;
    display: block;
    width: calc(100% - 300px); /* Add space for search box */
    color: #000000; /* Changed to black */
    font-weight: normal;
    letter-spacing: -0.02em;
}

.search-box {
    position: absolute;
    right: 40px; /* Adjusted to match calculator position */
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px; /* Reduced from 3px */
    width: 240px; /* Added fixed width */
    margin-left: 2rem; /* Add left margin */
    padding-left: 1rem; /* Add left padding */
}

.search-box .input-group {
    display: flex;
    flex-direction: row;
    gap: 4px;
    align-items: center;
    width: 100%; /* Make input group full width */
}

.search-label {
    color: #666;
    font-size: 0.6em;
    font-family: Arial, sans-serif;
    width: 100%;
    text-align: left;
    margin-bottom: 2px;
}

.search-box input {
    flex: 1; /* Allow input to grow */
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 0.7em;
    min-width: 0; /* Prevent input from overflowing */
    width: 160px;
    font-family: Arial, sans-serif;
}

.search-button {
    flex-shrink: 0; /* Prevent button from shrinking */
    padding: 3px 8px;
    background: #c0c0c0;
    color: #000;
    border: 2px outset #ddd;
    border-radius: 0;
    font-size: 0.7em;
    cursor: pointer;
    font-family: Arial, sans-serif;
    height: 24px;
    text-transform: capitalize;
    box-shadow: 1px 1px 1px rgba(0,0,0,0.2);
}

.search-button:active {
    border-style: inset;
    background: #b0b0b0;
}

/* Footer positioning */
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 0;
}

.content {
    flex: 1;
    max-width: 1200px; /* Increased from 800px */
    margin: 0 auto;
    padding: 0 2rem;
    padding-right: 340px; /* Add padding to prevent overlap (calculator width + margins) */
}

.content h1 {
    font-size: 2.4em;
    text-align: left;
    margin: 1rem 0;
    color: #6B6BE6;
    font-family: "Georgia", serif;
    font-weight: bold;
    border-bottom: 1px solid #6B6BE6;
    padding-bottom: 0.5rem;
}

.content h2, 
.section h2, 
.intro-section h2, 
.main-services h2 {
    font-size: 1.6em;
    margin-top: 0.5rem;
    color: #6B6BE6;
    margin-bottom: 0.5rem;
    font-family: "Georgia", "Times New Roman", serif; /* More elegant serif font */
    font-weight: normal;
    letter-spacing: 0.02em;
}

.section {
    margin: 1rem auto;
    padding: 0.5rem 0;
    position: relative;
    max-width: 800px;
}

.section p {
    margin: 0.5rem 0;
}

.section-separator {
    width: 100%;
    border: none;
    border-top: 1px solid #6B6BE6;
    margin: 1rem auto;
}

.intro-section {
    margin: 2rem 0;
    line-height: 1.6;
}

.intro-section h2 {
    font-size: 1.4em;
    color: #6B6BE6;
    margin: 1rem 0;
    font-family: "Georgia", "Times New Roman", serif;
    font-weight: normal;
    letter-spacing: 0.02em;
}

.intro-section p {
    margin: 1rem 0;
    font-size: 1em;
    color: #333;
}

.main-services {
    margin-top: 2rem; /* Reduced from 3rem */
}

.main-services h2 {
    font-size: 1.4em;
    color: #6B6BE6;
    margin: 1rem 0;
    font-family: "Georgia", "Times New Roman", serif;
    font-weight: normal;
    border-bottom: 1px solid #6B6BE6;
    padding-bottom: 0.3rem;
    letter-spacing: 0.02em;
}

.paid-services {
    margin-top: 2.5rem; /* Reduced from 4rem */
    padding-top: 1.5rem; /* Reduced from 2rem */
    border-top: 1px solid #ddd; /* Changed from 2px solid #eee */
}

.service-label.premium {
    background: #FFD700;
    color: #000;
}

.calculator-item.premium {
    border-bottom: 1px solid #FFD700;
    position: relative;
    padding-top: 2rem; /* Increased from 1.8rem */
    margin-top: 0.5rem;
}

.price-label {
    position: absolute;
    top: 5px; /* Adjusted from 2px */
    right: 0;
    color: #000;
    font-family: "MS Sans Serif", "Tahoma", sans-serif;
    font-size: 0.7em; /* Reduced from 0.75em */
    font-weight: bold; /* Changed to bold */
    background: #dcdcdc; /* Lighter grey */
    padding: 1px 4px; /* Reduced padding */
    border: 1px solid #888; /* Darker border */
    border-style: inset;
    box-shadow: inset 1px 1px 2px rgba(0,0,0,0.2);
}

.calculator-item.premium a {
    margin-top: 3px; /* Added to align better with price */
    color: #B8860B;
    font-weight: 500;
}

.calculator-item.premium a:hover {
    color: #DAA520;
}

.paid-services h2 {
    color: #B8860B;
}

.footer {
    background: #f8f8f8;
    padding: 20px 0;
    border-top: 1px solid #eee;
    margin-top: 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-content > div {
    margin: 10px 0;
}

.copyright {
    font-size: 0.9em;
    color: #666;
}

.social a, .legal a, .links a {
    color: #666;
    text-decoration: none;
    margin: 0 5px;
}

.social a:hover, .legal a:hover, .links a:hover {
    color: #3333ff;
    text-decoration: underline;
}

.service-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.service-label {
    background: #4CAF50;
    color: white;
    padding: 0.25rem 0.5rem;
    font-size: 0.8em;
    font-family: "Tahoma", sans-serif;
    border-radius: 2px;
}

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

.calculator-item {
    border-bottom: 1px solid #6B6BE6;
    padding-bottom: 1rem;
}

.calculator-item a {
    color: #6B6BE6;
    text-decoration: none;
    font-family: "Times New Roman", Times, serif;
    font-size: 1.1em;
    display: block;
    margin-bottom: 0.5rem;
}

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

.calculator-item p {
    color: #333;
    font-size: 0.9em;
    margin: 0;
    line-height: 1.4;
}

.info-sections {
    margin-top: 2.5rem; /* Reduced from 3rem */
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* Reduced from 2rem */
}

.info-section {
    display: flex;
    flex-direction: row; /* Ensure horizontal layout */
    align-items: flex-start; /* Align items to top */
    gap: 1.5rem;
    margin: 0;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid #ddd;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    min-height: 160px; /* Ensure minimum height for content */
}

.info-icon {
    flex: 0 0 120px; /* Fixed width, no grow/shrink */
    width: 120px;
    align-self: flex-start; /* Stick to top */
}

.info-icon img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid #ddd;
    padding: 4px;
    background: #fff;
}

.info-content {
    flex: 1;
    min-width: 0; /* Prevent flex item from overflowing */
    padding-right: 0.75rem; /* Reduced from 1rem */
}

.info-content h2 {
    margin-top: 0;
    font-size: 1.2em;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-family: "Georgia", "Times New Roman", serif;
}

.learn-section .info-content h2 {
    color: #6B6BE6;
}

.help-section .info-content h2 {
    color: #4CAF50;
}

.classic-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-family: "MS Sans Serif", "Tahoma", sans-serif;
}

.classic-list li {
    margin: 0.6rem 0; /* Reduced from 0.75rem */
    padding-left: 20px;
    position: relative;
    color: #666;
    font-size: 0.9em;
}

.classic-list li:before {
    content: "►"; /* Classic 90s arrow */
    position: absolute;
    left: 0;
    color: #6B6BE6;
    font-size: 0.8em;
}

.classic-list a {
    color: #3333ff;
    text-decoration: none;
    font-weight: bold;
    margin-right: 0.25em;
}

.classic-list a:hover {
    text-decoration: underline;
    color: #0000cc;
}

.links-section {
    margin: 2rem 0 3rem 0;
    padding: 1rem 0;
    border-bottom: 1px solid #6B6BE6;
}

.main-links {
    list-style: none;
    padding: 0;
    margin: 0;
    font-family: "Times New Roman", Times, serif;
    line-height: 1.6;
}

.main-links li {
    margin: 0.7em 0;
    display: flex;
    align-items: baseline;
    gap: 0.5em;
    color: #333;
}

.main-links a {
    color: #6B6BE6;
    text-decoration: none;
    font-weight: bold;
    white-space: nowrap;
}

.main-links a:hover {
    text-decoration: underline;
}

/* Add media query for mobile devices */
@media (max-width: 576px) {
    .info-section {
        flex-direction: column;
        min-height: auto;
    }

    .info-icon {
        width: 100%;
        max-width: 120px;
        margin-bottom: 1rem;
    }
}

.numerology-grid {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: flex;
    gap: 3rem;
}

.content-column {
    flex: 1;
    max-width: 800px;
    padding-right: 3rem;
}

.tool-column {
    width: 300px;
    flex-shrink: 0;
    align-self: flex-start;
    position: sticky;
    top: 2rem;
    background: #f8f8f8;
    padding: 2rem;
    border: 1px solid #ddd;
    border-radius: 3px;
    height: fit-content;
}

@media (max-width: 900px) {
    .numerology-grid {
        flex-direction: column;
        padding: 0 1rem;
    }
    
    .content-column {
        padding-right: 0;
    }
    
    .tool-column {
        width: 100%;
        position: static;
    }
}

.number-list, .step-list {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.number-list li, .step-list li {
    margin: 0.5rem 0;
    color: #333;
}

.calculator-widget {
    width: 140px; /* Reduced width */
    position: absolute;
    right: 40px;
    top: 280px; /* Moved down further */
    background-color: #d4d0c8;
    border: 2px solid #404040;
    padding: 4px; /* Reduced padding */
    z-index: 1;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.calculator-widget h3 {
    font-size: 11px;
    margin-bottom: 4px;
    font-family: "MS Sans Serif", Arial, sans-serif;
    font-weight: normal;
    color: #000;
}

.calc-form .form-group {
    margin-bottom: 4px;
}

.calc-form .form-group label {
    display: block;
    margin-bottom: 2px;
    font-family: "MS Sans Serif", Arial, sans-serif;
    font-size: 11px;
    color: #000;
}

.calc-form .form-group input {
    width: 128px; /* Adjusted for smaller container */
    height: 18px; /* Shorter inputs */
    border: 2px inset #fff;
    background: #fff;
    padding: 2px 4px;
    font-family: "MS Sans Serif", Arial, sans-serif;
    font-size: 11px;
}

.calc-button {
    width: 100%;
    background-color: #d4d0c8;
    border: 2px outset #fff;
    padding: 3px;
    margin-top: 6px;
    font-family: "MS Sans Serif", Arial, sans-serif;
    font-size: 11px;
    color: #000;
    text-align: center;
    cursor: pointer;
}

.calc-button:active {
    border-style: inset;
    background-color: #d4d0c8;
}

.calc-results {
    margin-top: 8px;
    padding: 6px;
    background: #fff;
    border: 2px inset #d4d0c8;
    font-size: 11px;
    min-height: 50px;
    color: #000;
}

.number-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.number-item {
    background: #fff;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.8em;
    border: 1px solid #ddd;
}

@media (max-width: 768px) {
    .numerology-grid {
        grid-template-columns: 1fr;
    }

    .content-column {
        padding-right: 0;
        border-right: none;
    }
}

/* Classic calculator styles */
.classic-calc {
    background-color: #d4d0c8;
    border: 2px solid #404040;
    padding: 8px;
    width: 180px;
    position: absolute;
    right: 40px;
    top: 280px;
    font-family: "MS Sans Serif", Arial, sans-serif;
}

.classic-calc h3 {
    font-size: 11px;
    margin-bottom: 6px;
    color: #000;
    font-weight: normal;
}

.classic-calc .form-group {
    margin-bottom: 6px;
}

.classic-calc input {
    width: 160px;
    height: 20px;
    border: 2px inset #fff;
    background: #fff;
    padding: 2px 4px;
    font-size: 11px;
}

.classic-calc .search-button {
    display: block;
    width: 80px;
    margin: 8px auto;
    padding: 3px 0;
    background: #c0c0c0;
    border: 2px outset #fff;
    border-radius: 0;
    font-family: "MS Sans Serif", Arial, sans-serif;
    font-size: 11px;
    color: #000;
    cursor: pointer;
    text-align: center;
    text-transform: none;
    height: auto;
    box-shadow: none;
}

.classic-calc .search-button:active {
    border-style: inset;
    background: #b0b0b0;
}

.classic-calc .calc-results {
    margin-top: 8px;
    padding: 6px;
    background: #fff;
    border: 2px inset #d4d0c8;
    font-size: 11px;
    line-height: 1.4;
    color: #000;
}

/* Show calculator widget on both numerology URLs */
.calculator-widget {
    display: none !important;
}

body[class*="numerology"] .calculator-widget {
    display: block !important;
}

/* Responsive Layout */
@media screen and (max-width: 768px) {
    /* Container and content */
    .container {
        padding: 10px;
        margin: 0;
    }

    .content {
        padding: 10px;
        margin: 0;
    }

    /* Header and navigation */
    .main-nav {
        flex-direction: column;
        padding: 5px;
    }

    .main-nav a {
        width: 100%;
        margin: 2px 0;
        padding: 8px;
        text-align: center;
        border: 1px solid #ddd;
    }

    /* Logo and search container */
    .logo-search-container {
        flex-direction: column;
        padding: 10px;
        align-items: center;
    }

    .logo-search-container h1 {
        width: 100%;
        font-size: 2em;
        text-align: center;
        margin-bottom: 10px;
    }

    /* Search box responsive fixes */
    .search-box {
        position: static;
        transform: none;
        width: 100%;
        max-width: 300px;
        margin: 10px auto;
        padding: 0;
    }

    .search-box .input-group {
        width: 100%;
    }

    .search-box input {
        width: 100%;
    }

    /* Calculator positioning */
    .calculator-widget,
    .angel-calculator {
        position: static;
        width: 100%;
        margin: 20px 0;
        right: auto;
        top: auto;
    }
}

/* Additional mobile optimizations */
@media screen and (max-width: 480px) {
    /* Smaller text for mobile */
    body {
        font-size: 14px;
    }

    /* Header adjustments */
    .header h1 {
        font-size: 1.8em;
    }

    /* Calculation display */
    .calculation-step {
        font-size: 12px;
        padding-left: 10px;
        overflow-x: auto;
    }

    /* Input fields */
    input[type="text"] {
        font-size: 16px; /* Prevent iOS zoom */
    }

    /* Section spacing */
    .section-divider {
        margin: 10px 0;
    }

    /* References */
    .reference-list {
        font-size: 0.8em;
    }
}

/* Calculator Collapse Controls */
.collapse-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #000080;
    color: #fff;
    padding: 4px 8px;
    margin: -10px -10px 10px -10px;
    font-family: "MS Sans Serif", Arial, sans-serif;
    font-size: 12px;
}

.calculator-title {
    flex: 1;
    text-align: center;
    font-weight: bold;
}

.collapse-btn {
    background: none;
    border: 1px solid #fff;
    color: #fff;
    cursor: pointer;
    font-size: 11px;
    padding: 1px 4px;
    font-family: "MS Sans Serif", Arial, sans-serif;
}

.collapse-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.collapse-btn:active {
    border-style: inset;
}

.collapse-bottom {
    text-align: center;
    margin-top: 10px;
    padding-top: 5px;
    border-top: 1px solid #808080;
}

.collapse-bottom .collapse-btn {
    width: 100%;
    padding: 2px 8px;
    background: #000080;
}

/* Mobile optimizations for calculator */
@media screen and (max-width: 767px) {
    .calculator-widget,
    .angel-calculator {
        position: relative;
        margin: 10px;
        border-radius: 0;
    }

    .collapse-controls {
        position: sticky;
        top: 0;
        z-index: 2;
    }

    .collapse-bottom {
        position: sticky;
        bottom: 0;
        background: #c0c0c0;
        margin: 0 -10px -10px -10px;
        padding: 5px 10px;
    }
}

.row {
    max-width: 1200px; /* Increased from 800px */
    margin: 0 auto;
    padding: 0;
}

.col-12 {
    padding: 0; /* Remove padding from columns */
}

.col-md-8 {
    padding-right: 300px; /* Added space for calculator */
    max-width: 800px; /* Keep main content width */
}

/* Remove extra margins */
#header-placeholder {
    margin-bottom: 0;
}

main.content {
    margin-top: 0;
    padding-top: 1rem;
}

.angel-calculator,
.calculator-widget {
    position: fixed; /* Change from absolute to fixed */
    right: 40px;
    top: 280px; /* Adjust if needed */
    width: 300px;
    z-index: 1000;
    margin-left: 20px;
}

/* Responsive adjustments */
@media screen and (max-width: 1200px) {
    .angel-calculator,
    .calculator-widget {
        position: static;
        width: 100%;
        max-width: 300px;
        margin: 2rem auto;
        right: auto;
        top: auto;
    }

    .content {
        padding-right: 2rem; /* Reset padding on mobile */
    }
}

.angel-calculator,
.calculator-widget {
    position: absolute;
    right: 40px; /* Match search box position */
    width: 240px; /* Match search box width */
}

/* Gematria Calculator Styles */
.calculator-container {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.calculator-form {
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.gematria-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.results-container {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.result-card {
    background-color: #f8f9fa;
    border-left: 4px solid #6c5ce7;
    padding: 15px;
    border-radius: 5px;
}

.result-card h4 {
    margin-top: 0;
    font-size: 18px;
    color: #333;
}

.result-card .value {
    font-size: 32px;
    font-weight: 600;
    color: #6c5ce7;
    margin: 10px 0;
}

.result-card .text-info {
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.gematria-explanation, .gematria-applications {
    margin-top: 40px;
}

.gematria-system {
    margin-bottom: 25px;
}

.gematria-system h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.error {
    color: #dc3545;
    font-weight: 500;
}

@media (max-width: 768px) {
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .gematria-options {
        grid-template-columns: 1fr 1fr;
    }
}

