/* --- Projects Page Styles --- */

/* This is the main container for the entire projects page content */
.projects-container {
    width: 100%;
    padding: 40px 0;
    /* margin: 0px 90px; */
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Styles for the introductory text block above the projects */
.projects-intro {
    text-align: left;
    max-width: 1200px;
    width: 100%;
    margin-bottom: 50px;
    padding: 0 15px;
}

.projects-intro h1 {
    margin-bottom: 1.5rem;
    font-family: "Pirata One", serif;
    color: var(--text);
}

.projects-intro .intro-content {
    font-size: 1.8rem;
    color: var(--textSoft);
    line-height: 1.7;
    max-width: 800px; /* Constrain line length for readability */
}

/* This creates the responsive grid for the project cards */
.projects-grid {
    display: grid;
    /* This creates columns that are at least 320px wide, but will grow to fill space */
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 1200px;
    padding: 0 15px;
}

/* The main styling for each individual project card */
.project-card {
    background-color: var(--bgSoft);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #2a3b5a;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

/* Container for the project image to control its size and overflow */
.project-image-container {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background-color: #0b1529; /* Fallback color while image loads */
}

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

.project-card:hover .project-image {
    transform: scale(1.05); /* Slight zoom effect on hover */
}

/* The content area of the card (tags, title, description) */
.project-content {
    padding: 15px;
    flex-grow: 1; /* Allows this section to grow and push the footer down */
    display: flex;
    flex-direction: column;
}

.project-tags {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.project-tag {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--textSoft);
}

.project-title {
    font-size: 2.0rem;
    margin-bottom: 12px;
    color: var(--text);
    font-family: "Lora", serif;
    font-weight: 700;
}

.project-description {
    font-size: 1.6rem;
    color: var(--textSoft);
    line-height: 1.6;
    flex-grow: 1; /* Ensures description takes up available space */
}

/* The footer section of the card with links and button */
.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-top: 1px solid #2a3b5a;
}

.project-links a {
    color: var(--textSoft);
    transition: color 0.3s ease;
}

.project-links a:hover {
    color: #fff; /* A brighter color on hover */
}

.project-demo-button {
    background-color: #334155;
    color: var(--text);
    padding: 5px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.5rem;
    border: 1px solid #475569;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.project-demo-button:hover {
    background-color: #475569;
    border-color: #64748b;
}

/* --- Responsive Styles --- */
@media (max-width: 811px) {
  .projects-container {
    margin: 0px 0px;
  }
}

@media (max-width: 768px) {
    .projects-grid {
        /* On smaller screens, stack the cards in a single column */
        grid-template-columns: 1fr;
        padding: 0;
    }

    .projects-intro {
        text-align: center;
        padding: 0 10px;
    }
}
