/* ==========================================================================
   1. Global Resets & Variables
   ========================================================================== */
:root {
    --primary-glow: rgba(144, 101, 255, 0.2);
    --dark-bg: #0f0e17;
    --card-bg: #1a1a2e;
    --text-light: #fffffe;
    --text-secondary: #a7a9be;
    --hover-bg: #f2f2f6;
    --hover-text: #000000;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul {
    margin: 0;
    padding: 0;
}

body {
    background-color: #000;
    font-family: 'Poppins', sans-serif;
    color: var(--text-light);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   2. Header & Navigation
   ========================================================================== */
header {
    width: 100%;
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    font-family: 'Montserrat', sans-serif;
    transition: background-color 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}

header.scrolled {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(144, 101, 255, 0.25);
    padding: 15px 0;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-container img {
    height: 50px;
    transition: height 0.3s ease;
    display: block;
}

header.scrolled .logo-container img {
    height: 40px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 35px;
}

.main-nav ul li {
    position: relative;
}

.main-nav ul li>a {
    /* UPDATED: Set default link color to white */
    color: var(--text-light);
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.3s ease;
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 1px;
    padding-bottom: 5px;
}

.main-nav ul li:hover>a {
    color: #b58aff;
}

/* UPDATED: Style for the active page link */
.active-link {
    color: #b58aff !important;
    font-weight: 700 !important;
}

.main-nav .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(15, 15, 15, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    padding: 5px 0;
    min-width: 220px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    display: flex;
    flex-direction: column;
}

.main-nav li:hover>.submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px);
}

.main-nav .submenu li {
    width: 100%;
}

.main-nav .submenu li a {
    display: block;
    padding: 6px 20px;
    color: #ffffff;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
}

.main-nav .submenu li a:hover {
    background: #1f1f28;
    color: #b58aff;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-btn {
    display: inline-block;
    padding: 10px 22px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(217, 179, 255, 0.6);
    border-radius: 50px;
    color: #b58aff;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
}

.contact-btn:hover {
    background: rgba(217, 179, 255, 0.08);
    border-color: #b58aff;
    box-shadow: 0 0 14px #b58aff, 0 0 30px #9065ff;
}

#hamburger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    background: none;
    border: none;
}

#hamburger-menu span {
    width: 25px;
    height: 3px;
    background: #b58aff;
    transition: all 0.3s ease;
    border-radius: 2px;
    display: block;
}

#side-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100%;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(15px);
    padding: 20px;
    z-index: 1001;
    transition: right 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    overflow-y: auto;
}

#side-menu.active {
    right: 0;
}

#side-menu .side-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--primary-glow);
}

#close-menu-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}

#side-menu .side-nav-list,
#side-menu .submenu-mobile {
    list-style: none;
}

#side-menu .side-nav-list>li {
    margin-bottom: 10px;
}

#side-menu .side-nav-list li a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    display: block;
    padding: 12px 0;
}

#side-menu .submenu-mobile {
    padding-left: 20px;
    display: none;
    margin-top: 10px;
}

#side-menu li.active>.submenu-mobile {
    display: block;
}

#side-menu li.active>a {
    color: #d84dff;
}

/* ==========================================================================
   3. Banner
   ========================================================================== */
.webverse-banner {
    padding: 120px 0;
    background-color: #000;
    position: relative;
    overflow: hidden;
    text-align: center;
    margin-top: 80px;
    /* offset for fixed header */
}

.webverse-banner .container {
    max-width: 500px;
    position: relative;
    z-index: 1;
}

.webverse-banner h2 {
    font-size: 2.6rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.webverse-banner p {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 30px;
    color: #cbd5e1;
}

.webverse-banner .explore-btn {
    display: inline-block;
    background: linear-gradient(90deg, #7e22ce, #3b82f6);
    color: #ffffff;
    padding: 14px 36px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(110, 69, 226, 0.4);
    transition: all 0.3s;
}

.webverse-banner .explore-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(110, 69, 226, 0.6);
}

/* ==========================================================================
   4. Explore Webverse Interactive Selector
   ========================================================================== */
.webverse-interactive-selector {
    padding: 80px 0;
    background: #060a15;
}

.section-heading {
    color: #dcdcdc;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 40px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: 'Poppins', sans-serif;
}

.features-grid-interactive {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.feature-item {
    text-align: center;
    cursor: pointer;
    outline: none;
}

/* Icon Box Styles */
.icon-box {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.icon-box:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.icon-box.active {
    background: linear-gradient(135deg, #7e22ce 0%, #3b82f6 100%);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(110, 69, 226, 0.4),
        0 0 0 2px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.feature-item:not(.active) .icon-box {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    opacity: 0.8;
}

.feature-item:not(.active) .icon-box:hover {
    background: rgba(0, 0, 0, 0.5);
    opacity: 1;
}

.icon-box img {
    width: 50px;
    height: 50px;
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
}

.icon-box.active img {
    filter: brightness(0) invert(1);
}

.feature-item:not(.active) .icon-box img {
    filter: brightness(0) invert(5) opacity(0.7);
}

.feature-item h3 {
    color: white;
    font-size: 16px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.feature-item.active h3 {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.feature-item:not(.active) h3 {
    color: rgba(255, 255, 255, 0.7);
}

.webverse-content-container {
    margin-top: 40px;
}

.webverse-content-container .video-wrapper {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
}

.webverse-content-container video {
    width: 100%;
    height: 500px;
    border-radius: 8px;
    object-fit: cover;
}

.video-caption {
    color: #dcdcdc;
    text-align: center;
    margin-top: 15px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

/* ==========================================================================
   5. Digiverse Feature Cards
   ========================================================================== */
.digiverse-features-section {
    background: var(--dark-bg);
    padding: 80px 0;
    font-family: 'Inter', sans-serif;
}

.digiverse-features-section .section-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    background: linear-gradient(90deg, #ffffff, #c7d2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.digiverse-features-section .section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.digiverse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    background: var(--hover-bg);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.feature-card:hover .card-content h3,
.feature-card:hover .card-content p {
    color: var(--hover-text);
}

.card-content {
    flex-grow: 1;
}

.card-image {
    height: 220px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-top: 1rem;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.card-image:hover img {
    transform: scale(1.05);
}

.image-hover-text {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.card-image:hover .image-hover-text {
    opacity: 1;
}

.card-number {
    background-color: #d796ea;
    color: #000;
    font-weight: bold;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.feature-card p {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

/* ==========================================================================
   6. Image Modal
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.modal.show .modal-content {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.modal-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #fff;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 4px;
    width: fit-content;
    max-width: 80%;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    z-index: 2001;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: #bbb;
    text-decoration: none;
    transform: scale(1.1);
}

.modal-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.loader-spinner {
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 5px solid #9065ff;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   7. Footer
   ========================================================================== */
.footer-section {
    background-color: #000;
    padding: 80px 0 40px;
    font-family: 'Poppins', sans-serif;
}

.footer-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col {
    flex: 1;
    min-width: 200px;
}

.footer-title {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    font-family: 'Poppins', sans-serif;
}

.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li {
    margin-bottom: 12px;
}

.footer-menu a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.3s;
    font-family: 'Poppins', sans-serif;
}

.footer-menu a:hover {
    color: #fff !important;
}

.footer-col.footer-spim {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.footer-col.footer-spim img {
    max-width: 150px;
    margin-bottom: 20px;
    filter: brightness(1) invert(0);
    transition: opacity 0.3s ease;
    display: block;
}

.footer-col.footer-spim img:hover {
    opacity: 0.9;
}

.company-info {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.6;
}

.company-info p {
    margin: 0 0 10px;
}

.company-info strong {
    color: #fff;
}

/* Copyright */
.glass-bottom-bar {
    background: rgba(0, 0, 0, 0.91);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 16px 20px;
    border-top: none;
    box-shadow: 0 -4px 12px rgba(181, 138, 255, 0.2);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    z-index: 99;
}

.glass-content-wrap {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.glass-copyright {
    color: #94a3b8;
    font-size: 14px;
    margin: 0;
}

.glass-copyright a {
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
}

.glass-copyright a:hover {
    color: #FFFFFF;
}

.glass-icons {
    display: flex;
    gap: 16px;
}

.icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: all 0.3s ease;
    font-size: 15px;
    background-color: transparent;
    border: none;
}

.icon svg {
    height: 24px;
    width: 24px;
    fill: currentColor;
    transition: color 0.3s ease;
}

.icon:hover {
    background-color: transparent;
    box-shadow: none;
    transform: scale(1.2);
}

.icon.li:hover svg,
.icon.fb:hover svg,
.icon.ig:hover svg {
    color: #FFFFFF;
}

/* ====================
   8. WhatsApp & Back to Top Buttons
   ==================== */

/* Back to Top Button */
.progress-wrap {
    position: fixed;
    right: 30px;
    bottom: 30px;
    height: 60px;
    width: 60px;
    cursor: pointer;
    display: block;
    border-radius: 50px;
    box-shadow: inset 0 0 0 2px rgba(144, 101, 255, 0.2);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 400ms linear;
}

/* WhatsApp button - positioned above the Back to Top button */
.whatsapp-float {
    position: fixed;
    right: 30px;
    bottom: 100px; /* 60px (height of progress-wrap) + 10px (spacing) */
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.6);
}

.whatsapp-float i {
    margin-top: 2px;
}

.progress-wrap.active-progress {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.progress-wrap::after {
    position: absolute;
    content: '';
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #7e22ce 0%, #3b82f6 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.progress-wrap:hover::after {
    opacity: 0.1;
}

.progress-wrap .progress-icon {
    position: absolute;
    height: 60px;
    width: 60px;
    font-size: 18px;
    text-align: center;
    line-height: 60px;
    color: #9065ff;
    left: 0;
    top: 0;
    z-index: 1;
    transition: all 400ms linear;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-wrap:hover .progress-icon {
    color: #ffffff;
}

.progress-wrap svg path {
    fill: none;
}

.progress-wrap svg.progress-circle path {
    stroke: #9065ff;
    stroke-width: 4;
    box-sizing: border-box;
    transition: all 400ms linear;
}

/* ==========================================================================
   9. Responsive
   ========================================================================== */
@media (max-width: 992px) {
    .main-nav,
    .contact-btn {
        display: none;
    }

    #hamburger-menu {
        display: flex;
    }
}

@media (max-width: 768px) {
    .features-grid-interactive {
        grid-template-columns: 1fr;
        max-width: 100%;
        gap: 15px;
    }

    .feature-item {
        display: flex;
        align-items: center;
        gap: 15px;
        text-align: left;
    }

    .icon-box {
        width: 60px;
        height: 60px;
        margin: 0;
    }

    .icon-box img {
        width: 30px;
        height: 30px;
    }

    .webverse-content-container video {
        height: auto;
        max-height: 50vh;
        min-height: 250px;
    }

    .webverse-interactive-selector {
        padding: 40px 0;
    }

    .footer-columns {
        flex-direction: column;
        gap: 30px;
    }

    .footer-col {
        min-width: 100% !important;
    }

    .footer-col.footer-spim {
        align-items: flex-start;
    }

    .footer-col.footer-spim img {
        margin-left: 0;
    }

    /* Adjust icon positions for smaller screens */
    .progress-wrap {
        right: 20px;
        bottom: 20px;
        width: 50px;
        height: 50px;
    }
    
    .whatsapp-float {
        right: 20px;
        bottom: 80px; /* 50px (height) + 10px (spacing) */
        width: 50px;
        height: 50px;
    }

    .progress-wrap .progress-icon {
        height: 50px;
        width: 50px;
        line-height: 50px;
    }
}

@media (max-width: 600px) {
    .glass-content-wrap {
        flex-direction: column;
        gap: 10px;
    }

    .glass-icons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .webverse-content-container video {
        height: 300px;
        min-height: 200px;
    }

    .webverse-interactive-selector {
        padding: 40px 0;
    }

    .webverse-content-container .video-wrapper {
        padding: 10px;
    }
}