/* ============================================================
   קלפי אימון אהרן בס - עיצוב ראשי
   RTL | Bootstrap 5 | Hebrew
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@300;400;600;700;800&family=Heebo:wght@300;400;600;700;900&display=swap');

:root {
    --primary:       #7c3aed;
    --primary-dark:  #5b21b6;
    --primary-light: #ede9fe;
    --secondary:     #f59e0b;
    --secondary-dark:#d97706;
    --accent:        #ec4899;
    --dark:          #1e1b4b;
    --gray-soft:     #f8f7ff;
    --text-main:     #2d2b55;
    --text-muted:    #6b7280;
    --border-color:  #e5e7eb;
    --shadow-sm:     0 2px 8px rgba(124,58,237,.08);
    --shadow-md:     0 8px 24px rgba(124,58,237,.14);
    --shadow-lg:     0 20px 60px rgba(124,58,237,.18);
    --radius-sm:     8px;
    --radius-md:     16px;
    --radius-lg:     24px;
    --radius-xl:     32px;
    --transition:    .3s cubic-bezier(.4,0,.2,1);
}

/* ---- Base ---- */
* { box-sizing: border-box; }

html {
    direction: rtl;
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Assistant', 'Heebo', Arial, sans-serif;
    background: #fff;
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Heebo', 'Assistant', Arial, sans-serif;
    font-weight: 700;
    line-height: 1.3;
    color: var(--dark);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover { color: var(--primary-dark); }

img { max-width: 100%; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--gray-soft); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    background: rgba(255,255,255,.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 20px rgba(124,58,237,.1);
    padding: 12px 0;
    transition: all var(--transition);
}

.navbar-brand {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary) !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-brand span.brand-sub {
    font-size: .8rem;
    font-weight: 400;
    color: var(--text-muted);
    display: block;
    line-height: 1.1;
}

.navbar .nav-link {
    font-weight: 600;
    color: var(--text-main) !important;
    padding: 8px 16px !important;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--primary) !important;
    background: var(--primary-light);
}

.btn-nav-login {
    border: 2px solid var(--primary);
    color: var(--primary) !important;
    border-radius: 50px !important;
    padding: 6px 20px !important;
}

.btn-nav-login:hover {
    background: var(--primary);
    color: #fff !important;
}

.btn-nav-cta {
    background: var(--primary);
    color: #fff !important;
    border-radius: 50px !important;
    padding: 8px 24px !important;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.btn-nav-cta:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 40%, #7c3aed 70%, #a855f7 100%);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 100px 0 60px;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='50' cy='50' r='40' fill='none' stroke='rgba(255,255,255,0.04)' stroke-width='1'/%3E%3C/svg%3E") repeat;
    pointer-events: none;
}

.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

.hero-blob-1 {
    width: 500px; height: 500px;
    background: rgba(168,85,247,.3);
    top: -150px; left: -150px;
}

.hero-blob-2 {
    width: 400px; height: 400px;
    background: rgba(236,72,153,.2);
    bottom: -100px; right: -100px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: .9rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    color: #fff;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-title .highlight {
    color: var(--secondary);
    position: relative;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255,255,255,.85);
    margin-bottom: 36px;
    max-width: 560px;
}

.hero-stats {
    display: flex;
    gap: 32px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
    color: #fff;
}

.hero-stat .stat-number {
    font-size: 2rem;
    font-weight: 900;
    color: var(--secondary);
    display: block;
}

.hero-stat .stat-label {
    font-size: .85rem;
    color: rgba(255,255,255,.75);
}

/* Card float animation */
.hero-cards-visual {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-card {
    position: absolute;
    width: 180px;
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 20px;
    text-align: center;
    animation: float 6s ease-in-out infinite;
    transition: transform var(--transition);
    cursor: pointer;
}

.floating-card:nth-child(1) { top: 20px;  right: 20px;  animation-delay: 0s;   }
.floating-card:nth-child(2) { top: 120px; left: 30px;   animation-delay: 1.5s; }
.floating-card:nth-child(3) { bottom: 80px; right: 60px; animation-delay: 3s;  }
.floating-card:nth-child(4) { bottom: 20px; left: 80px;  animation-delay: 4.5s;}

.floating-card .card-icon { font-size: 2.5rem; margin-bottom: 10px; }
.floating-card .card-title { font-size: .85rem; font-weight: 700; color: var(--dark); }
.floating-card .card-cat { font-size: .75rem; color: var(--text-muted); }

@keyframes float {
    0%, 100% { transform: translateY(0)    rotate(0deg); }
    33%       { transform: translateY(-16px) rotate(2deg); }
    66%       { transform: translateY(-8px)  rotate(-1deg); }
}

/* ============================================================
   SECTION COMMONS
   ============================================================ */
.section-pad { padding: 100px 0; }

.section-label {
    display: inline-block;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary);
    background: var(--primary-light);
    padding: 6px 16px;
    border-radius: 50px;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how-section { background: var(--gray-soft); }

.step-card {
    text-align: center;
    padding: 40px 30px;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    height: 100%;
    position: relative;
}

.step-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.step-number {
    width: 60px; height: 60px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.step-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    color: var(--primary);
}

.step-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--dark);
}

/* ============================================================
   CATEGORIES / DECKS
   ============================================================ */
.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 50px;
    border: 2px solid var(--border-color);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    background: #fff;
    color: var(--text-main);
}

.category-pill:hover,
.category-pill.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

/* Deck card */
.deck-card {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    background: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.deck-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.deck-card-cover {
    height: 200px;
    background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.deck-card-cover img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.deck-card-cover .deck-icon-placeholder {
    font-size: 4rem;
    color: rgba(255,255,255,.6);
}

.deck-card-cover .deck-badge-free {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--secondary);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 50px;
}

.deck-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.deck-card-category {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin-bottom: 8px;
}

.deck-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
}

.deck-card-desc {
    font-size: .9rem;
    color: var(--text-muted);
    flex: 1;
    margin-bottom: 16px;
}

.deck-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.deck-card-count {
    font-size: .85rem;
    color: var(--text-muted);
}

/* ============================================================
   CARD VIEWER (cards.php / card-view.php)
   ============================================================ */
.card-viewer-wrap {
    min-height: 100vh;
    background: var(--gray-soft);
    padding: 80px 0 60px;
}

.card-item {
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition);
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.card-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-md);
}

.card-item .card-inner {
    padding: 24px;
    text-align: center;
    width: 100%;
}

.card-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

.card-item .card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(30,27,75,.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding: 20px;
    opacity: 0;
    transition: opacity var(--transition);
}

.card-item:hover .card-overlay { opacity: 1; }

/* Flip card */
.flip-card-container {
    width: 340px;
    height: 500px;
    perspective: 1200px;
    margin: 0 auto;
}

.flip-card-inner {
    position: relative;
    width: 100%; height: 100%;
    transform-style: preserve-3d;
    transition: transform .7s cubic-bezier(.4,0,.2,1);
}

.flip-card-inner.flipped { transform: rotateY(180deg); }

.flip-card-front,
.flip-card-back {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    backface-visibility: hidden;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.flip-card-front {
    background: linear-gradient(145deg, var(--primary) 0%, #a855f7 100%);
}

.flip-card-back {
    background: #fff;
    transform: rotateY(180deg);
    padding: 32px;
    text-align: center;
}

.flip-card-front .card-img-full {
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: .9;
}

.flip-card-front .card-front-content {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 32px 24px 24px;
    background: linear-gradient(to top, rgba(0,0,0,.75), transparent);
    color: #fff;
    text-align: center;
}

.flip-card-back .card-back-text {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark);
    line-height: 1.6;
}

/* Random draw button */
.btn-draw {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 16px 48px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 8px 24px rgba(124,58,237,.35);
}

.btn-draw:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 16px 40px rgba(124,58,237,.45);
    color: #fff;
}

.btn-draw:active { transform: scale(.97); }

/* ============================================================
   PRICING
   ============================================================ */
.pricing-section { background: var(--gray-soft); }

.plan-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: all var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.plan-card:hover {
    border-color: var(--primary);
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.plan-card.featured {
    border-color: var(--primary);
    background: linear-gradient(145deg, var(--primary), var(--primary-dark));
    color: #fff;
    transform: scale(1.04);
}

.plan-card.featured h3,
.plan-card.featured .plan-price,
.plan-card.featured .plan-period,
.plan-card.featured .plan-features li {
    color: #fff;
}

.plan-badge {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: 50px;
    white-space: nowrap;
}

.plan-name {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.plan-price {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
    margin: 24px 0 4px;
}

.plan-price .currency {
    font-size: 1.3rem;
    vertical-align: super;
}

.plan-period {
    font-size: .9rem;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
    text-align: right;
    flex: 1;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,.06);
    font-size: .95rem;
}

.plan-features li i {
    color: #10b981;
    flex-shrink: 0;
}

.plan-card.featured .plan-features li i { color: #6ee7b7; }

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonial-section { background: #fff; }

.testimonial-card {
    background: var(--gray-soft);
    border-radius: var(--radius-lg);
    padding: 32px;
    position: relative;
    height: 100%;
}

.testimonial-card::before {
    content: '"';
    font-size: 5rem;
    color: var(--primary);
    opacity: .15;
    position: absolute;
    top: 8px;
    right: 24px;
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-main);
    margin-bottom: 20px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonial-avatar {
    width: 50px; height: 50px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 700;
    flex-shrink: 0;
}

.testimonial-author img {
    width: 50px; height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-name { font-weight: 700; font-size: .95rem; }
.testimonial-role { font-size: .82rem; color: var(--text-muted); }

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-section { background: var(--primary-light); }

.about-image-wrap {
    position: relative;
    display: inline-block;
}

.about-image-wrap img {
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
}

.about-badge-float {
    position: absolute;
    bottom: -20px;
    left: -20px;
    background: var(--secondary);
    color: #fff;
    border-radius: var(--radius-md);
    padding: 16px 24px;
    box-shadow: var(--shadow-md);
    text-align: center;
    font-weight: 700;
}

.about-badge-float .badge-number {
    font-size: 2rem;
    display: block;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary-custom {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 14px 40px;
    font-size: 1rem;
    font-weight: 700;
    transition: all var(--transition);
    box-shadow: 0 4px 14px rgba(124,58,237,.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary-custom:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(124,58,237,.4);
}

.btn-secondary-custom {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 50px;
    padding: 12px 36px;
    font-size: 1rem;
    font-weight: 700;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary-custom:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

.btn-white {
    background: #fff;
    color: var(--primary);
    border: none;
    border-radius: 50px;
    padding: 14px 40px;
    font-size: 1rem;
    font-weight: 700;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(0,0,0,.15);
}

.btn-white:hover {
    background: var(--primary-light);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-google {
    background: #fff;
    color: #3c4043;
    border: 1px solid #dadce0;
    border-radius: 50px;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all var(--transition);
    width: 100%;
    justify-content: center;
    cursor: pointer;
}

.btn-google:hover {
    background: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
    color: #3c4043;
}

.btn-google img {
    width: 22px; height: 22px;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-control, .form-select {
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-color);
    padding: 12px 16px;
    font-size: 1rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    background: #fff;
    color: var(--text-main);
    font-family: 'Assistant', Arial, sans-serif;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(124,58,237,.1);
    outline: none;
}

.form-label {
    font-weight: 600;
    font-size: .9rem;
    color: var(--text-main);
    margin-bottom: 6px;
}

.input-group-text {
    border: 2px solid var(--border-color);
    background: var(--gray-soft);
    color: var(--primary);
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.invalid-feedback { font-size: .85rem; }

/* Auth card */
.auth-card {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    box-shadow: var(--shadow-lg);
    max-width: 480px;
    width: 100%;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: .85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* ============================================================
   DASHBOARD / MEMBER AREA
   ============================================================ */
.dashboard-wrap {
    background: var(--gray-soft);
    min-height: 100vh;
    padding: 80px 0 60px;
}

.dashboard-sidebar {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 80px;
}

.dash-user-info {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.dash-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.dash-nav .nav-link {
    color: var(--text-main);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all var(--transition);
}

.dash-nav .nav-link:hover,
.dash-nav .nav-link.active {
    background: var(--primary-light);
    color: var(--primary);
}

.subscription-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #d1fae5;
    color: #065f46;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: .8rem;
    font-weight: 700;
}

.subscription-badge.expired {
    background: #fee2e2;
    color: #991b1b;
}

/* ============================================================
   ADMIN
   ============================================================ */
.admin-sidebar {
    background: var(--dark);
    min-height: 100vh;
    padding: 20px 0;
    position: fixed;
    right: 0;
    top: 0;
    width: 260px;
    z-index: 1000;
    overflow-y: auto;
}

.admin-sidebar .sidebar-brand {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 800;
    padding: 16px 24px 24px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    display: block;
    text-decoration: none;
}

.admin-sidebar .sidebar-brand span {
    display: block;
    font-size: .75rem;
    font-weight: 400;
    opacity: .6;
    margin-top: 2px;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,.7);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    transition: all var(--transition);
    border-right: 3px solid transparent;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,.08);
    border-right-color: var(--primary);
}

.admin-sidebar .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.admin-sidebar .sidebar-heading {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255,255,255,.35);
    padding: 20px 24px 8px;
}

.admin-content {
    margin-right: 260px;
    min-height: 100vh;
    background: var(--gray-soft);
}

.admin-topbar {
    background: #fff;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-page-content { padding: 32px; }

/* Stat cards */
.stat-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 28px 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 60px; height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-icon.purple  { background: var(--primary-light); color: var(--primary); }
.stat-icon.amber   { background: #fef3c7;              color: #d97706; }
.stat-icon.green   { background: #d1fae5;              color: #059669; }
.stat-icon.rose    { background: #ffe4e6;              color: #e11d48; }

.stat-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--dark);
    line-height: 1;
}

.stat-label {
    font-size: .85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Admin tables */
.admin-table-wrap {
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.admin-table-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.table { margin: 0; }
.table th {
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-muted);
    font-weight: 700;
    padding: 14px 20px;
    border-bottom: 2px solid var(--border-color);
    background: var(--gray-soft);
}

.table td {
    padding: 14px 20px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    font-size: .95rem;
}

.table tbody tr:hover { background: var(--gray-soft); }

/* Card image upload */
.upload-area {
    border: 2px dashed var(--primary);
    border-radius: var(--radius-md);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--primary-light);
}

.upload-area:hover { background: #ddd6fe; }
.upload-area i { font-size: 2.5rem; color: var(--primary); margin-bottom: 12px; }

/* ============================================================
   ALERTS / TOASTS
   ============================================================ */
.toast-container { z-index: 9999; }

.alert-custom {
    border-radius: var(--radius-md);
    border: none;
    padding: 16px 20px;
    font-weight: 600;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    background: var(--dark);
    color: rgba(255,255,255,.8);
    padding: 64px 0 0;
}

footer h5 {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
}

footer a {
    color: rgba(255,255,255,.65);
    transition: color var(--transition);
}

footer a:hover { color: #fff; }

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px; height: 42px;
    background: rgba(255,255,255,.1);
    border-radius: 50%;
    color: #fff;
    transition: all var(--transition);
    font-size: 1.1rem;
}

.footer-social a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 20px 0;
    margin-top: 48px;
    font-size: .85rem;
    color: rgba(255,255,255,.45);
    text-align: center;
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-content {
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 20px 24px;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 16px 24px;
}

/* ============================================================
   LOCKED OVERLAY
   ============================================================ */
.locked-overlay {
    position: absolute;
    inset: 0;
    background: rgba(30,27,75,.85);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.locked-overlay i { font-size: 2rem; margin-bottom: 8px; }
.locked-overlay p { font-size: .85rem; margin: 0; }

/* ============================================================
   BADGES & TAGS
   ============================================================ */
.badge-purple  { background: var(--primary-light);  color: var(--primary);  }
.badge-amber   { background: #fef3c7;               color: #92400e;         }
.badge-green   { background: #d1fae5;               color: #065f46;         }
.badge-rose    { background: #ffe4e6;               color: #9f1239;         }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991.98px) {
    .hero-cards-visual { display: none; }
    .hero-section      { text-align: center; }
    .hero-stats        { justify-content: center; }
    .hero-subtitle     { margin: 0 auto 32px; }
}

@media (max-width: 767.98px) {
    .section-pad { padding: 64px 0; }
    .plan-card.featured { transform: scale(1); }
    .auth-card { padding: 32px 24px; }
    .flip-card-container { width: 280px; height: 420px; }
}

/* ============================================================
   ADMIN — MOBILE RESPONSIVE OVERHAUL
   ============================================================ */

/* Sidebar transitions */
.admin-sidebar {
    transition: transform .3s cubic-bezier(.4,0,.2,1);
}

/* Mobile: hide sidebar by default */
@media (max-width: 991.98px) {
    .admin-sidebar {
        transform: translateX(100%);
        box-shadow: none;
    }

    body.sidebar-open .admin-sidebar {
        transform: translateX(0);
        box-shadow: -8px 0 32px rgba(0,0,0,.35);
    }

    /* Overlay */
    body.sidebar-open::after {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.5);
        z-index: 999;
    }

    .admin-content {
        margin-right: 0 !important;
    }

    .admin-topbar {
        position: sticky;
        top: 0;
        z-index: 100;
        padding: 0 16px;
    }

    .admin-page-content {
        padding: 16px;
    }

    /* Hide sidebar on mobile topbar btn */
    .btn-sidebar-toggle {
        display: flex !important;
    }

    /* Tables scroll */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Stat cards 2 per row */
    .stat-card {
        flex-direction: column;
        text-align: center;
        padding: 20px 12px;
    }

    .stat-icon {
        margin: 0 auto 8px;
    }

    /* Admin table header wrap */
    .admin-table-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 12px;
    }

    .admin-table-header form {
        width: 100%;
    }

    /* Plan cards stacked */
    .plan-card.featured {
        transform: none !important;
    }
}

/* Hamburger button — hidden on desktop */
.btn-sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    color: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.2rem;
    cursor: pointer;
    transition: background var(--transition);
}

.btn-sidebar-toggle:hover {
    background: var(--primary);
    color: #fff;
}

/* Close button inside sidebar (mobile only) */
.sidebar-close-btn {
    display: none;
    position: absolute;
    top: 16px;
    left: 16px;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,.15);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

@media (max-width: 991.98px) {
    .sidebar-close-btn {
        display: flex;
    }
}

/* Topbar title smaller on mobile */
@media (max-width: 575px) {
    .admin-topbar h5 {
        font-size: .95rem;
    }

    .admin-page-content {
        padding: 12px;
    }

    .stat-value {
        font-size: 1.5rem;
    }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s ease, transform .6s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.pulse-ring {
    animation: pulseRing 2s cubic-bezier(.4,0,.6,1) infinite;
}

@keyframes pulseRing {
    0%, 100% { opacity: 1;   transform: scale(1); }
    50%       { opacity: .6; transform: scale(1.05); }
}

/* spin for loading */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.spin { animation: spin .8s linear infinite; }

/* ============================================================
   UTILITIES
   ============================================================ */
.text-primary-custom { color: var(--primary) !important; }
.text-secondary-custom { color: var(--secondary) !important; }
.bg-primary-custom { background: var(--primary) !important; }
.bg-soft { background: var(--gray-soft) !important; }
.rounded-custom { border-radius: var(--radius-md) !important; }
.shadow-custom { box-shadow: var(--shadow-md) !important; }
.cursor-pointer { cursor: pointer; }

/* Fix Bootstrap RTL overrides */
.ms-auto { margin-right: auto !important; margin-left: 0 !important; }
.me-auto { margin-left: auto !important; margin-right: 0 !important; }

/* ============================================================
   COOKIE CONSENT BANNER
   ============================================================ */
#cookieBanner {
    position: fixed;
    bottom: -120px;
    left: 0; right: 0;
    z-index: 99999;
    background: #1e1b4b;
    color: #fff;
    padding: 16px 24px;
    transition: bottom .4s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 -4px 24px rgba(0,0,0,.25);
}

#cookieBanner.show { bottom: 0; }

#cookieBanner .cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

#cookieBanner .cookie-text {
    font-size: .9rem;
    color: rgba(255,255,255,.85);
    flex: 1;
}

#cookieBanner .cookie-text i { color: var(--secondary); }

#cookieBanner .cookie-text a {
    color: #a5b4fc;
    text-decoration: underline;
}

#cookieBanner .cookie-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.btn-cookie-accept {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 10px 28px;
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition);
    white-space: nowrap;
}

.btn-cookie-accept:hover { background: var(--primary-dark); }

.btn-cookie-more {
    color: rgba(255,255,255,.6);
    font-size: .85rem;
    text-decoration: underline;
    white-space: nowrap;
}

.btn-cookie-more:hover { color: #fff; }

@media (max-width: 575px) {
    #cookieBanner .cookie-content { flex-direction: column; align-items: flex-start; }
}
