/* ===============================
   CONTENT GATE CSS
   Plug & Play for Case Studies
================================ */

/* PREVIEW BLUR (teaser of locked content) */
.cs-gate-blur {
    --cs-blur-height: 250px;  /* default preview height */
    --cs-blur-spacing: 2.5rem;
    max-height: var(--cs-blur-height);
    margin-bottom: var(--cs-blur-spacing);
    filter: blur(5px);
    overflow: hidden;
    position: relative;
    pointer-events: none;
    user-select: none;
}

.cs-gate-blur::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.85) 60%,
            #fff 100%);
}

/* HIDDEN CONTENT UNTIL UNLOCKED */
.cs-gate-hidden {
    display: none;
}

/* FORM (initially hidden, reveal smoothly) */
.cs-gate-form {
    padding: 25px 20px;
    background: #fafafa;
    max-width: 650px;
    margin: 0 auto;
}

/* AFTER UNLOCK */
.cs-gate.unlocked .cs-gate-blur {
    filter: none;
    max-height: none;
    overflow: visible;
    pointer-events: auto;
    user-select: text;
}

.cs-gate.unlocked .cs-gate-blur::after {
    display: none;
}

.cs-gate.unlocked .cs-gate-hidden {
    display: block;
}

.cs-gate.unlocked .cs-gate-form {
    display: none !important;
}

/* UNLOCK FORM WRAPPER (controls visibility & animation) */
.cs-gate-unlock-wrapper {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .35s ease, transform .35s ease;
    margin-bottom: 40px;
}

.cs-gate-unlock-wrapper.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.cs-gate.unlocked .cs-gate-unlock-wrapper {
  display: none !important;
}

/* ===============================
   SIDEBAR DRAWER FORM
================================ */

/* Sticky trigger button on right side */
.cs-gate-sticky-btn {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    background: #0a66c2;
    color: #fff;
    border: none;
    padding: 22px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.6px;
    cursor: pointer;
    white-space: nowrap;
    border-radius: 8px 0 0 8px;
    box-shadow: -3px 0 14px rgba(0, 0, 0, 0.18);
    transition: background 0.2s ease;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    /* no flex — let writing-mode handle inline flow */
}

.cs-gate-sticky-btn:hover {
    background: #084f9a;
}

/* Download icon inside vertical button */
.cs-sticky-btn-icon {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 1rem;
    /* Rotate FA icon so it points correctly in vertical-rl context */
    transform: rotate(90deg);
}


/* Hide sticky button when unlocked */
.cs-gate.unlocked .cs-gate-sticky-btn {
    display: none !important;
}

/* Overlay backdrop */
.cs-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1100;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cs-sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Sidebar drawer panel */
.cs-gate-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    max-width: 100vw;
    height: 100%;
    background: #fff;
    z-index: 1200;
    overflow-y: auto;
    box-shadow: -4px 0 30px rgba(0,0,0,0.15);
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.cs-gate-sidebar.open {
    right: 0;
}

.cs-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e8ecf0;
    background: #0a66c2;
    color: #fff;
    flex-shrink: 0;
}

.cs-sidebar-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.cs-sidebar-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #fff;
    padding: 4px;
    line-height: 1;
    border-radius: 4px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-sidebar-close:hover {
    background: rgba(255,255,255,0.2);
}

.cs-sidebar-body {
    padding: 28px 24px;
    flex: 1;
}

.cs-sidebar-body .cs-sidebar-desc {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* Form fields inside sidebar */
.cs-gate-sidebar .form-control {
    width: 100%;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 0.9rem;
    color: #222;
    outline: none;
    transition: border-color 0.2s;
    background: #fafbfc;
}

.cs-gate-sidebar .form-control:focus {
    border-color: #0a66c2;
    background: #fff;
}

.cs-gate-sidebar .form-group {
    margin-bottom: 22px;
    position: relative;
}

/* Validation error labels generated by jQuery Validate */
.cs-gate-sidebar label.error {
    display: block;
    margin-top: 5px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #d9534f;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.4;
}

.cs-gate-sidebar .form-control.error {
    border-color: #d9534f;
    background-color: #fff8f8;
}

.cs-gate-sidebar .form-button {
    margin-top: 20px;
}

.cs-gate-sidebar .defult-btn {
    width: 100%;
    justify-content: center;
}

.cs-gate-sidebar .g-recaptcha {
    transform: scale(0.88);
    transform-origin: left top;
}

/* Hide sidebar form when unlocked */
.cs-gate.unlocked .cs-gate-sidebar {
    display: none !important;
}

@media (max-width: 480px) {
    .cs-gate-sidebar {
        width: 100vw;
        right: -100vw;
    }
}