/* spacing on all sections */
.section {
    margin-top: 4rem;
    padding-top: 4rem;
}
.section:last-of-type {
    padding-bottom: 4rem;
}
    
/* hero background image */
.bgimage {
    height:100vh;
    background: url('images/kansi.webp');
    background-size:cover;
    position:relative;
    padding: 0;
    margin: 0;
}

@media (max-width: 768px) {
    /* Center the hero background on mobile so the image isn't left-cropped */
    .bgimage {
        background-position: center center;
    }
}
/* text css above hero image*/
.hero_title {
    padding-top: 10rem;
    font-size: 4.5rem;
}
.hero_desc {
    font-size: 2rem;
}
.hero_text {
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
}

.image_about {
    width: 100%;
}

.navbarDark {
    background: #000;
}


 .social-icons {
    font-size: 36px;
    cursor: pointer;
}
.fa-facebook:hover,
.fa-instagram:hover,
.fa-twitter:hover,
.fa-linkedin:hover, 
.fa-twitch:hover {
    color: #fff;
}
.fab {
    color: #000000;
}

.servicesText.card {
    height: 280px;
    cursor: pointer;
}

.service-card {
    height: 280px;
    background-size: cover;
    background-position: center;
    position: relative;
    border: none;
    color: #fff;
    overflow: hidden;
}

/* Remove default link underline/blue styling on service card anchors */
.service-card-link,
.service-card-link:visited {
    text-decoration: none;
    color: inherit;
}
.service-card-link .card-title {
    text-decoration: none;
}

.service-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    transition: background 200ms ease;
    z-index: 1;
}

.service-card:hover .service-overlay {
    background: rgba(0,0,0,0.55);
}

.servicesIcon {
    font-size: 36px;
    text-align: center;
    width: 100%;
}

/* Ensure text and icons on service cards are white for contrast */
.service-card .card-title,
.service-card .servicesIcon,
.service-card .card-body {
    color: #fff !important;
}

/* Make sure card body content sits above the overlay */
.service-card .card-body {
    position: relative;
    z-index: 2;
}
.card-title {
    text-align: center;
}
.card:hover .servicesIcon {
    color: #008000;
}
.servicesText:hover {
    border: 1px solid #008000;
}

/* Portfolio Gallery Styles */
.portfolio-gallery {
    margin-top: 3rem;
}

.portfolio-row {
    margin-bottom: 4rem;
}

.row-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #000;
}

.scroll-container {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scroll-behavior: smooth;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.scroll-container.dragging {
    cursor: grabbing;
}

/* Hide titles on portfolio tiles */
.portfolio-card .card-title {
    display: none;
}

/* Hide scrollbar */
.scroll-container::-webkit-scrollbar {
    display: none;
}

.scroll-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.portfolio-card {
    flex: 0 0 280px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.portfolio-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.placeholder-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

.card-info {
    padding: 1rem;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.card-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #000;
    margin-bottom: 0.5rem;
}

.card-year {
    font-size: 0.85rem;
    color: #888;
}

@media (max-width: 768px) {
    .row-title {
        font-size: 1.4rem;
    }
    
    .portfolio-card {
        flex: 0 0 220px;
    }
    
    .portfolio-card img {
        height: 180px;
    }
    
    .placeholder-image {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .row-title {
        font-size: 1.2rem;
    }
    
    .portfolio-card {
        flex: 0 0 180px;
    }
    
    .portfolio-card img {
        height: 150px;
    }
    
    .placeholder-image {
        height: 150px;
    }
    
    .scroll-container {
        gap: 1rem;
    }
}

/* Collage styles: use CSS columns so images keep their aspect ratio and fill the space */
.collage {
    column-count: 2;
    column-gap: 12px;
    width: 100%;
}
.collage img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 12px;
    border-radius: 6px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
}

/* Hover pop-up effect */
.collage img {
    transition: transform 180ms ease, box-shadow 180ms ease;
}
.collage img:hover {
    transform: translateY(-6px) scale(1.04);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
    z-index: 3;
}

@media (min-width: 992px) {
    .collage {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    /* Hide the collage in the About section on small screens to avoid long scrolling on mobile */
    #about .collage {
        display: none;
    }
}

@media (max-width: 480px) {
    /* Adjust columns only for the About section on very small screens */
    #about .collage {
        column-count: 1;
    }
}

/* Lightbox overlay */
.lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    padding: 20px;
}
.lightbox.open {
    display: flex;
}
.lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}
.lightbox .close-hint {
    position: absolute;
    top: 18px;
    right: 22px;
    color: #fff;
    font-size: 22px;
    opacity: 0.9;
    cursor: pointer;
}