@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');

:root {
  --vh: 100vh;
  --vw: 100vw;

  --color-1: #ffffff;
  --color-2: #333333;
  --color-3: #d26528;
  --color-4: #335467;
  --color-5: #103550;
  --color-6: #dad2cf;
}

html,
body {
  height: 100%;
  margin: 0;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  overflow-y: scroll; /* forceert altijd verticale scroll, voorkomt layout jump */
  font-family: 'Nunito', Helvetica, Arial, Lucida, sans-serif;
}

h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem;
  margin-bottom: unset !important;
}

#testimonialCarousel b {
  color: #333 !important;
}

.section-inner {
  display: grid;
  place-items: center;
  width: 100vw;
  height: 100vh;
  padding: 0;
}

#s1 .section-inner {
  position: relative;
  top: -8vh;
}

#s6 .section-inner {
  display: block;
  padding: 0 5vw 20vh 5vw;
  height: 100vh;
}

.homepage-content {
  position: relative;
  top: 0;
  right: 5vw;
  width: 65vw;
  margin-left: auto;
  text-align: right;
}

.homepage-content h1,
.homepage-content p {
  text-align: right;
}

.bg-home-inline {
  display: none;
  width: 100%;
  height: 30vh;
  background-image: url("img/rafa-solo.png");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.homepage-logo {
  max-width: 50vw;
  max-height: 15vh;
  height: auto;
  width: auto;
  margin-bottom: 5vh;
}

.homepage-content h1 {
  font-family: 'Bebas Neue', display;
  text-transform: uppercase;
  font-size: clamp(24px, 8vh, 64px);
  color: #606160 !important;
  letter-spacing: 2px;
  line-height: 1.1em;
}

.homepage-content p {
  font-size: 33px;
  color: #606160 !important;
  line-height: 1.2em;
  text-align: right;
}

.btn-custom {
  position: relative;
  color: var(--color-1);
  background-color: var(--color-4);
  cursor: pointer;
  border: none;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-custom:hover {
  background-color: var(--color-3);
  color: var(--color-1);
}

.homepage-content .btn-custom {
  z-index: 200;
  background-color: var(--color-3);
}

.intro-content {
  position: relative;
  width: 100vw;
  height: 80vh;
  padding: 5% 10%;
}

.intro-content h2,
.tutor-content h2 {
  color: var(--color-5) !important;
}

.intro-content p,
.tutor-content p {
  font-size: 2.5vh;
  line-height: 3.5vh;
  margin-bottom: 3vh;
  color: var(--color-5) !important;
}

.intro-content .read-more-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.intro-content .read-more-content.is-open {
  max-height: 100vh;
}

.read-more-toggle {
  margin-top: 1vh;
  margin-bottom: 0;
  text-align: center;
  color: var(--color-4);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.tutor-content {
  position: relative;
  width: 100vw;
  padding: 5% 10%;
}

.tutor-content img {
  float: left;          /* laat de afbeelding links zweven */
  margin: 10px 20px 0 0; /* ruimte rondom de afbeelding */
  width: 405px;          /* optioneel: vaste breedte */
}

.section-content-box {
  z-index: 100;
  background: rgba(255, 255, 255, 0.7);
  padding: 20px;
  width: 65vw;
  position: relative;
  top: 0;
  height: calc(100vh - 30vh - 60px); /* tussen topbar en contact */
  margin-left: 25vw; /* positie gelijk aan contact-col-right */
  text-align: left;
  border-radius: 0.5rem;
  overflow-y: auto;
}

.section-content-box p {
  font-size: clamp(14px, 0.2vh, 14px);
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* Background layers */
.bg-layer {
  position: absolute;
  background-position: left top;
  background-repeat: no-repeat;
  z-index: -1;
  transition: opacity 0.6s ease;
}

.bg-home {
  z-index: 99;
  top: -48px;
  left: 12vw;
  right: 0;
  bottom: 0;
  height: 100vh;
  background-size: 65vh;
  background-image: url("img/rafa-solo.png");
  opacity: 1;
}

.bg-tutor {
  z-index: 99;
  top: 0;
  left: 0;
  right: 0;
  bottom: 15vh;
  background-size: 50vh;
  background-image: url("img/rafa-teacher.png");
  opacity: 0;
}

body.home-active .bg-home { opacity: 1; }
body.tutor-active .bg-tutor { opacity: 1; }

#s1 { height: 90vh; }
#s1, #s2, #s3, #s4, #s5, #s6 { background-color: var(--color-6); }
#s7 { background-color: var(--color-1); height: 100vh; }

@media (min-width: 769px) {
  .intro-content .read-more-content {
    max-height: none;
    overflow: visible;
  }

  .tutor-content .read-more-content {
    max-height: none;
    overflow: visible;
  }

  .read-more-toggle {
    display: none;
  }
}

.testimonial {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 1.5rem;
}

.testimonial p {
  height: 70vh !important;
  font-size: 2.3vh;
  line-height: 2.6vh;
  color: #606160 !important;
}

.angled-image {
  width: 50vh;
  height: 70vh;
  background-size: cover;
  background-position: center;
  clip-path: polygon(0 0, 90% 0, 100% 100%, 0 100%);
  float: left;
  border-top-left-radius: 1.5rem;
  border-bottom-left-radius: 1.5rem;
  margin-right: 3rem;
}

.carousel-inner {
  margin-top: 10vh;
}

/* Ronde buttons */
.carousel-control-prev,
.carousel-control-next {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--color-3); /* Kies jouw kleur */
  top: 50%;
  transform: translateY(-50%);
}

/* Pijl-icoon wit maken */
.carousel-control-prev-icon,
.carousel-control-next-icon {
  /* background-color: var(--color-6) !important; */
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.carousel-control-prev { left: -50px; }
.carousel-control-next { right: -50px; }

.carousel-indicators {
  z-index: 9999 !important;
  position: relative !important;
  pointer-events: auto !important;
  justify-content: center;
  margin-top: 2rem;
}

.carousel-indicators [data-bs-target] {
  pointer-events: auto !important;
  background-color: var(--color-3); /* or var(--color-4) for alternative look */
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 6px;
  opacity: 0.5;
  transition: opacity 0.3s ease;
  border: none;
  cursor: pointer;         /* <-- Belangrijk! */
  display: inline-block;   /* <-- Belangrijk! */
}

.carousel-indicators .active {
  opacity: 1;
  background-color: var(--color-4);
}

.cta-odd,
.cta-even {
  color: var(--color-1);
  width: 100vw;
  padding: 0;
  background: var(--color-4);
}

.cta-odd {
  background: var(--color-3);
  height: 10vh;
}

.cta-even {
  height: 10vh;
  z-index: 999;
}

.cta-title {
  line-height: 0.7;
  margin-top: 0.2em;
}

.cta-subtitle {
  font-size: 0.7em;
  font-weight: lighter;
}

#s7 .cta-even {
  height: 7vh;
}

.cta-odd .btn-custom,
.cta-even .btn-custom {
  color: var(--color-1);
  border: none;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cta-odd .btn-custom {
  background: var(--color-4);
  z-index: 999;
}

.cta-even .btn-custom {
  background: var(--color-3);
}

.cta-odd .btn-custom:hover {
  background: var(--color-1);
  color: var(--color-4);
}

.cta-even .btn-custom:hover {
  background: var(--color-1);
  color: var(--color-3);
}

.cta-last {
  position: fixed;
  z-index: 1000;
  bottom: 0;
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  width: 100vw;
  height: 85vh;
  margin-top: 5vh;
}

.contact-col-left {
  width: 38vw;
  position: relative;
  margin-left: 10vw;
  top: 10vh;
  height: 70vh;
}

.contact-col-right {
  width: 38vw;
  position: relative;
  margin-left: 4vw;
}

.contact-col-left img {
  max-width: 25vw;
  max-height: 10vh;
  margin-bottom: 5vh;
}

.btn-primary {
  width: 100%;
  color: var(--color-1);
  background: var(--color-4);
  border: none;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-primary:hover {
  background: var(--color-3);
  color: var(--color-1);
}

.calendly-inline-widget {
  position: relative;
  z-index: 100;
  height: 695px;
  overflow: hidden;
}

.calendly-inline-widget iframe {
  position: relative;
  z-index: 100;
  height: 695px;
  overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .homepage-content {
    width: 80vw;
    right: 0;
  }

  .section-content-box {
    width: 80vw;
    margin-left: 10vw;
  }

  .contact-col-left,
  .contact-col-right {
    width: 44vw;
  }
}

@media (max-width: 768px) {
  :root {
    --m-space-xs: clamp(4px, 0.8vh, 8px);
    --m-space-sm: clamp(8px, 1.6vh, 14px);
    --m-space-md: clamp(12px, 3vh, 24px);
    --m-space-lg: clamp(16px, 4vh, 32px);
    --s2-cta-even-h: 12dvh;
    --s7-widget-top: 2dvh;
    --s7-last-cta-h: clamp(56px, 8dvh, 76px);
    --s7-widget-h: calc(100dvh - var(--s7-last-cta-h) - var(--s7-widget-top) - var(--m-space-sm));
    --s6-collapsed-text-h: clamp(22dvh, 28dvh, 34dvh);
  }

  .section {
    height: 100dvh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .section > .cta-even,
  .section > .cta-odd {
    flex: 0 0 auto;
  }

  .section > .col-12 {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  .section-inner {
    height: 100dvh;
    width: 100vw;
    padding: var(--m-space-lg) 6vw;
  }

  #s1 {
    height: 80dvh;
  }

  #s3 {
    height: auto;
    min-height: 100dvh;
    display: grid;
    grid-template-rows: auto minmax(100dvh, auto) auto;
    overflow: visible;
  }

  #s2 {
    height: auto;
    min-height: 120dvh;
    display: grid;
    grid-template-rows: var(--s2-cta-even-h) minmax(0, calc(120dvh - var(--s2-cta-even-h))) auto;
    overflow: hidden;
  }

  #s3 > .col-12 {
    flex: 1 1 auto;
    min-height: 0;
  }

  #s2 > .col-12 {
    min-height: 0;
    overflow: hidden;
  }

  #s3 .intro-content {
    height: 80dvh;
    min-height: 80dvh;
    overflow: visible;
    box-sizing: border-box;
    padding: var(--m-space-md) 6vw;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: var(--m-space-xs);
  }

  #s3.is-expanded {
    height: auto;
    min-height: 100dvh;
    grid-template-rows: auto minmax(100dvh, auto) auto;
    overflow: visible;
  }

  #s2.is-expanded {
    height: auto;
    min-height: 100dvh;
    grid-template-rows: var(--s2-cta-even-h) auto auto;
    overflow: visible;
  }

  #s3.is-expanded > .col-12 {
    overflow: visible;
  }

  #s2.is-expanded > .col-12 {
    overflow: visible;
  }

  #s3.is-expanded .intro-content {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  #s2.is-expanded .tutor-content {
    overflow: visible;
    grid-template-rows: 50dvh auto;
    height: auto;
  }

  #s2.is-expanded .tutor-text-content {
    height: auto;
    overflow: visible;
  }

  #s2.is-expanded .rafa-teacher {
    height: 50dvh;
  }

  #s1 .section-inner {
    place-items: start center;
    padding-top: var(--m-space-sm);
    top: 0;
    position: relative;
    z-index: 1;
  }

  #s1 .homepage-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: flex-start;
  }

  #s1 .homepage-content h1:first-of-type {
    margin-top: var(--m-space-xs);
  }

  .bg-home-inline {
    display: block;
    margin: 0;
    padding: 0;
    height: clamp(12dvh, 20dvh, 24dvh);
  }

  #s3 .bg-home-inline {
    flex-shrink: 0;
    position: relative;
    top: -2rem;
    height: clamp(32dvh, 52dvh, 64dvh);
    width: calc(100% + 24vw);
    margin-left: -12vw;
    background-size: auto 100%;
    background-position: center top;
  }

  #s6 .section-inner {
    padding: var(--m-space-xs) 6vw var(--m-space-sm) 6vw;
    height: 100%;
    box-sizing: border-box;
  }

  #s6 > .col-12 {
    overflow: visible;
  }

  #s6 #testimonialCarousel {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding-bottom: 2.5rem;
  }

  #s6 .carousel-inner {
    flex: 1 1 auto;
    margin-top: 0;
    overflow: hidden;
  }

  #s6 .carousel-item {
    height: 100%;
  }

  #s6 .testimonial {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #s6 .carousel-indicators {
    position: absolute !important;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0 !important;
    z-index: 10000 !important;
  }

  #s2 > .cta-even {
    height: var(--s2-cta-even-h);
    min-height: 0;
    max-height: none;
  }

  #s6 {
    height: calc(100dvh - var(--s2-cta-even-h));
  }

  #s6.is-expanded {
    height: auto;
    min-height: calc(100dvh - var(--s2-cta-even-h));
    overflow: visible;
  }

  .homepage-content {
    width: 100%;
    right: 0;
    text-align: center;
  }

  .homepage-content h1,
  .homepage-content p {
    text-align: center;
  }

  .homepage-logo {
    max-width: clamp(180px, 70vw, 320px);
    max-height: clamp(60px, 14vh, 120px);
    margin-top: var(--m-space-sm);
    margin-bottom: 1rem;
  }

  .homepage-content p {
    font-size: clamp(14px, 2.4vh, 20px);
  }

  .intro-content h2 {
    font-size: clamp(18px, 2.6vh, 28px);
    line-height: 1em;
  }

  .intro-content p {
    font-size: clamp(12px, 2vh, 16px);
    line-height: clamp(16px, 2.2vh, 22px);
  }

  #s2 .tutor-content p {
    font-size: clamp(12px, 2vh, 16px);
    line-height: clamp(16px, 2.2vh, 22px);
  }

  .cta-title {
    line-height: 1em;
  }

  .read-more-toggle {
    align-self: center;
    padding: 0;
  }

  .intro-content,
  .tutor-content {
    width: 100%;
    height: auto;
    padding: var(--m-space-lg) 6vw;
  }

  #s2 .tutor-content {
    min-height: 0;
    overflow: hidden;
    display: grid;
    grid-template-rows: 50dvh 50dvh;
    gap: 0;
    padding: 0;
  }

  #s2 .tutor-text-content {
    height: 50dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: var(--m-space-md) 6vw calc(var(--m-space-sm) + 2vh) 6vw;
  }

  #s3 .intro-content {
    padding: var(--m-space-md) 6vw calc(var(--m-space-sm) + 2vh) 6vw;
  }

  #s3 .intro-content h2 {
    margin-bottom: var(--m-space-xs) !important;
  }

  #s3 .intro-content > p {
    margin-bottom: var(--m-space-xs);
  }

  #s3 .read-more-content {
    max-height: clamp(8dvh, 10dvh, 14dvh);
  }

  #s3 .read-more-content.is-open {
    max-height: 120vh;
  }

  #s2 .read-more-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  #s2 .read-more-content.is-open {
    max-height: 120vh;
  }

  #s3 .read-more-toggle {
    margin-top: 1rem;
    margin-bottom: var(--m-space-xs);
  }

  #s2 .read-more-toggle {
    margin-top: auto;
    margin-bottom: var(--m-space-xs);
  }

  #s2 .tutor-text-content > :last-child {
    margin-bottom: 0 !important;
  }

  #s3 .intro-content > :last-child {
    margin-bottom: 0 !important;
  }

  #s2 .tutor-content > :last-child {
    margin-bottom: 0 !important;
  }

  .tutor-content img {
    float: none;
    display: block;
    width: 100%;
    max-width: clamp(260px, 80vw, 420px);
    margin: 0 auto var(--m-space-md);
  }

  #s2 .rafa-teacher {
    width: 100%;
    height: 50dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    object-fit: contain;
    object-position: center top;
  }

  .section-content-box {
    width: 100%;
    margin-left: 0;
    height: auto;
    max-height: 70vh;
  }

  .bg-home {
    display: none;
  }

  .bg-tutor {
    display: none;
  }

  .testimonial p {
    height: auto !important;
    font-size: clamp(13px, 2vh, 16px);
    line-height: clamp(18px, 2.6vh, 22px);
  }

  #s6 .testimonial {
    padding-bottom: calc(var(--m-space-sm) + 2vh);
  }

  #s6 .testimonial p.p-5 {
    padding: clamp(1rem, 1.8dvh, 1.5rem) clamp(1rem, 5vw, 2rem) !important;
  }

  #s6 .testimonial p.is-collapsed {
    max-height: var(--s6-collapsed-text-h);
    overflow: hidden;
  }

  #s6 .testimonial-read-more {
    margin: var(--m-space-xs) 0 0 0;
    text-align: center;
    color: var(--color-4);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 0.2em;
  }

  .angled-image {
    width: 100%;
    height: clamp(24dvh, 35dvh, 42dvh);
    float: none;
    margin: 0 0 var(--m-space-md) 0;
    border-bottom-left-radius: 0;
  }

  #s6 .angled-image {
    clip-path: none;
    border-radius: 1.5rem;
    background-position: center 15%;
    height: clamp(28dvh, 40dvh, 48dvh);
  }

  .carousel-inner {
    margin-top: var(--m-space-xs);
  }

  .carousel-control-prev { left: 0; }
  .carousel-control-next { right: 0; }

  .cta-odd,
  .cta-even {
    height: auto;
    padding: var(--m-space-sm) 4vw;
    text-align: center;
  }

  .cta-odd {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: var(--m-space-xs);
  }

  .cta-even {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: var(--m-space-xs);
  }

  .cta-odd h2 {
    margin: 0 !important;
    font-size: clamp(16px, 4.6vw, 20px);
    line-height: 1em;
    white-space: nowrap;
  }

  .cta-even > h2 {
    margin: 0 !important;
    font-size: clamp(16px, 4.6vw, 20px);
    line-height: 1em;
    white-space: nowrap;
  }

  .cta-odd .btn-custom {
    flex: 0 0 100%;
    margin: var(--m-space-xs) 0 0 0 !important;
  }

  .cta-even .btn-custom {
    flex: 0 0 100%;
    margin: var(--m-space-xs) 0 0 0 !important;
  }

  #s7 .cta-even {
    height: auto;
  }

  #s7 .cta-last {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: none !important;
    opacity: 0 !important;
    width: 100vw;
    height: var(--s7-last-cta-h);
    min-height: var(--s7-last-cta-h);
    z-index: 1100;
  }

  #s7 .cta-last.is-visible {
    display: flex !important;
    opacity: 1 !important;
  }

  #s7 {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .contact-row {
    height: auto;
    margin-top: var(--m-space-sm);
  }

  .contact-col-left,
  .contact-col-right {
    width: 100%;
    margin-left: 0;
    top: 0;
    height: auto;
  }

  #s7 .contact-col-right {
    padding-top: 0;
    min-height: 100dvh;
    box-sizing: border-box;
  }

  #s7 .contact-col-left > a {
    display: block;
    text-align: center;
  }

  .contact-col-left img {
    max-width: clamp(180px, 70vw, 320px);
    max-height: clamp(60px, 12vh, 120px);
    display: block;
    margin: 0 auto var(--m-space-sm);
  }

  #s7 .contact-col-left form {
    padding: 0 4vw;
  }

  #s7 .contact-col-left > p {
    padding: 0 4vw;
  }

  .calendly-inline-widget,
  .calendly-inline-widget iframe {
    height: clamp(420px, 60vh, 560px);
  }

  #s7 .calendly-inline-widget,
  #s7 .calendly-inline-widget iframe {
    height: 100dvh;
    overflow: hidden !important;
  }
}

@media (max-width: 480px) {
  h2 {
    font-size: 2rem;
  }

  .homepage-content h1 {
    font-size: clamp(22px, 6vh, 48px);
  }

  .homepage-content p {
    font-size: 18px;
  }

  .carousel-control-prev,
  .carousel-control-next {
    width: 30px;
    height: 30px;
  }

  .carousel-control-prev-icon,
  .carousel-control-next-icon {
    width: 24px;
    height: 24px;
  }
}
