/* ==========================================================================
   Astral Enhancements — премиум-подобные эффекты для темы AstroStar
   Палитра темы: фон #070506, акцент #ca9d75, текст #c3beb6
   ========================================================================== */

/* --- 1. Preloader (заставка при загрузке) ------------------------------- */
#astral-preloader {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #070506;
    transition: opacity .6s ease, visibility .6s ease;
}
#astral-preloader.astral-hidden {
    opacity: 0;
    visibility: hidden;
}
.astral-spinner {
    width: 54px;
    height: 54px;
    border: 3px solid rgba(202, 157, 117, .25);
    border-top-color: #ca9d75;
    border-radius: 50%;
    animation: astral-spin .9s linear infinite;
}
@keyframes astral-spin {
    to { transform: rotate(360deg); }
}

/* --- 2. Кнопка «Наверх» ------------------------------------------------- */
#astral-top-btn {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #ca9d75;
    color: #070506;
    font-size: 22px;
    line-height: 46px;
    text-align: center;
    text-decoration: none;
    z-index: 99998;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .25s ease, transform .25s ease, background .25s ease, visibility .25s ease;
}
#astral-top-btn.astral-visible {
    opacity: .9;
    visibility: visible;
    transform: translateY(0);
}
#astral-top-btn:hover {
    opacity: 1;
    transform: translateY(-3px);
    background: #ffffff;
}

/* --- 3. Плавное появление секций при прокрутке -------------------------- */
.astral-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s ease, transform .7s ease;
    will-change: opacity, transform;
}
.astral-reveal.astral-in {
    opacity: 1;
    transform: translateY(0);
}

/* --- 4. Hover-зум на изображениях постов -------------------------------- */
.wpdevart-homepage-post-container .figureblogimage,
.wpdevart-home-latest-posts-list .figureblogimage,
article .figureblogimage {
    overflow: hidden;
}
.wpdevart-homepage-post-container .figureblogimage img,
.wpdevart-home-latest-posts-list .figureblogimage img,
article .figureblogimage img {
    transition: transform .45s ease, filter .45s ease;
    will-change: transform;
}
.wpdevart-homepage-post-container:hover .figureblogimage img,
.wpdevart-home-latest-posts-list .figureblogimage:hover img,
article .figureblogimage:hover img {
    transform: scale(1.07);
    filter: brightness(1.08);
}

/* --- 5. Анимация кнопок темы ------------------------------------------- */
.wpdevart_astrostar_primary_button_slide,
.wpdevart_astrostar_fourth_button_slide,
.wpdevart-primary-button,
input[type="submit"] {
    transition: transform .2s ease, box-shadow .2s ease !important;
}
.wpdevart_astrostar_primary_button_slide:hover,
.wpdevart_astrostar_fourth_button_slide:hover,
.wpdevart-primary-button:hover,
input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(202, 157, 117, .35);
}

/* Уважаем системную настройку «меньше движения» */
@media (prefers-reduced-motion: reduce) {
    .astral-reveal { opacity: 1; transform: none; transition: none; }
    .astral-spinner { animation: none; }
}

/* --- 6. Форма обратной связи [astral_contact] -------------------------- */
.astral-contact-wrap {
    max-width: 560px;
}
.astral-contact-form p {
    margin: 0 0 18px;
}
.astral-contact-form label {
    display: block;
    margin-bottom: 6px;
    color: #ca9d75;
    font-size: 15px;
}
.astral-contact-form input[type="text"],
.astral-contact-form input[type="email"],
.astral-contact-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px;
    background: #0d0a0b;
    border: 1px solid #433e37;
    border-radius: 6px;
    color: #e8e3db;
    font-size: 16px;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.astral-contact-form input[type="text"]:focus,
.astral-contact-form input[type="email"]:focus,
.astral-contact-form textarea:focus {
    outline: none;
    border-color: #ca9d75;
    box-shadow: 0 0 0 2px rgba(202, 157, 117, .22);
}
.astral-contact-form textarea {
    resize: vertical;
    min-height: 120px;
}
.astral-contact-btn {
    display: inline-block;
    padding: 12px 34px;
    background: #ca9d75;
    color: #070506;
    border: 1px solid #ca9d75;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.astral-contact-btn:hover {
    background: #070506;
    color: #ca9d75;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(202, 157, 117, .35);
}
/* honeypot — скрыт от людей, виден ботам */
.astral-hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.astral-form-ok,
.astral-form-error {
    padding: 13px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 15px;
}
.astral-form-ok {
    background: rgba(90, 160, 110, .15);
    border: 1px solid #5aa06e;
    color: #bfe6c9;
}
.astral-form-error {
    background: rgba(190, 90, 90, .15);
    border: 1px solid #be5a5a;
    color: #e6bfbf;
}
.astral-contact-direct {
    margin-top: 18px;
    color: #c3beb6;
}
.astral-contact-direct a {
    color: #ca9d75;
}
