/*
 * jimdo-fix.css
 * Replaces blocked assets.jimstatic.com files:
 *   - web_oldtemplate.css
 *   - ownbgr.css
 * Provides base Jimdo template styling for old-template sites.
 */

/* === Reset & Base === */
* { box-sizing: border-box; }
body { line-height: 1.5; }
img { border: 0; max-width: 100%; height: auto; }
a img { border: 0; }

/* === Utility Classes === */
.hidden { display: none !important; }
.clearover::after, .clearfix::after { content: ""; display: table; clear: both; }
.clearover, .clearfix { zoom: 1; }
.c { clear: both; height: 0; font-size: 0; line-height: 0; }
.cc-clear { clear: both; }

/* === Module Base === */
.j-module { margin-bottom: 10px; }
.j-module.n { padding: 5px; }

/* === Headers === */
.j-header h1, .j-header h2, .j-header h3 {
    margin: 0 0 5px 0;
    padding: 0;
}

/* === Text Module === */
.j-text p { margin: 0 0 10px 0; }

/* === Horizontal Rule === */
.j-hr .hr {
    border: 0;
    border-top: 1px solid #ccc;
    margin: 10px 0;
    height: 0;
}

/* === Spacer === */
.j-spacing .cc-m-spacer { height: 20px; }

/* === Image Module === */
.cc-imagewrapper { margin: 0 0 10px 0; line-height: 0; }
.cc-imagewrapper img { display: block; }
.cc-m-image-align-1 { text-align: left; }
.cc-m-image-align-2 { text-align: center; }
.cc-m-image-align-2 img { margin: 0 auto; display: block; }
.cc-m-image-align-3 { text-align: right; }
.cc-m-width-maxed img { width: 100%; }
.cc-imagewrapper figcaption {
    font-size: 11px;
    color: #666;
    margin-top: 4px;
    line-height: 1.4;
}

/* === Text With Image === */
.j-textWithImage .cc-m-textwithimage-inline-rte { overflow: hidden; }
.j-textWithImage .cc-imagewrapper { margin: 0 15px 10px 0; }
.j-textWithImage .cc-m-image-align-3 .cc-imagewrapper,
.j-textWithImage .cc-imagewrapper.cc-m-image-align-3 {
    float: right;
    margin: 0 0 10px 15px;
}
.j-textWithImage .cc-m-image-align-1 .cc-imagewrapper,
.j-textWithImage .cc-imagewrapper.cc-m-image-align-1 {
    float: left;
    margin: 0 15px 10px 0;
}

/* === Gallery Module === */
.cc-m-gallery-container.ccgalerie { overflow: hidden; }
.cc-m-gallery-container .thumb_sq1,
.cc-m-gallery-container .thumb_sq3 {
    float: left;
    overflow: hidden;
    margin: 0 5px 5px 0;
    cursor: pointer;
}
.cc-m-gallery-container .thumb_sq1 > div,
.cc-m-gallery-container .thumb_sq3 > div {
    overflow: hidden;
    width: 100%;
    height: 100%;
}
.cc-m-gallery-container .thumb_sq1 img,
.cc-m-gallery-container .thumb_sq3 img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s;
}
.cc-m-gallery-container .thumb_sq1:hover img,
.cc-m-gallery-container .thumb_sq3:hover img {
    opacity: 0.8;
}
.cc-m-gallery-container .thumb_sq1 a,
.cc-m-gallery-container .thumb_sq3 a {
    display: block;
    text-decoration: none;
    border: 0;
    width: 100%;
    height: 100%;
}

/* === Video Module === */
.j-video .cc-m-video-wrapper { position: relative; margin: 0 0 10px 0; }
.j-video .cc-m-video-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; }
.j-video .cc-m-video-container iframe,
.j-video .cc-m-video-container object,
.j-video .cc-m-video-container embed {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}
.cc-m-video-overlay { display: none; }
.cc-m-video-ratio-2 .cc-m-video-container { padding-bottom: 75%; }
.cc-m-video-align-left { }
.cc-m-video-align-center { margin: 0 auto; }

/* === Download Module === */
.j-downloadDocument .j-m-dowload { margin: 5px 0; }
.j-downloadDocument .leftDownload { float: left; margin-right: 10px; }
.j-downloadDocument .rightDownload { overflow: hidden; }
.j-downloadDocument .downloadImage img { display: block; }
.j-downloadDocument .cc-m-download-file { margin: 5px 0; }
.j-downloadDocument .cc-m-download-file-info { font-size: 11px; color: #888; }
.j-downloadDocument .cc-m-download-link a { text-decoration: underline; }

/* === Blog === */
.j-blogarticle { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #ddd; }
.j-blogarticle:last-child { border-bottom: 0; }
.j-blog-post--headline h2 { margin: 0 0 5px 0; }
.j-blog-post--date { font-size: 12px; color: #888; margin-bottom: 10px; }
.j-blog-post--tags-wrapper { font-size: 12px; margin-top: 10px; }
.j-blog-post--tag { display: inline-block; margin-right: 5px; }
.j-blog-comment-counter { font-size: 12px; color: #888; }
.article_separator { border-top: 1px solid #ddd; margin: 10px 0; }
.blogselection { margin-bottom: 20px; }

/* Date stamps */
.datetime { margin-bottom: 5px; font-size: 12px; }
.datetime p { margin: 0; }
.dt-hide { display: none; }

/* === Comments === */
.j-comment .commentstd { margin: 10px 0; padding: 10px 0; border-bottom: 1px solid #eee; }
.j-comment .com-meta { font-size: 11px; color: #888; margin-bottom: 5px; }
.j-comment .comment { margin-bottom: 5px; }

/* === Navigation helpers === */
.j-nav-variant-standard ul { list-style: none; margin: 0; padding: 0; }
.j-nav-variant-standard li { display: inline-block; }

/* === Floating Button Bar (Scroll to top) === */
.cc-FloatingButtonBarContainer {
    list-style: none;
    margin: 0;
    padding: 0;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
}
.cc-FloatingButtonBarContainer-button-scroll a {
    display: block;
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.5);
    color: white;
    text-align: center;
    line-height: 40px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 20px;
}
.cc-FloatingButtonBarContainer-button-scroll a span { display: none; }
.cc-FloatingButtonBarContainer-button-scroll a::after { content: "▲"; }
.cc-FloatingButtonBarContainer-button-scroll a:hover { background: rgba(0,0,0,0.7); }

/* === Joomla-style article leftovers (some pages have these) === */
.contentpagetitle { font-size: 18px; font-weight: bold; margin: 0 0 10px 0; }
.contentheading { font-size: 16px; font-weight: bold; margin: 0 0 5px 0; }
.contentpaneopen { margin-bottom: 15px; }
.leftrow { float: left; margin-right: 15px; }
.rightrow { overflow: hidden; }

/* === Background handling (replaces ownbgr.css) === */
body.body {
    background-attachment: fixed;
    background-size: cover;
    min-height: 100vh;
}

/* === Lightbox Styles (injected by jimdo-lightbox.js) === */
#jimdo-lightbox-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
#jimdo-lightbox-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    cursor: default;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}
#jimdo-lightbox-close {
    position: fixed;
    top: 15px; right: 20px;
    color: white;
    font-size: 36px;
    cursor: pointer;
    z-index: 10001;
    font-family: Arial, sans-serif;
    line-height: 1;
    text-shadow: 0 0 10px rgba(0,0,0,0.8);
}
#jimdo-lightbox-close:hover { color: #ccc; }
#jimdo-lightbox-prev,
#jimdo-lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 48px;
    cursor: pointer;
    z-index: 10001;
    font-family: Arial, sans-serif;
    user-select: none;
    text-shadow: 0 0 10px rgba(0,0,0,0.8);
    padding: 20px;
}
#jimdo-lightbox-prev { left: 10px; }
#jimdo-lightbox-next { right: 10px; }
#jimdo-lightbox-prev:hover,
#jimdo-lightbox-next:hover { color: #ccc; }
#jimdo-lightbox-counter {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 14px;
    font-family: Arial, sans-serif;
    z-index: 10001;
    text-shadow: 0 0 5px rgba(0,0,0,0.8);
}
#jimdo-lightbox-title {
    position: fixed;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 14px;
    font-family: Arial, sans-serif;
    z-index: 10001;
    text-align: center;
    max-width: 80vw;
    text-shadow: 0 0 5px rgba(0,0,0,0.8);
}
