/* Styling for individual interest pages (e.g., Chess, Adventures) */

/* Header for the interest page */
.interest-header {
    text-align: center;
    max-width: 800px;
    margin: 6rem auto 1rem auto;
    padding: 0 20px;
    animation: fadeIn 1s ease-in-out;
}



.interest-title {
    font-family: 'Oswald', sans-serif;
    font-size: 3rem;
    color: #fff;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.interest-intro {
    font-family: 'Roboto', sans-serif;
    font-size: 1.1rem;
    color: #ccc;
    line-height: 1.6;
}

/* Section containing all the posts */
.posts-section {
    padding: 0 0 2rem 0;
}

/* Grid layout for the posts */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Individual post card styling */
.post-card {
    background-color: rgba(30, 30, 30, 0.8); /* Slightly transparent background */
    border: 1px solid #444;
    border-radius: 8px;
    overflow: hidden; /* Ensures the image corners are rounded */
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(5px);
}

.post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

/* Thumbnail container */
.post-thumbnail {
    width: 100%;
    /* Aspect ratio for 16:9 (e.g., 1280x720) */
    aspect-ratio: 16 / 9; 
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the area without distortion */
    transition: transform 0.3s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05); /* Subtle zoom effect on hover */
}

/* Content area below the thumbnail */
.post-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Allows content to fill available space */
}

.post-intro {
    font-family: 'Roboto', sans-serif;
    color: #ddd;
    line-height: 1.5;
    flex-grow: 1; /* Pushes the button to the bottom */
    margin-bottom: 1.5rem;
}

/* 'Read More' button */
.post-btn-details {
    display: inline-block;
    background-color: #e8491d; /* Example button color, change as needed */
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    text-align: center;
    align-self: flex-start; /* Aligns button to the left */
}

.post-btn-details:hover {
    background-color: #f9633a;
}

/* Back to main page link styling in the navbar */
.navbar .nav-links a[href*="index.html"] {
    font-weight: bold;
    color: #e8491d; /* Highlight color to make it stand out */
    transition: color 0.3s;
}

.navbar .nav-links a[href*="index.html"]:hover {
    color: #f9633a;
}

/* =================================================
   NEW STYLE for multi-line tech stack
   ================================================= */

.tech-line {
    display: block; /* This is the key: it forces each span onto a new line */
    line-height: 1.4; /* Adjusts the spacing between the lines */
}


/* =================================================
   NEW STYLES FOR POST CARDS & VIDEO MODAL
   ================================================= */

/* Container for the button and icon */
.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto; /* Pushes this container to the bottom */
}

/* Overriding the button color to be less vivid */
.post-btn-details {
    background-color: #d04a20; /* A less vivid orange */
}
.post-btn-details:hover {
    background-color: #e8491d; /* Original color on hover for feedback */
}

/* Style for the new YouTube icon button */
.post-btn-youtube {
    font-size: 2.2rem; /* Larger icon size */
    color: #ddd;
    transition: color 0.3s, transform 0.3s;
}
.post-btn-youtube:hover {
    color: #ff0000; /* YouTube red on hover */
    transform: scale(1.1);
}


/* --- Video Modal Styles --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 0.3s, opacity 0.3s ease;
}
.modal.active {
    visibility: visible;
    opacity: 1;
    transition: visibility 0s, opacity 0.3s ease;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.modal-content {
    position: relative;
    background-color: #0d1117;
    border-radius: 8px;
    width: 90%;
    max-width: 960px; /* Max width for the video player */
    z-index: 2001;
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.modal.active .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal-close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    /* Creates a responsive 16:9 container for the iframe */
    position: relative;
    padding-bottom: 56.25%; 
    height: 0;
    overflow: hidden;
}

.modal-body iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}