/* ========================================
   Villa Kunterbunt - Custom Styles
   ======================================== */

/* --- General --- */
body {
    margin: 0;
    padding: 0;
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Logo (overlaps header into hero) --- */
.villa-logo {
    position: relative;
    width: 140px;
    min-width: 140px;
    height: 50px;
    z-index: 100;
    overflow: visible !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.villa-logo::before {
    content: "";
    position: absolute;
    width: 125px;
    height: 125px;
    background: #ffffff;
    border-radius: 50%;
    top: 8px;
    left: 48%;
    transform: translateX(-50%);
    z-index: 0;
}

.villa-logo img {
    position: absolute;
    top: -8px;
    left: 0;
    width: 140px;
    height: 140px;
    object-fit: contain;
    z-index: 1;
}

/* --- Header overflow (let logo extend into hero) --- */
.wp-block-template-part,
.wp-block-template-part * {
    overflow: visible !important;
}

.wp-block-template-part {
    position: relative;
    z-index: 100;
}

/* --- Navigation --- */

.villa-nav .wp-block-navigation-item a {
    padding: 8px 18px;
    border-radius: 12px;
    text-decoration: none;
    transition:
        background-color 0.2s,
        color 0.2s;
}

.villa-nav .wp-block-navigation-item a:hover {
    background-color: #6f92aa;
    color: #ffffff;
}

.villa-nav .villa-nav-active a {
    background-color: #f6c103;
    color: #ffffff !important;
    border-radius: 12px;
}

.villa-nav .villa-nav-active a:hover {
    background-color: #d4a800;
}

/* --- Hero Carousel --- */
.villa-hero-carousel {
    position: relative;
    overflow: hidden;
    min-height: 520px;
}

.villa-hero-carousel > .wp-block-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 0;
    min-height: 520px !important;
}

.villa-hero-carousel > .wp-block-cover.villa-slide-active {
    opacity: 1;
    z-index: 1;
    position: relative;
}

.villa-carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.villa-carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.3s;
}

.villa-carousel-dot.active,
.villa-carousel-dot:hover {
    background: #f6c103;
    border-color: #f6c103;
}

/* --- Hero Section --- */
.villa-hero {
    position: relative;
    background-color: #6f92aa;
}

.villa-hero .wp-block-cover__background {
    opacity: 0.15 !important;
    background-color: #333333 !important;
}

.villa-hero .wp-block-cover__image-background {
    object-fit: cover;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* Hero text: staggered lines with inline background, positioned center-right */
.villa-hero-text {
    margin-left: auto;
    margin-right: auto;
    padding-left: 30%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.villa-hero-line {
    color: #f6c103 !important;
    padding: 6px 20px;
    background-color: rgba(50, 50, 50, 0.45);
    width: fit-content;
    margin-bottom: 0 !important;
}

.villa-hero-line-2 {
    margin-left: 30px !important;
}

.villa-hero-line-3 {
    margin-left: 70px !important;
}

/* --- Separator with chevron --- */
.villa-separator-wrap {
    position: relative;
    background: #6f92aa;
}

.villa-dotted-separator {
    height: 16px;
    background-image:
        radial-gradient(circle, #f6c103 3px, transparent 3px),
        radial-gradient(circle, #c0463b 3px, transparent 3px),
        radial-gradient(circle, #8a9c4a 3px, transparent 3px),
        radial-gradient(circle, #6f92aa 3px, transparent 3px),
        radial-gradient(circle, #ef7f33 3px, transparent 3px),
        radial-gradient(circle, #59745a 3px, transparent 3px);
    background-size: 48px 16px;
    background-position:
        0px 7px,
        8px 7px,
        16px 7px,
        24px 7px,
        32px 7px,
        40px 7px;
    background-repeat: repeat-x;
}

.villa-chevron-down {
    font-size: 14px;
    color: #f6c103;
    margin-top: -2px !important;
    margin-bottom: 0 !important;
    padding-bottom: 8px !important;
    line-height: 1;
    width: 36px;
    height: 36px;
    border: 2px solid #f6c103;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    background: #ffffff;
}

/* --- Building Image --- */
.villa-building-image img {
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

/* --- Content on dark backgrounds --- */
.has-primary-background-color a {
    color: #f6c103;
}

.has-primary-background-color a:hover {
    color: #ffffff;
}

/* --- Footer --- */
.wp-block-group.has-primary-dark-background-color:last-child {
    margin-top: 0;
}

/* --- Post / Archive Styles --- */
.wp-block-post-title a {
    text-decoration: none;
    color: #6f92aa;
}

.wp-block-post-title a:hover {
    color: #f6c103;
}

.wp-block-post-excerpt__more-text a {
    color: #6f92aa;
    font-weight: 600;
    text-decoration: none;
}

.wp-block-post-excerpt__more-text a:hover {
    color: #f6c103;
}

/* --- Query Pagination --- */
.wp-block-query-pagination a {
    color: #6f92aa;
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid #6f92aa;
    border-radius: 3px;
}

.wp-block-query-pagination a:hover {
    background-color: #6f92aa;
    color: #ffffff;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .villa-hero-text {
        margin-left: 5%;
    }

    .villa-hero-line {
        font-size: 2rem !important;
    }

    .villa-hero-line-2 {
        margin-left: 10px !important;
    }

    .villa-hero-line-3 {
        margin-left: 20px !important;
    }

    .villa-hero {
        min-height: 350px !important;
    }

    .villa-hero-carousel {
        min-height: 350px;
    }

    .villa-hero-carousel > .wp-block-cover {
        min-height: 350px !important;
    }

    .wp-block-columns {
        flex-direction: column;
    }

    .wp-block-column {
        flex-basis: 100% !important;
    }
}

@media (max-width: 480px) {
    .villa-hero-line {
        font-size: 1.5rem !important;
    }
}
