* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    color: #333;
    line-height: 1.6;
    overflow: hidden; /* Ito ang nagtatanggal ng scrollbar, at ito ang gusto mo para sa page na ito */
    background-color: #0d0d0d; /* Ginawa kong dark background para consistent sa theme, instead of #333 */
    padding-top: 4rem; /* Para sa fixed header */

    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Siguraduhin na ang body ay kasingtaas ng viewport */
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.header {
    background: #000000;
    color: #ffffff;
    padding: 1rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2),
                0 2px 4px -1px rgba(0, 0, 0, 0.12);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    flex-shrink: 0; /* Para hindi ito lumiliit kapag nagbabago ang screen size */
}

.header1 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-direction: row;
}

.main-logo {
    height: 3.1rem;
    width: 3.1rem;
    border-radius: 9999px;
    margin-right: 1rem;
    object-fit: cover;
}

.brand-name {
    color: #e7ba51;
    text-decoration: none;
    font-size: 1.4em;
    font-weight: bold;
    white-space: nowrap;
    font-family: 'Roboto Slab';
}

.back-to-home-container {
    margin-left: auto;
}

.back-to-home-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #dbb152;
    color: #1a1a1a;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.back-to-home-button:hover {
    background-color: #b69343;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.project-detail-section {
    background-color: #0d0d0d;
    padding: 15px;
    color: #ffffff;
    
    display: flex;
    flex-direction: column;
    justify-content: center; /* I-center ang content vertically */
    align-items: center;
    flex-grow: 1; /* Hahaba ito para punuin ang natitirang space */
    /* overflow: hidden; */ /* Alisin ito kung minsan ay may minor overflow at ok lang ang scrollbar, pero kung ayaw mo talaga ng scrollbar, panatilihin. */
    box-sizing: border-box;
    /* --- DAGDAG: MINSAN, KAILANGAN NG overflow-y: auto/scroll KUNG MAY CONTENT NA LALAGPAS SA IMAGE SIZE */
    overflow-y: auto; /* Allow scrolling within this section if content exceeds its height */
}

.project-detail-section .container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 0 10px; /* Dagdagan ng kaunting horizontal padding sa container para hindi dumikit ang content sa gilid */

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    /* --- BINAGO: I-adjust ang max-height para sa image at info text --- */
    /* Kalkulahin ang available height minus header, padding, at button/text height */
    /* Example: 100vh - header_height - section_padding_top_bottom - button_height - text_height */
    max-height: calc(100vh - 4rem - 30px - 20px - 10px); /* Adjust based on actual header, padding, button, and text heights */
    /* Ang 4rem ay header height, 30px ang project-detail-section padding (top+bottom),
       20px ang estimated height ng back-to-design-button, 10px ang image-info-text height.
       This will give more space for the image to fit. */
    overflow-y: auto; /* Allow scrolling within the container if its content (image + text) overflows this calculated max-height */
}

.project-detail-section img {
    max-width: 100%;
    /* --- BINAGO: Adjustable image height para mag-fit sa natitirang space --- */
    /* Ang height ng image ay dapat mag-adapt sa available space sa container */
    max-height: 80vh; /* Adjust this value (e.g., 70vh, 75vh) until the image fits well without overflow */
                      /* Pwedeng 100% kung ang parent container ang may fixed height */
    height: auto; /* Keep auto to maintain aspect ratio */
    object-fit: contain; /* Para makita ang buong image */

    margin: 10px auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

.image-info-text {
    font-size: 0.8em; /* Liitan pa ang font size */
    color: #aaaaaa;
    margin-top: 5px; /* Ilayo nang bahagya sa image */
    margin-bottom: 10px; /* Bawasan */
    line-height: 1.2;
    flex-shrink: 0;
}

.back-to-design-button {
    display: inline-block;
    padding: 7px 14px;
    background-color: #dbb152;
    color: #1a1a1a;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.85em;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.back-to-design-button:hover {
    background-color: #b69343;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

@media (max-width: 768px) {
    body {
        padding-top: 3.5rem;
    }
    .header {
        padding: 0.7rem 0;
    }
    .main-logo {
        height: 2.5rem;
        width: 2.5rem;
    }
    .brand-name {
        font-size: 1.2em;
    }
    .back-to-home-button {
        font-size: 0.7em;
        padding: 5px 10px;
    }

    .project-detail-section {
        padding: 10px; /* Mas maliit na padding sa mobile */
    }

    .project-detail-section .container {
        /* Re-calculate max-height for mobile */
        max-height: calc(100vh - 3.5rem - 20px - 16px - 8px); /* Adjust based on new header, padding, button, text height */
                                                            /* 3.5rem (header), 20px (section padding), 16px (button), 8px (text) */
    }

    .project-detail-section img {
        max-height: 75vh; /* Adjustable image height on smaller screens */
        margin: 8px auto;
    }

    .image-info-text {
        font-size: 0.7em;
        margin-top: 3px;
        margin-bottom: 8px;
    }

    .back-to-design-button {
        font-size: 0.75em;
        padding: 5px 10px;
        margin-top: 8px;
    }
}

@media (max-width: 480px) {
    .project-detail-section .container {
        max-height: calc(100vh - 3.5rem - 20px - 16px - 8px); /* Same calc, or re-adjust if needed */
    }
    .project-detail-section img {
        max-height: 70vh; /* Further adjust image height for very small screens */
    }
}