/* FTC Express - Matching Hugo site styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #222;
    background: #FFF;
    text-align: center;
}

/* Container mimics original 90% width */
#container {
    width: 90% !important;
    max-width: 1400px;
    margin: 0 auto;
    padding: 5px;
    text-align: left;
    background: #FFF;
}

/* Header with logo */
#header {
    background: #FFF;
    padding: 20px 0;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#logo img {
    max-height: 80px;
}

/* Surname search box */
#header_surname {
    background-color: #CCFFCC;
    padding: 15px;
    border-radius: 5px;
    border: 2px solid #608341;
}

#header_surname input[type="text"] {
    font-size: 16px;
    background-color: #CCFFCC;
    border: 1px solid #608341;
    padding: 5px;
    width: 200px;
}

#header_surname input[type="submit"] {
    background: #608341;
    color: white;
    border: none;
    padding: 5px 15px;
    cursor: pointer;
    font-size: 14px;
}

/* Navigation bar */
#navbar {
    background: #FFF;
    font-size: 14px;
    padding: 10px 0;
    margin: 0;
    border-bottom: 1px solid #DDD;
}

#navbar a {
    text-decoration: none;
    color: #2361A1;
    padding: 0 15px;
}

#navbar a:hover {
    text-decoration: underline;
}

/* Main content area */
.content-wrapper {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

#content {
    flex: 1;
    padding: 10px;
    margin: 5px 0;
    background: #FFF;
}

/* Typography */
h1, h2, h3, p {
    margin: 0;
    padding: 5px 0;
    font-weight: normal;
}

h1 {
    font-size: 150%;
    color: #333;
    margin: 0 0 20px 0;
}

h2 {
    font-size: 140%;
    line-height: 1;
    color: #002455;
}

h3 {
    font-size: 125%;
    line-height: 1;
    color: #002455;
}

/* Links */
a {
    color: #2361A1;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Journal type styling - color coding from original */
.journal {
    border-left: 10px solid #608341;
}

.query {
    border-left: 10px solid #8E388E;
    background-color: #F8EDF8;
}

.question {
    border-left: 10px solid #EEC900;
    background-color: #FFFBE5;
}

.journal_list {
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid silver;
    background: white;
}

/* Homepage specific */
.homepage {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Newsletter CTA on homepage */
.relaunch-cta {
    margin: 40px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    border: 2px solid #dee2e6;
}

.cta-content h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 28px;
}

.cta-content p {
    color: #666;
    font-size: 18px;
    margin-bottom: 25px;
}

.cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #495057;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: #343a40;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.history-hero {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 40px;
}

.history-hero h1 {
    color: #002455;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.history-text p {
    margin-bottom: 15px;
    color: #444;
}

/* Featured content grid */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.featured-section {
    background: white;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.featured-section h3 {
    color: #002455;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #608341;
}

.featured-list {
    list-style: none;
}

.featured-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.featured-list li:last-child {
    border-bottom: none;
}

.view-count {
    float: right;
    color: #666;
    font-size: 0.9rem;
}

/* Navigation cards */
.nav-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.nav-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    display: block;
}

.nav-card:hover {
    border-color: #608341;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-decoration: none;
}

.nav-card-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.nav-card h3 {
    color: #002455;
    margin-bottom: 10px;
}

.nav-card-stats {
    color: #608341;
    font-weight: bold;
    margin-bottom: 10px;
}

.nav-card p {
    color: #666;
    line-height: 1.5;
}

.nav-card-arrow {
    color: #608341;
    font-weight: bold;
    margin-top: 15px;
}

/* Journal full page */
.journal-full {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 30px;
}

/* Journal surnames section */
.journal-surnames {
    margin: 20px 0;
    padding: 15px;
    background: #f8f8f8;
    border-left: 3px solid #608341;
    border-radius: 4px;
}

.journal-surnames a {
    display: inline-block;
    margin: 5px;
    padding: 5px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 20px;
    text-decoration: none;
    color: #2361A1;
    transition: all 0.2s;
}

.journal-surnames a:hover {
    background: #608341;
    color: white;
    border-color: #608341;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.journal-header {
    border-bottom: 2px solid #608341;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.journal-header h1 {
    color: #002455;
    margin-bottom: 15px;
}

.journal-meta {
    color: #666;
    font-size: 0.9rem;
}

.journal-meta span {
    margin-right: 20px;
}

.journal-content {
    margin-bottom: 40px;
    line-height: 1.8;
}

/* Lists in journal content */
.journal-content ul {
    margin: 15px 0 15px 20px;
    padding-left: 20px;
    list-style-type: disc;
    list-style-position: outside;
}

.journal-content ul li {
    margin-bottom: 8px;
    line-height: 1.6;
    text-indent: 0;
}

.journal-content ol {
    margin: 15px 0 15px 20px;
    padding-left: 20px;
    list-style-type: decimal;
    list-style-position: outside;
}

.journal-content ol li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Comments section */
.comments {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #608341;
}

.comments h2 {
    color: #002455;
    margin-bottom: 20px;
}

.comment {
    background: #f8f8f8;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 3px solid #608341;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #666;
    font-size: 0.9rem;
}

.comment-header strong {
    color: #002455;
}

.comment-body {
    line-height: 1.6;
}

/* Lists in comments */
.comment-body ul {
    margin: 10px 0 10px 20px;
    padding-left: 20px;
    list-style-type: disc;
    list-style-position: outside;
}

.comment-body ul li {
    margin-bottom: 6px;
    line-height: 1.6;
    text-indent: 0;
}

.comment-body ol {
    margin: 10px 0 10px 20px;
    padding-left: 20px;
    list-style-type: decimal;
    list-style-position: outside;
}

.comment-body ol li {
    margin-bottom: 6px;
    line-height: 1.6;
}

/* Surnames */
.surname-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.surname-link {
    padding: 8px 15px;
    background: #608341;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.surname-link:hover {
    background: #4a6832;
    text-decoration: none;
}

/* Surnames Index Page */
.surnames-index {
    padding: 2rem 0;
}

.alphabet-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1.5rem 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 2rem;
    justify-content: center;
}

.letter-link {
    display: inline-block;
    padding: 0.5rem 0.8rem;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.letter-link.active {
    background: #f0f0f0;
    color: #333;
}

.letter-link.active:hover {
    background: #608341;
    color: white;
}

.letter-link.disabled {
    color: #ccc;
    cursor: not-allowed;
}

.top-surnames {
    margin: 2rem 0;
    padding: 2rem;
    background: #f9f9f9;
    border-radius: 8px;
}

.top-surnames .surname-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.surname-item {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.surname-item:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.surname-item .count {
    color: #666;
    font-size: 0.9em;
    margin-left: 0.3rem;
}

.alphabetical-listing {
    margin-top: 3rem;
}

.letter-section {
    margin: 2rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid #e0e0e0;
}

.letter-section h3 {
    font-size: 2rem;
    color: #608341;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: #f0f8f0;
    display: inline-block;
    border-radius: 4px;
}

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

.surname-grid .surname-link {
    display: block;
    padding: 0.5rem;
    text-decoration: none;
    color: #333;
    background: transparent;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.surname-grid .surname-link:hover {
    background: #f0f0f0;
    padding-left: 1rem;
}

.surname-grid .surname-link strong {
    color: #608341;
    font-weight: bold;
}

.journal-count {
    color: #666;
    font-size: 0.85em;
    margin-left: 0.3rem;
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Back to top indicator */
.letter-section:target h3 {
    animation: highlight 1s ease;
}

@keyframes highlight {
    0% { background: #ffeb3b; }
    100% { background: #f0f8f0; }
}

/* Surname page sections */
.surname-wiki {
    background: #f8f8f8;
    padding: 20px;
    margin: 20px 0;
    border-left: 5px solid #608341;
    border-radius: 4px;
}

.surname-wiki ul {
    margin: 15px 0 15px 20px;
    padding-left: 20px;
    list-style-type: disc;
    list-style-position: outside;
}

.surname-wiki ul li {
    margin-bottom: 10px;
    line-height: 1.6;
    text-indent: 0;
}

.surname-wiki h3, .surname-wiki h4 {
    margin-top: 25px;
    margin-bottom: 15px;
    color: #002455;
}

.surname-wiki h3 {
    font-size: 1.3em;
    font-weight: bold;
}

.surname-wiki h4 {
    font-size: 1.1em;
    font-weight: bold;
}

.surname-wiki hr {
    margin: 20px 0;
    border: none;
    border-top: 1px solid #ddd;
}

/* Ensure wiki content links are styled properly */
.surname-wiki a {
    color: #2361A1;
    text-decoration: none;
}

.surname-wiki a:hover {
    text-decoration: underline;
}

.surname-researchers {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.surname-researchers h2 {
    color: #002455;
    margin-bottom: 10px;
}

.researchers-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.researcher-link {
    display: inline-block;
    padding: 8px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #2361A1;
    transition: all 0.3s;
}

.researcher-link:hover {
    background: #f0f0f0;
    border-color: #608341;
    text-decoration: none;
}

.researcher-link .journal-count {
    color: #666;
    font-size: 0.9em;
}

.surname-cloud {
    margin: 30px 0;
    line-height: 2.5;
}

.surname-tag {
    display: inline-block;
    margin: 5px;
    color: #2361A1;
    text-decoration: none;
    transition: color 0.3s;
}

.surname-tag:hover {
    color: #608341;
}

/* Journal cards for homepage */
.journal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.journal-card {
    padding: 20px;
    background: white;
    border: 1px solid #e0e0e0;
    border-left: 5px solid #608341;
    transition: box-shadow 0.3s;
}

.journal-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.journal-card h4 {
    margin-bottom: 10px;
}

.journal-card h4 a {
    color: #002455;
    font-weight: bold;
}

.journal-card .meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.journal-card .summary {
    color: #444;
    line-height: 1.5;
}

/* Footer */
#footer {
    clear: both;
    background: #CFCFCF;
    padding: 20px 0;
    margin-top: 40px;
    text-align: center;
    font-size: 14px;
}

/* Utility classes */
.small {
    font-size: 0.85em;
    color: #666;
}

.time-since {
    font-style: italic;
    color: #666;
}

.comment-count {
    color: #608341;
    font-weight: bold;
}

.no-comments {
    color: #666;
    font-style: italic;
    margin-top: 20px;
}

.error-page {
    text-align: center;
    padding: 60px 20px;
}

.error-page h1 {
    color: #e74c3c;
    margin-bottom: 20px;
}