/********** Template CSS **********/
:root {
    --primary: #FF6600;
    --primary-rgb: 255, 102, 0;
    --primary-glow: rgba(var(--primary-rgb), 0.5);

    --secondary: #00f2ff;
    --secondary-rgb: 0, 242, 255;
    --secondary-glow: rgba(var(--secondary-rgb), 0.5);

    --accent: #bc00ff;

    --dark: #050505;
    --dark-rgb: 5, 5, 5;

    --darker: #020202;
    --darker-rgb: 2, 2, 2;

    --light: #e0e0e0;
    --light-rgb: 224, 224, 224;

    --text-muted: #888888;
    --font-mono: 'Fira Code', 'Courier New', monospace;
}

body {
    background-color: var(--dark);
    color: var(--light);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    position: relative;
}

/* Grid Background */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 102, 0, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 102, 0, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -2;
    pointer-events: none;
}

/* Scanline Effect */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(18, 16, 16, 0) 50%,
            rgba(0, 0, 0, 0.1) 50%);
    background-size: 100% 4px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.1;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 30px;
    bottom: 30px;
    z-index: 99;
    border-radius: 50%;
    box-shadow: 0 0 15px var(--primary-glow);
}

/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
    background: var(--darker);
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}

/*** Button ***/
.btn {
    font-weight: 600;
    transition: .5s;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.btn-primary:hover {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.btn-secondary {
    background: transparent !important;
    border: 1px solid var(--secondary) !important;
    color: var(--secondary) !important;
}

.btn-secondary:hover {
    border-color: var(--secondary);
    box-shadow: 0 0 20px var(--secondary-glow);
}

.btn-whatsapp {
    background: #25d366 !important;
    border: none !important;
    color: #fff !important;
    font-weight: 600;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    background: #128c7e !important;
    color: #fff !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 15px var(--primary-glow);
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}

/*** Navbar ***/
.fixed-top {
    transition: .5s;
    background: transparent;
}

.fixed-top.bg-dark {
    background: rgba(5, 5, 5, 0.95) !important;
    backdrop-filter: blur(15px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.5) !important;
}

.top-bar {
    height: 45px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.navbar .navbar-nav .nav-link {
    margin-right: 30px;
    padding: 25px 0;
    color: var(--light);
    font-weight: 500;
    outline: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: 0.3s;
    position: relative;
    display: flex;
    align-items: center;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--primary);
    text-shadow: 0 0 8px var(--primary-glow);
}

.navbar .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 15px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: 0.3s;
    box-shadow: 0 0 5px var(--primary-glow);
}

.navbar .navbar-nav .nav-link:hover::after,
.navbar .navbar-nav .nav-link.active::after {
    width: 100%;
}

/*** Header & Carousel ***/
.carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.95) 100%);
    z-index: 1;
}

.carousel-caption h1 {
    font-family: var(--font-mono);
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 0 20px var(--primary-glow);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    background-color: var(--primary);
    border: none;
    border-radius: 50%;
}

.page-header {
    padding-top: 12rem;
    padding-bottom: 6rem;
    background: linear-gradient(rgba(5, 5, 5, 0.85), rgba(5, 5, 5, 0.85)), url(../img/carousel-1.jpg) center center no-repeat;
    background-size: cover;
    border-bottom: 2px solid var(--primary);
}

/*** Layout & Sections ***/
.container-xxl {
    background: transparent;
}

.bg-light {
    background-color: rgba(20, 20, 20, 0.6) !important;
    backdrop-filter: blur(5px);
}

.bg-secondary {
    background-color: rgba(255, 102, 0, 0.1) !important;
    color: var(--primary) !important;
    border: 1px solid var(--primary);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: #fff;
    font-weight: 600;
}

.display-6 {
    font-family: var(--font-mono);
}

/*** Vision Block ***/
.vision-block {
    background: rgba(255, 102, 0, 0.08) !important;
    border-left: 5px solid var(--primary) !important;
    border-right: 1px solid rgba(255, 102, 0, 0.2);
    border-top: 1px solid rgba(255, 102, 0, 0.2);
    border-bottom: 1px solid rgba(255, 102, 0, 0.2);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.vision-block p {
    color: #ffffff !important;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 15px;
    font-family: var(--font-mono);
}

.vision-block span {
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 2px;
    display: block;
}

/*** Card Items ***/
.causes-item,
.service-item,
.gallery-item,
.hosted-event-item,
.team-item {
    background: rgba(10, 10, 10, 0.95) !important;
    border: 1px solid rgba(255, 102, 0, 0.1);
    transition: 1s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    height: 100%;
}

.team-item img,
.about-img-grid img {
    filter: grayscale(100%);
    transition: 1.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    object-fit: cover;
    width: 100%;
}

.team-item:hover img,
.team-item.reveal-focus img,
.about-img-grid img:hover,
.about-img-grid img.reveal-focus {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.team-item:hover,
.team-item.reveal-focus {
    border-color: var(--primary);
    box-shadow: 0 0 25px rgba(255, 102, 0, 0.3);
}

.team-text {
    position: relative;
    background: rgba(10, 10, 10, 0.9);
    border-top: 1px solid rgba(255, 102, 0, 0.2);
}

.card-btn {
    display: inline-flex;
    align-items: center;
    color: var(--secondary) !important;
    text-transform: uppercase;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 2px;
    padding: 12px 25px;
    transition: 0.3s;
    text-decoration: none;
    border: 1px solid var(--secondary);
    border-radius: 4px;
    background: rgba(0, 242, 255, 0.05);
}

.card-btn:hover {
    background: var(--secondary);
    color: var(--dark) !important;
    box-shadow: 0 0 15px var(--secondary-glow);
}

.card-btn i {
    margin-left: 10px;
    font-size: 0.8rem;
    transition: 0.3s;
}

.card-btn:hover i {
    transform: translateX(5px);
}

.causes-item .position-relative::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 18, 18, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    opacity: 0.3;
}

.causes-item:hover .position-relative::after {
    opacity: 0.5;
}

.causes-item .bg-primary {
    background: rgba(255, 102, 0, 0.9) !important;
    backdrop-filter: blur(5px);
    border: 1px solid var(--primary);
    text-transform: uppercase;
    font-family: var(--font-mono);
    letter-spacing: 1px;
    clip-path: polygon(0 0, 100% 0, 90% 100%, 0% 100%);
    padding-right: 25px !important;
}

.tech-grid-card {
    text-align: left !important;
    position: relative;
    overflow: hidden;
}

.tech-icon {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px var(--primary-glow);
}

.tech-grid-card h4 {
    color: white;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.tech-grid-card p {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 0.95rem;
    line-height: 1.6;
}

.service-item {
    background: rgba(15, 15, 15, 0.6) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 102, 0, 0.1) !important;
    border-radius: 15px !important;
    transition: 0.5s;
}

.service-item:hover {
    border-color: var(--primary) !important;
    background: rgba(255, 102, 0, 0.05) !important;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(255, 102, 0, 0.2);
}

.causes-item:hover,
.service-item:hover,
.gallery-item:hover,
.hosted-event-item:hover,
.team-item:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 15px 40px var(--primary-glow);
}

.causes-item img,
.gallery-item img,
.hosted-event-item img {
    aspect-ratio: 4/5;
    object-fit: cover;
    width: 100%;
    height: auto;
}

.service-item img {
    max-height: 80px;
    width: auto;
    margin: 0 auto;
}

.team-item .team-text {
    background: transparent !important;
}

/* --- Optimized Modern Gallery System --- */
#mainGalleryGrid {
    content-visibility: auto;
    contain-intrinsic-size: 1000px;
    margin-top: 30px;
}

.gallery-item-modern {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #020202;
    aspect-ratio: 4/5;
    border: 1px solid rgba(255, 102, 0, 0.1);
    transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.gallery-item-modern img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    filter: brightness(0.9) contrast(1.1);
    image-rendering: auto;
    backface-visibility: hidden;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    opacity: 0;
    transition: 0.4s;
}

.gallery-item-modern:hover img {
    transform: scale(1.1);
    filter: brightness(1.1) contrast(1.2);
}

.gallery-item-modern:hover .gallery-overlay {
    opacity: 1;
}

.zoom-btn,
.download-btn {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    /* Techy square-ish corners */
    border: 1px solid rgba(255, 102, 0, 0.5);
    background: rgba(255, 102, 0, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    backdrop-filter: blur(5px);
}

.zoom-btn:hover,
.download-btn:hover {
    background: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
    transform: translateY(-3px);
}

/* Lightbox Enhancements */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 2, 2, 0.98);
    backdrop-filter: blur(20px);
    z-index: 30000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 95%;
    max-height: 85vh;
    border-radius: 12px;
    border: 1px solid rgba(255, 102, 0, 0.2);
    box-shadow: 0 0 100px rgba(0, 0, 0, 1);
    transform: scale(0.95);
    transition: 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.lightbox-overlay.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--primary);
    font-size: 2.5rem;
    cursor: pointer;
    transition: 0.3s;
}

.lightbox-download-btn {
    margin-top: 25px;
    padding: 12px 35px;
    background: var(--primary);
    color: white;
    border-radius: 5px;
    text-transform: uppercase;
    font-weight: 700;
    font-family: var(--font-mono);
    box-shadow: 0 5px 15px var(--primary-glow);
}

/*** Achievement Card ***/
.achievement-card {
    background: rgba(15, 15, 15, 0.6);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.3s;
}

.achievement-card:hover {
    border-color: var(--primary);
    background: rgba(255, 102, 0, 0.05);
}

/*** Testimonial ***/
.testimonial-carousel .testimonial-text {
    background: rgba(20, 20, 20, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--light);
}

.testimonial-carousel .owl-item.center .testimonial-text {
    background: var(--primary) !important;
    border-color: var(--primary);
}

/*** Footer ***/
.footer {
    background: var(--darker) !important;
    border-top: 2px solid var(--primary);
}

.footer .btn-link {
    display: block;
    margin-bottom: 10px;
    padding: 0;
    text-align: left;
    color: var(--text-muted) !important;
    font-size: 0.95rem;
    font-weight: normal;
    text-transform: capitalize;
    transition: .3s;
    text-decoration: none;
}

.footer .btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 12px;
    color: var(--primary);
    opacity: 0;
    transition: .3s;
}

.footer .btn-link:hover {
    color: var(--primary) !important;
    padding-left: 10px;
    text-shadow: 0 0 8px var(--primary-glow);
}

.footer .btn-link:hover::before {
    opacity: 1;
}

.footer .btn-link:hover i {
    color: var(--primary);
}

.footer p i {
    color: var(--primary);
    transition: 0.3s;
}

.footer p:hover i {
    text-shadow: 0 0 10px var(--primary-glow);
    transform: scale(1.1);
}

/*** Burger Menu Components ***/
.burger-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10001;
    position: relative;
    margin-left: 20px;
}

.burger-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s ease-in-out;
    box-shadow: 0 0 5px var(--primary-glow);
    transform-origin: left center;
}

.burger-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
    width: 100%;
}

.burger-menu-toggle.active span:nth-child(2) {
    width: 0%;
    opacity: 0;
}

.burger-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
    width: 100%;
}

.burger-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.burger-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.burger-menu {
    position: fixed;
    top: 0;
    right: -360px;
    width: 360px;
    height: 100vh;
    background: rgba(10, 10, 10, 0.4);
    backdrop-filter: blur(40px) saturate(150%);
    border-left: 1px solid rgba(255, 102, 0, 0.3);
    z-index: 10000;
    padding: 100px 40px 40px;
    transition: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -20px 0 80px rgba(0, 0, 0, 0.5);
}

.burger-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 100% 0%, rgba(255, 102, 0, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.burger-menu.active {
    right: 0;
}

.burger-menu-close {
    position: absolute;
    top: 30px;
    right: 40px;
    background: rgba(255, 102, 0, 0.1);
    border: 1px solid var(--primary);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: var(--primary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.burger-menu-close:hover {
    background: var(--primary);
    color: var(--dark);
    box-shadow: 0 0 20px var(--primary-glow);
    transform: rotate(90deg);
}

.burger-menu-title {
    font-family: var(--font-mono);
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 20px;
    letter-spacing: 4px;
    opacity: 0.6;
}

.burger-menu-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.burger-menu-nav li {
    margin-bottom: 5px;
    opacity: 0;
    transform: translateY(20px);
    transition: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.burger-menu.active .burger-menu-nav li {
    opacity: 1;
    transform: translateY(0);
}

.burger-menu.active .burger-menu-nav li:nth-child(1) {
    transition-delay: 0.1s;
}

.burger-menu.active .burger-menu-nav li:nth-child(2) {
    transition-delay: 0.15s;
}

.burger-menu.active .burger-menu-nav li:nth-child(3) {
    transition-delay: 0.2s;
}

.burger-menu.active .burger-menu-nav li:nth-child(4) {
    transition-delay: 0.25s;
}

.burger-menu.active .burger-menu-nav li:nth-child(5) {
    transition-delay: 0.3s;
}

.burger-menu.active .burger-menu-nav li:nth-child(6) {
    transition-delay: 0.35s;
}

.burger-menu.active .burger-menu-nav li:nth-child(7) {
    transition-delay: 0.4s;
}

.burger-menu.active .burger-menu-nav li:nth-child(8) {
    transition-delay: 0.45s;
}

.burger-menu.active .burger-menu-nav li:nth-child(9) {
    transition-delay: 0.5s;
}

.burger-menu.active .burger-menu-nav li:nth-child(10) {
    transition-delay: 0.55s;
}

.burger-menu-nav li a {
    color: var(--light);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 12px 0;
    transition: 0.3s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.burger-menu-nav li a i {
    width: 35px;
    color: var(--primary);
    font-size: 1.2rem;
    transition: 0.3s;
}

.burger-menu-nav li a:hover {
    color: var(--primary);
    padding-left: 15px;
    background: rgba(255, 102, 0, 0.15);
    text-shadow: 0 0 15px var(--primary-glow);
    border-radius: 8px;
    box-shadow: inset 0 0 10px rgba(255, 102, 0, 0.1);
}

.burger-menu-nav li a:hover i {
    transform: scale(1.2);
}

.burger-menu-footer {
    margin-top: auto;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 102, 0, 0.2);
}

.burger-socials {
    display: flex;
    gap: 15px;
}

.burger-socials a {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    transition: 0.3s;
    text-decoration: none;
}

.burger-socials a:hover {
    background: var(--primary);
    color: var(--dark);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
    transform: translateY(-3px);
}

/* Animations */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 5px var(--primary-glow);
    }

    50% {
        box-shadow: 0 0 20px var(--primary-glow);
    }

    100% {
        box-shadow: 0 0 5px var(--primary-glow);
    }
}

/* --- Modern Hero Animation (Replaces Glitch) --- */
@keyframes cinematic-reveal {
    0% {
        opacity: 0;
        transform: translateY(30px);
        filter: blur(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* --- Hero Typography (Forced) --- */
#header-carousel .hero-title {
    font-family: var(--font-secondary);
    font-weight: 800;
    font-size: 4.5rem;
    line-height: 1.1;
    letter-spacing: -1px;
    background: linear-gradient(to right, #ffffff, #a0a0a0) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 25px;
    opacity: 0;
    animation: cinematic-reveal 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.3s;
}

#header-carousel .hero-subtitle {
    font-family: var(--font-mono);
    color: var(--primary) !important;
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 30px;
    display: block;
    opacity: 0;
    animation: cinematic-reveal 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.1s;
}

.hero-text {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 700px;
    margin: 0 auto 40px;
    opacity: 0;
    animation: cinematic-reveal 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.5s;
}

.hero-btn {
    opacity: 0;
    animation: cinematic-reveal 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.7s;
    background: rgba(255, 102, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid var(--primary);
    box-shadow: 0 0 20px rgba(255, 102, 0, 0.2);
    color: white;
}

.hero-btn:hover {
    background: var(--primary);
    box-shadow: 0 0 40px rgba(255, 102, 0, 0.6);
    transform: translateY(-3px);
}


#header-carousel h1 {
    text-shadow: 0 0 10px rgba(255, 102, 0, 0.5);
}

.btn-primary {
    animation: pulse-glow 3s infinite;
}

/*** Custom Image Grids ***/
.about-img-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(12, 1fr);
    height: 600px;
    gap: 15px;
}

.about-img-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 2px solid rgba(255, 102, 0, 0.3);
    border-radius: 8px;
    filter: grayscale(0.8) contrast(1.2);
    transition: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/*** Membership Section ***/
.membership-panel {
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid rgba(255, 102, 0, 0.2);
    border-radius: 20px;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(255, 102, 0, 0.05);
}

.membership-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 102, 0, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.counter-card {
    background: rgba(255, 102, 0, 0.05);
    border: 1px solid rgba(255, 102, 0, 0.1);
    border-radius: 12px;
    padding: 20px;
    transition: 0.3s;
}

.counter-card:hover {
    background: rgba(255, 102, 0, 0.1);
    border-color: var(--primary);
    transform: translateY(-5px);
}

.about-img-grid img:nth-child(1) {
    grid-column: 1 / 7;
    grid-row: 1 / 8;
}

.about-img-grid img:nth-child(2) {
    grid-column: 7 / 13;
    grid-row: 1 / 6;
}

.about-img-grid img:nth-child(3) {
    grid-column: 7 / 10;
    grid-row: 6 / 13;
}

.about-img-grid img:nth-child(4) {
    grid-column: 10 / 13;
    grid-row: 6 / 9;
}

.about-img-grid img:nth-child(5) {
    grid-column: 1 / 7;
    grid-row: 8 / 13;
}

.about-img-grid img:hover {
    filter: grayscale(0) contrast(1);
    transform: scale(1.03) translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 0 30px var(--primary-glow);
    z-index: 2;
}

.tech-frame {
    position: relative;
    padding: 15px;
    border: 1px solid rgba(255, 102, 0, 0.2);
    background: rgba(255, 102, 0, 0.03);
    border-radius: 20px;
    display: inline-block;
    max-width: 100%;
    box-sizing: border-box;
}

.tech-frame::before,
.tech-frame::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary);
}

.tech-frame::before {
    top: -5px;
    left: -5px;
    border-right: none;
    border-bottom: none;
}

.tech-frame::after {
    bottom: -5px;
    right: -5px;
    border-left: none;
    border-top: none;
}

.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

.flicker {
    animation: flicker 2s infinite;
}

@keyframes flicker {

    0%,
    18%,
    22%,
    25%,
    53%,
    57%,
    100% {
        opacity: 1;
    }

    20%,
    24%,
    55% {
        opacity: 0.5;
    }
}

/* --- Global Contact & Chat Components (Modernized) --- */
.contact-card-modern {
    background: linear-gradient(145deg, rgba(20, 20, 20, 0.6) 0%, rgba(10, 10, 10, 0.8) 100%);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 25px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    transition: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.contact-card-modern:hover {
    border-color: var(--primary);
    background: linear-gradient(145deg, rgba(25, 25, 25, 0.8) 0%, rgba(15, 15, 15, 0.9) 100%);
    box-shadow: 0 10px 30px rgba(255, 102, 0, 0.2);
    transform: translateY(-5px);
}

.chat-direct-card {
    display: block;
    padding: 50px 30px;
    background: linear-gradient(160deg, rgba(25, 25, 25, 0.7) 0%, rgba(5, 5, 5, 0.9) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-top: 4px solid transparent;
    /* Prepare for hover color */
    border-radius: 24px;
    text-align: center;
    text-decoration: none !important;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.6);
}

.chat-direct-card i {
    font-size: 3.5rem;
    margin-bottom: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8);
}

.chat-direct-card h3 {
    color: white;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
    font-size: 1.5rem;
}

.chat-direct-card p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
    margin-bottom: 35px;
    line-height: 1.6;
    transition: 0.3s;
}

.chat-direct-card .action-btn {
    display: inline-block;
    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border-radius: 50px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    transition: 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* WhatsApp Specific */
.chat-direct-card.whatsapp {
    border-top-color: rgba(37, 211, 102, 0.3);
}

.chat-direct-card.whatsapp i {
    color: #25D366;
    text-shadow: 0 0 20px rgba(37, 211, 102, 0.3);
}

.chat-direct-card.whatsapp:hover {
    border-top-color: #25D366;
    box-shadow: 0 20px 50px -10px rgba(37, 211, 102, 0.15);
}

.chat-direct-card.whatsapp:hover i {
    background: rgba(37, 211, 102, 0.1);
    box-shadow: 0 0 40px rgba(37, 211, 102, 0.4);
    transform: scale(1.1) rotate(-5deg);
    color: #fff;
}

/* Instagram Specific */
.chat-direct-card.instagram {
    border-top-color: rgba(225, 48, 108, 0.3);
}

.chat-direct-card.instagram i {
    color: #E1306C;
    text-shadow: 0 0 20px rgba(225, 48, 108, 0.3);
}

.chat-direct-card.instagram:hover {
    border-top-color: #E1306C;
    box-shadow: 0 20px 50px -10px rgba(225, 48, 108, 0.15);
}

.chat-direct-card.instagram:hover i {
    background: rgba(225, 48, 108, 0.1);
    box-shadow: 0 0 40px rgba(225, 48, 108, 0.4);
    transform: scale(1.1) rotate(5deg);
    color: #fff;
}

/* Email Specific */
.chat-direct-card.email {
    border-top-color: rgba(255, 102, 0, 0.3);
}

.chat-direct-card.email i {
    color: var(--primary);
    text-shadow: 0 0 20px rgba(255, 102, 0, 0.3);
}

.chat-direct-card.email:hover {
    border-top-color: var(--primary);
    box-shadow: 0 20px 50px -10px rgba(255, 102, 0, 0.15);
}

.chat-direct-card.email:hover i {
    background: rgba(255, 102, 0, 0.1);
    box-shadow: 0 0 40px rgba(255, 102, 0, 0.4);
    transform: scale(1.1) translateY(-5px);
    color: #fff;
}

/* General Hover Effects */
.chat-direct-card:hover {
    transform: translateY(-10px);
}

.chat-direct-card:hover p {
    color: rgba(255, 255, 255, 0.9);
}

.chat-direct-card:hover .action-btn {
    background: white;
    color: black;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    border-color: white;
}

.contact-icon-box {
    width: 60px;
    height: 60px;
    min-width: 60px;
    background: linear-gradient(135deg, var(--primary), #cc5200);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 10px 20px rgba(255, 102, 0, 0.3);
}

/******************************************
    ADVANCED VISUAL EFFECTS (TECH THEME)
*******************************************/

/* --- Glitch Text Animation --- */
.glitch-text {
    position: relative;
    color: white;
    mix-blend-mode: lighten;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    width: 100%;
    background: var(--dark);
    clip: rect(0, 0, 0, 0);
}

.glitch-text::before {
    left: -2px;
    text-shadow: 1px 0 #ff00c1;
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: 2px;
    text-shadow: -1px 0 #00fff9;
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% {
        clip: rect(20px, 9999px, 15px, 0);
    }

    20% {
        clip: rect(50px, 9999px, 60px, 0);
    }

    40% {
        clip: rect(10px, 9999px, 80px, 0);
    }

    60% {
        clip: rect(80px, 9999px, 20px, 0);
    }

    80% {
        clip: rect(30px, 9999px, 5px, 0);
    }

    100% {
        clip: rect(70px, 9999px, 90px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(60px, 9999px, 25px, 0);
    }

    20% {
        clip: rect(10px, 9999px, 5px, 0);
    }

    40% {
        clip: rect(80px, 9999px, 40px, 0);
    }

    60% {
        clip: rect(20px, 9999px, 90px, 0);
    }

    80% {
        clip: rect(50px, 9999px, 10px, 0);
    }

    100% {
        clip: rect(30px, 9999px, 70px, 0);
    }
}

/* --- Tech Frame Scan Animation --- */
.tech-frame {
    overflow: hidden;
    /* Ensure scan stays inside */
}

.tech-frame::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: rgba(255, 102, 0, 0.5);
    box-shadow: 0 0 15px var(--primary);
    filter: blur(5px);
    animation: scan-vertical 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 10;
}

@keyframes scan-vertical {
    0% {
        top: -10%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 110%;
        opacity: 0;
    }
}

/* --- Neon Glow Pull (Interactive) --- */
.causes-item:hover,
.service-item:hover,
.gallery-item:hover {
    box-shadow: inset 0 0 20px rgba(255, 102, 0, 0.2),
        0 0 30px rgba(255, 102, 0, 0.4);
    border-color: var(--primary);
}

/* --- Scrollbar Styling --- */
::-webkit-scrollbar {
    width: 8px;
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--primary), #cc5200);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

/******************************************
    RESPONSIVE MEDIA QUERIES (END OF FILE)
*******************************************/

@media (max-width: 991.98px) {

    .container-xxl,
    .container-fluid {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .py-5 {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }

    .display-4 {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
    }

    .display-5 {
        font-size: 2.2rem !important;
    }

    .display-6 {
        font-size: 1.8rem !important;
    }

    .carousel-caption p {
        font-size: 1rem !important;
        margin-bottom: 2rem !important;
    }

    .navbar-brand img {
        width: 150px !important;
    }

    .top-bar {
        display: none !important;
    }

    .navbar .navbar-nav {
        margin-top: 15px;
        background: rgba(5, 5, 5, 0.98);
        padding: 20px !important;
        border: 1px solid var(--primary-glow);
        border-radius: 12px;
        backdrop-filter: blur(15px);
    }

    .navbar .navbar-nav .nav-link {
        padding: 12px 0;
        margin: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .navbar .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }

    .about-img-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
        height: auto;
        gap: 10px;
    }

    .about-img-grid img {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
        height: 180px !important;
    }

    .about-img-grid img:nth-child(5) {
        grid-column: span 2 !important;
        height: 220px !important;
    }

    .tech-frame {
        padding: 8px;
        border-radius: 12px;
    }

    .tech-frame::before,
    .tech-frame::after {
        width: 20px;
        height: 20px;
    }

    .membership-panel {
        padding: 40px 20px;
    }

    .causes-item img,
    .gallery-item img,
    .hosted-event-item img {
        height: 250px !important;
    }

    .btn {
        padding: 12px 25px !important;
        font-size: 0.9rem !important;
    }

    .card-btn {
        padding: 10px 20px !important;
        font-size: 0.75rem !important;
        width: 100%;
        justify-content: center;
    }

    .footer {
        text-align: center !important;
    }

    .footer .row {
        justify-content: center !important;
    }

    .footer .col-lg-3,
    .footer .col-md-6 {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        margin-bottom: 30px !important;
    }

    .footer .btn-link {
        text-align: center !important;
        padding: 10px 0 !important;
        margin: 0 auto !important;
        display: block !important;
        width: fit-content !important;
    }

    .footer .btn-link::before {
        display: none !important;
    }

    .footer p {
        text-align: center;
        margin-bottom: 15px;
    }

    .tech-frame {
        display: inline-block !important;
        /* Changed back to inline-block for text-center parent */
        margin: 0 auto !important;
        max-width: 95% !important;
        /* Prevent edge touching */
        padding: 10px !important;
        border-radius: 15px !important;
    }

    .tech-frame img {
        width: 100% !important;
        height: auto !important;
        border-radius: 12px !important;
    }


    .tech-frame .position-absolute {
        bottom: -2px !important;
        /* Tighten for mobile */
    }

    .team-item .team-text {
        padding: 15px 10px !important;
    }

    .team-item h5 {
        font-size: 0.95rem !important;
        margin-bottom: 5px !important;
    }

    .team-item p {
        font-size: 0.75rem !important;
    }

    .row.g-4 {
        --bs-gutter-x: 10px;
        --bs-gutter-y: 10px;
    }

    .carousel-control-prev,
    .carousel-control-next {
        display: none !important;
    }

    .carousel-item img {
        height: 60vh !important;
        object-fit: cover;
    }

    .fixed-top {
        background: rgba(5, 5, 5, 0.95) !important;
        backdrop-filter: blur(15px);
    }
}

@media (max-width: 1366px) {

    /* Laptop Optimization */
    .container-xxl {
        padding-left: 30px;
        padding-right: 30px;
    }

    .about-img-grid {
        height: 500px;
        /* Reduce height for smaller laptop screens */
    }

    .display-4 {
        font-size: 3rem;
        /* Resize excessively large headings */
    }

    .navbar .navbar-nav .nav-link {
        margin-right: 15px;
        /* Reduce spacing to prevent navbar wrap */
        font-size: 0.85rem;
    }
}

@media (max-width: 767.98px) {
    .display-4 {
        font-size: 2rem !important;
    }

    .display-5 {
        font-size: 1.8rem !important;
    }

    .display-6 {
        font-size: 1.5rem !important;
    }

    .about-img-grid img {
        height: 140px !important;
    }

    .about-img-grid img:nth-child(5) {
        height: 180px !important;
    }

    /* Mobile Optimization for Chat Cards */
    .chat-direct-card {
        padding: 30px 20px;
        border-radius: 16px;
    }

    .chat-direct-card i {
        width: 70px;
        height: 70px;
        font-size: 2.2rem;
        margin-bottom: 20px;
    }

    .chat-direct-card h3 {
        font-size: 1.25rem;
        margin-bottom: 10px;
    }

    .chat-direct-card p {
        font-size: 0.85rem;
        margin-bottom: 25px;
        line-height: 1.4;
    }

    .chat-direct-card .action-btn {
        padding: 10px 25px;
        font-size: 0.8rem;
    }

    /* --- Mobile Optimization for New Hero Carousel --- */
    #header-carousel .hero-title {
        font-size: 1.8rem !important;
        line-height: 1.3;
        margin-bottom: 12px;
    }

    #header-carousel .hero-subtitle {
        font-size: 0.85rem !important;
        margin-bottom: 10px;
        letter-spacing: 1px;
    }

    #header-carousel .hero-text {
        font-size: 0.9rem !important;
        margin-bottom: 20px;
        line-height: 1.5;
        max-width: 100%;
        /* Ensure it fits */
    }

    #header-carousel .hero-btn {
        padding: 8px 25px !important;
        font-size: 0.85rem;
    }

    #header-carousel .col-lg-7 {
        padding-top: 0 !important;
        /* Remove excessive Bootstrap padding on mobile */
    }

    /* --- Mobile Optimization for Contact Page --- */
    .contact-card-modern {
        flex-direction: column;
        text-align: center;
        padding: 25px !important;
    }

    .contact-card-modern .contact-icon-box {
        margin-bottom: 15px;
    }

    .contact-card-modern .ms-4 {
        margin-left: 0 !important;
        /* Reset bootstrap margin */
    }

    /* Fix Copyright Overlap on Mobile */
    .copyright {
        padding-bottom: 30px !important;
        position: relative;
        z-index: 10;
    }
}

@media (max-width: 480px) {
    .display-4 {
        font-size: 1.6rem !important;
    }

    .carousel-caption p {
        font-size: 0.85rem !important;
    }

    .about-img-grid {
        gap: 8px;
    }

    .about-img-grid img {
        height: 110px !important;
    }

    .about-img-grid img:nth-child(5) {
        height: 150px !important;
    }

    .membership-panel {
        padding: 30px 15px;
    }

    .btn {
        width: 100%;
        margin-right: 0 !important;
        margin-bottom: 10px;
    }

    /* Ensure tech-frame does not overflow */
    .tech-frame {
        max-width: 90% !important;
        /* Force margin against edges */
    }
}