:root {
    --sidebar-w: 242px;
    --sidebar-c: 80px;
    --header-h: 55px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --dark-tooltip: #222;
}

html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, sans-serif;
}

body {
    width: 100%;
    max-width: 100%;
    background: #ffffff;
    display: flex;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

img,
svg,
video,
canvas {
    max-width: 100%;
    height: auto;
}

/* ICONO WHATSAPP FLOTANTE */
.float {
    position: fixed;
    width: 50px;
    height: 50px;
    background-color: #25d366;
    top: 7px;
    border-radius: 50px;
    right: 7px;
    z-index: 5000;
    color: #F8F9F9;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.float .bxl-whatsapp {
    font-size: 2rem;
}

.float:hover {
    background-color: #2bf375;
    color: #222e2e;
}

/* SIDEBAR */
.sidebar {
    width: var(--sidebar-w);
    height: 100vh;
    background: #fff;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
}

.sidebar.collapsed {
    width: var(--sidebar-c);
}

.sidebar-header {
    height: 100px;
    display: flex;
    align-items: center;
    padding: 15px;
    position: relative;
}

.logo-wrapper {
    width: 100%;
    overflow: hidden;
}

.logo-main {
    margin-top: 30px;
    width: 100%;
    transition: var(--transition);
    display: block;
}

.collapsed .logo-main {
    transform: scale(1);
}

.desktop-toggle {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: -15px;
    top: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    z-index: 5;
}

.collapsed .desktop-toggle {
    transform: rotate(180deg);
    right: -15px;
}

/* NAV */
.sidebar-nav {
    margin-top: 30px;
    flex: 1;
    overflow-y: auto;
    overflow-x: visible;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.nav-link {
    display: flex;
    align-items: center;
    margin: 5px 10px;
    padding: 10px 18px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
    transition: 0.3s;
}

.nav-link:hover {
    color: #f9f9f9;
    background-color: rgba(15, 41, 245, .6);
    box-shadow: inset 3px 3px 3px rgba(255,255,255,0.5),
                inset -3px -3px 3px rgba(0,0,0,.3);
    border-radius: 5px;
}

.link {
    display: none;
    align-items: center;
    margin: 5px 10px;
    padding: 10px 18px;
    color: rgb(0, 89, 255);
    text-decoration: none;
    white-space: nowrap;
    transition: 0.3s;
}

.link:hover {
    color: rgb(255, 89, 0);
}

.icon-desktop,
.user-icon-always {
    min-width: 30px;
    font-size: 24px;
}

.icon-desk,
.user-icon-always {
    min-width: 30px;
    font-size: 24px;
}

.link-text {
    margin-left: 15px;
}

/* SUBMENUS EXTENDIDOS */
.submenu {
    max-height: 0;
    overflow: hidden;
    background: #fafafa;
    transition: var(--transition);
    list-style: none;
}

.dropdown.active .submenu {
    max-height: 500px;
}

.submenu .nav-link {
    padding-left: 55px;
    font-size: 14px;
}

.arrow-icon {
    margin-left: auto;
    transition: 0.3s;
}

.dropdown.active .arrow-icon {
    transform: rotate(90deg);
}

/* SUBMENU FLOTANTE (MODO COMPRIMIDO) */
@media (min-width: 992px) {
    .sidebar.collapsed .dropdown.active .submenu {
        position: fixed;
        left: 80px;
        width: 200px;
        max-height: none;
        background: var(--dark-tooltip);
        border-radius: 0 0 8px 8px;
        z-index: 3000;
        box-shadow: 5px 5px 15px rgba(0,0,0,0.3);
    }

    .sidebar.collapsed .dropdown.active .submenu .nav-link {
        color: #ccc;
        padding: 12px 20px 12px 1px;
        border-bottom: 1px solid #444;
    }

    .sidebar.collapsed .dropdown.active .submenu .nav-link:hover {
        color: #fff;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
    }

    .sidebar.collapsed .dropdown.active > .nav-link::after {
        content: attr(data-tooltip);
        position: fixed;
        left: 80px;
        width: 200px;
        background: var(--dark-tooltip);
        color: #fff;
        padding: 10px;
        text-align: center;
        border-radius: 8px 8px 0 0;
        visibility: visible;
        opacity: 1;
    }
}

/* REDES SOCIALES */
.social-li {
    padding: 20px 0;
    text-align: center;
}

.contact-title {
    font-weight: bold;
    font-size: 11px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.redes-sociales {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 5px;
}

.redes-sociales > a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    width: 40px;
    border-radius: 50%;
    box-shadow: 3px 3px 3px rgba(255,255,255,0.5),
                -3px -3px 3px rgba(0,0,0,.3);
}

.redes-sociales > a:hover {
    border-radius: 50%;
}

.redes-sociales > a:nth-child(1):hover {
    background-color: #316FF6;
}

.redes-sociales > a:nth-child(3) {
    color: #316FF6;
    font-size: 1.5rem;
}

.redes-sociales > a:nth-child(3):hover {
    background-color: #316FF6;
}

.redes-sociales > a:nth-child(2):hover {
    background-color: #E1306C;
}

.redes-sociales > a:nth-child(1):hover i,
.redes-sociales > a:nth-child(2):hover i,
.redes-sociales > a:nth-child(3):hover i {
    color: #fff;
}

.whatsapp {
    font-size: 23px;
    font-weight: 500;
    color: #25d366;
}

.facebook{
    font-size: 23px;
    font-weight: 500;
    color: #316FF6;
}

.email {
    font-size: 23px;
    font-weight: 500;
    color: #316FF6;
}

.instagram {
    font-size: 23px;
    font-weight: 500;
    color: #E1306C;
}

.collapsed .contact-title,
.collapsed .link-text,
.collapsed .arrow-icon {
    display: none;
}

.collapsed .redes-sociales {
    flex-direction: column;
    align-items: center;
}

/* TOOLTIPS */
.sidebar.collapsed [data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: fixed;
    left: 85px;
    background: var(--dark-tooltip);
    color: #fff;
    padding: 7px 14px;
    border-radius: 5px;
    font-size: 13px;
    z-index: 2500;
}

.sidebar:not(.collapsed) [data-tooltip]::after {
    display: none;
}

.sidebar.collapsed .redes-sociales > a:nth-child(1)[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: fixed;
    left: 85px;
    background: #316FF6;
    color: #fff;
    padding: 7px 14px;
    border-radius: 5px;
    font-size: 13px;
    z-index: 2500;
    text-shadow: 3px 3px 3px rgba(0,0,0,.3),
                 -3px -3px 3px rgba(255,255,255,0.5);
    box-shadow: inset 3px 3px 3px rgba(255,255,255,0.2),
                inset -3px -3px 3px rgba(0,0,0,.3);
}

.sidebar.collapsed .redes-sociales > a:nth-child(3)[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: fixed;
    left: 85px;
    background: #3b5998;
    color: #fff;
    padding: 7px 14px;
    border-radius: 5px;
    font-size: 13px;
    z-index: 2500;
    text-shadow: 3px 3px 3px rgba(0,0,0,.3),
                 -3px -3px 3px rgba(255,255,255,0.5);
    box-shadow: inset 3px 3px 3px rgba(255,255,255,0.2),
                inset -3px -3px 3px rgba(0,0,0,.3);
}

.sidebar.collapsed .redes-sociales > a:nth-child(2)[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: fixed;
    left: 85px;
    background: #E1306C;
    color: #fff;
    padding: 7px 14px;
    border-radius: 5px;
    font-size: 13px;
    z-index: 2500;
    text-shadow: 3px 3px 3px rgba(0,0,0,.3),
                 -3px -3px 3px rgba(255,255,255,0.5);
    box-shadow: inset 3px 3px 3px rgba(255,255,255,0.2),
                inset -3px -3px 3px rgba(0,0,0,.3);
}

/* USER BOTTOM */
.user-li {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid gray;
    border-radius: 5px;
}

.user-li .user a {
    text-decoration: none;
}

.user-li .user i {
    display: flex;
    box-shadow: inset 3px 3px 3px rgba(255,255,255,0.5),
                inset -3px -3px 3px rgba(0,0,0,.3);
    padding: 5px;
    border-radius: 50%;
}

.user-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    white-space: nowrap;
}

.user-data .name {
    font-size: .8rem;
    font-weight: 600;
}

.user-data .email {
    font-size: .6rem;
}

.sidebar.collapsed .user-li [data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: fixed;
    left: 85px;
    bottom: 15px;
    background: #316FF6;
    color: #fff;
    padding: 7px 14px;
    border-radius: 5px;
    font-size: 13px;
    z-index: 2500;
    text-shadow: 3px 3px 3px rgba(0,0,0,.3),
                 -3px -3px 3px rgba(255,255,255,0.5);
    box-shadow: inset 3px 3px 3px rgba(255,255,255,0.2),
                inset -3px -3px 3px rgba(0,0,0,.3);
}

/* CONTENIDO */
.main-content {
    margin-left: var(--sidebar-w);
    width: calc(100% - var(--sidebar-w));
    max-width: calc(100vw - var(--sidebar-w));
    min-width: 0;
    transition: var(--transition);
    box-shadow: inset -3px 0px 3px rgba(255,255,255,0.2),
                inset 3px 0px 3px rgba(0,0,0,0.3),
                -3px 0px 10px rgba(255,255,255,0.2),
                3px 0px 10px rgba(0,0,0,0.3);
    padding: 0 !important;
    overflow-x: hidden;
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-c);
    width: calc(100% - var(--sidebar-c));
    max-width: calc(100vw - var(--sidebar-c));
}

/* RESPONSIVE */
.mobile-header {
    display: none;
    height: var(--header-h);
    background: #fff;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1100;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid #eee;
}

.sidebar-overlay {
    display: none;
}

@media (max-width: 1024px) {
    body {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .mobile-header {
        display: flex;
    }

    .sidebar {
        left: -100%;
        top: var(--header-h);
        height: calc(100dvh - var(--header-h));
        width: 280px !important;
    }

    .sidebar.open {
        left: 0;
    }

    .icon-desktop,
    .desktop-toggle {
        display: none;
    }

    .sidebar.collapsed {
        width: 280px !important;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding-top: 55px !important;
        box-shadow: none;
        overflow-x: hidden !important;
    }

    .sidebar-overlay.active {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        display: block;
    }

    .mini-logo {
        height: 35px;
        width: auto;
        display: block;
    }

    .menu-toggle-icon {
        background: none;
        border: none;
        font-size: 32px;
        cursor: pointer;
    }

    .sidebar .sidebar-header {
        display: none;
    }

    .sidebar-nav {
        padding-top: 10px;
    }

    .nav-list {
        padding-top: 0;
    }

    .float {
        width: 40px;
        height: 40px;
        top: 60px;
        right: 5px;
    }

    .user-li {
        margin-top: auto;
    }
}

@media (max-width: 767px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
    }

    .main-content,
    .banner,
    .slider-wrapper,
    .feature-section,
    .magic-card,
    footer {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
}

@media (max-width: 900px) and (orientation: landscape) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
    }

    .main-content {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
}

/* DEBUG OVERFLOW */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
}

.menu-toggle-icon>i{
    color: #222 !important;
}