/* ===== PROJECT FILTERS SECTION ===== */
.project-filters-section {
    padding: 40px 0 0; /* Padding above filters */
    background-color: var(--background-color); /* Match main background */
}

.project-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 15px;
    margin-bottom: 2rem; /* Space below filters */
}

/* Style .project-filter using existing .skills-tab styles or define similarly */
.project-filter {
    padding: 10px 25px;
    border: 1px solid var(--border-color);
    background-color: transparent;
    color: var(--text-color-light);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    font-size: 0.95rem;
}

.project-filter:hover {
    background-color: var(--hover-color);
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.project-filter.active {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border-color: var(--secondary-color);
}

/* ===== PROJECTS SECTION & GRID ===== */
.projects-section {
    padding: 40px 0 var(--section-padding); /* Adjust padding */
}

.projects-grid {
    display: grid;
    /* Use existing grid definition or define here */
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

/* ===== PROJECT CARD ===== */
/* Use existing .project-card styles if defined, otherwise: */
.project-card {
    background-color: var(--card-bg-color);
    border-radius: 8px;
    overflow: hidden; /* Contain image */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; /* Use flex for better structure */
    flex-direction: column; /* Stack image and info */
    border: 1px solid var(--border-color); /* Subtle border */
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Project Image */
.project-img {
    height: 200px; /* Or aspect-ratio: 16 / 9; */
    overflow: hidden;
    background-color: var(--hover-color); /* Fallback background */
}

.project-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    font-size: 3.5rem;
    opacity: 0.5; /* Make placeholder icon less prominent */
}

/* Project Info */
.project-info {
    padding: 20px 25px; /* Slightly more padding */
    flex-grow: 1; /* Allow info section to grow */
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
    color: var(--text-color);
}

.project-info p {
    margin-bottom: 15px;
    font-size: 0.95rem;
    flex-grow: 1; /* Push links to bottom */
    color: var(--text-color-light);
}

/* Project Tags (Use existing .tag styles if defined) */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px; /* Space before links */
}

.tag {
    background-color: rgba(100, 255, 218, 0.1);
    color: var(--secondary-color);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Project Links */
.project-links {
    display: flex;
    flex-wrap: wrap; /* Allow buttons to wrap */
    gap: 10px;
    margin-top: auto; /* Pushes links to the bottom */
}

/* Small Button Variant */
.small-btn {
    padding: 6px 15px; /* Smaller padding */
    font-size: 0.85rem; /* Smaller font */
}


/* ===== PROJECT DETAILS MODAL ===== */

/* Hidden content within the card */
.project-details-content {
    display: none;
}

/* Modal Overlay */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1050; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Disable scroll on body when modal is open (handled by JS) */
    background-color: rgba(10, 25, 47, 0.85); /* Dark overlay with opacity */
    /* For fade-in effect */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s; /* Delay visibility change */
}

.modal.active {
    display: flex; /* Use flex to center content */
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s linear 0s;
}

/* Modal Content Box */
.modal-content {
    background-color: var(--background-color);
    color: var(--text-color);
    margin: auto; /* Center vertically and horizontally */
    padding: 30px 40px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 800px; /* Max width for readability */
    max-height: 90vh; /* Max height, vertical viewport height */
    overflow-y: auto; /* Enable scroll if content overflows */
    position: relative; /* For positioning the close button */
    box-shadow: var(--shadow-large);
    /* Animation for appearing */
    transform: scale(0.95) translateY(-20px);
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Close Button ('x') */
.close-modal {
    color: var(--text-color-light);
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem; /* Larger close icon */
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--secondary-color);
    text-decoration: none;
    outline: none;
}

/* Modal Body (where dynamic content goes) */
.modal-body {
    margin-top: 20px; /* Space below close button area */
}

/* --- Styling for content INSIDE the modal --- */
.modal-body h2 {
    color: var(--secondary-color);
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center;
}

.project-details-section {
    margin-bottom: 25px;
}

.project-details-section h3 {
    color: var(--text-color);
    font-size: 1.3rem;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.project-details-section p {
    color: var(--text-color-light);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 10px;
}

.project-details-section ul {
    list-style: none;
    padding-left: 0;
}

.project-details-section li {
    color: var(--text-color-light);
    font-size: 0.95rem;
    margin-bottom: 8px;
    position: relative;
    padding-left: 25px; /* Space for icon */
    line-height: 1.6;
}

/* Custom bullet using FontAwesome Check */
.project-details-section li::before {
    content: '\f00c'; /* FontAwesome check icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--secondary-color);
    position: absolute;
    left: 0;
    top: 3px; /* Adjust vertical alignment */
    font-size: 0.9em;
}


/* ===== Responsive Adjustments for Modal ===== */
@media screen and (max-width: 768px) {
    .modal-content {
        padding: 20px 25px;
        max-height: 85vh; /* Allow slightly more height on smaller screens */
    }
    .modal-body h2 {
        font-size: 1.5rem;
    }
    .project-details-section h3 {
        font-size: 1.15rem;
    }
    .close-modal {
        font-size: 1.8rem;
        top: 10px;
        right: 15px;
    }
}

@media screen and (max-width: 576px) {
     .projects-grid {
         grid-template-columns: 1fr; /* Stack cards */
     }
     .project-filter {
         padding: 8px 18px;
         font-size: 0.9rem;
     }
     .modal-content {
         width: 95%;
         padding: 15px 20px;
     }
     .modal-body h2 {
         font-size: 1.3rem;
     }
}


