/* CSS Reset and Base Variables */
:root {
    --primary: #003366;
    --secondary: #FFD700;
    --accent: #FF5722;
    --light: #f8f9fa;
    --dark: #343a40;
    --text: #333333;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    line-height: 1.6;
    width: 100%;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--primary);
}

img {
    max-width: 100%;
}

/* Container for consistent width */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Styles */
header {
    background-color: var(--primary);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    width: 100%;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
}

.logo h1 {
    color: white;
    font-size: 1.8rem;
}

.logo span {
    color: var(--secondary);
}

.nav-menu {

    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 1.5rem; /* Standardize the margin between menu items */
}

.nav-menu a {
    color: white;
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 0; /* Add consistent padding */
    display: inline-block; /* Ensures padding works properly */
}

.nav-menu a:hover, .nav-menu .active {
    color: var(--secondary);
}

.mobile-menu {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--secondary);
    color: var(--primary);
}

.btn-primary:hover {
    background-color: white;
    transform: translateY(-3px);
}

/* Blog Post Specific Styles */
.blog-post-header {
    background-image: linear-gradient(135deg, #336699, #1a4a7e);
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 4rem 1rem;
    width: 100%;
}

.blog-post-header h1 {
    font-size: 2.5rem;
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.3;
}

.blog-post-content {
    padding: 3rem 0;
    background-color: var(--light);
}

.blog-post-container {
    background-color: white;
    border-radius: 8px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    max-width: 900px;
    margin: 0 auto;
}

.blog-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    color: #666;
}

.blog-post-container h2 {
    color: var(--primary);
    margin: 2rem 0 1rem;
    font-size: 1.8rem;
}

.blog-post-container h3 {
    color: var(--primary);
    margin: 1.8rem 0 1rem;
    font-size: 1.5rem;
}

.blog-post-container p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.blog-post-container ul, .blog-post-container ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.blog-post-container li {
    margin-bottom: 0.5rem;
}

.blog-post-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 0; /* Reduced from 2rem */
}


.blog-post-container table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.blog-post-container th, .blog-post-container td {
    border: 1px solid #ddd;
    padding: 0.8rem;
    text-align: left;
}

.blog-post-container th {
    background-color: var(--primary);
    color: white;
}

.blog-post-container tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Author Bio */
.blog-author {
    display: flex;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-right: 1.5rem;
}

.author-info h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* Related Posts Section */
.related-posts {
    padding: 4rem 1rem;
    background-color: var(--light);
    width: 100%;
}

.related-posts h3 {
    text-align: center;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 2.5rem;
    position: relative;
}

.related-posts h3:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--secondary);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 100%;
}

.blog-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.blog-image {
    height: 200px;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-date {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.blog-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary);
    line-height: 1.4;
}

.blog-excerpt {
    margin-bottom: 1.5rem;
    color: #555;
    flex-grow: 1;
}

.blog-read-more {
    font-weight: 600;
    color: var(--primary);
    position: relative;
    display: inline-block;
    padding-right: 20px;
    align-self: flex-start;
    transition: color 0.3s;
}

.blog-read-more::after {
    content: '→';
    position: absolute;
    right: 0;
    transition: transform 0.3s;
}

.blog-read-more:hover {
    color: var(--accent);
}

.blog-read-more:hover::after {
    transform: translateX(5px);
}

/* Subscribe Section */
.subscribe-section {
    padding: 4rem 1rem;
    background-color: white;
    width: 100%;
}

.subscribe-box {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    background-color: var(--primary);
    color: white;
    padding: 3rem 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.subscribe-box h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.subscribe-box p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.subscribe-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.subscribe-form input {
    flex-grow: 1;
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: 4px 0 0 4px;
    font-family: inherit;
    font-size: 1rem;
}

.subscribe-form button {
    padding: 0.8rem 1.5rem;
    border-radius: 0 4px 4px 0;
    background-color: var(--secondary);
    color: var(--primary);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.subscribe-form button:hover {
    background-color: white;
}

/* Footer Styles */
footer {
    background-color: var(--dark);
    color: white;
    padding: 3rem 1rem 1rem;
    width: 100%;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    width: 100%;
}

.footer-col h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
    display: inline-block;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--secondary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #ddd;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--secondary);
}

.social-links {
    display: flex;
    list-style: none;
    margin-top: 1rem;
}

.social-links li {
    margin-right: 1rem;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

/* Responsive Styles */
@media screen and (max-width: 992px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .blog-post-header h1 {
        font-size: 2rem;
    }
    
    .blog-post-container {
        padding: 1.5rem;
    }
    
    .blog-author {
        flex-direction: column;
        text-align: center;
    }
    
    .author-avatar {
        margin: 0 auto 1rem;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary);
        padding: 1rem;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        margin: 0.5rem 0;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .subscribe-form {
        flex-direction: column;
    }
    
    .subscribe-form input {
        border-radius: 4px;
        margin-bottom: 1rem;
    }
    
    .subscribe-form button {
        border-radius: 4px;
    }
    
    .table-responsive {
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }
    
    .table {
      width: 100%;
      min-width: 100%;
      table-layout: fixed;
    }
    
    .table th, 
    .table td {
      white-space: normal;
      word-wrap: break-word;
      font-size: 0.9rem;
      padding: 6px 4px;
    }
    
    /* Adjust column widths for mobile */
    .table th:nth-child(1),
    .table td:nth-child(1) {
      width: 35%; /* German term */
    }
    
    .table th:nth-child(2),
    .table td:nth-child(2) {
      width: 25%; /* English meaning */
    }
    
    .table th:nth-child(3),
    .table td:nth-child(3) {
      width: 40%; /* Example sentence */
    }
  }
  
  /* Additional styles for better readability */
  .table th {
    background-color: #003366;
    color: white;
  }
  
  .table tr:nth-child(even) {
    background-color: #f2f2f2;
  }
  
  .table tr:hover {
    background-color: #e6f0ff;
  }
}
/* Enhanced image styling */
.blog-image-container {
    margin: 2.5rem auto;
    text-align: center;
    max-width: 800px; /* Constrains image size on larger screens */
}

.blog-image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-image-container img:hover {
    transform: scale(1.01);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.image-caption {
    font-size: 0.9rem;
    color: #666 ;
    text-align: center ;
    margin-top: 4px; /* Minimal top margin */
    margin-bottom: 0; /* No bottom margin */
    font-style: italic ;
}

/* Media queries for responsive images */
@media screen and (min-width: 1200px) {
    .blog-image-container.large {
        max-width: 85%;
    }
    
    .blog-image-container.medium {
        max-width: 70%;
    }
    
    .blog-image-container.small {
        max-width: 50%;
    }
}
/* Updated image styling with reduced vertical spacing */
.article-image {
    width: 75%;
    max-width: 700px;
    margin: 1rem auto; /* Reduced from 2rem to 1rem */
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.image-wrapper {
    text-align: center;
    margin: 0; /* Reduced from 1.5rem to 1rem */
    padding: 0;
}


@media (max-width: 768px) {
    .article-image {
        width: 100%;
        margin: 0.25rem auto;
    }
    
    .image-wrapper {
        margin: 1rem 0; /* Even smaller margins on mobile */
    }
}

@media screen and (max-width: 768px) {
    .image-wrapper {
        margin: 0.75rem 0; /* Even smaller margins on mobile */
    }
}


.series-navigation {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin: 2.5rem 0;
    border-left: 4px solid #003366;
}

.series-navigation h2 {
    color: #003366;
    margin-top: 0;
    margin-bottom: 1rem;
}

.series-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.series-item {
    display: flex;
    background-color: white;
    border-radius: 6px;
    padding: 1.2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.series-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.series-item.active {
    border: 2px solid #FFD700;
    background-color: #fffdf0;
}

.series-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: #003366;
    color: white;
    border-radius: 50%;
    font-weight: bold;
    margin-right: 1rem;
    flex-shrink: 0;
}

.series-content {
    flex-grow: 1;
}

.series-content h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: #003366;
}

.series-content p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.8rem;
}

.series-link {
    display: inline-block;
    color: #FF5722;
    font-weight: 600;
    transition: color 0.3s;
    text-decoration: none;
}

.series-link:hover {
    color: #003366;
}

.series-link.current {
    color: #003366;
    font-weight: bold;
}

@media (max-width: 768px) {
    .series-grid {
        grid-template-columns: 1fr;
    }
    
    .series-navigation {
        padding: 1.5rem;
    }
}
