/* CSS Styles */
:root {
    --bg-color: #000000;
    --primary-color: #0059ff;
    --secondary-color: #4708bb;
    --card-bg-color: #050505;
    --text-color: #e0e0e0;
    --text-secondary-color: #a0a0a0;
    --border-color: #1a1a1a;
    --card-hover-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

/* Lenis helper styles */
html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

body {
    background-color: #000 !important;
    /* Force full black */
    color: var(--text-color);
}

html {
    max-width: 100%;
    background: #000;
    /* Reserve scrollbar space to prevent layout-shift jitter when scroll is locked */
    scrollbar-gutter: stable;
}

body {
    max-width: 100%;
    overflow-x: hidden;
    background: #000 !important; /* Ensure black background */
}

/* Welcome Popup Styles */
.intro-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 1;
    transition: opacity 0.5s ease;
    /* Prevent layout shift when scroll is locked */
    overflow: hidden;
}

.intro-popup.hidden {
    opacity: 0;
    pointer-events: none;
}

.popup-card {
    position: relative;
    background: #000;
    padding: 30px;
    padding-top: 80px;
    border-radius: 25px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    border: 1px solid #333;
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(70, 70, 200, 0.2);
    transform: scale(0.9);
    animation: popup-appear 0.4s 0.2s ease-out forwards;
}

@keyframes popup-appear {
    to {
        transform: scale(1);
    }
}

.popup-wings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -65%);
    width: 150%;
    z-index: -1;
    opacity: 0.8;
}

.popup-wings img {
    width: 100%;
}

.profile-image-wrapper {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid #1A1A1A;
    background-color: #1A1A1A;
}

.verified-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 30px;
    height: 30px;
    background-color: #1DA1F2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    border: 2px solid #1A1A1A;
}

.intro-greeting {
    color: #a0a0a0;
    font-size: 1rem;
    margin: 0;
}

.popup-card h2 {
    color: #ffffff;
    font-size: 2.2rem;
    margin: 5px 0 20px 0;
}

.intro-details {
    color: #a0a0a0;
    line-height: 1.6;
    margin-bottom: 30px;
}

.intro-details p {
    margin: 0;
    font-size: 1.1rem;
}

.portfolio-button {
    display: inline-block;
    padding: 12px 35px;
    background-color: #5D26C1;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.portfolio-button:hover {
    background-color: #a026c1;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(93, 38, 193, 0.4);
}

.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 90%;
    max-width: 800px;
    /* ඩෙස්ක්ටොප් සඳහා පළල නැවත සකසන ලදී */
    padding: 10px 20px;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 10px;
    border: 1px solid #1a1a1a;
    transition: top 0.3s ease-in-out, opacity 0.3s ease-in-out;
}


.navbar nav {
    display: flex;
    justify-content: center;
    /* ඩෙස්ක්ටොප් එකේදී මෙනුව මැදට */
    align-items: center;
    width: 100%;
}

.navbar ul {
    list-style: none;
    display: flex;
    flex-direction: row;
    /* ඩෙස්ක්ටොප් එකේදී තිරස් අතට */
    gap: 30px;
    /* ඩෙස්ක්ටොප් එකේදී අයිතම අතර ඉඩ */
    padding: 0;
    margin: 0;
}

.navbar ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding: 5px 0;
    font-size: 1rem;
}

.navbar ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.navbar ul li a:hover,
.navbar ul li a.active {
    color: var(--primary-color);
}

.navbar ul li a:hover::after,
.navbar ul li a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    /* Hamburger මෙනුව ඩෙස්ක්ටොප් එකේදී සඟවන්න */
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
}

.menu-close-btn {
    display: none;
    /* Hide 'X' button on desktop */
}

/* ඩෙස්ක්ටොප් එකේදී ලාංඡනය සඟවන්න */
.mobile-nav-logo {
    display: none;
}


/* --- Mobile සඳහා වන Styles (Media Query) --- */
@media (max-width: 768px) {
    .navbar {
        top: 15px;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        max-width: none;
        height: auto;
        background: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border: none !important;
        padding: 0 20px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        pointer-events: none;
        /* Let clicks pass through empty areas */
    }

    .navbar nav {
        display: flex;
        justify-content: flex-end;
        /* Group icons to the right */
        align-items: center;
        width: auto;
        gap: 12px;
        pointer-events: auto;
        /* Re-enable clicks for icons */
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(0, 0, 0, 0.6) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        width: 45px;
        height: 45px;
        border-radius: 50%;
        color: var(--text-color);
        font-size: 1.2rem;
        cursor: pointer;
        order: 2;
        margin: 0;
        transition: all 0.3s ease;
        z-index: 3000;
        /* Always above everything */
    }

    .menu-toggle:active {
        transform: scale(0.9);
        background: var(--primary-color) !important;
    }

    .navbar ul {
        display: flex;
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100vh;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 5px;
        /* Reduced gap */
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        border: none;
        padding: 60px 0 40px 0;
        /* Adjusted padding */
        margin: 0;
        z-index: 2000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        transform: translateY(-20px);
        overflow-y: auto;
    }

    .navbar ul.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .navbar ul li {
        width: auto;
        /* Fit content */
    }

    .navbar ul li a {
        display: block;
        padding: 6px 15px;
        /* Compact padding */
        text-align: center;
        font-size: 1.1rem;
        /* Smaller, elegant size */
        font-weight: 500;
        letter-spacing: 1px;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.6);
        transition: all 0.3s ease;
    }

    .navbar ul li a:active,
    .navbar ul li a.active {
        color: var(--primary-color);
        transform: scale(1.05);
        background: rgba(255, 255, 255, 0.05);
        border-radius: 30px;
    }

    /* --- Mobile Nav Logo --- */
    .mobile-nav-logo {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        margin-bottom: 20px;
        padding-bottom: 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-nav-logo img {
        width: 140px;
        /* Better visibility */
        height: auto;
        opacity: 0.9;
        filter: brightness(1.2);
    }

    .navbar ul li a::after {
        display: none;
    }

    /* Hide redundant elements */
    .navbar ul li.close-btn-li,
    .menu-close-btn {
        display: none !important;
    }

}

/* <--- ඔබගේ @media (max-width: 768px) බ්ලොක් එක මෙතනින් වැසෙනවාදැයි බලන්න --- */


/* --- Header --- */
header#home {
    min-height: 100vh;
    padding-top: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    position: relative;
    background-color: #000;
    background-image: linear-gradient(110deg,
            #000 0%,

            /* Spectrum 1: Cyan & Deep Purple */
            #020203 10%,
            rgba(0, 150, 255, 0.03) 20%,
            rgba(100, 40, 255, 0.09) 25%,
            rgba(0, 150, 255, 0.03) 30%,
            #020203 45%,

            /* Gap between waves */
            #020203 55%,

            /* Spectrum 2: Mint & Crimson */
            #020203 65%,
            rgba(0, 255, 150, 0.03) 75%,
            rgba(255, 20, 100, 0.09) 80%,
            rgba(0, 255, 150, 0.03) 85%,
            #020203 95%,

            #020203 100%);
    background-size: 350% 100%;
    animation: sharpAuroraWave 35s ease-in-out infinite alternate;
}

/* Optional: Add a subtle overlay for extra blend/blur */
header#home::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* backdrop-filter: blur(15px); Removed to fix extreme lag */
    /* -webkit-backdrop-filter: blur(15px); Removed to fix extreme lag */
    background: rgba(0, 0, 0, 0.4); /* Adding a slight dark overlay instead of expensive blur */
    z-index: 0;
    /* Keep behind content */
    pointer-events: none;
}

header#home>* {
    z-index: 1;
    /* Ensure content is above the blur */
}

@keyframes sharpAuroraWave {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

.profile-img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: none;
    object-fit: cover;
    margin-top: 60px;
    margin-bottom: 20px;
    animation: fadeIn 1s ease-in-out;
}

/* === HERO TYPOGRAPHY & BUTTONS === */
.hero-title {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease 0.2s backwards;
    position: relative;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.7) 0%,
            rgba(255, 255, 255, 1) 20%,
            rgba(200, 200, 220, 1) 40%,
            rgba(255, 255, 255, 1) 60%,
            rgba(255, 255, 255, 0.7) 80%,
            rgba(255, 255, 255, 0.7) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease 0.2s backwards, shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

.gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, var(--primary-color) 50%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary-color);
    line-height: 1.8;
    margin-bottom: 3rem;
    max-width: 700px;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-buttons {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    color: #ffffff;
}

.scroll-down {
    position: absolute;
    bottom: 20px;
    font-size: 1.5rem;
    color: var(--text-color);
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-15px);
    }

    60% {
        transform: translateY(-8px);
    }
}




/* Animated background */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Behind all content */
    overflow: hidden;
    pointer-events: none;
    /* Allow clicks to pass through */
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    /* filter: blur(100px); Removed for performance */
    /* Slightly reduced blur for better visibility */
    opacity: 0.8;
    /* Increased opacity for visibility */
    animation: float 25s infinite ease-in-out;
    will-change: transform;
}

.orb-1 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(0, 89, 255, 0.4) 0%, rgba(0, 89, 255, 0.1) 50%, transparent 70%);
    top: -15%;
    left: -15%;
    animation-delay: 0s;
}

.orb-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.35) 0%, rgba(138, 43, 226, 0.1) 50%, transparent 70%);
    bottom: -15%;
    right: -15%;
    animation-delay: 8s;
}

.orb-3 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(0, 200, 255, 0.3) 0%, rgba(0, 200, 255, 0.08) 50%, transparent 70%);
    top: 50%;
    left: 50%;
    margin-top: -275px;
    /* Half of height */
    margin-left: -275px;
    /* Half of width */
    animation-delay: 16s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }

    25% {
        transform: translate(50px, -50px) scale(1.15) rotate(3deg);
    }

    50% {
        transform: translate(-30px, 40px) scale(0.95) rotate(-3deg);
    }

    75% {
        transform: translate(40px, 30px) scale(1.05) rotate(2deg);
    }
}


/* --- ඔබ ලබාදුන් Aurora Background (z-index වෙනස් කර ඇත) --- 
        .aurora-bg {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: #080808b2;
            z-index: -1; /* පිටුපසම ස්ථරය 
            overflow: hidden;
            filter: blur(100px);
        }

        .aurora-bg .aurora-dot {
            position: absolute;
            border-radius: 50%;
        }

        .aurora-bg .aurora-dot:nth-child(1) {
            top: -20%;
            left: -10%;
            width: 500px;
            height: 500px;
            background: rgba(0, 170, 255, 0.219);
            animation: float 20s infinite alternate;
        }

        .aurora-bg .aurora-dot:nth-child(2) {
            top: 40%;
            left: 60%;
            width: 600px;
            height: 600px;
            background: rgba(170, 0, 255, 0.123);
            animation: float 25s infinite alternate-reverse;
        }

        @keyframes float {
            0% { transform: translateY(0px) translateX(0px) rotate(0deg); }
            100% { transform: translateY(100px) translateX(-100px) rotate(180deg); } 
        }  */

/* --- අලුතින් එකතු කල Snow Effect --- */

.snow-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Aurora එකට උඩින්, Content එකට යටින් */
    pointer-events: none;
    /* Click කිරීමේදී බාධා නොවීම සඳහා */
}

/* හිම අංශු හදන්නේ image නැතුව 'radial-gradient' වලින් */

/* ලේයර් 1: කුඩා, සෙමින් වැටෙන (දුරින්ම) */
.snow-layer-1 {
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.363) 1px, transparent 1.5px);
    background-size: 200px 200px;
    /* හිම අංශු අතර පරතරය */
    animation: snow-fall-1 25s linear infinite;
}

/* ලේයර් 2: මධ්‍යම ප්‍රමාණයේ */
.snow-layer-2 {
    background-image: radial-gradient(circle, rgba(255, 208, 0, 0.267) 2px, transparent 2.5px);
    background-size: 300px 300px;
    animation: snow-fall-2 15s linear infinite;
    animation-delay: -5s;
    /* ඇനിമේෂන් එක අතරමැදින් පටන් ගැනීමට */
}

/* ලේයර් 3: විශාල, වේගයෙන් වැටෙන (ළඟින්ම) */
.snow-layer-3 {
    background-image: radial-gradient(circle, rgba(0, 102, 255, 0.219) 3px, transparent 4px);
    background-size: 400px 400px;
    animation: snow-fall-3 10s linear infinite;
    animation-delay: -10s;
    /* ඇനിമේෂන් එක අතරමැදින් පටන් ගැනීමට */
}

/* හිම වැටීම සඳහා Keyframes */
@keyframes snow-fall-1 {
    from {
        background-position: 0px 0px;
    }

    to {
        background-position: 100px 100vh;
    }

    /* 100vh (සම්පූර්ණ උස) + 100px තිරස් චලනය */
}

@keyframes snow-fall-2 {
    from {
        background-position: 0px 0px;
    }

    to {
        background-position: -150px 100vh;
    }

    /* වෙනස් තිරස් චලනයක් */
}

@keyframes snow-fall-3 {
    from {
        background-position: 0px 0px;
    }

    to {
        background-position: 200px 100vh;
    }

    /* වෙනස් තිරස් චලනයක් */
}

/* --- General Section Styling --- */
section {
    padding: 100px 10%;
    /* Contain layout so child animations don't bleed into adjacent sections */
    contain: layout style;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    font-weight: 700;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* --- Gallery Section --- */
#gallery {
    /* backdrop-filter removed for performance */
    text-align: center;
    overflow: hidden;
    /* ගැස්සීම වැලැක්වීමට */
}

.swiper-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto 30px auto;
    position: relative;
}

.swiper-container .swiper-wrapper {
    transition-timing-function: ease !important;
}

.swiper-slide img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 15px;
}

#gallery .swiper-slide {
    width: 70%;
    transition: transform 0.6s ease, opacity 0.6s ease, filter 0.6s ease;
    opacity: 0.2;
    filter: brightness(0.3);
    transform: scale(0.8);
}

#gallery .swiper-slide-active {
    opacity: 1;
    filter: brightness(1);
    transform: scale(1);
}

.swiper-button-next,
.swiper-button-prev {
    color: var(--primary-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: background 0.3s;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    color: white;
}

.animated-btn {
    position: relative;
    display: inline-flex;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: transform 0.3s ease;
    border: none;
    z-index: 1;
    /* Removed padding and black background from here */
}

/* 0. The black inner surface */
.btn-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    background-color: #000;
    color: #ffffff;
    border-radius: 8px;
    /* Match or slightly smaller than parent */
    width: 100%;
    height: 100%;
    z-index: 2;
    /* Ensures it sits above the ::before border */
}

/* 1. The animating gradient border */
.animated-btn::before {
    content: "";
    position: absolute;
    inset: -1.5px;
    border-radius: inherit;
    background: linear-gradient(-90deg, #007cf0, #00dfd8, #ff0080, #007cf0) 0 0 / 400% 100%;
    animation: btnGradientBackground 8s ease-in-out infinite;
    z-index: -1;
    /* Behind the black background */
}

/* 2. The blurred glow effect */
.animated-btn::after {
    content: "";
    position: absolute;
    inset: -1.5px;
    border-radius: inherit;
    background: linear-gradient(-90deg, #007cf0, #00dfd8, #ff0080, #007cf0) 0 0 / 400% 100%;
    animation: btnGradientBackground 8s ease-in-out infinite;
    z-index: -2;
    /* Furthest back */
    filter: blur(12px);
    opacity: 0.85;
}

@keyframes btnGradientBackground {
    50% {
        background-position: 140%;
        transform: skew(-2deg);
    }
}

.animated-btn:hover {
    transform: translateY(-5px);
}

.animated-btn.secondary {
    background-color: #111;
}

.animated-btn.secondary::before,
.animated-btn.secondary::after {
    background: linear-gradient(-90deg, #333333, #666666, #999999, #333333) 0 0 / 400% 100%;
}

/* --- Portfolio Section --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
    /* Isolate stacking context so card hover z-index never bleeds into adjacent sections */
    isolation: isolate;
}

.portfolio-card {
    background: linear-gradient(145deg, #0a0d1a 0%, #060810 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.35s ease;
    will-change: transform, box-shadow;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Gradient top accent line — handled via box-shadow inset instead of ::before
   to avoid conflict with the lightning-glow ::before further below */

/* Bottom glow bar */
.portfolio-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--primary-color), #7c3aed);
    transition: width 0.45s cubic-bezier(0.4,0,0.2,1);
    z-index: 2;
}

.portfolio-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0,89,255,0.28);
    box-shadow: 0 22px 55px rgba(0,0,0,0.65), 0 0 30px rgba(0,89,255,0.1), inset 0 1px 0 rgba(255,255,255,0.05);
}

.portfolio-card:hover::before { opacity: 1; }

/* Animate the bottom glow bar on hover */
.portfolio-card:hover::after { width: 100%; }


/* Image wrapper — MUST stay overflow:hidden so no image ever bleeds out */
.portfolio-card .portfolio-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 220px;
    flex-shrink: 0;
}

.portfolio-content {
    padding: 22px 24px 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.portfolio-description {
    color: rgba(160, 170, 200, 0.85);
    font-size: 0.875rem;
    line-height: 1.65;
    margin-bottom: 20px;
    flex-grow: 1;
}

.portfolio-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.portfolio-card:hover .portfolio-img {
    transform: scale(1.06);
}

.portfolio-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #e8eeff;
    margin-bottom: 10px;
    letter-spacing: 0.1px;
    line-height: 1.3;
}

.portfolio-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    background-color: rgba(0,89,255,0.07);
    color: #e8eeff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.88rem;
    border: 1.5px solid rgba(0,89,255,0.5);
    transition: all 0.25s ease;
    align-self: flex-start;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.portfolio-btn:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 0 18px rgba(0,89,255,0.4);
    transform: translateY(-2px);
}

/* --- Search Engine Styles --- */
.search-nav-btn-floating {
    position: absolute;
    right: -71px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(5, 5, 5, 0.459);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1001;
}

.search-nav-btn-floating:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 20px rgba(0, 124, 240, 0.5);
}

@media (max-width: 768px) {
    .search-nav-btn-floating {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        width: 40px;
        height: 40px;
        font-size: 1rem;
        order: 1;
        /* Search icon first */
        background: rgba(255, 255, 255, 0.05);
    }

    .menu-toggle {
        /* Reset absolute positioning if any */
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        width: 40px;
        height: 40px;
    }
}

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 10vh;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-container {
    width: 90%;
    max-width: 800px;
    transform: translateY(-20px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-overlay.active .search-container {
    transform: translateY(0);
}

.search-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.search-input-wrapper {
    flex-grow: 1;
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    padding: 5px 25px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.search-input-wrapper:focus-within {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 30px rgba(0, 124, 240, 0.3);
}

.search-icon {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-right: 15px;
}

#search-input {
    width: 100%;
    background: none;
    border: none;
    color: white;
    font-size: 1.4rem;
    padding: 15px 0;
    outline: none;
    font-family: inherit;
}

#search-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.search-clear-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    font-size: 1rem;
    padding: 10px;
    transition: color 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.search-clear-btn.active {
    opacity: 1;
    visibility: visible;
}

.search-clear-btn:hover {
    color: white;
}

.search-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 10px;
    transition: color 0.3s ease;
}

.search-close-btn:hover {
    color: var(--primary-color);
}

.search-results-wrapper {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
    /* Custom Scrollbar */
}

.search-results-wrapper::-webkit-scrollbar {
    width: 6px;
}

.search-results-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 100px;
}

.search-results-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.search-results {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    animation: slideUp 0.4s ease forwards;
}

.search-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
    transform: translateX(10px);
}

.search-item-icon {
    width: 50px;
    height: 50px;
    background: rgba(0, 124, 240, 0.1);
    color: var(--primary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.search-item-info {
    flex-grow: 1;
}

.search-item-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}

.search-item-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    display: block;
}

.search-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.3);
}

.search-empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.2;
}

.search-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.search-hints {
    display: flex;
    gap: 20px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

.search-hints kbd {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 2px 6px;
    margin-right: 5px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Optimizations for Search */
@media (max-width: 768px) {
    .search-overlay {
        padding-top: 20px;
    }

    .search-container {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        padding: 20px;
    }

    .search-header {
        margin-bottom: 20px;
    }

    #search-input {
        font-size: 1.1rem;
    }

    .search-results-wrapper {
        flex-grow: 1;
    }

    .search-item {
        padding: 15px;
    }

    .search-item-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .search-item-title {
        font-size: 1rem;
    }
}

/* --- Portfolio Card Lightning Effect (නැවත එක් කරන ලදී) --- */
.portfolio-card::before {
    content: '';
    position: absolute;
    left: var(--mouse-x, -100%);
    top: var(--mouse-y, -100%);
    width: 0;
    height: 0;
    background: radial-gradient(circle closest-side, rgba(84, 11, 179, 0.2), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.2s ease, height 0.2s ease;
    z-index: 0;
    /* අනෙකුත් content වලට යටින් පෙන්වීමට */
}

.portfolio-card:hover::before {
    width: 300px;
    height: 300px;
}

.portfolio-card .portfolio-content {
    z-index: 2;
    /* content එක උඩින් පෙන්වීමට */
    position: relative;
}

/* --- Projects Section --- */
#projects {
    text-align: center;
}

.project-intro {
    max-width: 700px;
    margin: 0 auto 50px auto;
    color: var(--text-secondary-color);
}

.project-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 1rem;
    color: var(--text-secondary-color);
}

.review-link {
    display: block;
    margin-bottom: 50px;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.review-link:hover {
    text-decoration: underline;
}

.project-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    isolation: isolate;
}

.project-card {
    background: #050505;
    /* backdrop-filter removed for performance */
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: hidden; /* Prevent hover-image from bleeding outside card */
    cursor: pointer;
    transition: all 0.4s ease;
    will-change: transform, box-shadow;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-hover-shadow);
}

.project-card-image {
    position: absolute;
    inset: 0; /* Cover the card itself, not float above it */
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    border-radius: 15px;
    transform: scale(1.05);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1;
    pointer-events: none;
}

.project-card:hover .project-card-image {
    opacity: 0.18; /* Subtle overlay — not fully opaque so text stays readable */
    transform: scale(1);
}

.project-card-content {
    position: relative;
    z-index: 2;
}

.project-card .icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.project-card:hover .icon {
    transform: scale(1.1);
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.project-card p {
    color: var(--text-secondary-color);
}


/* --- Price Section --- */
.price-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.accordion-item {
    background: #050505;
    /* backdrop-filter removed for performance */
    margin-bottom: 10px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.accordion-header {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.accordion-header:hover {
    background-color: #141414;
}

.accordion-header i {
    transition: transform 0.4s ease;
}

.accordion-item.active .accordion-header i {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), padding 0.5s ease;
    padding: 0 20px;
}

.accordion-content-inner {
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
}

.price-detail {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed #444;
}

.price-detail:last-child {
    border-bottom: none;
}

.price-detail .item-name {
    color: var(--text-secondary-color);
}

.price-detail .price {
    font-weight: 600;
    color: var(--primary-color);
}

.price-detail .note {
    font-size: 0.8rem;
    color: #888;
}

/* --- Order Now Section --- */
#order-now {
    padding: 100px 10%;
}

.order-card {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    background: #000;
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary-color);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    background-color: #050505;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-color);
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(84, 11, 179, 0.2);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.agreement-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

#agreement {
    width: 18px;
    height: 18px;
}

.send-btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: #ffffff;
    text-decoration: none;
    border-radius: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-color);
    cursor: pointer;
    margin-left: auto;
}

.send-btn:disabled {
    background-color: #555;
    border-color: #555;
    cursor: not-allowed;
}

.form-row {
    display: flex;
    align-items: center;
    gap: 20px;
}


/* --- About Me Section --- */
#about-me {
    display: flex;
    flex-direction: column;
    /* උඩ සිට පහලට සකසන ලදී */
    align-items: center;
    /* මැදට ගන්න ලදී */
    text-align: center;
    /* සියල්ල මැදට ගන්න ලදී */
    gap: 30px;
}

.about-image {
    flex-shrink: 0;
}

.about-image img {
    width: 200px;
    /* ලෝගෝ ප්‍රමාණයට සකසන ලදී */
    height: 200px;
    border-radius: 50%;
    border: 5px solid var(--primary-color);
    object-fit: cover;
}

.about-details {
    width: 100%;
    max-width: 800px;
}

.about-details h1 {
    font-size: 2.2rem;
    margin-bottom: 5px;
}

.about-details .subtitle {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 30px;
}

.info-section {
    margin-bottom: 25px;
    text-align: left;
    /* තොරතුරු වමට සකසන ලදී */
}

.info-section h3 {
    font-size: 1.3rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
    margin-bottom: 15px;
    display: inline-block;
}

.info-section ul {
    list-style: none;
}

.info-section ul li {
    margin-bottom: 10px;
    display: flex;
}

.info-section ul li strong {
    width: 120px;
    display: inline-block;
    color: var(--text-secondary-color);
}

.pro-skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.skill-item {
    background: var(--card-bg-color);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.about-details .animated-btn {
    margin-top: 20px;
}

/* --- Advanced Footer Styles --- */
#main-footer {
    position: relative;
    /* අනිත් කොටස් ස්ථානගත කිරීමට */
    background-color: #000;
    color: #ffffff;
    padding: 100px 10% 20px 10%;
    margin-top: 150px;
}

.thank-you-banner {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #000;
    padding: 15px 50px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.thank-you-banner h3 {
    margin: 0;
    font-size: 1.5rem;
    color: white;
}

.thank-you-banner p {
    margin: 0;
    color: var(--text-secondary-color);
}

.footer-content {
    display: grid;
    /* තීරු වල පළල අනුපාතය වෙනස් කරන ලදී */
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1.5fr;
    gap: 30px;
    margin-bottom: 50px;
}

.footer-column {
    font-size: 0.9rem;
}

.footer-column h4 {
    font-weight: bold;
    margin-bottom: 20px;
    font-size: 1rem;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: var(--text-secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: var(--primary-color);
}

#footer-logo-col .footer-logo {
    max-width: 150px;
}

#footer-contact-col .footer-qr {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    margin-bottom: 15px;
}

#footer-contact-col .contact-details p {
    margin: 5px 0;
    color: var(--text-secondary-color);
}

#footer-contact-col .footer-badges {
    margin-top: 15px;
}

#footer-contact-col .footer-badges img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

/* Floating Profile Image */
.floating-profile {
    position: absolute;
    right: 2%;
    bottom: 90px;
    width: 250px;
    text-align: center;
}

.floating-profile img {
    width: 100%;
    bottom: 30px;
    margin-bottom: -10px;
    /* text එකට සම්බන්ධ වීමට */
}

.floating-profile .profile-details {
    color: var(--text-secondary-color);
    font-size: 0.9rem;
}

.profile-details h4 {
    color: white;
    font-size: 1.1rem;
    margin: 5px 0;
}

/* Bottom Bar */
.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.footer-bottom .footer-social-icons {
    display: none;
    /* Mobile වලදී පෙන්වීමට, ඩෙස්ක්ටොප් එකේදී රූපයේ පරිදි නැත */
}

.footer-bottom .footer-credit {
    color: var(--text-secondary-color);
    font-size: 0.8rem;
}

/* --- Responsive Footer --- */
@media (max-width: 1200px) {
    .floating-profile {
        display: none;
        /* කුඩා ඩෙස්ක්ටොප් තිර වලදී සඟවන්න */
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        /* මොබයිල් වලදී columns 2ක් */
        text-align: center;
    }

    #footer-logo-col,
    #footer-contact-col {
        grid-column: 1 / -1;
        /* columns 2ම හරහා span කරන්න */
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-bottom {
        flex-direction: column-reverse;
        gap: 15px;
    }

    .footer-bottom .footer-social-icons {
        display: flex;
        gap: 20px;
        font-size: 1.2rem;
    }

    .footer-bottom .footer-social-icons a {
        color: var(--text-secondary-color);
    }
}

/* --- Helper Tools (Go to Top, WhatsApp) --- */
.go-to-top {
    position: fixed;
    bottom: 50px;
    width: 50px;
    height: 50px;

    color: white;
    /* පාට වෙනස් කරන ලදී */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    text-decoration: none;
    cursor: pointer;
    z-index: 999;
    transition: opacity 0.3s, transform 0.3s, background-color 0.3s;
    opacity: 0;
    pointer-events: none;
}

.go-to-top {
    right: 30px;
}


.go-to-top.show {
    opacity: 1;
    pointer-events: auto;
}

.go-to-top:hover {
    transform: scale(1.1);
    background-color: var(--secondary-color);
}

/* --- Animations --- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .welcome-text {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .navbar {
        width: 95%;
        max-width: none;
        transition: transform 0.4s ease-out;
    }

    .navbar.hide {
        transform: translate(-50%, -150px);
    }

    section {
        padding: 80px 5%;
    }

    #order-now {
        padding: 80px 5%;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .project-cards-grid {
        grid-template-columns: 1fr;
    }

    .about-details .info-section {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .about-details .info-section ul {
        width: 100%;
        max-width: 350px;
    }

    .order-card {
        padding: 25px;
    }

    .form-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .agreement-group {
        margin-bottom: 20px;
    }

    .send-btn {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .go-to-top {
        bottom: 50px !important;
        /* Go to top button safe zone */
    }

    .chatbot-container {
        bottom: 30px !important;
        /* Chatbot button safe zone */
    }
}

/* --- Preloader Styles --- */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    /* වෙබ් අඩවියේ පසුබිම් වර්ණයම යොදමු */
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #444;
    /* Spinner එකේ අළු පැහැති කොටස */
    border-top-color: var(--primary-color);
    /* Spinner එකේ උඩ දම් පැහැති කොටස */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* --- Testimonials Section Styles --- */
#testimonials {

    padding: 100px 10%;
}

.testimonials-slider {
    padding-bottom: 50px;
    /* Pagination dots වලට ඉඩ තැබීමට */
}

.testimonial-card {
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    background: #050505;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid var(--border-color);
}

/* Testimonials Section - Client Photo නිවැරදි කළ style එක */
#testimonials .testimonial-card .client-photo {
    width: 70px;
    /* ප්‍රමාණය කුඩා කරන ලදී */
    height: 70px;
    /* ප්‍රමාණය කුඩා කරන ලදී */
    border-radius: 50%;
    /* රවුමක් සෑදීමට */
    border: 3px solid var(--primary-color);
    object-fit: cover;
    /* රූපය විකෘති නොවී රවුම පිරවීමට */
    margin: 0 auto 20px;
    /* උඩ සහ යට ඉඩ සහ තිරස් අතට මැදට ගැනීමට */
}

.rating {
    color: #fdd835;
    /* තරු සඳහා රන්වන් පැහැය */
    margin-bottom: 15px;
}

.testimonial-text {
    color: var(--text-secondary-color);
    font-style: italic;
    line-height: 1.7;
    margin-bottom: 20px;
    min-height: 120px;
    /* කාඩ් වල උස සමානව තබා ගැනීමට */
}

.client-name {
    color: var(--text-color);
    font-weight: 600;
}

.client-company {
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* Swiper pagination dots වල වර්ණය වෙනස් කිරීමට */
.testimonials-slider .swiper-pagination-bullet-active {
    background-color: var(--primary-color);
}

/* --- QR Code Popup Styles --- */
.qr-popup {
    display: none;
    /* මොබයිල් වලදී සම්පූර්ණයෙන්ම සඟවන්න */
    position: fixed;
    bottom: 30px;
    right: 30px;

    background: #000;
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(20px);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    text-align: center;
    width: 220px;
}

/* ඩෙස්ක්ටොප් වලදී පමණක් පෙන්වීමට සහ animation එක් කිරීමට */
@media (min-width: 769px) {
    .qr-popup {
        display: block;
        animation: slideInUp 0.5s ease-out forwards;
    }
}

.qr-popup.hidden {
    animation: slideOutDown 0.5s ease-in forwards;
}

.qr-popup .qr-code-img {
    width: 150px;
    height: 150px;
    margin-bottom: 10px;
    border-radius: 10px;
}

.qr-popup p {
    margin: 0;
    color: var(--text-secondary-color);
    font-weight: 500;
}

.qr-popup .close-btn {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 1.8rem;
    color: var(--text-secondary-color);
    cursor: pointer;
    transition: color 0.3s ease;
}

.qr-popup .close-btn:hover {
    color: var(--text-color);
}

.initial-hide {
    display: none !important;
}

/* Pop-up සඳහා Animations */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(100%);
        opacity: 0;
        visibility: hidden;
    }
}

/* --- Showcase Button - FINAL CORRECTED CSS (Version 3) --- */

.showcase-final-container {
    display: none;
    /* Hide on mobile */
}

@media (min-width: 769px) {

    /* Showcase කොටස Header එකට සාපේක්ෂව ස්ථානගත කිරීම */
    header#home>.showcase-final-container {
        display: flex;
        justify-content: center;
        align-items: center;

        /* නව positioning ක්‍රමය */
        position: absolute;
        top: 80px;
        /* Navbar එකට පහළින් */
        left: 0;
        width: 100%;
        z-index: 501;
        /* අනෙකුත් අන්තර්ගතයට උඩින් පෙන්වීමට */
    }

    /* ඉරේ කොටස් දෙක */
    .line-segment {
        height: 1px;
        width: 120px;
        background-color: var(--border-color);
    }

    /* බොත්තම සහ hover card එක දරන wrapper එක */
    .button-wrapper {
        position: relative;
        margin: 0 15px;
    }

    /* බොත්තම */
    .showcase-button {
        display: block;
        padding: 8px 30px;
        border-radius: 50px;
        border: 1px solid var(--border-color);
        background-color: var(--bg-color);
        color: var(--text-color);
        text-decoration: none;
        font-weight: 500;
        transition: all 0.3s ease;
    }

    .showcase-card {
        position: absolute;
        top: calc(100% + 15px);
        left: 50%;
        transform: translateX(-50%) translateY(20px);
        width: 400px;
        background-color: #000;
        -webkit-backdrop-filter: blur(15px);
        backdrop-filter: blur(15px);
        border: 1px solid var(--border-color);
        border-radius: 15px;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
        padding: 20px;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
        z-index: 100;
    }

    /* Hover කිරීමේ ක්‍රියාවලිය (වෙනසක් නැත) */
    .button-wrapper:hover .showcase-card {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0);
    }

    .button-wrapper:hover .showcase-button {
        color: white;
        border-color: var(--secondary-color);
        box-shadow: 0 0 25px rgba(0, 132, 255, 0.5);
    }

    /* Card එකේ උඩ ත්‍රිකෝණය (Pointer) */
    .card-pointer {
        position: absolute;
        top: -10px;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 0;
        border-left: 10px solid transparent;
        border-right: 10px solid transparent;
        border-bottom: 10px solid #1A1A1A;
    }

    /* Card එකේ අන්තර්ගතය */
    .card-content {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .card-content img {
        width: 100px;
        height: 100px;
        object-fit: cover;
        border-radius: 10px;
        flex-shrink: 0;
    }

    .card-text h4 {
        font-size: 1.2rem;
        color: white;
        margin-bottom: 8px;
    }

    .card-text p {
        font-size: 0.9rem;
        color: var(--text-secondary-color);
        line-height: 1.6;
    }
}

/* --- tsParticles Container Style --- */
#tsparticles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* අනෙකුත් සියලුම අන්තර්ගතයට පිටුපසින් පෙන්වීමට */
}

/* --- Animated Skills Bar Styles --- */

.skills-list {
    width: 100%;
    max-width: 700px;
    padding: 0 15px;
}

.skill-bar {
    margin-bottom: 25px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--text-color);
}

.skill-name {
    font-weight: 500;
}

.skill-percent {
    font-weight: 600;
}

.progress-line {
    height: 8px;
    width: 100%;
    background-color: #333;
    border-radius: 10px;
    position: relative;
}

.progress-line span {
    height: 100%;
    width: 0;
    /* Animation එක සඳහා මුලින් පළල 0 ලෙස තබමු */
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    position: absolute;
    top: 0;
    left: 0;
    transition: width 1.5s ease-in-out;
    /* පළල වෙනස් වීමේ සජීවීකරණය */
}

/* --- Company Branding Section 
#company-branding {
    padding: 100px 10%;
}

.branding-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.branding-card {
    background: rgba(30, 30, 30, 0.5);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
}

.branding-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.branding-card-image img {
    width: 100%;
    height: 200px; /* 1280x720 aspect ratio is approximately 16:9 
    object-fit: cover;
    display: block;
}

.branding-card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.branding-company-name {
    font-size: 1.6rem;
    color: var(--text-color);
    margin-bottom: 10px;
}

.branding-date-time {
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 500;
    opacity: 0; /* Initially hidden for animation 
    animation: fadeInDate 1.5s 0.5s ease forwards;
}

@keyframes fadeInDate {
    to {
        opacity: 1;
    }
}

.branding-description {
    color: var(--text-secondary-color);
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1; /* Pushes button to the bottom 
}

.preview-pdf-btn {
    align-self: flex-start; /* Aligns button to the left *
}

/* --- PDF Popup Panel Styles --- *
.pdf-popup-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: none; /* Initially hidden *
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.pdf-popup-content {
    position: relative;
    width: 90%;
    height: 90%;
    max-width: 1000px;
    background: #1e1e1e;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    transform: scale(0.7);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.pdf-popup-container.active .pdf-popup-content {
    transform: scale(1);
    opacity: 1;
}

.pdf-popup-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    font-size: 24px;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border: 2px solid var(--bg-color);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.pdf-popup-close:hover {
    transform: scale(1.1) rotate(90deg);
    background-color: var(--secondary-color);
}

#pdf-viewer {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    border: none;
}
#company-branding .project-intro {
    text-align: center;
} --- */

/* News & Updates Section Styles */
.news-events-section {
    max-width: 1200px;
    /* Sets a maximum width like other sections */
    margin: 0 auto;
    /* Centers the section on the page */
    padding: 60px 20px 30px;
    /* <--- මෙසේ වෙනස් කරන්න */
    text-align: center;
}

.news-events-section .section-header .section-subtitle {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.news-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
    text-align: left;
}

.news-card {
    /*background: var(--blur-bg);*/
    border-radius: 15px;
    overflow: hidden;
    /*backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);*/
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-8px);
    /* box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);8*/
}

.news-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.news-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    /* Allows the footer link to stick to the bottom */
}

.news-card-category {
    display: inline-block;
    padding: 5px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 5px;
    margin-bottom: 15px;
    color: #0e0e0e;
    align-self: flex-start;
    /* Makes the background fit the text */
}

/* Category Colors from the example image */
.category-studio {
    background-color: #fce188;
    /* Yellow */
}

.category-youtube {
    background-color: #ff6253;
    /* Red */
}

.category-medium {
    background-color: #8be0ff;
    /* Blue */
}

.news-card-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.news-card-description {
    font-size: 0.95rem;
    color: rgba(240, 240, 240, 0.8);
    line-height: 1.6;
    flex-grow: 1;
}

.news-card-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-top: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease, gap 0.3s ease;
}

.news-card-link:hover {
    color: #ffffff;
    gap: 12px;
}

/* Styles for Embedded YouTube Video */
.news-card-video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
    overflow: hidden;
}

.news-card-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 35px;
    left: 35px;
    /* ← වම් පැත්තට තබන්න */
    z-index: 9999;
    transition: all 0.3s ease;
}

.chatbot-button {
    background: transparent !important;
    /* Button transparent කරන්න */
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 2rem;
    color: rgb(0, 60, 255);
    box-shadow: none;
    /* අවශ්‍යනම් shadow remove කරන්න */
}


.chatbot-buttonr:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 119, 255, 0.6);
}

.chatbot-panel {
    width: 350px;
    max-width: 90vw;
    height: 500px;
    max-height: 80vh;

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 68, 255, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    position: absolute;
    bottom: -20px;
}

.chatbot-panel.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    bottom: 80px;
}

.chatbot-header {
    padding: 15px;
    background: rgba(20, 20, 20, 0.9);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(110, 0, 255, 0.3);
}

.chatbot-header h3 {
    color: white;
    font-size: 16px;
    font-weight: 600;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chatbot-close:hover {
    transform: rotate(90deg);
}

.chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chatbot-messages::-webkit-scrollbar {
    width: 5px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(110, 0, 255, 0.5);
    border-radius: 10px;
}

.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
}

.bot-message {
    background: rgba(110, 0, 255, 0.2);
    color: white;
    border-bottom-left-radius: 5px;
    align-self: flex-start;
    position: relative;
    border: 1px solid rgba(110, 0, 255, 0.1);
}

.bot-message::before {
    content: '';
    position: absolute;
    left: -10px;
    bottom: 0;
    width: 0;
    height: 0;
    border: 10px solid transparent;
    border-right-color: rgba(110, 0, 255, 0.2);
    border-left: 0;
    border-bottom: 0;
    margin-bottom: 10px;
}

.user-message {
    background: rgb(19, 19, 19);
    color: white;
    border-bottom-right-radius: 5px;
    align-self: flex-end;
}

.service-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.service-card {
    background: rgba(110, 0, 255, 0.1);
    border: 1px solid rgba(110, 0, 255, 0.2);
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    text-align: center;
    font-size: 13px;
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(110, 0, 255, 0.2);
    background: rgba(110, 0, 255, 0.3);
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.option-item {
    background: rgba(110, 0, 255, 0.1);
    border: 1px solid rgba(110, 0, 255, 0.2);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-size: 13px;
}

.option-item:hover {
    background: rgba(110, 0, 255, 0.3);
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 8px 15px;
    border-radius: 20px;
    border: none;
    background: rgb(0, 81, 255);
    color: white;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.action-btn:hover {
    background: rgb(4, 35, 104);
    transform: translateY(-2px);
}

.chatbot-input {
    padding: 15px;
    background: rgba(20, 20, 20, 0.9);
    border-top: 1px solid rgba(110, 0, 255, 0.3);
    display: flex;
    gap: 10px;
}

.chatbot-input input {
    flex: 1;
    padding: 10px 15px;
    border-radius: 20px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    outline: none;
    font-size: 14px;
}

.chatbot-input input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.chatbot-input button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgb(12, 12, 12);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chatbot-input button:hover {
    background: rgb(20, 20, 20);
    transform: rotate(15deg);
}

.typing {
    display: inline-block;
}

.typing-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
    opacity: 0;
    animation: typingAnimation 1.5s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: 0s;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.3s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes typingAnimation {
    0% {
        opacity: 0;
        transform: translateY(0);
    }

    50% {
        opacity: 1;
        transform: translateY(-3px);
    }

    100% {
        opacity: 0;
        transform: translateY(0);
    }
}


@media (max-width: 480px) {
    .chatbot-panel {
        width: 90vw;
        height: 70vh;
    }

}

@keyframes chatbot-popin {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.8);
    }

    80% {
        opacity: 1;
        transform: translateY(-8px) scale(1.05);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* ========== Our Packages Section Styles ========== */
#packages {
    text-align: center;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.package-card {
    background: #00000033;
    /* Deeper, solid background */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid #333;
    border-radius: 20px;
    padding: 35px 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    /* Adding a subtle background pattern */
    background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.05) 1px, transparent 0);
    background-size: 20px 20px;
}

.package-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border-color: #0044ff;
}

/* Metallic gradient for the icon */
.package-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 10px auto 25px auto;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    color: #E0E0E0;
    /* Metallic Gradient */
    background: linear-gradient(145deg, #444, #222);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4), 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 2px solid #555;
}

.package-title {
    font-size: 1.6rem;
    /* Slightly larger */
    font-weight: 600;
    /* Bolder feel */
    color: #FFFFFF;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
    /* Added spacing */
}

.package-description {
    font-size: 1rem;
    color: var(--text-secondary-color);
    margin-bottom: 25px;
    min-height: 45px;
}

.package-price {
    font-size: 2.5rem;
    font-weight: 700;
    /* Using a gradient for the price text */
    background: -webkit-linear-gradient(45deg, #A0A0A0, #FFFFFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 30px;
}

/* === COMPLETE BUTTON REDESIGN === */
.package-shop-btn {
    background: linear-gradient(145deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 15px 30px;
    /* Larger padding */
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: box-shadow 0.3s ease;
}

.package-shop-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
    z-index: -1;
}

.package-shop-btn:hover {
    box-shadow: 0 0 25px var(--secondary-color);
}

.package-shop-btn:hover::before {
    left: 100%;
}

.customer-care-cta {
    margin-top: 60px;
    padding: 30px;
    background: #00000033;
    /* Deeper, solid background */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.customer-care-cta p {
    color: var(--text-secondary-color);
    margin: 0 0 20px 0;
}

.whatsapp-help-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background-color: #25D366;
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.whatsapp-help-btn:hover {
    background-color: #1DA851;
}

/* ========== JGS Standalone Service Launcher (FINAL CORRECTED VERSION) ========== */

/* Main container for the button and popup */
.jgs-service-launcher {
    position: fixed;
    top: 20px;
    /* This calculation places the button relative to the centered navbar */
    right: 90px;
    /* <-- calc(...) සිට 30px ලෙස මෙසේ වෙනස් කරන්න */
    z-index: 9999;
}

/* The trigger button itself */
.service-launcher-btn {
    background: #1A1A1A;
    border: 1px solid #444;
    color: #e0e0e0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.service-launcher-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: scale(1.1) rotate(10deg);
}

/* The Popup Panel - NO OVERLAY */
.service-launcher-popup {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 980px;
    max-width: 95vw;
    background-color: rgba(12, 12, 12, 0.329);
    /* Slightly adjusted for better look */
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 16px;
    padding: 25px 30px;
    border: 1px solid #444;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    /* Smoother animation */
}

.service-launcher-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Pointer pointing up to the button */
.mega-menu-pointer {
    position: absolute;
    top: -10px;
    right: 14px;
    /* Aligns with the center of the 48px button */
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid rgba(30, 30, 30, 0.8);
}

/* Card Interaction: Turns white ON HOVER */
.mega-menu-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 89, 255, 0.1);

    /* Changes on hover */
    background: #fff;
    color: #000;
}

.mega-menu-card:hover p {
    color: #555;
}

.mega-menu-card:hover .card-icon {
    color: #000;
}

.mega-menu-card:hover .card-arrow {
    right: 20px;
}


/* --- Child Element Styles (Copied from previous correct version) --- */
.mega-menu-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary-color);
    font-size: 2.2rem;
    /* Slightly larger for easier clicking */
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    line-height: 1;
}

.mega-menu-close-btn:hover {
    color: #fff;
    transform: scale(1.2);
}

.mega-menu-top-bar {
    display: flex;
    align-items: center;
    gap: 20px;

    /* Style changes for the black background */
    background-color: #000;
    /* Set a solid black background */
    margin: -25px -30px 20px -30px;
    /* Use negative margins to fill the parent's padding */
    padding: 20px 30px;
    /* Add padding back inside the bar */
    border-bottom: 1px solid var(--border-color);
    border-top-left-radius: 16px;
    /* Match the parent's top rounded corners */
    border-top-right-radius: 16px;
    /* Match the parent's top rounded corners */
}

.mega-menu-top-bar p {
    margin: 0;
    color: var(--text-color);
    flex-grow: 1;
    /* Allows text to take up available space */
}

.get-now-button {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
    font-weight: 700;
    padding: 10px 30px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
    /* Prevents the button from shrinking */
}

.get-now-button:hover {
    background: #ffffff;
    color: #000;
    transform: scale(1.05);
}

.mega-menu-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.mega-menu-card {
    background: #121212;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mega-menu-card .card-icon {
    font-size: 2rem;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.mega-menu-card h3 {
    font-size: 1.2rem;
    margin: 0 0 5px 0;
}

.mega-menu-card .card-subtitle-platform,
.mega-menu-card .card-subtitle-free {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-color);
    display: block;
    margin-bottom: 15px;
}

.mega-menu-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary-color);
    transition: color 0.3s ease;
}

.card-arrow {
    position: absolute;
    bottom: 20px;
    right: 25px;
    font-size: 1.2rem;
    transition: right 0.3s ease;
}

.mega-menu-bottom-banner {
    background: #121212;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bottom-banner-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.bottom-banner-left .fa-shopping-cart {
    font-size: 1.8rem;
}

.bottom-banner-left p {
    margin: 0;
    color: var(--text-secondary-color);
    font-size: 0.9rem;
    max-width: 350px;
    /* Constrains the width of the text to force wrapping */
}

.bottom-banner-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.bottom-banner-right img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
}

.help-customer-care-btn {
    background: transparent;
    border: 1px solid var(--text-secondary-color);
    color: var(--text-secondary-color);
    padding: 10px 20px;
    border-radius: 20px;
    /* More rounded like the image */
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.help-customer-care-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* --- Responsive Adjustments --- */
/* Make sure this responsive rule is updated to handle the new positioning logic 
@media (max-width: 1200px) {
    .jgs-service-launcher {
        right: 30px; /* Fallback to a fixed position on smaller screens 
    }
}*/
@media (max-width: 1024px) {
    .service-launcher-popup {
        width: auto;
        max-width: 95vw;
        left: auto;
        right: 0;
    }

    .mega-menu-cards-grid {
        grid-template-columns: 1fr;
    }

    .mega-menu-bottom-banner {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .mega-menu-top-bar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* Hide the entire service launcher on mobile devices */
@media (max-width: 768px) {
    .jgs-service-launcher {
        display: none !important;
    }
}



/* --- Company Branding Section (New) --- */
#company-branding {
    background: transparent;
    padding: 100px 5%;
    /* Mobile-first padding */
    position: relative;
    overflow: hidden;
}

#company-branding .project-intro {
    text-align: center;
}

.branding-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.tab-btn {
    padding: 10px 30px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary-color);
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active,
.tab-btn:hover {
    color: var(--text-color);
    background: var(--card-bg-color);
    border-color: var(--primary-color);
}

.branding-tab-content {
    display: none;
}

.branding-tab-content.active {
    display: block;
}

.branding-content-wrapper {
    position: relative;
}

/* Swiper styles for this section */
.branding-slider-brand,
.branding-slider-logo {
    width: 100%;
    padding: 20px 0;
    overflow: hidden;
}

#company-branding .swiper-slide {
    width: 60%;
    /* Mobile-first: 1.5 slides පෙන්වීමට */
    aspect-ratio: 1/1;
    /* 1920x1920 යනු 1:1 අනුපාතයයි */
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: #1a1a1a;

    /* Non-active slides (දෙපස අඳුරු කිරීම) */
    opacity: 0.3;
    filter: blur(4px);
    transform: scale(0.85);
    transition: transform 0.5s, opacity 0.5s, filter 0.5s;
}

#company-branding .swiper-slide-active {
    /* Active (center) slide (මැද slide එක) */
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
}

#company-branding .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.new-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-color);
    color: white;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.card-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
    box-sizing: border-box;
    /* Padding නිවැරදිව තබාගැනීමට */
}

.card-footer span {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
}

.card-footer i {
    color: white;
    font-size: 1.1rem;
    opacity: 0.7;
}

/* Custom Navigation Arrows */
.brand-prev,
.brand-next,
.logo-prev,
.logo-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(5px);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.brand-prev:hover,
.brand-next:hover,
.logo-prev:hover,
.logo-next:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.brand-prev,
.logo-prev {
    left: -10px;
}

.brand-next,
.logo-next {
    right: -10px;
}

.branding-footer-text {
    text-align: center;
    margin-top: 30px;
}

.branding-footer-text h3 {
    font-size: 1.2rem;
    color: var(--text-color);
}

.branding-footer-text p {
    font-size: 0.9rem;
    color: var(--text-secondary-color);
    max-width: 600px;
    margin: 10px auto 15px auto;
}

.multi-color-line {
    width: 150px;
    height: 4px;
    margin: 0 auto;
    background: linear-gradient(to right, #f39c12, #e74c3c, #2ecc71, #f1c40f);
    border-radius: 2px;
}

/* Responsive adjustments for sliders */
@media (min-width: 768px) {
    #company-branding {
        padding: 100px 10%;
    }

    #company-branding .swiper-slide {
        width: 30%;
        /* Desktop: slides 3ක් පෙන්වීමට */
    }

    .brand-prev,
    .logo-prev {
        left: 10px;
    }

    .brand-next,
    .logo-next {
        right: 10px;
    }
}

/* --- Image Lightbox (New) --- */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10001;
    display: none;
    /* මුලින් සඟවා ඇත */
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
    box-sizing: border-box;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s ease;
    line-height: 1;
}

.lightbox-close:hover {
    transform: scale(1.1);
}

/* --- Advanced Chatbot CSS (Premium UI) --- */

/* Panel එකට Premium පෙනුමක් */
.chatbot-panel {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.chatbot-header {
    background: #000;
    border-bottom-color: rgba(139, 92, 246, 0.3);
}

.chatbot-header h3 {
    color: #f0f0f0;
    font-weight: 600;
}

.chatbot-input {
    background: #000;
    border-top-color: rgba(139, 92, 246, 0.3);
}

.chatbot-input input {
    background: #050505;
    border: 1px solid #1a1a1a;
    color: #e0e0e0;
    transition: border-color 0.3s ease;
}

.chatbot-input input:focus {
    border-color: var(--primary-color);
}

.chatbot-input button {
    background: var(--primary-color);
    color: white;
}

.chatbot-input button:hover {
    background: var(--secondary-color);
    transform: scale(1.1) rotate(10deg);
}

/* Messages වල පෙනුම */
.bot-message {
    background: #0a0a0a;
    color: #e0e0e0;
    border: 1px solid #1a1a1a;
    border-bottom-left-radius: 5px;
}

.bot-message::before {
    /* Triangle ඉවත් කර, වඩාත් සියුම් පෙනුමක් */
    display: none;
}

.user-message {
    background: var(--primary-color);
    /* User message වර්ණය */
    color: white;
    border-bottom-right-radius: 5px;
}

/* Advance Thinking/Typing Animation */
.thinking {
    display: flex;
    align-items: center;
    padding: 5px 0;
}

.thinking .dot {
    width: 8px;
    height: 8px;
    margin: 0 3px;
    background-color: #888;
    border-radius: 50%;
    animation: thinking-bounce 1.4s infinite ease-in-out both;
}

.thinking .dot:nth-child(1) {
    animation-delay: -0.32s;
}

.thinking .dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes thinking-bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1.0);
    }
}

/* නව Category Cards (ප්‍රධාන මෙනුව) */
.category-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.category-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #e0e0e0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.category-card i {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.category-card span {
    font-size: 0.85rem;
    font-weight: 500;
}

.category-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 89, 255, 0.1);
}

.category-card:hover i {
    transform: scale(1.1);
    color: #fff;
}

/* උප මෙනු (Options List) */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.option-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #e0e0e0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.option-item i {
    color: var(--text-secondary-color);
    width: 20px;
    text-align: center;
}

.option-item:hover {
    background: rgba(0, 0, 0, 0.568);
    border-color: var(--primary-color);
    color: #fff;
}

.option-item:hover i {
    color: var(--primary-color);
}

/* Reset Button Style */
.reset-btn {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    border-color: var(--primary-color);
}

.reset-btn:hover {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

/* Action Buttons (සිරස් අතට) */
.action-buttons-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.action-buttons-vertical .action-btn {
    width: 100%;
    padding: 12px 15px;
    justify-content: center;
}

.action-buttons-vertical .action-btn.whatsapp {
    background: #25D366;
}

.action-buttons-vertical .action-btn.call {
    background: #555;
}

/* Chatbot Notification Styles - LEFT of Chatbot Icon */
.chatbot-notification {
    position: fixed;
    bottom: 120px;
    left: 110px;
    /* Move left of chatbot icon */
    z-index: 9999;
    background: #000;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    min-width: 320px;
    max-width: 350px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(30px) scale(0.95);
    transition: opacity 0.4s, transform 0.4s;
    border: 2px solid #006eff;
    padding: 18px 18px 18px 12px;
    font-family: inherit;
}

.chatbot-notification.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    animation: chatbot-popin 0.5s cubic-bezier(.68, -0.55, .27, 1.55);
}

@keyframes chatbot-popin {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.8);
    }

    80% {
        opacity: 1;
        transform: translateY(-8px) scale(1.05);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chatbot-notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.chatbot-notification-avatar {
    background: #0066ff;
    color: #fff;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    box-shadow: 0 2px 8px rgba(110, 0, 255, 0.12);
    flex-shrink: 0;
}

.chatbot-notification-message {
    font-size: 1rem;
    color: #ffffff;
    line-height: 1.3;
}

.chatbot-notification-close {
    font-size: 1.3rem;
    color: #888;
    margin-left: 10px;
    cursor: pointer;
    transition: color 0.2s;
    user-select: none;
}

.chatbot-notification-close:hover {
    color: #6e00ff;
}

/* --- FINAL MOBILE HERO OVERRIDES --- */
@media (max-width: 768px) {
    header#home {
        padding-top: 120px !important;
        /* Navbar එකට ඉඩ ලබා දීම */
        justify-content: center !important;
        min-height: 100vh !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        overflow: hidden;
        /* කොටස් කැපී යාම වැලැක්වීම */
    }

    header#home .profile-img {
        width: 140px !important;
        height: 140px !important;
        margin-top: 0px !important;
        /* ඍණ අගය ඉවත් කරන ලදි */
        margin-bottom: 20px !important;
        z-index: 2;
    }

    header#home .hero-title {
        font-size: clamp(2rem, 6vw, 2.5rem) !important;
        /* තිරයට අනුව අකුරු වෙනස් වීම */
        margin-bottom: 15px !important;
        line-height: 1.3 !important;
        width: 100% !important;
        padding: 0 10px;
    }

    header#home .hero-description {
        font-size: 0.95rem !important;
        margin-bottom: 25px !important;
        max-width: 95% !important;
        line-height: 1.6 !important;
    }

    header#home .header-buttons {
        margin-top: 0 !important;
        margin-bottom: 70px !important;
    }

    header#home .scroll-down {
        bottom: 20px !important;
        /* පහළින් තැබීම */
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        display: block !important;
    }

    /* --- GALLERY MOBILE OVERRIDES --- */
    #gallery .swiper-slide img {
        height: auto !important;
        max-height: 450px !important;
        object-fit: contain !important;
        background: rgba(0, 0, 0, 0.2) !important;
    }

    #gallery .swiper-slide {
        width: 85% !important;
    }
}

/* ======================================================
   EVENT MANAGEMENT SECTION
   ====================================================== */
#event-management {
    padding: 100px 40px;
    background: #000;
    position: relative;
    overflow: hidden;
}

#event-management::before {
    content: '';
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 500px;
    background: radial-gradient(ellipse, rgba(90, 0, 200, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

/* --- Header --- */
.em-header {
    text-align: center;
    margin-bottom: 60px;
}

.em-label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--primary-color);
    background: rgba(0, 89, 255, 0.08);
    border: 1px solid rgba(0, 89, 255, 0.25);
    padding: 6px 18px;
    border-radius: 50px;
    margin-bottom: 16px;
}

.em-subtitle {
    font-size: 1rem;
    color: var(--text-secondary-color);
    max-width: 580px;
    margin: 14px auto 0;
    line-height: 1.8;
}

/* --- Cards Grid --- */
.em-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* --- Individual Card --- */
.em-card {
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.em-card-inner {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 18px;
    overflow: hidden;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        box-shadow 0.4s ease;
    will-change: transform, box-shadow;
}

.em-card:hover .em-card-inner {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

/* --- Card Image --- */
.em-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: filter 0.5s ease, transform 0.5s ease;
}

.em-card:hover .em-card-img {
    filter: blur(4px) brightness(0.35);
    transform: scale(1.06);
}

/* --- Default Title (visible when not hovered) --- */
.em-card-default-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 50px 22px 22px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
    transition: opacity 0.35s ease;
    z-index: 2;
}

.em-card-title-default {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.8px;
}

.em-card:hover .em-card-default-info {
    opacity: 0;
}

/* --- Overlay (appears on hover, slides bottom-to-top) --- */
.em-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.97) 0%,
            rgba(0, 0, 0, 0.88) 50%,
            rgba(0, 0, 0, 0.30) 100%);
    z-index: 3;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.em-card:hover .em-card-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* --- Tier Badge --- */
.em-tier-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 50px;
    background: rgba(0, 89, 255, 0.2);
    border: 1px solid rgba(0, 89, 255, 0.5);
    color: #7ab4ff;
    backdrop-filter: blur(6px);
}

.em-tier-badge.tier-gold {
    background: rgba(200, 150, 0, 0.2);
    border-color: rgba(220, 170, 0, 0.5);
    color: #f0c855;
}

.em-tier-badge.tier-rose {
    background: rgba(200, 50, 100, 0.2);
    border-color: rgba(220, 80, 130, 0.5);
    color: #ff8aad;
}

/* --- Card Info (inside overlay) --- */
.em-card-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.em-card-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.3;
}

.em-card-desc {
    font-size: 0.82rem;
    color: rgba(200, 200, 215, 0.85);
    line-height: 1.65;
    margin: 0;
}

/* --- Example Button --- */
.em-example-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    padding: 10px 22px;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
    align-self: flex-start;
    box-shadow: 0 4px 20px rgba(0, 89, 255, 0.35);
}

.em-example-btn:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 8px 30px rgba(0, 89, 255, 0.55);
    filter: brightness(1.15);
}

.em-example-btn i {
    font-size: 0.75rem;
    transition: transform 0.25s ease;
}

.em-example-btn:hover i {
    transform: translateX(4px);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .em-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 580px) {
    #event-management {
        padding: 70px 20px;
    }

    .em-cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .em-card-inner {
        aspect-ratio: 1 / 1;
    }

    .em-card:hover .em-card-img {
        filter: blur(3px) brightness(0.35);
    }
}