/*
Theme Name: Portfolio Ewout Vancraeynest
Author: Ewout Vancraeynest
Description: Een custom WordPress thema voor een portfolio website.
Version: 1.1
*/

/* Importeer een font, als dat nodig is */
@import url('https://fonts.googleapis.com/css2?family=Avenir:wght@400;500;700&display=swap'); */


/* ========================================= */
/* 1. Algemene opmaak en typografie         */
/* ========================================= */
html {
  scroll-behavior: smooth;
}

body {
    font-family: Avenir, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    color: #333333;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
    color: #000000;
}

a {
    text-decoration: none;
    color: #000000;
}

/* ========================================= */
/* 2. Header en navigatiebalk boven         */
/* ========================================= */

#site-header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    z-index: 1000;
    padding: 15px 40px;
    box-sizing: border-box;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1250px; /* Dit is de aanpassing */
    margin: 0 auto;    /* Dit is de aanpassing */
}

.site-branding a {
    display: flex;
    align-items: center;
    gap: 0px;
}

.site-logo {
    height: 50px;
    width: 96px;
}

.site-branding a:hover .site-logo {
    opacity: 0;
}

.site-logo-container {
    height: 50px;
    width: 96px;
    position: relative;
    overflow: visible;
    margin-right: -20px;

}

.site-logo-container-gif {
    height: 50px;
    width: 96px;
    position: absolute;
    top: 0;
    left: 0;
    background-image: url('assets/images/logo-klein-2.gif');
    background-size: cover;
    background-position: center;
    opacity: 0; /* Standaard onzichtbaar */
    z-index: 1;
}

.site-branding a:hover .site-logo-container-gif {
    opacity: 1; /* Toon de GIF bij hover */
}

.site-titles {
    display: flex;
    flex-direction: column;
}

.site-portfolio-title {
    font-size: 1.2rem;
    line-height: 1.2;
}

.site-author-name {
    font-size: 0.9rem;
    line-height: 1.2;
}

#main-navigation .main-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

#main-navigation .main-menu li {
    margin-left: 25px;
}

#main-navigation .main-menu a {
    text-transform: lowercase;
    font-size: 1.2rem;
    font-weight: 400;
    color: #000000;
    display: flex;
    align-items: center;
}

/* Externe link icoon */
.external-link-icon {
    margin-left: 5px;
    width: 1em;
    height: 1em;
    vertical-align: middle;
}

/* Hamburgermenu styling */
.menu-toggle {
    display: none;
    position: relative;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger-icon,
.hamburger-icon::before,
.hamburger-icon::after {
    display: block;
    content: '';
    width: 100%;
    height: 3px;
    background-color: #000;
    position: absolute;
    transition: transform 0.3s ease-in-out, top 0.3s ease-in-out;
}

.hamburger-icon {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger-icon::before {
    top: -10px;
}

.hamburger-icon::after {
    top: 10px;
}

.menu-toggle.is-active .hamburger-icon {
    transform: rotate(45deg);
}

.menu-toggle.is-active .hamburger-icon::before {
    top: 0;
    transform: rotate(90deg);
}

.menu-toggle.is-active .hamburger-icon::after {
    top: 0;
    transform: rotate(0deg);
}


/* ========================================= */
/* 3. Hoofdcontent en lay-out                */
/* ========================================= */

#site-content {
    display: flex;
    max-width: 1250px;
    margin: auto;
}

#site-content .main-content {
    flex-grow: 1; /* Zorgt ervoor dat het de overgebleven ruimte inneemt */
}

.main-content {
    margin-top: 60px;
    padding: 20px 40px;
    box-sizing: border-box; /* Belangrijk voor consistente breedte */
    min-height: calc(100vh + 80px); /* Voeg deze regel toe */
    width: calc(100vw - 250px - 2 * 40px); 
}

/* De nieuwe wrapper voor intro en main-content */
.content-wrapper {
    flex-grow: 1; /* Neemt de overgebleven ruimte in */
    display: flex;
    flex-direction: column;
}

/* ========================================= */
/* 4. Zijbalknavigatie                       */
/* ========================================= */

.sidebar-nav {
    width: 250px;
    padding: 20px;
    position: sticky;
    top: 80px;
    left: 0;
    height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-sizing: border-box;
}

.category-block {
    width: 200px;
    height: 200px;
    aspect-ratio: 1 / 1;
    border-radius: 35px;
    position: relative;
    overflow: hidden; /* Dit is de sleutel om de video te croppen */
    cursor: pointer;
    background-color: #f0f0f0;
    border: 3px solid #000;
    background-size: 110%;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.3s ease;
}

.category-block video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 110%; 
    height: 110%; 
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
    transform: translate(-50%, -50%);
}

.category-block:hover video {
    opacity: 1;
}
/* ========================================= */
/* 5. Contentgedeelte (intro en portfolio)   */
/* ========================================= */

.main-content {
    margin-top: 60px;
    padding: 20px 40px;
}

.intro {
    padding: 20px 40px;
    padding-left: 0;
    margin-bottom: 50px;
}

.intro-portfolio {
    padding: 20px 40px;
    padding-left: 0;
    margin: 0;
}

.intro h2, .intro-portfolio h2 {
    font-size: 2.5rem;
    font-weight: 500;
    margin-top: 0;
}

.intro p {
    font-size: 1.1rem;
    line-height: 1.6;
}

.intro a {
    text-decoration: underline;
}

.intro .uitklap-knop {
      /* Verwijder de standaard knopstijlen */
  background: none;
  border: 1px solid black;
  border-radius: 35px;
  padding: 7px;
  padding-left: 13px;
  padding-right: 13px;
  cursor: pointer; /* Zorgt ervoor dat de muis verandert in een handje */
  outline: inherit; /* Verwijder de focus-rand */

  /* Stijl de tekst als een link */
  color: black; /* Of een andere gewenste kleur */
  text-decoration: none;
  font-family: inherit;
  font-size: inherit;
}

.intro .uitklap-knop:hover {
    background: rgb(0,0,0,0.2);
}

.uitklap-knop svg {
  width: 16px; /* Definieer de grootte van het SVG-icoon */
  height: 16px;
  stroke: currentColor; /* Zorgt ervoor dat de kleur van het icoon de tekstkleur van de knop overneemt */
  vertical-align: middle;
}

.lange-inhoud {
  max-height: 0; 
  overflow: hidden; 
  transition: max-height 0.5s ease-in-out, margin-top 0.3s ease-out;

}

/* Deze klasse wordt door JavaScript toegevoegd om de inhoud te tonen */
.lange-inhoud.actief {
    margin-top: -20px;
  max-height: 2000px;
}

.category-section {
    scroll-margin-top: 90px;
}

.portfolio-items h2 {
    font-size: 2rem;
    font-weight: 500;
    text-transform: lowercase;
    margin-top: 50px;
    margin-bottom: 20px;

}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    
    /* Dynamische hoogte van de rijen op basis van de kolombreedte */
    grid-auto-rows: calc((100vw - 250px - 2*40px - 2*30px - 30px) / 3);
}

/* Update voor de portfolio-items op de hoofdpagina */
.portfolio-item-block {
    position: relative;
    overflow: hidden;
    background-color: #f0f0f0;
    border: 3px solid transparent;
    border-radius: 35px;
    transition: border-color 0.3s ease;
    text-decoration: none; /* Zorg dat de linkstijl overal consistent is */
    color: inherit;
}

.portfolio-item-block:hover {
    border-color: black;
}

.portfolio-image-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.portfolio-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Zorgt ervoor dat de afbeelding de container vult zonder te vervormen */
    display: block;
    transition: transform 0.3s ease;
}

.portfolio-item-block:hover .portfolio-image-container img {
    transform: scale(1.05); /* Licht zoom-effect bij hover */
}

/* De overlay die verschijnt bij hover */
.portfolio-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Donkere overlay */
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 2;
    padding: 1rem;
    box-sizing: border-box;
}

.portfolio-item-block:hover .portfolio-hover-overlay {
    opacity: 1;
    visibility: visible;
}

.portfolio-info {
    /* De info zelf zit hierin */
}

.portfolio-info h3 {
    color: #fff;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.portfolio-info .client-name {
    color: #ccc;
    font-size: 1rem;
    margin: 0;
}

.portfolio-info .description {
    color: #eee;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Beperk de omschrijving tot 3 lijnen */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* Horizontaal 1x2 vak */
.portfolio-item-block.size-1x2 {
    grid-column: span 2;
}

/* Groot 2x2 vak */
.portfolio-item-block.size-2x2 {
    grid-column: span 2;
    grid-row: span 2;
}

/* -------------------- START VAN FOOTER STIJLEN -------------------- */
#site-footer {
    background-color: #fc0;
    padding: 40px 20px 20px;
    width: 100%;
    box-sizing: border-box;
    font-family: 'Avenir', sans-serif;
    margin-top: 3em;
}

#site-footer a {
    text-decoration: none;
    transition: color 0.3s ease;
    color: #000;
}

#site-footer a:hover {
    color: #333;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    text-align: left;
    margin-bottom: 1rem;
    width: 100%;
    max-width: 900px;
    padding: 0 2rem;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.column {
    max-width: 400px;
    flex: 1 1 50%;
    padding: 0 1rem;
    box-sizing: border-box;
}

#column-2 {
    text-align: right;
}

#site-footer p {
    margin: 0.5rem 0;
    font-size: 0.9em;
}

#site-footer .copyright {
    text-align: center;
    font-size: 0.9rem;
    padding-top: 15px;
    border-top: 1px solid #444;
    margin-top: 20px;
    color: #333;
}

#logo-footer {
  max-width: 150px;
  height: auto;
  margin-right: 20px;
  flex-shrink: 0;
}

.desktop-breaks-only {
    display: block;
}
.mobile-breaks-only {
    display: none;
}

/* -------------------- EINDE VAN FOOTER STIJLEN -------------------- */

/* ========================================= */
/* 6. Pop-up styling                         */
/* ========================================= */

#popup-overlay,
#about-popup-overlay,
#contact-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#popup-overlay.show-popup,
#about-popup-overlay.show-popup,
#contact-popup-overlay.show-popup { 
    opacity: 1;
    visibility: visible;
}

#popup-content,
#about-popup-content,
#contact-popup-content {
    background-color: #ffffff;
    padding: 30px;
    border: 3px solid black;
    border-radius: 35px;
    position: relative;
    max-width: 700px;
    box-sizing: border-box;
    overflow: hidden;
}

/* Algemene styling voor pop-up content */
#popup-content h2,
#about-popup-content h2,
#contact-popup-content h2 {
    margin-top: 0;
    font-size: 2em;
}

.close-popup {
    /* Bestaande styling */
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 30px;
    cursor: pointer;
    line-height: 1;
    
    /* Nieuwe regels voor de animatie */
    transition: transform 0.4s ease-in-out;
}

.close-popup:hover {
    /* Transformatie bij hover */
    transform: rotate(180deg);
}

#popup-content,
#about-popup-content,
#contact-popup-content {
    max-height: 90vh; /* Beperk de maximale hoogte tot 90% van de viewport hoogte */
    overflow-y: auto;  /* Zorg dat de inhoud verticaal scrollbaar is indien nodig */
}

/* Styling voor de "Over" pop-up */
#about-popup-content {
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Styling voor het contactformulier (Contact Form 7) */
div.wpcf7 form.wpcf7-form {
    text-align: left;
}

div.wpcf7 form.wpcf7-form p {
    text-align: left;
}

div.wpcf7 form.wpcf7-form label {
    display: block;
    text-align: left;
}

/* Verhoog de padding van de invoervelden */
div.wpcf7 form.wpcf7-form input[type="text"],
div.wpcf7 form.wpcf7-form input[type="email"],
div.wpcf7 form.wpcf7-form textarea {
    padding: 15px; /* Pas de waarde aan voor de gewenste hoogte */
}

/* De textarea kan ook apart worden aangepast voor meer ruimte */
div.wpcf7 form.wpcf7-form textarea {
    height: 150px; /* Geef de textarea een specifieke hoogte */
}

div.wpcf7 form.wpcf7-form input[type="text"],
div.wpcf7 form.wpcf7-form input[type="email"],
div.wpcf7 form.wpcf7-form textarea {
    width: 100%;
    box-sizing: border-box;
}

div.wpcf7 form.wpcf7-form button {
    width: auto;
}

div.wpcf7 form.wpcf7-form .wpcf7-submit {
    font-family: Avenir, sans-serif;
    font-size: 1em;
    background-color: #ffcc00;
    color: #000000;
    border: 3px solid transparent;
    border-radius: 35px;
    padding: 15px 30px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

div.wpcf7 form.wpcf7-form .wpcf7-submit:hover {
    border: 3px solid black;
}

/* Styling voor de Portfolio pop-up */
.portfolio-popup-inner-content {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    text-align: left;
}

.portfolio-popup-image {
    flex: 1 1 40%;
    max-width: 100%;
}

.portfolio-popup-details {
    flex: 1 1 50%;
}

.portfolio-popup-details h3 {
    margin-top: 0;
}

/* Extra styling voor de pop-up content */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    margin-top: 20px;
    margin-bottom: 20px;
}
.video-container iframe,
.video-container object,
.video-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Styling voor de metadata */
.portfolio-meta {
    margin-bottom: 20px;
    padding-bottom: 10px;
}

.portfolio-meta p {
    margin: 5px 0;
    font-size: 0.9rem;
}

.portfolio-meta strong {
    color: #000;
}

/* Styling voor de galerij */
.portfolio-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.portfolio-gallery img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}


/* ========================================= */
/* 7. Responsive Design                      */
/* ========================================= */

@media (max-width: 768px) {
    /* Header */
    #site-header {
        padding: 15px 20px;
    }

    .menu-toggle {
        display: block;
        z-index: 1001;
    }

    #main-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100%;
        background-color: #fff;
        padding: 80px 20px;
        transition: right 0.3s ease-in-out;
        z-index: 1000;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }

    #main-navigation.is-open {
        right: 0;
    }

    #main-navigation .main-menu {
        flex-direction: column;
        width: 100%;
        text-align: center;
    }

    #main-navigation .main-menu li {
        margin: 20px 0;
    }
    
    #main-navigation .main-menu a {
        font-size: 1.8rem;
        display: inline-flex;
        justify-content: center;
    }
    
    .site-logo {
        opacity: 0 !important;
    }

    .site-logo-container-gif {
        opacity: 1 !important;
    }

    /* Content en Zijbalk */
    #site-content {
        flex-direction: column;
        padding-top: 40px;
    }
    
    /* Wijziging: intro en main-content lay-out */
    .intro {
        order: -1;
        margin-bottom: 0;
        padding: 20px;
    }

    .main-content {
        order: 1;
        margin-top: 0;
        padding: 20px;
        width: 100vw;
    }

    /* Wijziging: Zijbalknavigatie met Grid */
    .category-block video {
      border-radius: 20px;
    }

    .sidebar-nav {
        order: 0;
        position: static;
        width: 100%;
        height: auto;
        padding: 20px;
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: scroll;
        gap: 15px;
        margin-bottom: -40px;

        /* Voeg deze twee regels toe voor het snap-effect */
        scroll-snap-type: x mandatory; 
        -webkit-overflow-scrolling: touch; /* Voor soepel scrollen op iOS */
        
        /* Verberg de scrollbar voor een schoner uiterlijk */
        -ms-overflow-style: none; /* IE and Edge */
        scrollbar-width: none; /* Firefox */
    }

    .sidebar-nav::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }

    .category-block {
        flex-shrink: 0;
        width: 50%;
        max-width: 170px;
        height: auto;
        padding-bottom: 0;
        margin: 0;
        border-radius: 35px;
        aspect-ratio: 1 / 1; 

        /* Voeg deze regel toe */
        scroll-snap-align: center;
    }

    /* Portfolio Grid */
    .portfolio-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        gap: 20px;
    }

    .portfolio-item-block {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }

    /* Footer */
    #site-footer .footer-content {
        flex-direction: column;
        align-items: center;
        padding: 0 1rem;
        max-width: 100%;
    }

    #site-footer .column {
        width: 100%;
        max-width: 300px;
        text-align: center;
        margin-bottom: 20px;
    }

    #site-footer #column-2 {
        text-align: center;
    }

    .desktop-breaks-only {
        display: none !important;
    }
    .mobile-breaks-only {
        display: block;
    }

    /* Pop-up aanpassingen voor mobiel */
    #popup-content,
    #about-popup-content,
    #contact-popup-content,
    #portfolio-popup-content {
        max-width: 90%;
        padding: 20px;
        border-radius: 20px;
    }

    .portfolio-popup-inner-content {
        flex-direction: column;
        gap: 20px;
    }

    .portfolio-popup-details {
        flex: 1 1 100%;
    }
    
    .portfolio-popup-image {
        display: none; /* De afbeelding van de pop-up verbergen op mobiel */
    }

    /* Zorg ervoor dat de overlay altijd zichtbaar is op mobiel */
    .portfolio-item-block .portfolio-hover-overlay {
        opacity: 1;
        visibility: visible;
        position: static; /* Zorgt ervoor dat de info onder de afbeelding komt */
    }

    /* Pas de styling van de afbeelding aan */
    .portfolio-item-block .portfolio-image-container img {
        opacity: 1;
        transform: none; /* Verwijder de zoom */
    }
}

@media (min-width: 1250px) {
    .portfolio-grid {
        /* De breedte van de grid wordt 1250px minus de marges en padding */
        /* Dit zorgt ervoor dat de hoogte niet meer schaalt na 1250px */
        grid-auto-rows: calc((1250px - 250px - 2*40px - 2*30px - 30px) / 3);
    }
}

/* Styling voor de scrollbalk 
::-webkit-scrollbar {
  width: 10px; /* Breedte van de scrollbalk */
}

/** De achtergrond van de scrollbalk (de 'track')
::-webkit-scrollbar-track {
  background: transparent; /* Maak de achtergrond transparant */
}

/* De balk zelf (de 'thumb') 
::-webkit-scrollbar-thumb {
  background: grey; /* Maak de balk zwart
  border-radius: 5px; /* Rond de hoeken af voor een mooier effect 
}

/* Kleur van de balk bij hover 
::-webkit-scrollbar-thumb:hover {
  background: transparent;
}*/