/*
 Theme Name:   Profinz Theme
 Theme URI:    https://profinz.com/
 Description:  Child theme for Hello Elementor — Profinz
 Author:       Profinz
 Author URI:   https://profinz.com/
 Template:     hello-elementor
 Version:      1.1.0
 Text Domain:  hello-elementor-child
*/

/* ===========================
   BRAND TOKENS
   =========================== */

:root {
    --brand-primary: #064F9B;   /* Profinz blue */
    --brand-accent:  #E31D2A;   /* Profinz red */
    --brand-light:   #1780ED;   /* bright blue */
    --brand-grey:    #EAEAEA;
    --brand-black:   #000000;
}

/* Overflow fix — clip (not hidden) keeps position: sticky working.
   "hidden" stays as the fallback for browsers without clip support. */
html,
body {
    width: 100% !important;
    overflow-x: hidden !important;
    overflow-x: clip !important;
}

/* ===========================
   TEXT SELECTION
   =========================== */

::selection {
    background: var(--brand-accent) !important;
    color: #ffffff !important;
}

/* ===========================
   SCROLLBAR
   =========================== */

/* Chrome, Edge, Safari */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    background: var(--brand-grey);
}

::-webkit-scrollbar-thumb {
    background: var(--brand-primary);
    border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--brand-light);
}

::-webkit-scrollbar-corner {
    background: var(--brand-grey);
}

/* Firefox */
@supports not selector(::-webkit-scrollbar) {
    * {
        scrollbar-width: thin;
        scrollbar-color: var(--brand-primary) var(--brand-grey);
    }
}

/* ===========================
   ELEMENTOR POPUP — close icon
   =========================== */

.dialog-close-button {
    padding: 5px !important;
    border-radius: 100px !important;
}

.dialog-close-button svg {
    transition: transform 0.3s ease;
}

.dialog-close-button:hover svg {
    transform: rotate(90deg);
}

/* ===========================
   ELEMENTOR OFF-CANVAS — page lock + fit the real mobile viewport
   Off-Canvas Height: Custom → 100 % (not vh)
   =========================== */

html.is-scroll-locked,
html.is-scroll-locked body {
    overflow: hidden !important;
}

/* Tall popups scroll inside themselves */
.elementor-popup-modal .dialog-message {
    max-height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.e-off-canvas__main {
    height: 100vh;                  /* fallback for older browsers */
    height: 100dvh !important;      /* visible viewport, not 100vh */
    max-height: 100dvh !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;   /* no scroll chaining to the page */
}

/* ===========================
   HELPER CLASSES
   Add in Advanced → CSS Classes
   =========================== */

/* Icon line-height fix — menu-icon-widget */
.menu-icon-widget {
    line-height: 0 !important;
}

/* Float up and down — floating-up-down */
.floating-up-down {
    animation: floatY 2s ease-in-out infinite;
}

@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

/* Gentle pulse — pulse-grow */
.pulse-grow {
    animation: pulse-grow 2s infinite;
}

@keyframes pulse-grow {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Gradient text — gradient-text */
.gradient-text {
    background: linear-gradient(90deg, var(--brand-accent) 0%, var(--brand-light) 30%, var(--brand-accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Glass background — branch-sub-title */
.branch-sub-title {
    backdrop-filter: blur(12px) saturate(200%);
    -webkit-backdrop-filter: blur(12px) saturate(200%);
    background-color: rgba(17, 25, 40, 0);
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.125);
}

@media (prefers-reduced-motion: reduce) {
    .floating-up-down,
    .pulse-grow {
        animation: none !important;
    }
}

/* ===========================
   WIDGET TWEAKS
   =========================== */

/* Testimonial marquee — equal card height */
.deensimc-testimonial-marquee .deensimc-tes-main blockquote {
    height: 300px !important;
}

/* Loop Carousel (blog) — pill-shaped dots */
.elementor-widget-loop-carousel.elementor-pagination-position-outside:not(:has(> .elementor-widget-container)) .swiper-pagination-bullet,
.elementor-widget-loop-carousel.elementor-pagination-position-outside > .elementor-widget-container .swiper-pagination-bullet {
    height: 5px !important;
    width: 20px !important;
    border-radius: 20px !important;
}

/* Blog post tables — no striped/hover background */
.wp-block-table tbody tr td,
.wp-block-table tbody tr th,
.wp-block-table tbody tr:nth-child(odd) td,
.wp-block-table tbody tr:nth-child(odd) th,
.wp-block-table tbody tr:hover td,
.wp-block-table tbody tr:hover th {
    background-color: transparent !important;
}
