/* 
    Simple Portfolio Website
    Replace colors, fonts, and spacing as needed.
*/

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f4f4;
    color: #222;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

/* Header */
.site-header {
    background: linear-gradient(135deg, #1f2933, #3d4f5c);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.header-container {
    text-align: center;
}

.site-header h1 {
    margin: 0;
    font-size: 2.5rem;
    text-align: center;
}

.subtitle {
    margin: 8px 0;
    text-align: center;
}

/* Sticky area for overview and filters */
.sticky-portfolio-nav {
    position: sticky;
    top: 0;
    z-index: 999;
    background: #f4f4f4;
    padding-top: 10px;
    padding-bottom: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* About and contact sections */
.about,
.contact {
    background: white;
    margin: 30px 0;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

/* Tight spacing when about is inside sticky container */
.sticky-portfolio-nav .about {
    margin: 0 0 15px 0;
    padding: 15px 25px;
}

.sticky-portfolio-nav .about h2 {
    margin-top: 0;
    margin-bottom: 5px;
}

.sticky-portfolio-nav .about p {
    margin-bottom: 0;
}

/* Filter buttons */
.filters {
    text-align: center;
    margin: 25px 0;
}

.sticky-portfolio-nav .filters {
    margin: 0;
}

.filter-btn {
    border: none;
    background: #ddd;
    color: #222;
    padding: 10px 16px;
    margin: 5px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.3s ease, color 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: #1f2933;
    color: white;
}

/* Portfolio layout */
.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin-top: 30px;
    margin-bottom: 40px;
	height: 760px;
    min-height: 760px;
}

/* Embedded site viewer inside portfolio-grid */
.portfolio-viewer {
    position: relative;
    width: 100%;
    min-height: 620px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.portfolio-viewer-placeholder {
    min-height: 620px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    color: #44515c;
    background:
        linear-gradient(135deg, rgba(31, 41, 51, 0.035), rgba(61, 79, 92, 0.08));
}

.portfolio-viewer-placeholder h3 {
    margin: 0 0 8px;
    color: #1f2933;
    font-size: 1.4rem;
}

.portfolio-viewer-placeholder p {
    margin: 0;
    max-width: 560px;
}

.portfolio-viewer-placeholder.hidden {
    display: none;
}

.portfolio-frame {
    display: none;
    width: 100%;
    height: 760px;
    border: 0;
    background: white;
}

.portfolio-frame.active {
    display: block;
}

/* Fixed card sizing */
.portfolio-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);

    min-height: 520px;
    max-height: 720px;
    overflow-y: auto;
}

.portfolio-card h3 {
    margin-top: 0;
    color: #1f2933;
}

/* Before/after image layout */
.comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.comparison div {
    background: #f8f8f8;
    padding: 10px;
    border-radius: 8px;
    min-height: 300px;
}

.comparison span {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #444;
}

/* Fixed image display size inside cards */
.comparison img,
.portfolio-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    border-radius: 6px;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.portfolio-image:hover {
    transform: scale(1.02);
    opacity: 0.85;
}

/* Contact section */
.contact a {
    color: #1f2933;
    font-weight: bold;
}

/* Footer */
.site-footer {
    text-align: center;
    background: #1f2933;
    color: white;
    padding: 20px;
    margin-top: 40px;
}

/* Used by JavaScript filtering */
.hidden {
    display: none;
}

/* Large image popup */
.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    padding: 40px 20px;
    text-align: center;
}

.image-modal.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Large popup image */
.modal-image {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
    border: 3px solid white;
    object-fit: contain;
    background: white;
}

/* Caption under image */
.modal-caption {
    color: white;
    margin-top: 15px;
    font-size: 1rem;
}

/* Close button */
.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: white;
    color: #222;
    border: none;
    font-size: 2rem;
    line-height: 1;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2200;
}

.modal-close:hover {
    background: #ddd;
}

/* Modal arrow buttons */
.modal-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    color: #222;
    border: none;
    font-size: 2.5rem;
    line-height: 1;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2100;
    opacity: 0.85;
    transition: opacity 0.25s ease, background 0.25s ease;
}

.modal-arrow:hover {
    opacity: 1;
    background: #ddd;
}

.modal-prev {
    left: 30px;
}

.modal-next {
    right: 30px;
}

/* Responsive layout */
@media screen and (max-width: 700px) {
    .site-header {
        padding: 40px 0;
    }

    .site-header h1 {
        font-size: 2rem;
    }

    .sticky-portfolio-nav {
        position: static;
        box-shadow: none;
    }

    .portfolio-card {
        min-height: auto;
        max-height: none;
        overflow-y: visible;
    }

    .comparison {
        grid-template-columns: 1fr;
    }

    .comparison div {
        min-height: auto;
    }

    .comparison img,
    .portfolio-image {
        height: 220px;
    }

    .filter-btn {
        display: inline-block;
        width: auto;
    }

    .portfolio-viewer,
    .portfolio-viewer-placeholder {
        min-height: 520px;
    }

    .portfolio-frame {
        height: 70vh;
        min-height: 520px;
    }

    .modal-image {
        max-width: 95%;
        max-height: 75vh;
    }

    .modal-close {
        top: 15px;
        right: 15px;
    }

    .modal-arrow {
        width: 42px;
        height: 42px;
        font-size: 2rem;
    }

    .modal-prev {
        left: 10px;
    }

    .modal-next {
        right: 10px;
    }
}