/*
Theme Name: HPO Child Theme
Template: astra
Version: 1.0.0
*/

/* --- GLOBAL VARIABLES --- */
:root {
    --HPO-primary: #000;
    --HPO-accent: #2D68C4;
    --HPO-bg-page: #F8FAFC;
    --HPO-text: #000;
    --HPO-border: #2E6F40;
}

body { 
    background-color: var(--HPO-bg-page); 
}

p {
    font-size: 16px;
}

a:hover, a:focus {
    color: var(--HPO-border);
}
a {
    color: var(--HPO-border) !important;
    text-decoration: none; /* Optional: removes underline */
    transition: 0.3s;
}
#astra-footer-menu .menu-item > a {
    color: #fff !important;
}
.site-below-footer-wrap {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

.main-header-bar {
    display: none !important;
}


/* --- FLOATING FLIP CALL BUTTON --- */
.HPO-floating-call-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99999;
    perspective: 1000px; /* Activates the 3D space */
    margin-bottom: 35px;
}

/* The wrapper that actually spins */
.HPO-call-flipper {
    display: block;
    width: 210px;
    height: 60px;
    position: relative;
    transform-style: preserve-3d;
    text-decoration: none !important;
    /* 3s total duration = 1.5s per side */
    animation: hpoFlipButton 3s infinite; 
}

/* 3D Vertical Flip Animation */
@keyframes hpoFlipButton {
    0%, 40%   { transform: rotateX(0deg); }    /* Hold Front */
    50%, 90%  { transform: rotateX(180deg); }  /* Hold Back */
    100%      { transform: rotateX(360deg); }  /* Return to Front */
}

/* Shared styles for both faces */
.HPO-call-front,
.HPO-call-back {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 50px;
    font-size: 17px;
    font-weight: 700;
    color: #ffffff !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* Front Face */
.HPO-call-front {
    background-color: var(--HPO-border); /* Uses your HPO theme variable */
}

/* Back Face */
.HPO-call-back {
    background-color: #000; /* Fallback or primary theme color */
    transform: rotateX(180deg); /* Pre-flipped so it's correct when spun */
}

.HPO-call-front svg, 
.HPO-call-back svg {
    flex-shrink: 0;
}

/* Mobile Adjustments */
@media screen and (max-width: 768px) {
    .HPO-floating-call-btn {
        bottom: 20px;
        right: 20px;
        margin-bottom: 35px;
    }
    .HPO-call-flipper {
        width: 190px;
        height: 55px;
    }
    .HPO-call-front, .HPO-call-back {
        font-size: 15px;
    }
}