/*
Theme Name: Pageking Flex (child)
Template: pk-theme
Author: Pageking
Author URI: https://www.pageking.nl/
Description: Pageking is een thema voor WordPress dat is ontworpen voor Pageking websites.
Requires at least: 5.9
Tested up to: 6.7.2
Requires PHP: 8.3
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

html {
    scroll-behavior: smooth;
}

* {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* SPEED OPTIMIZATIONS */
  /* Layout Shift Prevention - CLS Optimization */
  img {
    max-width: 100%;
    height: auto;
    /* Preserve aspect ratio to prevent layout shifts */
    aspect-ratio: attr(width) / attr(height);
  }

  img[width][height] {
    /* Browser calculates aspect-ratio from width/height attributes */
    aspect-ratio: auto;
  }

  /* Ensure hero images maintain aspect ratio */
  .hero-bg {
    width: 100%;
    height: auto;
    object-fit: cover;
  }

button {
  font-family: var(--pk-text-font-family);
}

.fin-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 40px;
    border-radius: 999px;
    transition: .2s ease-in-out background-color, .2s ease-in-out color;
    flex-shrink: 0;
    width: fit-content;
    background-color: var(--fin-green);
    color: var(--fin-black);
    font-weight: 700;
    font-size: var(--body-text-xl);
    text-decoration: none;
}

.fin-button:hover, .fin-button:active {
    background-color: var(--fin-green-hover);
}

/* DEFAULTS PAGE-CONTENT */
.pk-page-content h1, .pk-page-content h2, .pk-page-content h3, .pk-page-content h4, .pk-page-content h5, .pk-page-content h6 {
  margin-top: 0rem;
  margin-bottom: 1rem;
}

.pk-page-content p {
  margin-top: 0;
  margin-bottom: 1.25rem;
}

.pk-page-content ul, .pk-page-content ol {
  margin-top: 0;
  margin-bottom: 1.5rem;
  padding-left: 1.1rem;
}

.pk-page-content li {
  margin-bottom: 0.5rem;
}

.pk-page-content img {
  max-width: 100%;
  height: auto;
  display: block;
}

.pk-page-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}

.pk-page-content th, .pk-page-content td {
  padding: 0.75rem 1rem;
  border: 1px solid #e0e0e0;
  text-align: left;
}

.pk-page-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
}

.pk-page-content hr {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 2rem 0;
}

/* Global anchor underline animation */
.pk-page a:not(.fin-button):not(.footer-social-link):not(.pk-button) {
    position: relative;
    text-decoration: none;
    width: fit-content;
}

.pk-page a:not(.fin-button):not(.footer-social-link):not(.pk-button)::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    z-index: 1;
    width: 0;
    height: 1px;
    background-color: currentColor;
    translate: -50% 0px;
    transition: width 0.3s ease-in-out;
}

.pk-page a:not(.fin-button):not(.footer-social-link):not(.pk-button):hover::before {
    width: 100%;
}

/* LAYOUTS */

.pk-page {
    overflow: clip !important;
}

.pk-row {
  padding-block: unset !important;
}

.flex-layout {
    display: block;
}

/* First layout in the repeater gets no margin-top */
.flex-repeater > .flex-content:first-child > .flex-layout:first-child {
    margin-top: unset;
    padding-top: 260px !important;
}

.flex-repeater > .flex-content:last-child > .flex-layout:last-child.no-margin {
    margin-bottom: unset;
}

@media screen and (max-width: 1024px) {

    .flex-layout {
      padding-inline: var(--pk-site-gutter) !important;
    }

    /* First layout in the repeater gets no margin-top */
    .flex-repeater > .flex-content:first-child > .flex-layout:first-child {
        padding-top: 200px !important;
    }

}


@media (max-width: 767px) {

    .fin-button {
      padding: 16px 24px;
    }

    .pk-page-content ul, .pk-page-content ol { 
      padding-left: 1.1rem; 
    }

        /* First layout in the repeater gets no margin-top */
    .flex-repeater > .flex-content:first-child > .flex-layout:first-child {
        padding-top: 120px !important;
    }


}