/* Modify the video-wrapper to ensure dynamic scaling */
.video-wrapper {
    position: relative;
    width: 100%; /* Full width for responsiveness */
    max-width: 560px; /* Maintain max-width for larger screens */
    margin: 0 auto;
    padding-bottom: 56.25%; /* 16:9 aspect ratio for all screens */
    height: 0; /* This makes sure the container scales with padding */
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Ensure the video title stays above the iframe on desktop and mobile */
.video-container h2 {
    width: 90%; /* 90% width to match the video's new width */
    margin: 0 auto 10px; /* Center and add space below */
    text-align: center;
    color: #333; /* Default color */
    background-color: transparent; /* No background by default */
}

/* Desktop specific styles */
@media (min-width: 769px) {
    .video-container h2 {
        color: white; /* Text color set to white for desktop */
        background-color: black; /* Background set to black for desktop */
    }

    .video-wrapper {
        width: 90%; /* Adjusted to 90% width for desktop */
        max-width: none; /* Allow full 90% width */
    }
}

/* Modify the header banner to reduce height to 65% without cropping */
.main-header img.header-banner {
    width: 100%;
    height: auto; /* Maintain aspect ratio */
    max-height: 65vh; /* Scales height to 65% of viewport height */
    object-fit: contain; /* This will scale down the image to fit within max-height without cropping */
}

/* Add styles for the new header title */
.header-title {
    font-family: 'Georgia', serif;
    font-weight: bold;
    text-align: center;
    padding: 10px 0;
    font-size: 20px; /* Adjust size as needed */
}

/* Responsive adjustments for header */
@media (max-width: 768px) {
    .main-header img.header-banner {
        max-height: 40vh; /* Reduce height further for mobile */
    }
    .header-title {
        font-size: 16px; /* Smaller font size for mobile */
    }
}

/* Styles for the new post section */
.post-section {
    padding: 20px 0;
    background-color: #f9f9f9; /* Light background for contrast */
}

.post-container {
    width: 90%;
    max-width: 800px; /* Constrain width for readability */
    margin: 0 auto;
    font-family: 'Georgia', serif;
    color: #333;
}

.post-container h1 {
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
}

.post-container .post-text {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px; /* Increased spacing below the text */
}

.post-container ol {
    margin: 15px 0;
    padding-left: 30px;
}

.post-container ol li {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.post-image {
    width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.image-caption {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin-top: 5px;
    margin-bottom: 20px;
    font-style: italic;
}

.image-fallback {
    font-size: 14px;
    color: #ff0000; /* Red text for visibility */
    text-align: center;
    margin: 20px 0;
    font-weight: bold;
}

.post-container a {
    color: #0066cc;
    text-decoration: none;
    padding: 2px 5px;
    border-radius: 3px;
    transition: background-color 0.3s;
}

.post-container a:hover {
    background-color: #e6f0fa; /* Light blue background on hover */
    text-decoration: underline;
}

/* Responsive adjustments for post section */
@media (max-width: 768px) {
    .post-container h1 {
        font-size: 24px;
    }

    .post-container .post-text,
    .post-container ol li {
        font-size: 14px;
    }

    .image-caption,
    .image-fallback {
        font-size: 12px;
    }
}
