/**
 * Keyvisual Element Styles
 * 
 * WICHTIG: Nutzt globale CSS-Variablen (--mm-*)
 * 
 * @package Belle_Maison
 * @subpackage VC_Elements
 */

/* ==========================================================================
   Keyvisual Base Styles
   ========================================================================== */

/* Keyvisual spacing on tablet and mobile – see uncode-overrides.css */
.belle-maison-keyvisual {
    position: relative;
    width: 100%;
    overflow: visible; /* Allow frame and balloons to extend */
}

.belle-maison-keyvisual__image-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 40%; /* ~2.5:1 aspect ratio (≈400px at 1000px width) */
    overflow: visible; /* Allow frame to extend */
    background: rgba(var(--mm-color-white), 1); /* White space between frames */
}

.belle-maison-keyvisual__image {
    position: absolute;
    top: 17px; /* padding (12px) + border (5px) */
    left: 17px;
    width: calc(100% - 34px); /* 2 * (padding + border) */
    height: calc(100% - 34px);
    object-fit: cover;
    object-position: center;
    display: block;
    z-index: 5; /* Below frame (z-index: 10) */
    opacity: 1;
    transition: opacity 1s ease-in-out;
}

/* Slider - Hidden images */
.belle-maison-keyvisual__image--hidden {
    opacity: 0;
    pointer-events: none;
}

/* Compact Height Variant */
.belle-maison-keyvisual--compact .belle-maison-keyvisual__image-wrapper {
    padding-bottom: 0; /* Remove aspect ratio */
    height: 380px; /* Fixed height */
}

.belle-maison-keyvisual--compact .belle-maison-keyvisual__image {
    object-position: center center; /* Center both horizontally and vertically */
}

/* Frame SVG Overlay (Rough.js) */
.belle-maison-keyvisual__frame-svg {
    position: absolute;
    top: -10px; /* Extra space for rough lines */
    left: -10px;
    pointer-events: none;
    z-index: 10;
    overflow: visible; /* Allow rough lines to extend */
}

/* Balloon Pattern Overlay */
.belle-maison-keyvisual__balloons {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 250px; /* Fixed size for better control */
    height: auto;
    pointer-events: none;
    z-index: 9999; /* Above frame and image */
    transform-origin: bottom right;
    transform: translate(71%, -8%); /* Push right and slightly up from corner */
}

.belle-maison-keyvisual__balloons-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Claim Image Container - Bottom Right */
.belle-maison-keyvisual__contact {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 180px;
    height: auto;
    transform-origin: bottom right;
    transform: translate(10%, 30%); /* Push right and down over frame */
    z-index: 9999;
}

.belle-maison-keyvisual__contact-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Phone Number - Centered on Claim */
.belle-maison-keyvisual__phone {
    position: absolute;
    top: calc(58% + 2px);
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
    padding: 0 10px;
}

.belle-maison-keyvisual__phone-link {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-decoration: none;
    color: rgba(var(--mm-color-white), 1) !important;
    font-family: var(--mm-font-heading);
    font-size: 17px;
    line-height: 1.1;
    transition: color 0.3s ease;
}

.belle-maison-keyvisual__phone-link:hover {
    color: rgba(var(--mm-color-gray), 1) !important;
    text-decoration: underline;
}

.belle-maison-keyvisual__phone-number {
    display: block;
}


/* ==========================================================================
   Responsive Styles
   ========================================================================== */

/* Tablet & Mobile (< 960px) */
@media (max-width: 959px) {
    /* Keep same aspect ratio as desktop (40% / ~2.5:1) */
    
    .belle-maison-keyvisual--compact .belle-maison-keyvisual__image-wrapper {
        padding-bottom: 0; /* Keep fixed height */
        height: 250px; /* Slightly smaller on tablet */
    }
    
    /* Balloons - hide on tablet */
    .belle-maison-keyvisual__balloons {
        display: none;
    }
    
    /* Contact/Claim - scale down for tablet */
    .belle-maison-keyvisual__contact {
        width: 110px;
    }
    
    /* Phone Number - scale down for tablet */
    .belle-maison-keyvisual__phone-link {
        font-size: var(--mm-font-size-xs); /* 12px */
        gap: 2px;
    }
}

/* Mobile (< 570px) */
@media (max-width: 569px) {
    /* Keep same aspect ratio as desktop (40% / ~2.5:1) */
    
    .belle-maison-keyvisual--compact .belle-maison-keyvisual__image-wrapper {
        padding-bottom: 0; /* Keep fixed height */
        height: 200px; /* Even smaller on mobile */
    }
    
    /* Balloons - hide on mobile */
    .belle-maison-keyvisual__balloons {
        display: none;
        transform: translate(71%, -8%); /* Same position as desktop */
    }
    
    /* Contact/Claim - scale down for mobile */
    .belle-maison-keyvisual__contact {
        width: 100px; /* Increased from 80px */
    }
    
    /* Phone Number - scale down for mobile */
    .belle-maison-keyvisual__phone-link {
        font-size: 11px; /* Increased from 9px */
        gap: 1px;
    }
}


/* ==========================================================================
   Accessibility
   ========================================================================== */

.belle-maison-keyvisual__phone-link:focus-visible {
    outline: 2px solid rgba(var(--mm-color-primary), 1);
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .belle-maison-keyvisual__image {
        transition: none;
    }
}
