html, body {
    scroll-behavior: smooth;
    overflow-x: clip;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variablen */
:root {
    --pearl-white: #ffffff;
    --coral-mist: #f7f7f7;
    --sand-drift: #e1d4c7;
    --seafoam-grey: #c2d0df;
    --lagoon-blue: #668AB0;
    --deep-reef: #253648;
    --ocean-blue: #003d7c;
    --coral-orange: #c55213;
    --coral-orange-dark: #a9450f;
    --tropical-turquoise: #188588;
    --mulberry-reef: #7a1a4d;
    --palm-green: #457c44;
    --deep-reef-transparent: rgba(37, 54, 72, 0.6);
    --seafoam-grey-transparent: rgba(194, 208, 223, 0.6);
    --shadow: 0px 5px 10px rgba(37, 54, 72, 0.3);
    --fonttext: Outfit-Light, Helvetica, Arial, sans-serif;
    --fonthero: Outfit-Bold, Helvetica, Arial, sans-serif;
    --fontheadline: Outfit-SemiBold, Helvetica, Arial, sans-serif;
    --content-width: 1320px;
}

@font-face {
    font-family: 'Outfit-Light';
    src: local('Outfit-Light'),
        /* erst nachsehen, ob die Schrift beim Besucher schon installiert ist */
        url('../fonts/Outfit-Light.ttf') format('truetype');
    /* wenn nicht, wird die Schrift vom Webserver geladen */
}

@font-face {
    font-family: 'Outfit-SemiBold';
    src: local('Outfit-SemiBold'),
        url('../fonts/Outfit-SemiBold.ttf') format('truetype');
}

@font-face {
    font-family: 'Outfit-Bold';
    src: local('Outfit-Bold'),
        url('../fonts/Outfit-Bold.ttf') format('truetype');
}

/* Schrifthierarchie */
body {
    font-size: clamp(1rem, calc(0.25rem + 0.9375vw), 1.375rem);
}

.hero-headline {
    font-family: var(--fonthero);
    color: var(--ocean-blue);
    font-size: clamp(2.625rem, calc(1.875rem + 0.9375vw), 3rem);
    margin-bottom: 1rem;
}

.headline-large {
    font-family: var(--fontheadline);
    color: var(--ocean-blue);
    font-size: clamp(2.25rem, calc(1.5rem + 0.9375vw), 2.625rem);
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.headline-medium {
    font-family: var(--fontheadline);
    color: var(--ocean-blue);
    font-size: clamp(2rem, calc(1.25rem + 0.9375vw), 2.375rem);
    margin-bottom: 0.5rem;
}

.headline-small {
    font-family: var(--fontheadline);
    color: var(--ocean-blue);
    font-size: clamp(1.75rem, calc(0.9rem + 1.0625vw), 2.175rem);
    padding-left: 15%;
    margin-bottom: 1rem;
}

.headline-xsmall {
    font-family: var(--fontheadline);
    color: var(--deep-reef);
    font-size: clamp(1.5rem, calc(0.75rem + 0.9375vw), 1.875rem);
    margin-bottom: 0.5rem;
}

/* Header und Navigation */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--coral-mist);
}

.gradient-divider {
    height: 10px;
    width: 100%;
    background: linear-gradient(
        to right,
        var(--ocean-blue),
        var(--tropical-turquoise),
        var(--ocean-blue)
    );
    opacity: 0.5;
}

.nav {
    height: clamp(90px, 6vw, 120px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    --nav-pad: 7.5rem;       
    --nav-pad-drift: 0px;     
    padding-inline: calc(var(--nav-pad) + var(--nav-pad-drift));
    position: relative;
    flex-direction: row-reverse;
    box-shadow: var(--shadow);
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 4rem;
}

.nav-menu a {
    color: var(--deep-reef);
    font-size: clamp(1.125rem, calc(0.375rem + 0.9375vw), 1.5rem);
    font-family: var(--fontheadline);
    text-decoration: none;
}

.nav-menu a:hover,
.nav-menu a.active {
    border-bottom: 3px solid var(--coral-orange);
}

.logo {
    position: absolute;
    --logo-left: 4rem;
    --logo-drift: 0px;
    left: calc(var(--logo-left) + var(--logo-drift));
    top: clamp(7rem, 2rem + 9vw, 13rem);
    transform-origin: top left;
}

.logo img {
    height: clamp(140px, 12vw, 240px);
    width: auto;
}

/* Hero Section */
.content-wrapper {
    position: relative;
}

.hero-video-section {
    position: relative;
    height: 105vh;
    overflow: hidden;
}

.hero-img-section {
    position: relative;
    height: auto;
    overflow: visible;
    z-index: 1;
}

.hero-img {
    width: 100%;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100vh;
    object-fit: cover;
}

.hero-wave {
    position: absolute;
    top: calc(-28px - (50 * ((100vw - 1280px) / 640)));
    left: 50%;
    width: 101vw;
    transform: translateX(-50%);
    z-index: 3;
    pointer-events: none;
}

.hero-wave img,
.hero-wave svg {
    width: 100%;
    height: auto;
    display: block;
}

.scroll-indicator {
    position: absolute;
    bottom: 25vh;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 28px;
    z-index: 4;
    opacity: 0.9;
    animation: bounce 2s ease-in-out infinite;
}

.scroll-indicator svg {
    width: 100%;
    height: 100%;
}

.scroll-indicator path {
    fill: none;
    stroke: var(--pearl-white);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(6px);
    }
}

.wave-divider {
    position: absolute;
    bottom: calc(-1px - ((100vw - 1280px) * 49 / 640));
    left: 50%;
    width: 101vw;
    transform: translateX(-50%);
    z-index: 5;
}

.wave-divider img,
.wave-divider svg {
    width: 100%;
    height: auto;
    display: block;
}

/* allgemeine Section-Stylings */
.content-container {
    width: min(calc(100% - 8rem), var(--content-width));
    margin-inline: auto;
}

.first-section {
    padding: 1rem 0 3rem;
    max-width: 70%;
}

.first-section p,
.highlight-box p {
    max-width: min(100%, calc(100vw * 550 / 1280));
    font-family: var(--fonttext);
    color: var(--deep-reef);
    line-height: 1.6;
}

.img-section p {
    max-width: min(100%, calc(100vw * 400 / 1280));
    font-family: var(--fonttext);
    color: var(--deep-reef);
    line-height: 1.6;
}

.wave-background {
    position: relative;
    background-repeat: no-repeat;
    background-size: cover;
    padding-bottom: 320px;
    z-index: 10;
}

.page-startseite .wave-background {
    background-image: url("../img/wave_background_startseite.svg");
    background-position: center calc(-60px - (100 * (100vw - 1280px) / 640));
}

.page-tauchspots .wave-background {
    background-image: url("../img/wave_background_tauchspots.svg");
    background-position: center calc(-235px - (100 * ((100vw - 1280px) / 640)));
}

.page-kurse .wave-background {
    background-image: url("../img/wave_background_kurse.svg");
    background-position: center calc(-235px - (100 * ((100vw - 1280px) / 640)));
}

.page-ueber-uns .wave-background {
    background-image: url("../img/wave_background_ueber_uns.svg");
    background-position: center calc(-100px - (100 * ((100vw - 1280px) / 640)));
}

.page-kontakt .wave-background {
    background-image: url("../img/wave_background_kontakt.svg");
    background-position: center calc(-235px - (100 * ((100vw - 1280px) / 640)));
}

/* Highlight-Box Section */
.highlight-section {
    display: flex;
    align-items: flex-end;
    flex-direction: row-reverse;
    padding: 12rem 0 3rem;
    width: min(calc(100% - 8rem), var(--content-width));
    max-width: 70%;
    margin: 0 auto;
}

.highlight-wrapper {
    position: relative;
    width: 79%;
    min-width: 700px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 1;
}

.sea-stars {
    position: absolute;
    width: 240px;
    left: -165px; 
    top: 60px; 
    pointer-events: none;
}

.highlight-box {
    background: var(--seafoam-grey);
    padding: 70px 100px;
    border-radius: 1.75rem;
}

/* Section – Text mit elliptischem Bild */
.img-section {
    position: relative;
    width: min(calc(100% - 8rem), var(--content-width));
    max-width: 70%;
    margin: 4rem auto;
}

.ellipse-img-wrapper {
    position: absolute;
    --ellipse-left: 53%;
    --ellipse-drift: 0px;
    left: calc(var(--ellipse-left) + var(--ellipse-drift));
    top: 53%;
    transform: translateY(-50%);
    width: clamp(420px, 55vw, 780px);
    aspect-ratio: 4 / 3; 
    overflow: visible;
    z-index: 2;
}

.ellipse-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    position: relative;
    z-index: 1;
}

.ellipse-img-wrapper::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 3px solid var(--ocean-blue);
    border-radius: 50% / 50%;
    transform: rotate(20deg) translate(8px, -8px);
    z-index: 2;
    pointer-events: none;
}

/* Buttons */
.btn-wrapper {
    text-align: left;
    margin-top: 1.5rem;
}

.btn-primary,
.btn-secondary {
    font-size: clamp(1.125rem, calc(0.375rem + 0.9375vw), 1.5rem);
    font-family: var(--fontheadline);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border-radius: 999px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--coral-orange);
    color: var(--pearl-white);
    padding: 15px 30px;
}

.btn-secondary {
    border: 3px solid var(--ocean-blue);
    color: var(--ocean-blue);
    background: transparent;
    padding: 12px 30px;
} 

.btn-primary::after,
.btn-secondary::after {
    content: "";
    width: 8px;
    height: 8px;
    transform: rotate(-45deg);
    margin-left: 0.5rem;
}

.btn-primary::after {
    border-right: 3px solid var(--pearl-white);
    border-bottom: 3px solid var(--pearl-white);
}

.btn-secondary::after {
    border-right: 3px solid var(--ocean-blue);
    border-bottom: 3px solid var(--ocean-blue);
}

.btn-primary:hover {
    background-color: var(--coral-orange-dark);
}

.btn-secondary:hover {
    background: var(--seafoam-grey-transparent);
}

.btn-secondary:hover,
.btn-primary:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

/* Footer */
.text-highlight {
    font-family: var(--fontheadline);
}

.site-footer {
    position: relative;
    overflow: hidden;
    margin-top: -280px;
    z-index: 20;
}
  
.footer-artwork{
    width: 100%;
    display: block;
    aspect-ratio: 1280 / 430;
    height: auto;
    margin-bottom: -1px;
    background-image: url(../img/coral_footer.svg);
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: cover;
}

.footer-bar{
    background: var(--deep-reef);
}  

.footer-inner {
    width: 70%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 2rem 1.5rem; 
    color: var(--coral-mist);
    font-family: var(--fonttext);
    line-height: 1.6;
}
  
.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 30px;
}
  
.footer-logo img {
    height: 110px;
    width: auto;
}

.footer-divider {
    margin: 40px auto 20px;
    height: 2px;
    width: 100%;
    background-color: var(--seafoam-grey);
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
}
  
.footer-column a,
.footer-bottom a {
    font-family: var(--fontheadline);
    text-decoration: none;
    color: var(--coral-mist);
    font-size: 1em;
}
  
.footer-column a:hover,
.footer-bottom a:hover {
    border-bottom: 3px solid var(--coral-orange);
}
  
.footer-bottom span {
    margin: 0 10px;
} 

/* Tauchspots */
.map-section {
    padding-top: calc(16rem + (200 * ((100vw - 1280px) / 640)));
    padding-bottom: 6rem;
    position: relative;
    z-index: 2;
}

.map-container {
    position: relative;
    width: 85%;
    margin-left: 8rem;
}

.map-background {
    width: 100%;
    display: block;
}
  
.map-pin {
    position: absolute;
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 3;
}
  
.map-pin img {
    width: clamp(40px, 4.6875vw, 80px);
    height: auto;
    display: block;
}
  
.map-pin:hover {
    transform: translateY(-4px) scale(1.05);
}

/* Positionierung der Pins */  
.pin-turtle { top: -3%; left: 56%; }
.pin-coral { top: -19%; left: 22.5%; } 
.pin-deep { top: -37%; left: 27%; }
.pin-shark { top: 17%; left: -6%; }
.pin-manta { top: 81.5%; left: 8.5%; } 

.map-overlay {
    position: fixed;
    inset: 0;
    background: var(--deep-reef-transparent);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 0.3s ease,
      visibility 0.3s ease;
}
  
.map-overlay.active {
    opacity: 1;
    visibility: visible;
}
  
.map-card {
    width: 100%;
    max-width: 920px;
    display: grid;
    grid-template-columns: 320px 1fr;
    background: var(--pearl-white);
    border-radius: 1.75rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}
  
.map-overlay.active .map-card {
    transform: translateY(0);
}
  
.map-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}
  
.overlay-icon-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlay-icon-wrapper img {
    max-width: 140px;
    max-height: 170px;
    opacity: 1;
    visibility: visible;
    display: block;
}
  
.map-card-content {
    position: relative;
    padding: 70px 60px;
    font-family: var(--fonttext);
    color: var(--deep-reef);
    line-height: 1.6;
}
  
.close-overlay {
    position: absolute;
    top: 28px;
    right: 28px; 
    border: none;
    background: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s ease;
}
  
.overlay-turtle {
    background: var(--palm-green);
}
  
.overlay-coral {
    background: var(--coral-orange);
}
  
.overlay-deep {
    background: var(--tropical-turquoise);
}
  
.overlay-shark {
    background: var(--mulberry-reef);
}
  
.overlay-manta {
    background: var(--ocean-blue);
}

/* Kurse */
.courses-section {
    padding: 5rem 0 0 0;
}

.cards-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.course-card {
    width: 70%;
    display: grid;
    grid-template-columns: 40% 60%;
    background: var(--pearl-white);
    border-radius: 1.75rem;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.course-content {
    padding: 70px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.toggle {
    display: none;
}

.toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-family: var(--fontheadline);
    color: var(--ocean-blue);
    width: fit-content;
    margin-top: 10px;
}

.toggle-label::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 3px solid var(--ocean-blue);
    border-bottom: 3px solid var(--ocean-blue);
    transform: rotate(45deg);
    transition: 0.3s ease;
    margin-left: 0.5rem;
}

.less {
    display: none;
}

.less, .more {
    font-size: 1.125rem;
}

.toggle:checked + .toggle-label .more{
    display: none;
}

.toggle:checked + .toggle-label .less{
    display: inline;
}

.toggle:checked + .toggle-label::after{
    transform: rotate(-135deg);
    margin-top: 4px;
}

.expand-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, margin-top 0.5s ease;
}

.toggle:checked ~ .expand-content {
    max-height: 1000px;
    margin-top: 2rem;
}

.expand-content p {
    margin-bottom: 2rem;
    font-family: var(--fonttext);
    color: var(--deep-reef);
    line-height: 1.6;
}

.details-box {
    background: var(--coral-mist);
    font-family: var(--fonttext);
    color: var(--deep-reef);
    line-height: 1.6;
    border-radius: 1.5rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.detail-item span {
    display: block;
}

.page-kurse .detail-item img {
    width: 1.5rem;
    height: 1.5rem;
    object-fit: contain;
}

/* Formulare */
.form-section {
    display: flex;
    justify-content: center;
    padding-top: 8rem;
    position: relative;
}

.form {
    background: var(--seafoam-grey);
    border-radius: 2rem;
    padding: 50px 70px;
    width: 100%;
    max-width: 70%;
    box-shadow: var(--shadow);
    position: relative;
}

.form::after {
    content: "";
    position: absolute;
    right: -50px;
    width: 240px;
    height: 240px;
    background-image: url("../img/sea_stars_2.svg");
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
}

.booking-form::after {
    top: -60px;
}

.contact-form::after {
    bottom: -85px;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label,
.form-group legend {
    display: block;
    font-family: var(--fontheadline);
    color: var(--deep-reef);
    margin-bottom: 0.5rem;
}

.form fieldset {
    border: 0;
    margin: 0;
}

.form input[type="text"],
.form input[type="email"],
.form select,
.form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: none;
    font-family: var(--fonttext);
    background: var(--coral-mist);
}

.form input::placeholder,
.form textarea::placeholder {
    color: var(--deep-reef-transparent);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.form-checkbox {
    margin-bottom: 1rem;
}

.form-checkbox label {
    display: flex;
    gap: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.4;
    font-family: var(--fonttext);
    color: var(--deep-reef);
    max-width: 550px;
}

.form-checkbox input {
    accent-color: var(--ocean-blue);
}

.form-button {
    font-family: var(--fontheadline);
    font-size: 1.125rem;
    margin-top: 0.5rem;
    border: none;
    padding: 0.9rem 2rem;
}

.form h3 {
    margin-bottom: 1.5rem;
}

/* Kontakt */
.detail-item a {
    color: var(--ocean-blue);
    font-size: 1em;
    font-family: var(--fontheadline);
    text-decoration: none;
}
  
.detail-item a:hover {
    border-bottom: 3px solid var(--coral-orange);
}

.page-kontakt .highlight-box {
    padding: 5rem 5rem 5rem 20rem;
}

.page-kontakt .ellipse-img-wrapper {
    --ellipse-left: -6%;
    top: 66%;
}

.page-kontakt .details-box {
    background: none;
    margin: 0;
    padding: 0;
}

.page-kontakt .detail-item img {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
}

@media (min-width: 1920px) {
    .nav {
        --nav-pad-drift: clamp(0px, calc((100vw - 1920px) * 0.25), 180px);
    }

    .logo {
        --logo-drift: clamp(0px, calc((100vw - 1920px) * 0.25), 100px);
    }

    .ellipse-img-wrapper {
        --ellipse-drift: clamp(0px, calc((100vw - 1920px) * 1), 300px);
    }

    .page-kontakt .ellipse-img-wrapper {
        --ellipse-drift: clamp(0px, calc((100vw - 1920px) * 1), 450px);
    }
}
