/* =====================================================
   FILE: success-stories/design.css
   MODULE: Success Stories Page
   PURPOSE: Premium Unified Frontend Design
   STATUS: Production Ready
   VERSION: v4.8 - Stats Reordered & 4 Cards Per View
===================================================== */

/* =====================================================
   DESIGN TOKENS (HOMEPAGE MASTER REFERENCE)
===================================================== */

:root {
    --navy: #14213D;
    --navy-soft: #1E315A;
    --navy-lighter: #2A3F62;
    --gold: #C8A951;
    --gold-light: #E6C97A;
    --gold-dark: #B8963E;
    --gold-gradient: linear-gradient(135deg, #C8A951 0%, #E6C97A 50%, #C8A951 100%);
    --gold-gradient-shine: linear-gradient(135deg, #C8A951 0%, #F3E5AB 25%, #C8A951 50%, #F3E5AB 75%, #C8A951 100%);
    --teal: #0F6A64;
    --teal-light: #1A8A82;
    --teal-gradient: linear-gradient(135deg, #0F6A64 0%, #1A8A82 100%);
    --white: #FFFFFF;
    --bg: #F7F4EE;
    --cream: #FDFBF7;
    --muted: #6B7280;
    --border: #EAEAEA;
    --shadow-sm: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 20px 35px -8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 30px 50px -12px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 40px 60px -15px rgba(0, 0, 0, 0.2);
    --shadow-gold: 0 20px 40px -10px rgba(200, 169, 81, 0.3);
    --shadow-gold-lg: 0 30px 60px -12px rgba(200, 169, 81, 0.25);
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --transition-premium: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* =====================================================
   GLOBAL
===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--navy);
    overflow-x: hidden;
    font-family: 'Figtree', sans-serif;
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6,
.section-title,
.card-title,
.modal-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.counter,
.stat-number,
.metric-number {
    font-family: 'Figtree', sans-serif !important;
    font-variant-numeric: tabular-nums;
}

/* Story Code - Clean Sans-Serif (not Playfair) */
.story-code {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.2;
    color: var(--navy);
    font-style: normal;
    text-transform: uppercase;
}

/* =====================================================
   ANIMATIONS
===================================================== */

@keyframes heroShine {
    0% { transform: translateX(-100%) skewX(-15deg); }
    100% { transform: translateX(200%) skewX(-15deg); }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes float-slow {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(2deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes glowPulse {
    0% { box-shadow: 0 0 0 0 rgba(200, 169, 81, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(200, 169, 81, 0); }
    100% { box-shadow: 0 0 0 0 rgba(200, 169, 81, 0); }
}

@keyframes cardHover {
    0% { transform: translateY(0); }
    100% { transform: translateY(-12px); }
}

@keyframes goldShine {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes borderPulse {
    0% { border-color: rgba(200, 169, 81, 0.2); }
    50% { border-color: rgba(200, 169, 81, 0.6); }
    100% { border-color: rgba(200, 169, 81, 0.2); }
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reveal Animation Classes */
.reveal {
    opacity: 0;
    visibility: hidden;
    will-change: transform, opacity;
}

.reveal.revealed {
    opacity: 1;
    visibility: visible;
}

.reveal.revealed.fade-in-up {
    animation: fadeInUp 0.8s var(--transition-smooth) forwards;
}

.reveal.revealed.fade-in-left {
    animation: fadeInLeft 0.8s var(--transition-smooth) forwards;
}

.reveal.revealed.fade-in-right {
    animation: fadeInRight 0.8s var(--transition-smooth) forwards;
}

.reveal.revealed.scale-in {
    animation: scaleIn 0.6s var(--transition-smooth) forwards;
}

/* Stagger Animations */
.stagger-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s var(--transition-smooth), transform 0.6s var(--transition-smooth);
}

.stagger-item.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* =====================================================
   HERO SECTION - PREMIUM LUXURY
===================================================== */

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 220px 0 180px;
    text-align: center;
    background: linear-gradient(135deg, var(--navy) 0%, var(--teal) 50%, var(--navy-soft) 100%);
    isolation: isolate;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(200, 169, 81, 0.12), transparent 60%),
                repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.03) 8px);
    pointer-events: none;
}

.page-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: skewX(-15deg);
    animation: heroShine 12s linear infinite;
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(200, 169, 81, 0.12);
    backdrop-filter: blur(12px);
    padding: 10px 24px;
    border-radius: 999px;
    margin-bottom: 30px;
    border: 1px solid rgba(200, 169, 81, 0.4);
    animation: fadeInUp 0.8s var(--transition-smooth) forwards;
}

.hero-badge i {
    color: var(--gold);
    font-size: 14px;
}

.hero-badge span {
    color: var(--gold-light);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.page-hero h1 {
    font-size: clamp(3.5rem, 6vw, 6rem);
    color: var(--gold);
    margin-bottom: 20px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s var(--transition-smooth) 0.1s forwards;
    opacity: 0;
    transform: translateY(30px);
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
}

.page-hero .lead {
    color: rgba(255,255,255,0.95);
    font-size: 1.35rem;
    max-width: 760px;
    margin: auto;
    line-height: 1.8;
    animation: fadeInUp 0.8s var(--transition-smooth) 0.2s forwards;
    opacity: 0;
    transform: translateY(30px);
}

.hero-divider {
    width: 120px;
    height: 3px;
    background: var(--gold-gradient);
    border-radius: 999px;
    margin: 30px auto 0;
    animation: fadeInUp 0.8s var(--transition-smooth) 0.3s forwards;
    opacity: 0;
    position: relative;
}

.hero-divider::before,
.hero-divider::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--gold);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}

.hero-divider::before {
    left: -15px;
}

.hero-divider::after {
    right: -15px;
}

.trust-badge {
    position: absolute;
    bottom: 40px;
    right: 40px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(12px);
    padding: 14px 28px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid rgba(200, 169, 81, 0.4);
    animation: float 4s ease-in-out infinite;
    z-index: 5;
}

.trust-badge i {
    color: var(--gold);
    font-size: 22px;
}

.trust-badge span {
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .page-hero {
        padding: 160px 0 120px;
    }
    
    .hero-badge {
        padding: 6px 16px;
        margin-bottom: 20px;
    }
    
    .hero-badge span {
        font-size: 11px;
    }
    
    .trust-badge {
        bottom: 20px;
        right: 20px;
        padding: 10px 18px;
    }
    
    .trust-badge i {
        font-size: 16px;
    }
    
    .trust-badge span {
        font-size: 11px;
    }
}

/* =====================================================
   STATS SECTION - PREMIUM DARK LUXURY WITH OVERLAP
   Adjusted for 4 cards - moved downward
===================================================== */

.stats-section {
    margin-top: -40px;
    position: relative;
    z-index: 10;
    padding-bottom: 60px;
    margin-bottom: 20px;
}

.counter-container {
    background: var(--navy);
    border-radius: 36px;
    padding: 45px 20px;
    box-shadow: var(--shadow-xl);
    transition: all 0.5s var(--transition-premium);
    border: 1px solid rgba(200, 169, 81, 0.35);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(4px);
}

.counter-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gold-gradient);
    transform: scaleX(0);
    transition: transform 0.5s var(--transition-premium);
    transform-origin: left;
}

.counter-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(200,169,81,0.15), transparent);
    opacity: 0;
    transition: opacity 0.5s var(--transition-premium);
    pointer-events: none;
}

.counter-container:hover::before {
    transform: scaleX(1);
}

.counter-container:hover::after {
    opacity: 1;
}

.counter-container:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-xl), var(--shadow-gold);
    border-color: rgba(200, 169, 81, 0.6);
    background: var(--navy-soft);
}

.counter {
    font-size: 3.8rem;
    font-weight: 800;
    background: var(--gold-gradient-shine);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 2px;
    animation: countUp 0.6s var(--transition-premium);
}

.counter[data-counted="true"] {
    animation: goldShine 3s linear infinite;
}

.counter-label {
    color: rgba(255,255,255,0.85);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 15px;
    position: relative;
    display: inline-block;
}

@media (max-width: 992px) {
    .counter {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .stats-section {
        margin-top: -25px;
        padding-bottom: 40px;
        margin-bottom: 10px;
    }
    
    .counter-container {
        padding: 30px 15px;
        border-radius: 28px;
    }
    
    .counter {
        font-size: 2.2rem;
    }
    
    .counter-label {
        font-size: 12px;
    }
}

/* =====================================================
   SECTION STYLES
===================================================== */

.section {
    padding: 80px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 70px;
}

.section-title {
    font-size: clamp(2.6rem, 5vw, 4.2rem);
    color: var(--navy);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    background: linear-gradient(135deg, var(--navy) 0%, var(--teal) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-subtitle {
    color: var(--muted);
    font-size: 1.15rem;
    line-height: 1.8;
    max-width: 800px;
    margin: auto;
}

.section-divider {
    width: 120px;
    height: 4px;
    background: var(--gold-gradient);
    border-radius: 999px;
    margin: 25px auto;
    position: relative;
}

.section-divider::before,
.section-divider::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--gold);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}

.section-divider::before {
    left: -18px;
}

.section-divider::after {
    right: -18px;
}

/* =====================================================
   STORY CARD - PREMIUM LUXURY (4 Cards Layout)
===================================================== */

.stories-grid-section {
    background: linear-gradient(180deg, var(--bg) 0%, var(--cream) 100%);
    padding-top: 60px;
}

.story-card {
    background: var(--white);
    border-radius: 32px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.5s var(--transition-premium);
    height: 100%;
    position: relative;
    border: 1px solid rgba(200, 169, 81, 0.15);
    display: flex;
    flex-direction: column;
}

.story-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(200, 169, 81, 0.08) 100%);
    opacity: 0;
    transition: opacity 0.5s var(--transition-premium);
    pointer-events: none;
    z-index: 1;
    border-radius: 32px;
}

/* Removed the top gold separator line */
.story-card::after {
    display: none;
}

.story-card:hover::before {
    opacity: 1;
}

.story-card:hover {
    transform: translateY(-16px);
    box-shadow: var(--shadow-xl), var(--shadow-gold-lg);
    border-color: rgba(200, 169, 81, 0.3);
}

.card-img-wrapper {
    height: 260px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, var(--navy-lighter), var(--teal));
}

.card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.8s var(--transition-premium);
    opacity: 1;
}

.card-img-top.loaded {
    opacity: 1;
}

.story-card:hover .card-img-top {
    transform: scale(1.12);
}

.country-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(10px);
    padding: 8px 18px;
    border-radius: 999px;
    color: var(--gold);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    z-index: 3;
    transition: all 0.3s var(--transition-smooth);
}

.country-badge i {
    margin-right: 6px;
    font-size: 11px;
}

.story-card:hover .country-badge {
    background: var(--gold);
    color: var(--navy);
    transform: translateY(-2px);
}

.user-id-badge {
    position: absolute;
    bottom: 18px;
    left: 18px;
    background: rgba(20,33,61,0.85);
    backdrop-filter: blur(10px);
    padding: 6px 14px;
    border-radius: 999px;
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
    font-family: monospace;
    letter-spacing: 0.5px;
    z-index: 3;
    transition: all 0.3s var(--transition-smooth);
}

.story-card:hover .user-id-badge {
    background: var(--navy);
    color: var(--gold-light);
}

.card-body {
    padding: 38px;
    position: relative;
    z-index: 2;
    background: var(--white);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 280px;
}

.card-title {
    font-size: 1.55rem;
    color: var(--navy);
    margin-bottom: 14px;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.card-meta {
    display: flex;
    gap: 18px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(200, 169, 81, 0.2);
    padding-bottom: 16px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
}

.meta-item i {
    color: var(--gold);
    font-size: 13px;
}

.card-text {
    color: var(--muted);
    line-height: 1.75;
    margin-bottom: 28px;
    font-style: italic;
    position: relative;
    padding-left: 28px;
    font-size: 0.95rem;
    flex: 1;
}

.card-text::before {
    content: '"';
    font-size: 2.5rem;
    color: var(--gold);
    opacity: 0.4;
    position: absolute;
    left: -5px;
    top: -15px;
    font-family: serif;
}

.read-story-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
    color: var(--white);
    font-weight: 700;
    transition: all 0.4s var(--transition-premium);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    font-size: 14px;
    letter-spacing: 0.5px;
    margin-top: auto;
}

.read-story-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(200, 169, 81, 0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.read-story-btn i {
    transition: transform 0.3s var(--transition-smooth);
}

.read-story-btn:hover::before {
    width: 400px;
    height: 400px;
}

.read-story-btn:hover {
    transform: translateY(-3px);
    background: var(--gold-gradient);
    color: var(--navy);
    box-shadow: var(--shadow-gold);
}

.read-story-btn:hover i {
    transform: translateX(5px);
}

/* =====================================================
   FILTER BUTTONS - PREMIUM DARK (EQUAL SIZE)
   Increased spacing: gap 18px, bottom margin 45px
===================================================== */

.filter-controls {
    margin-bottom: 45px;
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}

.filter-controls .btn {
    padding: 14px 34px;
    border-radius: 999px;
    border: 2px solid var(--navy);
    background: var(--white);
    color: var(--navy);
    font-weight: 700;
    box-shadow: var(--shadow-sm);
    transition: all 0.35s var(--transition-premium);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    font-size: 14px;
    letter-spacing: 0.5px;
    min-width: 130px;
    text-align: center;
}

.filter-controls .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(200, 169, 81, 0.25), transparent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.filter-controls .btn:hover::before {
    width: 350px;
    height: 350px;
}

.filter-controls .btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    background: var(--navy);
    color: var(--white);
    border-color: var(--gold);
}

.filter-controls .btn.active {
    background: var(--navy);
    color: var(--gold);
    border-color: var(--gold);
    box-shadow: var(--shadow-md), var(--shadow-gold);
}

.filter-controls .btn.active::before {
    display: none;
}

@media (max-width: 768px) {
    .filter-controls .btn {
        padding: 10px 22px;
        font-size: 13px;
        min-width: 110px;
    }
    
    .filter-controls {
        gap: 12px;
        margin-bottom: 40px;
    }
}

@media (max-width: 576px) {
    .filter-controls .btn {
        padding: 8px 16px;
        font-size: 12px;
        min-width: 90px;
    }
}

/* =====================================================
   CAROUSEL CONTROLS - PREMIUM ENHANCED
===================================================== */

#storyCardSlider {
    position: relative;
}

.carousel-control-prev,
.carousel-control-next {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--white);
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
    box-shadow: var(--shadow-lg);
    transition: all 0.4s var(--transition-premium);
    border: 1px solid rgba(200, 169, 81, 0.2);
}

.carousel-control-prev {
    left: -30px;
}

.carousel-control-next {
    right: -30px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: var(--gold-gradient);
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-gold);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 24px;
    height: 24px;
    background-size: 24px 24px;
    filter: brightness(0) saturate(100%) invert(13%) sepia(23%) saturate(1880%) hue-rotate(190deg) brightness(96%) contrast(92%);
    transition: filter 0.3s;
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
    filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(100%) contrast(100%);
}

/* Ensure arrows are always visible */
.carousel-control-prev:focus,
.carousel-control-next:focus {
    opacity: 1;
    outline: none;
}

.carousel-indicators {
    margin-top: 50px;
    position: relative;
    gap: 14px;
    bottom: auto;
}

.carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(0,0,0,0.2);
    transition: all 0.4s var(--transition-premium);
    margin: 0;
}

.carousel-indicators .active {
    background: var(--gold-gradient);
    width: 32px;
    border-radius: 999px;
    background-size: 200% auto;
}

/* Carousel Transition Smooth - CRITICAL FOR MOVEMENT */
.carousel-item {
    transition: transform 0.6s var(--transition-premium) !important;
    width: 100%;
    flex-shrink: 0;
}

.carousel-item-next,
.carousel-item-prev,
.carousel-item.active {
    display: flex;
}

.carousel-inner {
    overflow: hidden;
    position: relative;
    width: 100%;
}

/* Ensure carousel actually moves */
.carousel-inner .carousel-item {
    display: none;
}

.carousel-inner .carousel-item.active {
    display: flex;
}

.carousel-inner .carousel-item-next.carousel-item-start,
.carousel-inner .carousel-item-prev.carousel-item-end {
    display: flex;
}

/* Autoplay Pause Visual */
.carousel:hover .carousel-control-prev,
.carousel:hover .carousel-control-next {
    opacity: 1;
}

/* =====================================================
   RESPONSIVE - 4 Cards Layout Breakpoints
===================================================== */

/* Large screens: 4 cards per row */
@media (min-width: 1200px) {
    .carousel-item .row {
        display: flex;
        flex-wrap: wrap;
    }
    
    .carousel-item .col-lg-4 {
        flex: 0 0 auto;
        width: 25%;
    }
}

/* Tablet screens: 2 cards per row */
@media (max-width: 1199px) and (min-width: 768px) {
    .carousel-item .col-md-6 {
        flex: 0 0 auto;
        width: 50%;
    }
}

/* Mobile screens: 1 card per row */
@media (max-width: 767px) {
    .carousel-item .col-12 {
        flex: 0 0 auto;
        width: 100%;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        display: none;
    }
}

/* =====================================================
   CTA SECTION — ROYAL LUXURY VERSION
===================================================== */

.cta-section {
    padding: 90px 0 120px;
    position: relative;
}

.cta-content {

    position: relative;
    overflow: hidden;

    max-width: 1180px;
    margin: 0 auto;

    padding: 95px 70px;

    border-radius: 42px;

    background:
        linear-gradient(
            135deg,
            #f8f4ea 0%,
            #fdfaf3 35%,
            #f6efe0 100%
        );

    border: 1px solid rgba(200,169,81,0.22);

    box-shadow:
        0 25px 60px rgba(15, 35, 60, 0.08),
        0 10px 25px rgba(200,169,81,0.10);

    text-align: center;
}

/* Premium Glow */

.cta-content::before {

    content: '';

    position: absolute;

    top: -120px;
    right: -120px;

    width: 320px;
    height: 320px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(200,169,81,0.14),
            transparent 70%
        );

    pointer-events: none;
}

.cta-content::after {

    content: '';

    position: absolute;

    bottom: -140px;
    left: -120px;

    width: 340px;
    height: 340px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(15,106,100,0.10),
            transparent 70%
        );

    pointer-events: none;
}

/* =====================================================
   TEXT
===================================================== */

.cta-content h2 {

    position: relative;
    z-index: 2;

    font-size: clamp(3rem, 5vw, 4.6rem);

    line-height: 1.1;

    margin-bottom: 24px;

    color: var(--navy);

    font-weight: 600;

    letter-spacing: -0.04em;
}

.cta-content p {

    position: relative;
    z-index: 2;

    max-width: 760px;

    margin: 0 auto;

    color: #5f6472;

    font-size: 1.15rem;

    line-height: 1.9;

    font-weight: 400;
}

/* =====================================================
   BUTTON AREA
===================================================== */

.cta-buttons {

    position: relative;
    z-index: 2;

    margin-top: 54px;

    display: flex;

    justify-content: center;

    gap: 22px;

    flex-wrap: wrap;
}

/* =====================================================
   COMMON BUTTON STYLE
===================================================== */

.cta-buttons .btn {

    position: relative;

    overflow: hidden;

    min-width: 220px;

    padding: 18px 34px;

    border-radius: 999px;

    border: none;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 10px;

    font-size: 14px;

    font-weight: 700;

    letter-spacing: 0.4px;

    text-decoration: none;

    cursor: pointer;

    transform-style: preserve-3d;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
}

/* Shine Animation */

.cta-buttons .btn::before {

    content: '';

    position: absolute;

    top: 0;
    left: -120%;

    width: 80%;
    height: 100%;

    background:
        linear-gradient(
            120deg,
            transparent,
            rgba(255,255,255,0.35),
            transparent
        );

    transform: skewX(-20deg);

    transition: 0.7s;
}

.cta-buttons .btn:hover::before {

    left: 130%;
}

/* Hover Animation */

.cta-buttons .btn:hover {

    transform:
        translateY(-6px)
        rotateX(6deg);

}

/* Click */

.cta-buttons .btn:active {

    transform:
        translateY(-2px)
        scale(0.98);
}

/* =====================================================
   REGISTER BUTTON
===================================================== */

.btn-primary {

    background:
        linear-gradient(
            180deg,
            #17345f 0%,
            #102747 100%
        );

    color: #ffffff;

    box-shadow:
        0 12px 0 #0a1b33,
        0 20px 30px rgba(16,39,71,0.22);
}

.btn-primary:hover {

    box-shadow:
        0 7px 0 #0a1b33,
        0 26px 35px rgba(16,39,71,0.30);
}

/* =====================================================
   CONSULTATION BUTTON
===================================================== */

.btn-secondary {

    background:
        linear-gradient(
            180deg,
            #0d6b66 0%,
            #09524f 100%
        );

    color: #ffffff;

    box-shadow:
        0 12px 0 #063634,
        0 20px 30px rgba(9,82,79,0.22);
}

.btn-secondary:hover {

    box-shadow:
        0 7px 0 #063634,
        0 26px 35px rgba(9,82,79,0.30);
}

/* =====================================================
   WHATSAPP BUTTON
===================================================== */

.btn-whatsapp {

    background:
        linear-gradient(
            180deg,
            #28d466 0%,
            #1eb957 100%
        );

    color: #ffffff;

    box-shadow:
        0 12px 0 #159142,
        0 20px 30px rgba(30,185,87,0.24);
}

.btn-whatsapp:hover {

    box-shadow:
        0 7px 0 #159142,
        0 26px 35px rgba(30,185,87,0.34);
}

/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 768px) {

    .cta-section {
        padding: 65px 0 90px;
    }

    .cta-content {

        padding: 60px 26px;

        border-radius: 30px;
    }

    .cta-content h2 {

        font-size: 2.4rem;

        line-height: 1.2;
    }

    .cta-content p {

        font-size: 1rem;

        line-height: 1.75;
    }

    .cta-buttons {

        flex-direction: column;

        gap: 16px;

        margin-top: 40px;
    }

    .cta-buttons .btn {

        width: 100%;

        min-width: auto;

        padding: 17px 22px;
    }
}

/* =====================================================
   MODAL - PREMIUM
===================================================== */

.story-modal .modal-content {
    border: none;
    border-radius: 48px;
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-xl);
}

.story-modal .modal-header {
    border-bottom: 2px solid rgba(200, 169, 81, 0.25);
    padding: 28px 35px;
    background: linear-gradient(135deg, var(--cream), var(--white));
}

.story-modal .modal-title {
    color: var(--navy);
    font-size: 1.7rem;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

.story-modal .btn-close {
    transition: all 0.3s;
}

.story-modal .btn-close:hover {
    transform: rotate(90deg);
}

.modal-body {
    padding: 35px;
}

.story-details-img {
    border-radius: 28px;
    margin-bottom: 28px;
    width: 100%;
    object-fit: cover;
    max-height: 400px;
    box-shadow: var(--shadow-md);
}

.story-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 35px;
}

.story-meta-item {
    background: linear-gradient(135deg, var(--bg), var(--cream));
    padding: 14px 24px;
    border-radius: 999px;
    font-size: 14px;
    color: var(--navy);
    font-weight: 600;
    border: 1px solid rgba(200, 169, 81, 0.2);
    transition: all 0.3s;
}

.story-meta-item i {
    color: var(--gold);
    margin-right: 10px;
}

.full-story-content {
    line-height: 2;
    color: var(--muted);
    font-size: 1rem;
}

.modal-footer {
    border-top: 1px solid rgba(200, 169, 81, 0.15);
    padding: 20px 35px;
}

/* =====================================================
   NO RESULTS
===================================================== */

#noResults {
    padding: 80px 40px;
    border-radius: 40px;
    background: var(--white);
    text-align: center;
    box-shadow: var(--shadow-md);
    color: var(--muted);
    font-size: 1.1rem;
    border: 1px solid rgba(200, 169, 81, 0.2);
}

/* =====================================================
   IMAGE LAZY FADE-IN
===================================================== */

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.5s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Country badge fix - ensure it's inside image wrapper */
.card-img-wrapper .country-badge {
    position: absolute;
    z-index: 10;
}

/* User ID badge improved hierarchy */
.card-img-wrapper .user-id-badge {
    position: absolute;
    z-index: 10;
    font-weight: 600;
    letter-spacing: 1px;
    background: rgba(20,33,61,0.9);
    border-left: 2px solid var(--gold);
}

/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 1200px) {
    .carousel-control-prev {
        left: -20px;
    }
    
    .carousel-control-next {
        right: -20px;
    }
}

@media (max-width: 992px) {
    .section {
        padding: 60px 0;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 48px;
        height: 48px;
        left: -15px;
        right: -15px;
    }
    
    .card-img-wrapper {
        height: 260px;
    }
    
    .card-body {
        padding: 28px;
        min-height: 260px;
    }
    
    .cta-content {
        padding: 50px 40px;
        border-radius: 50px;
    }
    
    .cta-section {
        padding: 40px 0 80px;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 50px 0;
    }
    
    .section-header {
        margin-bottom: 45px;
    }
    
    .card-img-wrapper {
        height: 260px;
    }
    
    .card-body {
        padding: 24px;
        min-height: 240px;
    }
    
    .card-title {
        font-size: 1.35rem;
    }
    
    .cta-content {
        padding: 45px 25px;
        border-radius: 40px;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .cta-buttons .btn {
        width: 100%;
        padding: 14px 30px;
    }
    
    .carousel-indicators {
        margin-top: 35px;
    }
    
    .story-meta-item {
        font-size: 12px;
        padding: 8px 16px;
    }
    
    .modal-body {
        padding: 25px;
    }
    
    .story-modal .modal-header {
        padding: 20px 25px;
    }
    
    .story-modal .modal-title {
        font-size: 1.3rem;
    }
    
    .cta-section {
        padding: 30px 0 60px;
    }
}

@media (max-width: 576px) {
    .card-img-wrapper {
        height: 260px;
    }
    
    .card-body {
        padding: 20px;
        min-height: 220px;
    }
    
    .card-title {
        font-size: 1.2rem;
    }
    
    .meta-item {
        font-size: 11px;
    }
    
    .card-text {
        font-size: 0.85rem;
        padding-left: 20px;
    }
    
    .card-text::before {
        font-size: 1.8rem;
        top: -10px;
    }
    
    .read-story-btn {
        padding: 12px;
        font-size: 13px;
    }
    
    .counter-container {
        padding: 25px 12px;
    }
    
    .counter {
        font-size: 2rem;
    }
    
    .counter-label {
        font-size: 11px;
    }
    
    .story-details-img {
        border-radius: 20px;
    }
    
    .story-meta {
        gap: 10px;
    }
    
    .story-meta-item {
        font-size: 10px;
        padding: 6px 12px;
    }
    
    .full-story-content {
        font-size: 0.9rem;
        line-height: 1.8;
    }
}

/* =====================================================
   CAROUSEL SMOOTH MOTION & MOVEMENT FIX
===================================================== */

.carousel-item {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 0.6s;
}

#storyCardSlider {
    transition: opacity 0.3s ease;
}

/* Prevent FOUC on carousel rebuild */
.carousel-inner {
    will-change: transform;
}

/* Ensure carousel movement is visible */
.carousel-inner .carousel-item {
    transition: transform 0.6s ease-in-out;
}

.carousel-inner .carousel-item.active,
.carousel-inner .carousel-item-next.carousel-item-start,
.carousel-inner .carousel-item-prev.carousel-item-end {
    transform: translateX(0);
}

.carousel-inner .carousel-item-next,
.carousel-inner .carousel-item-prev {
    position: absolute;
    top: 0;
    width: 100%;
}

.carousel-inner .carousel-item-next {
    transform: translateX(100%);
}

.carousel-inner .carousel-item-prev {
    transform: translateX(-100%);
}

.carousel-inner .carousel-item-next.carousel-item-start,
.carousel-inner .carousel-item-prev.carousel-item-end {
    transform: translateX(0);
}

.carousel-inner .carousel-item.active.carousel-item-end {
    transform: translateX(100%);
}

.carousel-inner .carousel-item.active.carousel-item-start {
    transform: translateX(-100%);
}