/*============================================================================================*/
/* Your custom styles below */
/*============================================================================================*/

/* ============================================================================
   MODERN STEPS SECTION STYLING
   ============================================================================ */

.steps-section {
    padding: 120px 0 95px;
    position: relative;
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
    overflow: hidden;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 80px;
    animation: fadeInDown 0.8s ease-out;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #3f4079;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.section-header h2 strong {
    color: #1f7a6e;
    font-weight: 700;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
    line-height: 1.6;
}

/* Steps Container */
.steps-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    align-items: start;
    position: relative;
}

/* Step Card */
.step-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(229, 231, 235, 0.6);
    animation: scaleIn 0.6s ease-out;
}

.step-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(63, 64, 121, 0.15);
    border-color: #74d1c6;
}

/* Step Number Badge */
.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #f5a623 0%, #e09412 100%);
    color: #ffffff;
    border-radius: 50%;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 25px;
    box-shadow: 0 8px 20px rgba(245, 166, 35, 0.3);
    animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Step Icon */
.step-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 140px;
    height: 140px;
    margin: 0 auto 25px;
    color: #74d1c6;
    animation: slideInUp 0.6s ease-out 0.1s both;
}

.step-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 12px rgba(116, 209, 198, 0.2));
    transition: all 0.4s ease;
}

.step-card:hover .step-icon svg {
    filter: drop-shadow(0 8px 24px rgba(116, 209, 198, 0.35));
    transform: scale(1.05) rotate(2deg);
}

/* Step Title */
.step-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: #3f4079;
    margin-bottom: 15px;
    margin-top: 15px;
    transition: color 0.3s ease;
}

.step-card:hover .step-title {
    color: #3f4079;
}

/* Step Description */
.step-description {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
    font-weight: 400;
}

/* ============================================================================
   RESPONSIVE DESIGN - TABLET (768px and below)
   ============================================================================ */

@media (max-width: 991px) {
    .steps-section {
        padding: 80px 0 60px;
    }

    .section-header {
        margin-bottom: 60px;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .steps-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .step-card {
        padding: 35px 25px;
    }

    .step-icon {
        max-width: 120px;
        height: 120px;
    }

    .step-title {
        font-size: 1.2rem;
    }
}

/* ============================================================================
   RESPONSIVE DESIGN - MOBILE (576px and below)
   ============================================================================ */

@media (max-width: 575px) {
    .steps-section {
        padding: 60px 0 45px;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .section-subtitle {
        font-size: 0.9rem;
        padding: 0 15px;
    }

    .step-card {
        padding: 30px 20px;
        border-radius: 12px;
    }

    .step-number {
        width: 50px;
        height: 50px;
        font-size: 24px;
        margin-bottom: 20px;
    }

    .step-icon {
        max-width: 100px;
        height: 100px;
        margin-bottom: 20px;
    }

    .step-title {
        font-size: 1.1rem;
        margin-top: 10px;
    }

    .step-description {
        font-size: 0.9rem;
    }
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation for cards */
.step-card:nth-child(1) {
    animation-delay: 0s;
}

.step-card:nth-child(3) {
    animation-delay: 0.15s;
}

.step-card:nth-child(5) {
    animation-delay: 0.3s;
}


/* ============================================================================
   CAPACITOR MOBILE APP - GLOBAL FIXES
   ============================================================================ */

/* 1. Body & Scroll Handling + Global Box Model Fix */
body.capacitor-app {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    max-width: 100vw !important;
    /* The app header is a normal sticky element (in flow), so no top padding is
       needed to clear it. The status-bar inset is handled natively. */
    padding-top: 0 !important;
}

/* Force consistent box-sizing to prevent overflow issues */
body.capacitor-app *,
body.capacitor-app *::before,
body.capacitor-app *::after {
    box-sizing: border-box !important;
}

body.capacitor-app {
    /* Opaque page background so the native app's purple window background only
       shows behind the status bar, never through empty content areas. */
    background-color: var(--bg-page);
}

body.capacitor-app main {
    /* The native app provides its own bottom navigation OUTSIDE the WebView, so
       the web content must NOT reserve space for a web bottom bar (that gap used
       to reveal the purple window background just above the native nav). */
    padding-bottom: 0 !important;
}

/* Override Bootstrap container/row that cause overflow */
body.capacitor-app .container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
    margin: 0 auto !important;
}

body.capacitor-app .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
}

/* Fix home page hero overflow */
body.capacitor-app .hero_home {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    width: 100% !important;
}

body.capacitor-app .hero_home .content {
    padding-left: 10px !important;
    padding-right: 10px !important;
    max-width: 100% !important;
}

body.capacitor-app .hero_home .container,
body.capacitor-app .hero_home .row {
    max-width: 100% !important;
    margin: 0 !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
}

/* Hide web-only elements */
body.capacitor-app footer,
body.capacitor-app #toTop,
body.capacitor-app .e-navlist-container {
    display: none !important;
}

/* 2. App header (new design): white fixed bar with the Tibse brand, safe-area top */
body.capacitor-app header.header_sticky,
body.capacitor-app header.header_sticky.sticky {
    background: #3f4079 !important;
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    height: 42px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    z-index: 99999 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

body.capacitor-app header.header_sticky .container {
    margin: 0 !important;
    padding: 0 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 42px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

body.capacitor-app header.header_sticky .site-header--app {
    background-color: #3f4079;
    width: auto !important;
    padding: 0 !important;
    justify-content: center !important;
}

/* Keep the app-header logo at a safe size */
body.capacitor-app header.header_sticky .site-header--app .site-header__brand img {
    height: 30px !important;
    width: auto !important;
    max-width: 130px !important;
    display: block !important;
}

/* Search results: the in-page search bar must stick just below the fixed app header */
body.capacitor-app .search-page .search-bar {
    top: calc(56px + env(safe-area-inset-top, 10px)) !important;
}

/* 3. Bottom Navigation - PREVENT HORIZONTAL OVERFLOW */
/* While an app modal is open it owns the screen — hide the fixed app chrome
   (its very high z-index otherwise paints over the modal's header/footer). */
body.capacitor-app.app-modal-open .capacitor-bottom-nav,
body.capacitor-app.app-modal-open header.header_sticky {
    display: none !important;
}

body.capacitor-app .capacitor-bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: auto !important;
    min-height: 75px !important;
    background: #ffffff !important;
    display: flex !important;
    justify-content: space-around !important;
    align-items: flex-start !important;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1) !important;
    z-index: 99998 !important; /* Just below header */
    padding-top: 8px !important;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 15px)) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 !important;
    border-top: 1px solid #f0f0f0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

body.capacitor-app .capacitor-bottom-nav .nav-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    color: #9ca3af !important;
    font-size: 11px !important;
    flex: 1 1 25% !important;
    max-width: 25% !important;
    height: 100% !important;
    padding: 8px 4px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

body.capacitor-app .capacitor-bottom-nav .nav-item i {
    font-size: 24px !important;
    margin-bottom: 3px !important;
    display: block !important;
}

body.capacitor-app .capacitor-bottom-nav .nav-item span {
    font-weight: 500 !important;
    display: block !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
}

body.capacitor-app .capacitor-bottom-nav .nav-item.active {
    color: #3f4079 !important;
}

body.capacitor-app .capacitor-bottom-nav .nav-item.active i {
    color: #3f4079 !important;
}

/* ==========================================================================
   Account area (templates/web/user/*)
   ========================================================================== */
:root {
    --acc-navy: #3f4079;
    --acc-pink: #74d1c6;       /* retired pink → teal accent (Direction 2) */
    --acc-teal-deep: #5cc4b8;
    --acc-ink: #2b2d42;
    --acc-muted: #8a8da3;
    --acc-line: #ececf3;
    --acc-soft: #f6f7fb;
}

/* Account shell + sidebar nav + mobile tab bar are owned by tibse.css. */
.account-nav__item i { font-size: 18px; line-height: 1; }

/* ---- Account information form + save action ---- */
.e-profile .form-group { margin-bottom: 1rem; }
.e-profile .form-group label { font-weight: 600; font-size: 13.5px; color: #5b5d72; margin-bottom: 4px; }
.e-profile .form-control { border-radius: 10px; padding: 10px 12px; }

.account-form__actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--acc-line);
}
.account-save-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    background: var(--acc-pink);
    color: #1b1c33;
    border: none;
    border-radius: 11px;
    padding: 12px 24px;
    font-weight: 700;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 10px 22px -12px rgba(63, 64, 121, 0.55);
    transition: background .18s ease, transform .15s ease, box-shadow .18s ease;
}
.account-save-btn i { font-size: 19px; }
.account-save-btn:hover { background: var(--acc-teal-deep); transform: translateY(-1px); box-shadow: 0 14px 26px -12px rgba(63, 64, 121, 0.6); }
.account-save-btn:active { transform: translateY(0); }
.account-save-btn:focus-visible { outline: 3px solid rgba(63, 64, 121, 0.4); outline-offset: 2px; }

@media (max-width: 575.98px) {
    .account-form__actions { justify-content: stretch; }
    .account-save-btn { width: 100%; }
}

/* Native app: flatten the auth (login/register) card so it reads as a native
   screen rather than a floating web card — drop the rounded corners + shadow. */
body.capacitor-app #login.auth-split,
body.capacitor-app #register.auth-split {
    border-radius: 0;
    box-shadow: none;
}
body.capacitor-app #login .auth-split__main,
body.capacitor-app #register .auth-split__main {
    padding: 22px 18px;
}
body.capacitor-app #login .box_form > div:first-child,
body.capacitor-app #register .box_form > div:first-child {
    margin-top: 0;
}

