/* Header logo layout */
.logo {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 15px 25px !important;
}

.logo__img-link {
    flex-shrink: 0;
}

.logo__img {
    height: 80px;
    width: auto;
    display: block;
    object-fit: contain;
}

.logo__link {
    text-align: right !important;
    margin-left: auto;
    padding-left: 20px;
}

@media screen and (max-width: 767px) {
    .logo {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }
    .logo__img {
        height: 60px;
    }
    .logo__link {
        text-align: center !important;
        padding-left: 0;
    }
}

/* Image gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin: 16px 0 24px;
}

.gallery img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 4px;
    transition: opacity .2s ease;
}

.gallery img:hover {
    opacity: .85;
}

.gallery--logo img {
    height: auto;
    max-width: 400px;
}

@media screen and (max-width: 620px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    .gallery img {
        height: 120px;
    }
}

/* Dropdown menu */
.menu__item--has-children {
    position: relative;
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
}

.menu__link--parent {
    flex: 1;
}

.menu__arrow-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: inherit;
}

.menu__arrow {
    font-size: 12px;
    transition: transform .2s ease;
    display: inline-block;
}

.menu__dropdown {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    background: #2a2a2a;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    min-width: 180px;
}

.menu__dropdown-item {
    border-top: 1px solid rgba(255,255,255,.1);
}

.menu__dropdown-link {
    display: block;
    padding: 10px 18px;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s ease;
}

.menu__dropdown-link:hover {
    background: #e22d30;
    color: #fff;
}

/* Desktop: hover dropdown */
@media screen and (min-width: 767px) {
    .menu__dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 200;
    }

    .menu__item--has-children:hover .menu__dropdown {
        display: block;
    }

    .menu__item--has-children:hover .menu__arrow {
        transform: rotate(180deg);
    }
}

/* Mobile: click to toggle */
@media screen and (max-width: 766px) {
    .menu__dropdown {
        position: static;
        box-shadow: none;
        border-top: 1px solid rgba(255,255,255,.1);
        width: 100%;
        flex-basis: 100%;
    }

    .menu__item--has-children.menu__item--open .menu__dropdown {
        display: block;
    }

    .menu__item--has-children.menu__item--open .menu__arrow {
        transform: rotate(180deg);
    }
}

/* Post gallery slideshow */
.post-gallery-wrap {
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}
.post-gallery-wrap img {
    display: block;
    width: 100% !important;
    height: auto !important;
    object-fit: unset;
    opacity: 0;
    will-change: transform, opacity, filter, clip-path;
}
.post-gallery-wrap img:first-child {
    opacity: 1;
}
.post-gallery-wrap img ~ img {
    display: none;
}
.list__thumbnail, .post__thumbnail {
    position: relative;
    overflow: hidden;
}
.list__thumbnail .gallery-arrow {
    width: 28px;
    height: 28px;
    font-size: 15px;
}
.list__thumbnail .gallery-arrow--left  { left: 6px; }
.list__thumbnail .gallery-arrow--right { right: 6px; }
.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0,0,0,0.45);
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    user-select: none;
}
.gallery-arrow:hover { background: rgba(0,0,0,0.75); }
.gallery-arrow--left  { left: 12px; }
.gallery-arrow--right { right: 12px; }

/* Author box: quote button + visit counter */
.authorbox {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}
.authorbox__avatar {
    float: none !important;
    margin: 0 !important;
}
.authorbox__body {
    flex: 1 1 200px;
}
.authorbox__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    margin-left: auto;
}
.authorbox__quote-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e22d30;
    color: #fff !important;
    padding: 10px 18px;
    border-radius: 4px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    transition: background .2s ease;
}
.authorbox__quote-btn:hover {
    background: #c4231f;
}
.authorbox__quote-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}
.authorbox__visits {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
}
.authorbox__visits img {
    display: block;
}
@media screen and (max-width: 600px) {
    .authorbox {
        flex-direction: column;
        align-items: flex-start;
    }
    .authorbox__actions {
        margin-left: 0;
        align-items: flex-start;
        width: 100%;
    }
}

/* Contact toast */
.contact-toast {
    position: fixed;
    left: 50%;
    bottom: 30px;
    transform: translate(-50%, 20px);
    background: #2a2a2a;
    color: #fff;
    padding: 12px 22px;
    border-radius: 6px;
    font-size: 14px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.3);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
    max-width: 90vw;
    text-align: center;
}
.contact-toast--visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* Interaction counter badge: matches hits.sh "Views" badge size/font */
.authorbox__visits-label--gap {
    margin-left: 10px;
}
.authorbox__counter-badge {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 6px;
    background: #e22d30;
    color: #fff;
    font-family: Verdana, Geneva, DejaVu Sans, sans-serif;
    font-size: 11px;
    line-height: 1;
    vertical-align: middle;
}
