/* Basic styling */
:root {
  --text-color: #1a100d;
  --light-background: #F0EBE3;
  --color-0: #333;
  --color-1: #A5543C;
  --color-2: #5D3A2E;
  --color-3: #C8A87A;
  --color-4: #F4F1EC;
  --color-5: #6b6661; /* secondary text; darker than before to meet WCAG AA */
  --color-test: #dc4c20;

  --color-even-div: #FFFFF4;
  --color-odd-div: #F7F5F2;

  --font-general: Futura, sans-serif;

  /* South African inspired palette */
  --sa-gold: #D4A853;
  --sa-terracotta: #C4784A;
  --sa-sage: #7D9A78;
  --sa-sand: #F5F0E8;
  --sa-charcoal: #2D2D2D;
}

h3 {
    font-size: x-large;
    font-variant: small-caps;
}

/* ==========================================
   HERO / WELCOME CONTAINER
   ========================================== */
.welcome-container {
   display: flex;
   flex-direction: row;
   width: 100%;
   box-sizing: border-box;
   aspect-ratio: 4.2358;
   min-height: 162px;
   padding: 0rem;
   position: relative;
   overflow: hidden;
   color: var(--color-ivory);
   align-items: center;
   justify-content: center;
   gap: 2rem;
   z-index: 1; /* Ensure hero stays above fixed background pattern */
}

.welcome-container::before {
   content: '';
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   /* Phones: the whole photo. Wider screens: a cropped band, see the media query below. */
   background-image: url("../images/ubuntu_coaching_banner_960.ba6b5bf3bfb4.webp");
   background-size: cover;
   background-position: center 75%;
   background-repeat: no-repeat;
   z-index: -1;
}

@media (min-width: 769px) {
   .welcome-container::before {
      background-image: url("../images/ubuntu_coaching_banner.d43508b7741d.webp");
      background-position: center 66%;
   }
}

.welcome-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.35);
    z-index: -1;
}

.welcome-logo {
  height: 50%;
  width: auto;
  border-radius: 5px;
  flex-shrink: 0;
  z-index: 1001;
}

.titles-container {
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    flex: 1;
    max-width: 60%;
}

.main-title-container h1,
.main-title-container .banner-title {
    margin: 0;
    font-size: clamp(1rem, 4vw, 3rem);
}

.welcome-slogan-container {
    position: relative;
    min-height: 50px;
    width: 100%;
}

.slogan-text p {
    margin: 0;
    font-size: clamp(.5rem, 3vw, 1.5rem);
}

.slogan-text {
    display: block;
    transition: opacity 0.8s ease-in-out;
    position: absolute;
    width: 100%;
    left: 0;
    top: 0;
    font-size: clamp(.5rem, 3vw, 1.5rem);
    margin: 0;
}

.welcome-text-container {
    position: relative;
    min-height: 50px;
    width: 100%;
}

.welcome-text {
    opacity: 0;
    display: none;
    transition: opacity 0.8s ease-in-out;
    position: absolute;
    width: 100%;
    left: 0;
    top: 0;
    font-size: clamp(.5rem, 3vw, 1.5rem);
    margin: 0;
}

.welcome-text.active {
    opacity: 1;
    display: block;
}

.welcome-text p {
    margin: 0;
    font-size: clamp(.5rem, 3vw, 1.5rem);
}

/* ==========================================
   LANDING PAGE FLOATING BLOCKS
   ========================================== */
.landing-blocks {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem; /* More space to show the background pattern between cards */
    padding: 4rem 1rem;
}

.landing-block {
    background-color: var(--sa-sand); /* Solid background */
    border-radius: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 3rem 2rem;
    width: 100%;
    max-width: 900px;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;

    /* Staggered animation */
    opacity: 0;
    transform: translateY(30px);
    animation: fadeSlideIn 0.6s ease-out forwards;
}

.landing-block:nth-child(odd)  { margin-left: 8rem; }
.landing-block:nth-child(even) { margin-right: 8rem; }
.landing-block:nth-child(1)    { margin-left: 0; }

.landing-block:nth-child(1) { animation-delay: 0.1s; }
.landing-block:nth-child(2) { animation-delay: 0.25s; }
.landing-block:nth-child(3) { animation-delay: 0.4s; }
.landing-block:nth-child(4) { animation-delay: 0.55s; }
.landing-block:nth-child(5) { animation-delay: 0.7s; }
.landing-block:nth-child(6) { animation-delay: 0.85s; }

@keyframes fadeSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.landing-block h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--sa-charcoal);
    margin: 0 0 1.5rem 0;
    font-weight: 600;
}

.landing-block p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--color-5);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 0 1rem 0;
}

/* Block 1: Philosophy */
.block-philosophy {
    background: linear-gradient(135deg, var(--sa-sand) 0%, #fff 100%);
}

.block-philosophy .philosophy-text {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    font-style: italic;
    color: var(--sa-charcoal);
    max-width: 700px;
}

/* Introduction block: longer text, so left-aligned and a comfortable line length */
.block-intro .intro-text {
    max-width: 700px;
    text-align: left;
    line-height: 1.7;
    color: var(--sa-charcoal);
}

/* The general tile rule narrows and greys paragraphs; an introduction reads better at full strength */
.block-intro .intro-text p {
    max-width: none;
    color: var(--sa-charcoal);
}

.block-intro .intro-text > :last-child {
    margin-bottom: 0;
}

/* Block 2: Services */
.block-services .services-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin-top: 2rem;
}

.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    background: white;
    border-radius: 1rem;
    min-width: 180px;
    max-width: 220px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.service-item i {
    font-size: 2.5rem;
    color: var(--sa-terracotta);
}

.service-item h3 {
    font-size: 1.1rem;
    color: var(--sa-charcoal);
    margin: 0;
}

.service-item p {
    font-size: 0.9rem;
    color: var(--color-5);
    margin: 0;
}

.service-item a {
    color: var(--color-1); /* deeper terracotta: the light one fails WCAG AA contrast as text */
    text-decoration: none;
    font-weight: 500;
    margin-top: 0.5rem;
}

.service-item a:hover {
    text-decoration: underline;
}

/* Block 3: Upcoming Classes */
.block-upcoming .classes-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 600px;
    margin-top: 2rem;
}

.class-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: white;
    border-radius: 1rem;
    border-left: 4px solid var(--sa-gold);
    text-align: left;
}

.class-item .class-info h3 {
    font-size: 1.1rem;
    color: var(--sa-charcoal);
    margin: 0 0 0.25rem 0;
    font-variant: normal;
}

.class-item .class-info p {
    font-size: 0.9rem;
    color: var(--color-5);
    margin: 0;
}

.class-item .class-date {
    font-size: 0.9rem;
    color: var(--sa-terracotta);
    font-weight: 500;
    white-space: nowrap;
}

.classes-link {
    margin-top: 1.5rem;
}

.classes-link a {
    color: var(--color-1); /* deeper terracotta: the light one fails WCAG AA contrast as text */
    text-decoration: none;
    font-weight: 500;
}

.classes-link a:hover {
    text-decoration: underline;
}

.no-classes {
    color: var(--color-5);
    font-style: italic;
}

/* Block 4: Coaches */
.block-coaches .coaches-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.coach-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: 200px;
}

.coach-item img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--sa-gold);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.coach-item img:hover,
.coach-item .coach-placeholder:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.coach-item .coach-placeholder {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sa-sage) 0%, var(--sa-gold) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.coach-item .coach-placeholder i {
    font-size: 3rem;
    color: white;
}

.coach-item h3 {
    font-size: 1.1rem;
    color: var(--sa-charcoal);
    margin: 0;
    font-variant: normal;
}

.coach-item a {
    color: var(--color-1); /* deeper terracotta: the light one fails WCAG AA contrast as text */
    text-decoration: none;
    font-size: 0.9rem;
}

.coach-item a:hover {
    text-decoration: underline;
}

/* Block 5: CTA + Newsletter */
.block-cta {
    background: linear-gradient(135deg, #fff 0%, var(--sa-sand) 100%);
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--color-1); /* deeper terracotta: the light one fails WCAG AA contrast as text */
    color: white;
    text-decoration: none;
    border-radius: 2rem;
    font-size: 1.1rem;
    font-weight: 500;
    transition: background-color 0.2s ease, transform 0.2s ease;
    margin-top: 1rem;
}

.cta-button:hover {
    background-color: var(--color-2);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

.newsletter-signup {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
}

.newsletter-signup p {
    font-size: 1rem;
    color: var(--color-5);
    margin-bottom: 1rem;
}

.newsletter-signup form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.newsletter-signup input[type="text"],
.newsletter-signup input[type="email"] {
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    font-size: 1rem;
    min-width: 150px;
    flex: 1;
}

.newsletter-signup input:focus {
    outline: none;
    border-color: var(--sa-gold);
}

.newsletter-signup button {
    padding: 0.75rem 1.5rem;
    background-color: var(--sa-gold);
    color: #2c1b16; /* dark text on gold: white failed WCAG AA */
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.newsletter-signup button:hover {
    background-color: var(--sa-terracotta);
}

/* ==========================================
   RESPONSIVE ADJUSTMENTS
   ========================================== */
@media only screen and (max-width: 800px) {
    .welcome-container {
        padding: 1rem;
        gap: 1rem;
        flex-direction: column;
        text-align: center;
    }

    .welcome-logo {
        height: 30%;
    }

    .titles-container {
        text-align: center;
        max-width: 100%;
    }

    .landing-blocks {
        padding: 2rem 1rem;
        gap: 3rem;
    }

    .landing-block {
        padding: 2rem 1.5rem;
        min-height: auto;
        border-radius: 1rem;
    }

    .landing-block:nth-child(odd),
    .landing-block:nth-child(even) {
        align-self: center;
        margin-left: 0;
        margin-right: 0;
    }

    .class-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .class-item .class-date {
        align-self: flex-start;
    }

    .newsletter-signup form {
        flex-direction: column;
    }

    .newsletter-signup input[type="text"],
    .newsletter-signup input[type="email"] {
        width: 100%;
    }
}

@media only screen and (max-width: 600px) {
    .welcome-container {
        flex-direction: column;
        gap: 1rem;
    }

    .titles-container {
        text-align: center;
    }

    .services-grid {
        flex-direction: column;
        align-items: center;
    }

    .service-item {
        width: 100%;
        max-width: 280px;
    }
}

#aanbod {
    scroll-margin-top: 90px;
}

/* Honeypot field: off-screen for visitors, still filled in by bots */
.newsletter-signup .hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}
