/* Modern Variables */
:root {
    --primary-color: #e6a756;
    --secondary-color: #2c3e50;
    --dark-bg: #1a1a1a;
    --light-bg: #f8f9fa;
    --font-heading: 'Raleway', sans-serif;
    --font-body: 'Lora', serif;
}

/* Base Styles */
body {
    font-family: var(--font-body);
    line-height: 1.7;
    transition: background-color 0.3s ease, color 0.3s ease;
}

[data-bs-theme="light"] body {
    background-color: var(--light-bg);
    color: #212529;
}

[data-bs-theme="dark"] body {
    background: radial-gradient(circle at top, #2b3035 0%, #050505 100%);
    color: #f8f9fa;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand,
.btn {
    font-family: var(--font-heading);
}

/* Header / Masthead */
.masthead {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('assets/img/bg.png');
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    padding-top: 10rem;
    padding-bottom: 10rem;
    margin-bottom: 0;
    position: relative;
}

.masthead-heading {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

@media (min-width: 992px) {
    .masthead-heading {
        font-size: 4rem;
    }
}

/* Navbar */
#mainNav {
    background-color: transparent;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    transition: all 0.3s ease-in-out;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

#mainNav.navbar-shrink {
    background-color: rgba(22, 16, 14, 0.95);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.navbar-brand {
    font-weight: 700;
    color: #fff !important;
    transition: color 0.3s;
}

.navbar-brand:hover {
    color: var(--primary-color) !important;
}

.nav-link {
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.7) !important;
    transition: color 0.3s;
}

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

@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: rgba(22, 16, 14, 0.95);
        padding: 1rem;
        border-radius: 0.5rem;
        margin-top: 0.5rem;
    }

    .navbar-toggler {
        background-color: rgba(0, 0, 0, 0.5);
        border-color: rgba(255, 255, 255, 0.5);
    }
}

.dropdown-menu {
    background-color: #222;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-item {
    color: rgba(255, 255, 255, 0.7);
}

.dropdown-item:hover {
    background-color: transparent;
    color: var(--primary-color);
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #d4923e;
    border-color: #d4923e;
    transform: translateY(-2px);
}

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

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

.border-primary {
    border-color: var(--primary-color) !important;
}

/* Scroll to top */
#btn-back-to-top {
    background-color: var(--primary-color);
    border: none;
    color: white;
    transition: transform 0.3s, background-color 0.3s;
}

#btn-back-to-top:hover {
    transform: translateY(-5px);
    background-color: #d4923e;
}

/* Enhanced Footer Styles */
.footer-gradient {
    background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
    position: relative;
}

.footer-heading {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 25px;
    font-weight: 700;
    letter-spacing: 1px;
}

.footer-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 60px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

@media (max-width: 991.98px) {
    .footer-heading::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

.footer-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    padding: 5px 0;
    position: relative;
}

.footer-link:hover {
    color: var(--primary-color);
    padding-left: 15px;
}

.footer-link::before {
    content: '\f105';
    /* FontAwesome angle-right */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: all 0.3s ease;
    color: var(--primary-color);
}

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

.social-btn {
    width: 45px;
    height: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    margin-right: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(230, 167, 86, 0.3);
}

/* Animations & Header Extras */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

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

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

.floating-logo {
    animation: float 6s ease-in-out infinite;
}

.btn-xl {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 50rem;
}

.scroll-down-arrow {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    opacity: 0.7;
    transition: opacity 0.3s;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) translateX(-50%);
    }

    40% {
        transform: translateY(-10px) translateX(-50%);
    }

    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

/* --- GLOBAL & UTILITIES --- */
/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

[data-bs-theme="light"] ::-webkit-scrollbar-track {
    background: #f1f1f1;
}

[data-bs-theme="light"] ::-webkit-scrollbar-thumb {
    background: #adb5bd;
}

[data-bs-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Loader */
#global-loader {
    position: fixed;
    z-index: 99999;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #121212;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
}

.loader-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.loader-text {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    color: #f8f9fa;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
    }

    50% {
        transform: scale(1);
    }

    100% {
        transform: scale(0.95);
    }
}

body.loading {
    overflow: hidden;
}

/* Hide loader immediately if loaded class is present */
html.loaded #global-loader {
    display: none !important;
}

/* Scroll Progress */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #ffc107);
    z-index: 10000;
    transition: width 0.1s;
    box-shadow: 0 0 10px rgba(230, 167, 86, 0.7);
}

/* Noise Overlay */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIj48ZmlsdGVyIGlkPSJub2lzZSI+PGZlVHVyYnVsZW5jZSB0eXBlPSJmcmFjdGFsTm9pc2UiIGJhc2VGcmVxdWVuY3k9IjAuNjUiIG51bU9jdGF2ZXM9IjMiIHN0aXRjaFRpbGVzPSJzdGl0Y2giLz48L2ZpbHRlcj48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWx0ZXI9InVybCgjbm9pc2UpIiBvcGFjaXR5PSIwLjA1Ii8+PC9zdmc+');
    pointer-events: none;
    z-index: 9998;
    opacity: 0.04;
}

/* --- GLASSMORPHISM & CARDS --- */
.glass-card,
#intro .bg-white {
    background: rgba(30, 30, 30, 0.6) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    color: #e0e0e0 !important;
    transition: all 0.4s ease;
}

.glass-card:hover,
#intro .bg-white:hover {
    transform: translateY(-5px);
    background: rgba(40, 40, 40, 0.7) !important;
    border-color: rgba(230, 167, 86, 0.4) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

[data-bs-theme="light"] .glass-card,
[data-bs-theme="light"] #intro .bg-white {
    background: rgba(255, 255, 255, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    color: #212529 !important;
}

[data-bs-theme="light"] .glass-card:hover,
[data-bs-theme="light"] #intro .bg-white:hover {
    background: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.glass-panel {
    background: rgba(10, 10, 10, 0.3);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 3rem 2rem;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.05);
    isolation: isolate;
    transition: transform 0.1s ease-out;
    max-width: 950px;
    margin: 0 auto;
}

[data-bs-theme="light"] .glass-panel {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

/* --- HERO & TITLES --- */
.hero-title {
    font-weight: 900;
    letter-spacing: 2px;
    background: linear-gradient(to right, #ffffff 20%, var(--primary-color) 50%, #ffffff 80%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 25px rgba(255, 193, 7, 0.5));
    animation: shine 3s linear infinite;
}

[data-bs-theme="light"] .hero-title {
    background: linear-gradient(45deg, #212529, var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

/* --- CATEGORIES --- */
.category-icon-wrapper {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.category-icon-wrapper:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 10px 25px rgba(230, 167, 86, 0.4);
    background: linear-gradient(45deg, var(--primary-color), #ffc107);
    border-color: transparent;
}

.category-icon-wrapper:hover i {
    color: #fff !important;
}

[data-bs-theme="light"] .category-icon-wrapper {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

[data-bs-theme="light"] .category-icon-wrapper i {
    color: var(--primary-color);
}

/* --- AI WIDGET --- */
#ai-widget-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1050;
    font-family: var(--font-heading);
}

#ai-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    z-index: 1051;
}

#ai-toggle:hover {
    transform: scale(1.1);
}

#ai-panel {
    width: 350px;
    height: 500px;
    position: absolute;
    bottom: 80px;
    left: 0;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform-origin: bottom left;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    pointer-events: none;
}

#ai-panel.active {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: all;
}

[data-bs-theme="dark"] #ai-panel {
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="light"] #ai-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.ai-header {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.1);
}

.ai-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scrollbar-width: thin;
}

.ai-input-area {
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.05);
}

.ai-msg {
    max-width: 85%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
    animation: fadeIn 0.3s ease;
}

.ai-msg.user {
    align-self: flex-end;
    background: linear-gradient(45deg, var(--primary-color), #ffc107);
    color: #000;
    border-bottom-right-radius: 2px;
}

.ai-msg.bot {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
    border-bottom-left-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

[data-bs-theme="light"] .ai-msg.bot {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.05);
}

.typing-indicator span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: currentColor;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
    margin: 0 1px;
    opacity: 0.6;
}

.typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- SEARCH MODAL --- */
#searchModal .modal-content {
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border-radius: 20px;
}

[data-bs-theme="light"] #searchModal .modal-content {
    background: rgba(255, 255, 255, 0.85);
    color: #212529;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

#searchModal .list-group-item {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.1);
    color: inherit;
    transition: all 0.2s;
}

[data-bs-theme="light"] #searchModal .list-group-item {
    border-color: rgba(0, 0, 0, 0.1);
}

#searchModal .list-group-item:hover {
    background: rgba(230, 167, 86, 0.15);
    padding-left: 1.5rem;
    border-left: 3px solid var(--primary-color);
}

#searchModal .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="light"] #searchModal .modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* --- FLOATING BACKGROUNDS --- */
.floating-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
    animation: fadeInBg 2.5s ease-out forwards;
}

@keyframes fadeInBg {
    from {
        opacity: 0;
        filter: blur(5px);
    }

    to {
        opacity: 1;
        filter: blur(0);
    }
}

.floating-item {
    position: absolute;
    animation: float-3d 20s infinite ease-in-out alternate;
    will-change: transform;
}

.floating-item i {
    text-shadow: 0 0 15px currentColor;
}

.cube-3d {
    width: 60px;
    height: 60px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate-3d 15s infinite linear;
}

.cube-face {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 15px rgba(230, 167, 86, 0.4), inset 0 0 10px rgba(230, 167, 86, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
}

.cube-face.front {
    transform: translateZ(30px);
}

.cube-face.back {
    transform: rotateY(180deg) translateZ(30px);
}

.cube-face.right {
    transform: rotateY(90deg) translateZ(30px);
}

.cube-face.left {
    transform: rotateY(-90deg) translateZ(30px);
}

.cube-face.top {
    transform: rotateX(90deg) translateZ(30px);
}

.cube-face.bottom {
    transform: rotateX(-90deg) translateZ(30px);
}

@keyframes float-3d {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(30px, 50px) rotate(10deg);
    }
}

@keyframes rotate-3d {
    0% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }

    100% {
        transform: rotateX(360deg) rotateY(180deg) rotateZ(360deg);
    }
}

.item-1 {
    top: 15%;
    left: 10%;
    animation-duration: 25s;
}

.item-2 {
    top: 25%;
    right: 15%;
    animation-duration: 30s;
    animation-delay: -5s;
}

.item-3 {
    bottom: 20%;
    left: 20%;
    animation-duration: 35s;
    animation-delay: -10s;
}

.item-4 {
    bottom: 10%;
    right: 10%;
    animation-duration: 28s;
    animation-delay: -2s;
}

.item-5 {
    top: 45%;
    left: 5%;
    animation-duration: 38s;
    animation-delay: -5s;
}

.item-6 {
    top: 65%;
    right: 8%;
    animation-duration: 32s;
    animation-delay: -12s;
}

.item-7 {
    top: 15%;
    left: 45%;
    animation-duration: 45s;
    animation-delay: -20s;
    filter: blur(1px);
}

.item-8 {
    bottom: 15%;
    left: 35%;
    animation-duration: 29s;
    animation-delay: -8s;
}

.item-9 {
    top: 75%;
    right: 25%;
    animation-duration: 36s;
    animation-delay: -4s;
}

.item-10 {
    top: 10%;
    right: 35%;
    animation-duration: 40s;
    animation-delay: -15s;
    filter: blur(2px);
}