/*
 * VH Art - Master Override CSS
 * Single file that controls ALL visual fixes for the static site.
 * Loaded LAST to override Duda's inline styles.
 * Uses attribute selectors [id="..."] to bypass CSS ID-starting-with-number issue.
 */

/* ==========================================================================
   1. GLOBAL RESETS & CLEANUP
   ========================================================================== */

body, .dmBody, .dmContent {
    overflow-x: hidden !important;
}

/* Kill all spacers - Duda uses them for spacing, we use CSS */
.dmSpacer {
    height: 15px !important;
    min-height: 0 !important;
    max-height: 20px !important;
    padding: 0 !important;
}

/* Reduce excessive padding on rows and columns */
.dmRespRow {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* ==========================================================================
   2. CONTACT FORMS - HIDE ALL
   ========================================================================== */

.dmform,
.dmForm,
[data-element-type="dContactUsRespId"],
.dmform-wrapper,
.dmforminput,
.dmformsubmit {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Also hide form success/error messages */
.dmform-success,
.dmform-error {
    display: none !important;
}

/* ==========================================================================
   3. PHOTO GALLERIES - Clean modern layout
   ========================================================================== */

/* -- 3a. Pinterest/Grid galleries (div structure) -- */
.dmPhotoGallery .layout-container {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    justify-content: center !important;
    align-items: flex-start !important;
}

.dmPhotoGallery .photogallery-row {
    display: contents !important;
}

.dmPhotoGallery .photogallery-column {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 6px !important;
}

.dmPhotoGallery .photogallery-column.column-2 {
    flex: 0 0 calc(50% - 10px) !important;
    max-width: calc(50% - 10px) !important;
}

.dmPhotoGallery .photogallery-column.column-3 {
    flex: 0 0 calc(33.333% - 10px) !important;
    max-width: calc(33.333% - 10px) !important;
}

/* CRITICAL: aspect ratio boxes for images */
.dmPhotoGallery .image-container {
    position: relative !important;
    width: 100% !important;
    padding-top: 100% !important;  /* 1:1 square by default */
    padding-bottom: 0 !important;
    overflow: hidden !important;
    background: #f0f0f0 !important;
    border-radius: 6px !important;
}

.dmPhotoGallery .image-container a {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    display: block !important;
}

.dmPhotoGallery .image-container img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* Hide captions */
.dmPhotoGallery .caption-container {
    display: none !important;
}

/* Hide "View All" if gallery is cut off */
.dmPhotoGallery .photoGalleryViewAll {
    display: none !important;
}

/* -- 3b. UL/LI galleries (asymmetric) -- */
.dmPhotoGallery ul.dmPhotoGalleryHolder {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    justify-content: center !important;
}

.dmPhotoGallery ul.dmPhotoGalleryHolder li.photoGalleryThumbs {
    flex: 0 0 calc(33.333% - 10px) !important;
    max-width: calc(33.333% - 10px) !important;
    min-width: 150px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.dmPhotoGallery ul.dmPhotoGalleryHolder li .image-container {
    position: relative !important;
    width: 100% !important;
    padding-top: 100% !important;
    padding-bottom: 0 !important;
    overflow: hidden !important;
    border-radius: 6px !important;
}

.dmPhotoGallery ul.dmPhotoGalleryHolder li .image-container a {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
}

.dmPhotoGallery ul.dmPhotoGalleryHolder li .image-container img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* ==========================================================================
   4. BUTTONS - Proper sizing
   ========================================================================== */

.dmButtonLink, a.dmButtonLink {
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: inline-block !important;
}

.dmButtonLink .text {
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* ==========================================================================
   5. ELFSIGHT WIDGET - Force visibility
   ========================================================================== */

.elfsight-app-3dfe37a8-e0e6-4cfb-8cf9-58012cd736d3 {
    width: 100% !important;
    min-height: 300px !important;
    display: block !important;
    visibility: visible !important;
    overflow: visible !important;
}

.dmCustomHtml {
    width: 100% !important;
    min-height: 200px !important;
    overflow: visible !important;
    display: block !important;
    visibility: visible !important;
}

/* ==========================================================================
   6. SLIDERS - Show first image only
   ========================================================================== */

.flexslider,
.dmSlider {
    overflow: hidden !important;
}

.flexslider .slides li:not(:first-child),
.dmSlider .slides li:not(:first-child) {
    display: none !important;
}

.flexslider .flex-direction-nav,
.flexslider .flex-control-nav,
.dmSlider .flex-direction-nav,
.dmSlider .flex-control-nav {
    display: none !important;
}

/* ==========================================================================
   7. SVG ICONS - Constrain size (despre mine issue)
   ========================================================================== */

.dmRespCol img[src$=".svg"],
.dmRespCol .graphicWidget svg {
    max-width: 50px !important;
    max-height: 50px !important;
    width: auto !important;
    height: auto !important;
    display: inline-block !important;
}

/* ==========================================================================
   8. BLOG GRID - Static blog cards
   ========================================================================== */

.blog-grid,
#static-blog-listing {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 30px !important;
    visibility: visible !important;
    opacity: 1 !important;
    padding: 20px !important;
}

.blog-card {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.blog-card:hover {
    transform: translateY(-3px);
}

/* ==========================================================================
   9. HEADER - social icons spacing
   ========================================================================== */

.dmHeaderContainer .socialicons-container,
.fHeader .socialicons-container {
    display: flex !important;
    gap: 8px !important;
    padding-right: 15px !important;
}

/* ==========================================================================
   10. MOBILE RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
    /* Hide Duda desktop headers on mobile */
    .dmHeaderContainer,
    .fHeader {
        display: none !important;
    }

    /* Show custom mobile header */
    #custom-mobile-header {
        display: block !important;
    }

    /* Hide empty columns */
    .empty-column,
    .hide-for-small,
    .hide-for-medium {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    /* Stack columns vertically */
    .dmRespColsWrapper {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
    }

    .dmRespCol {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    /* Button sizing on mobile */
    .dmButtonLink, a.dmButtonLink {
        font-size: 14px !important;
        padding: 10px 20px !important;
    }

    .dmButtonLink .text {
        font-size: 14px !important;
    }

    /* Gallery mobile: 2 columns */
    .dmPhotoGallery .photogallery-column.column-2,
    .dmPhotoGallery .photogallery-column.column-3 {
        flex: 0 0 calc(50% - 10px) !important;
        max-width: calc(50% - 10px) !important;
    }

    .dmPhotoGallery ul.dmPhotoGalleryHolder li.photoGalleryThumbs {
        flex: 0 0 calc(50% - 10px) !important;
        max-width: calc(50% - 10px) !important;
    }

    /* Blog grid mobile */
    .blog-grid,
    #static-blog-listing {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Elfsight mobile */
    .elfsight-app-3dfe37a8-e0e6-4cfb-8cf9-58012cd736d3 {
        min-height: 400px !important;
    }

    /* Spacers even smaller on mobile */
    .dmSpacer {
        height: 8px !important;
        max-height: 10px !important;
    }
}

/* ==========================================================================
   11. CUSTOM MOBILE HEADER
   ========================================================================== */

#custom-mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 99999;
    font-family: Arial, Helvetica, sans-serif;
}

#cmh-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    padding: 8px 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    height: 55px;
    box-sizing: border-box;
}

#cmh-bar img {
    max-height: 40px;
    width: auto;
}

#cmh-hamburger {
    width: 30px;
    height: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    padding: 5px;
}

#cmh-hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: #333;
    border-radius: 2px;
}

#cmh-drawer {
    display: none;
    background: #2c2c2c;
    padding: 0;
    max-height: calc(100vh - 55px);
    overflow-y: auto;
}

#cmh-drawer-header {
    padding: 20px 15px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

#cmh-drawer-logo {
    max-height: 50px;
    width: auto;
    filter: brightness(1) !important;
}

#cmh-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

#cmh-nav li {
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

#cmh-nav li a {
    display: block;
    padding: 14px 20px;
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    letter-spacing: 0.5px;
    transition: background 0.2s;
}

#cmh-nav li a:hover,
#cmh-nav li a:active {
    background: rgba(255,255,255,0.1);
}

#cmh-drawer-footer {
    padding: 15px 20px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
}

#cmh-drawer-footer a {
    color: #eac416;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
}

@media (max-width: 1024px) {
    #custom-mobile-header {
        display: block !important;
    }
}

@media (max-width: 600px) {
    /* Gallery single column on phone */
    .dmPhotoGallery .photogallery-column.column-2,
    .dmPhotoGallery .photogallery-column.column-3,
    .dmPhotoGallery ul.dmPhotoGalleryHolder li.photoGalleryThumbs {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    /* Blog single column */
    .blog-grid,
    #static-blog-listing {
        grid-template-columns: 1fr !important;
    }
}
