/* =========================================================
   BUTTONS — "shine & glow" (#41 in the collection), in the
   colours of the header button.

   Resting state on every button: transparent fill, a 1px
   #167BFF border and white text — exactly like "Связаться с
   нами". On hover the button fills with #167BFF, a blue glow
   spreads around it and a slanted band of light sweeps across.
========================================================= */

.right-menu button,
.btn-primary,
.btn-secondary,
.contacts-button,
.project-feature-button,
.project-allprojects-btn,
.dir-panel-cta,
.e404-actions a{
    position:relative;
    overflow:hidden;
    isolation:isolate;
    background:transparent !important;
    /* the outline is an inset shadow, not a border: the sheen runs under a
       border but over an inset shadow, so it now reaches the very edge */
    border:0 !important;
    box-shadow:inset 0 0 0 1px #167BFF;
    color:#FFFFFF !important;
    transition:
        background .35s ease,
        box-shadow .35s ease,
        border-color .35s ease,
        color .35s ease;
}

.right-menu button:hover,
.btn-primary:hover,
.btn-secondary:hover,
.contacts-button:hover,
.project-feature-button:hover,
.project-allprojects-btn:hover,
.dir-panel-cta:hover,
.e404-actions a:hover{
    background:#167BFF !important;
    color:#FFFFFF !important;
    /* the glow */
    box-shadow:
        inset 0 0 0 1px #167BFF,
        0 0 12px rgba(22,123,255,.55),
        0 0 30px rgba(22,123,255,.38),
        0 8px 26px rgba(6,26,60,.45) !important;
}

/* "Получить предложение" and "Оставить заявку" stay filled at rest */
.btn-primary,
.contacts-button,
.e404-actions .btn-primary{
    background:#167BFF !important;
    box-shadow:inset 0 0 0 1px #167BFF, 0 8px 22px rgba(6,26,60,.35);
}

/* the shine: a slanted band of light crossing the button */
.right-menu button::after,
.btn-primary::after,
.btn-secondary::after,
.contacts-button::after,
.project-feature-button::after,
.project-allprojects-btn::after,
.dir-panel-cta::after,
.e404-actions a::after{
    content:"";
    position:absolute;
    top:-60%;
    bottom:-60%;
    left:-75%;
    width:42%;
    z-index:1;
    pointer-events:none;
    opacity:0;
    transform:rotate(22deg);
    background:linear-gradient(90deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,.55) 50%,
        rgba(255,255,255,0) 100%);
}

.right-menu button:hover::after,
.btn-primary:hover::after,
.btn-secondary:hover::after,
.contacts-button:hover::after,
.project-feature-button:hover::after,
.project-allprojects-btn:hover::after,
.dir-panel-cta:hover::after,
.e404-actions a:hover::after{
    animation:geoShine 1.1s ease-in-out .05s infinite;
}

@keyframes geoShine{
    0%   { left:-75%; opacity:0; }
    15%  { opacity:1; }
    85%  { opacity:1; }
    100% { left:125%; opacity:0; }
}

/* ---------- arrow: half a turn on hover ---------- */
.btn-ico{
    display:inline-flex !important;
    align-items:center;
    justify-content:center;
    width:16px;
    height:16px;
    line-height:0 !important;
    flex:0 0 16px;
}

.btn-ico svg{ display:block; }

.project-feature-button span,
.project-allprojects-btn span,
.dir-panel-cta span{
    color:#FFFFFF !important;
    transition:transform .32s cubic-bezier(.4,0,.2,1) !important;
    transform:rotate(0deg);
}

.project-feature-button:hover span,
.project-allprojects-btn:hover span,
.dir-panel-cta:hover span{ transform:rotate(180deg); }

/* ---------- round arrows in the catalog: pulsing ring (kept) ---------- */
.dir-row-arrow,
.geo-pnav-btn{ position:relative; }

.dir-row-arrow::after,
.geo-pnav-btn::after{
    content:"";
    position:absolute;
    inset:-2px;
    border-radius:inherit;
    border:1px solid rgba(67,183,255,.75);
    opacity:0;
    pointer-events:none;
}

.dir-row:hover .dir-row-arrow::after,
.dir-row.active .dir-row-arrow::after,
.geo-pnav-btn:hover::after{
    animation:geoRingPulse 1.6s ease-out infinite;
}

@keyframes geoRingPulse{
    0%   { opacity:.85; transform:scale(1); }
    70%  { opacity:0;   transform:scale(1.45); }
    100% { opacity:0;   transform:scale(1.45); }
}

@media (prefers-reduced-motion: reduce){
    .right-menu button:hover::after,
    .btn-primary:hover::after,
    .btn-secondary:hover::after,
    .contacts-button:hover::after,
    .project-feature-button:hover::after,
    .project-allprojects-btn:hover::after,
    .dir-panel-cta:hover::after,
    .e404-actions a:hover::after,
    .dir-row:hover .dir-row-arrow::after,
    .geo-pnav-btn:hover::after{ animation:none; }
}

/* =========================================================
   Final word on the outline, above the older desktop-unify rules
   (they set a real 1px border on the hero buttons and removed the
   outline of "Узнать больше"). A real border stays dark while the
   sheen passes and shows as a rim; an inset shadow lies under the
   sheen, so the light now reaches the very edge.
========================================================= */
html body .right-menu button,
html body .btn-primary,
html body .btn-secondary,
html body .hero-buttons .btn-primary,
html body .hero-buttons .btn-secondary,
html body .contacts-button,
html body .project-feature-button,
html body .project-allprojects-btn,
html body .dir-panel-cta,
html body .e404-actions a{
    border:0 !important;
    box-shadow:inset 0 0 0 1px #167BFF !important;
}

html body .btn-primary,
html body .hero-buttons .btn-primary,
html body .contacts-button,
html body .e404-actions .btn-primary{
    box-shadow:inset 0 0 0 1px #167BFF, 0 8px 22px rgba(6,26,60,.35) !important;
}

html body .right-menu button:hover,
html body .btn-primary:hover,
html body .btn-secondary:hover,
html body .hero-buttons .btn-primary:hover,
html body .hero-buttons .btn-secondary:hover,
html body .contacts-button:hover,
html body .project-feature-button:hover,
html body .project-allprojects-btn:hover,
html body .dir-panel-cta:hover,
html body .e404-actions a:hover{
    box-shadow:
        inset 0 0 0 1px #167BFF,
        0 0 12px rgba(22,123,255,.55),
        0 0 30px rgba(22,123,255,.38),
        0 8px 26px rgba(6,26,60,.45) !important;
}
