/*
Theme Name: Astra Child (Stavkujem)
Template: astra
Version: 1.0.4
Description: Child theme for Stavkujem.com
*/

/* ===== Import parent theme ===== */
@import url("../astra/style.css");

/* ===== H1 nad featured image ===== */
/* Astra zobrazuje featured image v .ast-single-post-featured-section
   pred ARTICLE elementom. Pomocou flex order na #main presunieme
   ARTICLE (s H1) pred featured image sekciu. */

/* Hlavny kontajner ako flex column */
.ast-single-post #main.site-main,
.page #main.site-main,
.single #main.site-main {
    display: flex !important;
    flex-direction: column !important;
}

/* ARTICLE (obsahuje H1 a obsah) ide prvy */
.ast-single-post #main.site-main > article,
.page #main.site-main > article,
.single #main.site-main > article {
    order: 1 !important;
}

/* Featured image sekcia ide druha (pod H1) */
.ast-single-post #main.site-main > .ast-single-post-featured-section,
.page #main.site-main > .ast-single-post-featured-section,
.single #main.site-main > .ast-single-post-featured-section {
    order: 2 !important;
}

/* ===== Homepage padding fix ===== */
body.home .ast-container,
body.home .site-content > .ast-container,
body.home .entry-content {
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    body.home .ast-container,
    body.home .entry-content {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

/* ===== Override: Remove ALL CAPS from navigation ===== */
.ast-builder-menu-1 .main-header-menu > li > a,
.ast-builder-menu-1 .main-header-menu > li > .ast-menu-toggle,
.main-header-menu > li > a,
.main-header-menu > li > .ast-menu-toggle,
#ast-desktop-header .main-header-menu > li > a,
.ast-main-header-wrap .main-header-bar-navigation .menu-item > a {
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
}

.main-header-menu .sub-menu li > a,
.ast-builder-menu-1 .main-header-menu .sub-menu li > a,
#ast-desktop-header .main-header-menu .sub-menu li > a {
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
}

/* ===== Submenu: single column, dark, compact ===== */
.main-header-menu .sub-menu,
.ast-builder-menu-1 .main-header-menu .sub-menu,
#ast-desktop-header .main-header-menu .sub-menu {
    min-width: 230px !important;
    max-width: 260px !important;
    background: #1a1a2e !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4) !important;
    padding: 6px 0 !important;
}

.main-header-menu .sub-menu > li,
#ast-desktop-header .main-header-menu .sub-menu > li {
    display: block !important;
    width: 100% !important;
    float: none !important;
    border-bottom: none !important;
}

.main-header-menu .sub-menu > li > a,
#ast-desktop-header .main-header-menu .sub-menu > li > a {
    display: block !important;
    padding: 9px 18px !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    color: rgba(255,255,255,0.85) !important;
    white-space: nowrap !important;
    line-height: 1.4 !important;
    border-bottom: none !important;
    background: transparent !important;
    transition: background 0.15s, color 0.15s, padding-left 0.15s !important;
}

.main-header-menu .sub-menu > li > a:hover,
#ast-desktop-header .main-header-menu .sub-menu > li > a:hover {
    background: rgba(255,255,255,0.09) !important;
    color: #ffffff !important;
    padding-left: 22px !important;
}

.main-header-menu .sub-menu .menu-item-has-children > .ast-menu-toggle,
.main-header-menu .sub-menu .menu-item-has-children > a .ast-menu-toggle {
    display: none !important;
}

.main-header-menu .sub-menu .sub-menu,
#ast-desktop-header .main-header-menu .sub-menu .sub-menu {
    position: static !important;
    display: block !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    min-width: unset !important;
    max-width: unset !important;
    border-radius: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    left: auto !important;
    top: auto !important;
}

.main-header-menu .sub-menu > .menu-item-has-children > a {
    color: rgba(255,255,255,0.45) !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    padding: 14px 18px 3px 18px !important;
    cursor: default !important;
    pointer-events: none !important;
}

.main-header-menu .sub-menu .sub-menu > li > a {
    padding: 8px 18px !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    color: rgba(255,255,255,0.85) !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.main-header-menu .sub-menu .sub-menu > li > a:hover {
    padding-left: 22px !important;
    color: #fff !important;
    background: rgba(255,255,255,0.09) !important;
}

/* ===== Language switcher ===== */
.stavkujem-lang-switcher {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    padding: 6px 0 20px 0;
    font-size: 13px;
    font-weight: 600;
}
.stavkujem-lang-switcher .lang-active {
    color: #1a1a1a;
    background: #f0f0f0;
    padding: 3px 12px;
    border-radius: 20px;
}
.stavkujem-lang-switcher .lang-link {
    color: #2563eb;
    text-decoration: none;
    padding: 3px 12px;
    border-radius: 20px;
    border: 1px solid #2563eb;
    transition: all 0.2s;
}
.stavkujem-lang-switcher .lang-link:hover {
    background: #2563eb;
    color: #fff;
}

/* ===== Hero image ===== */
.stavkujem-hero-image {
    margin: 0 0 2.5rem 0;
    text-align: center;
}
.stavkujem-hero-image img {
    width: 100%;
    max-width: 800px;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 12px;
}

/* ===== Inline figures ===== */
.stavkujem-inline-figure {
    margin: 2rem auto !important;
    text-align: center;
}
.stavkujem-inline-figure img {
    width: 100%;
    max-width: 720px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.10);
}


/* =============================================
   RESPONSIVE TABLE
   ============================================= */

.table-scroll-wrapper {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin: 1.5rem 0;
    border-radius: 6px;
    -webkit-box-shadow: inset -8px 0 8px -8px rgba(0,0,0,0.12);
    box-shadow: inset -8px 0 8px -8px rgba(0,0,0,0.12);
}

.table-scroll-wrapper table {
    border-collapse: collapse !important;
    width: max-content !important;
    min-width: 100% !important;
    max-width: none !important;
    display: table !important;
    overflow-x: visible !important;
}

.entry-content > table,
.elementor-widget-text-editor > table,
.wp-block-table > table {
    border-collapse: collapse;
    width: 100%;
    max-width: 100%;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.entry-content table th,
.entry-content table td,
.elementor-widget-text-editor table th,
.elementor-widget-text-editor table td {
    white-space: nowrap;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    font-size: 14px;
    line-height: 1.5;
}

.entry-content table th,
.elementor-widget-text-editor table th {
    background: #f8fafc;
    font-weight: 600;
    color: #1e293b;
}

.entry-content table tr:nth-child(even) td,
.elementor-widget-text-editor table tr:nth-child(even) td {
    background: #f8fafc;
}

@media (max-width: 768px) {
    .entry-content table th,
    .entry-content table td,
    .elementor-widget-text-editor table th,
    .elementor-widget-text-editor table td {
        font-size: 13px;
        padding: 8px 10px;
    }
}

