/* Trading Lateral - Custom Styles */

/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800&display=swap');

/* Variables CSS */
:root {
    --tl-bg: #0f0f11;
    --tl-panel: #171a2b;
    --tl-panel-2: #171a2b;
    --tl-bg-footer: #0f0f11;
    --tl-text: #eaeaea;
    --tl-muted: #9aa0a6;
    --tl-accent: #a9fe00;
    --tl-accent-2: #7df500;
    --tl-cyan: #00bfff;
    --tl-danger: #ed3839;
}

/* Fondo oscuro global con gradiente */
html, body,
.wp-site-blocks,
article,
.entry-content,
.page-content,
.site-main {
    background-color: #171a2b !important;
    color: var(--tl-text) !important;
    font-family: 'Poppins', sans-serif !important;
}

/* Gradiente de fondo para el contenido principal */
main {
    background: linear-gradient(to bottom, #171a2b, #0f0f11) !important;
    color: var(--tl-text) !important;
    font-family: 'Poppins', sans-serif !important;
}

/* Header styling */
.wp-site-blocks > header,
header.wp-block-template-part,
.site-header,
header {
    background-color: #171a2b !important;
    border-bottom: none !important;
    padding: 10px 0 !important;
    min-height: auto !important;
}

/* Header container */
header .wp-block-group,
header .wp-block-row,
.wp-block-template-part[data-area="header"] .wp-block-group,
.wp-block-template-part[data-area="header"] > div {
    padding: 0 40px !important;
    margin: 0 !important;
    max-width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

/* Logo del header - 218x123 px */
.wp-block-site-logo img {
    width: 218px !important;
    height: 123px !important;
    max-width: 218px !important;
    max-height: 123px !important;
}

.wp-block-site-logo {
    flex-shrink: 0 !important;
}

.wp-block-site-title a,
.wp-block-site-title {
    color: var(--tl-text) !important;
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

/* Navegación del header - alineada a la derecha */
.wp-block-navigation {
    display: flex !important;
    gap: 0 !important;
    margin-left: auto !important;
    justify-content: flex-end !important;
}

.wp-block-navigation__container,
.wp-block-navigation ul {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 35px !important;
    justify-content: flex-end !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.wp-block-navigation-item,
.wp-block-navigation li {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
}

.wp-block-navigation a,
.wp-block-navigation-item a,
.wp-block-navigation-item__content {
    color: var(--tl-cyan) !important;
    font-family: 'Poppins', sans-serif !important;
    font-weight: 500 !important;
    font-size: 15px !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
    padding: 0 !important;
}

.wp-block-navigation a:hover,
.wp-block-navigation-item a:hover {
    color: var(--tl-accent) !important;
}

/* Link activo - página actual con color verde */
.wp-block-navigation-item.current-menu-item a,
.wp-block-navigation-item.current-menu-item .wp-block-navigation-item__content,
.current-menu-item a,
.current_page_item a {
    color: var(--tl-accent) !important;
    text-decoration: underline !important;
    text-decoration-color: var(--tl-accent) !important;
    text-underline-offset: 6px !important;
    text-decoration-thickness: 2px !important;
}

/* Contenido principal - ancho completo */
.wp-site-blocks,
.wp-block-group,
.entry-content,
.page-content,
main,
.site-main,
article {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Contenedor principal */
.wp-block-post-content,
.entry-content > *,
.wp-block-group__inner-container {
    max-width: 100% !important;
    width: 100% !important;
}

/* Ocultar títulos de página */
.page .entry-title,
.page .wp-block-post-title,
h1.wp-block-post-title,
.page-title,
article header .entry-title {
    display: none !important;
}

/* Footer */
footer,
.wp-block-template-part[data-area="footer"],
.site-footer {
    background-color: var(--tl-bg-footer) !important;
    border-top: 1px solid rgba(255,255,255,0.06) !important;
    color: var(--tl-muted) !important;
}

footer a {
    color: var(--tl-cyan) !important;
}

/* ===== CUSTOM HEADER TRADING LATERAL ===== */
.tl-header {
    background-color: #171a2b;
    padding: 10px 0;
}

.tl-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    max-width: 100%;
}

.tl-header-logo a {
    display: block;
}

.tl-header-logo img {
    width: 218px;
    height: 123px;
    max-width: 218px;
    max-height: 123px;
}

.tl-header-nav {
    margin-left: auto;
}

.tl-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 35px;
}

.tl-menu li {
    margin: 0;
    padding: 0;
}

.tl-menu a {
    color: #00bfff;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 15px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.tl-menu a:hover {
    color: #a9fe00;
}

.tl-menu .current-menu-item a,
.tl-menu .current_page_item a {
    color: #a9fe00;
    text-decoration: underline;
    text-decoration-color: #a9fe00;
    text-underline-offset: 6px;
    text-decoration-thickness: 2px;
}

/* Main content wrapper */
.tl-main {
    background: linear-gradient(to bottom, #171a2b, #0f0f11);
    color: #eaeaea;
    font-family: 'Poppins', sans-serif;
    min-height: 50vh;
}

/* Responsive header */
@media (max-width: 768px) {
    .tl-header-inner {
        flex-direction: column;
        padding: 15px 20px;
        gap: 15px;
    }

    .tl-header-logo img {
        width: 180px;
        height: auto;
    }

    .tl-header-nav {
        margin-left: 0;
    }

    .tl-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }
}

/* ===== CUSTOM FOOTER TRADING LATERAL ===== */
.tl-footer {
    background-color: var(--tl-bg-footer);
    padding: 50px 20px 30px;
    text-align: center;
    font-family: 'Poppins', sans-serif;
}

.tl-footer-logo {
    margin-bottom: 25px;
}

.tl-footer-logo img {
    max-width: 200px;
    height: auto;
}

.tl-footer-disclaimer {
    color: var(--tl-muted);
    font-size: 11px;
    line-height: 1.6;
    max-width: 1100px;
    margin: 0 auto 25px;
    padding: 0 20px;
}

.tl-footer-disclaimer strong {
    color: var(--tl-muted);
}

.tl-footer-legal {
    margin-bottom: 20px;
}

.tl-footer-legal a {
    color: #0097b2 !important;
    font-size: 13px;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.tl-footer-legal a:hover {
    color: #a2f301 !important;
}

.tl-footer-legal span {
    color: #9aa0a6;
}

.tl-footer-company {
    color: #9aa0a6;
    font-size: 12px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.tl-footer-company strong {
    color: #eaeaea;
    font-weight: 700;
}

.tl-footer-email {
    margin-bottom: 20px;
}

.tl-footer-email a {
    color: #0097b2 !important;
    font-size: 14px;
    text-decoration: none;
}

.tl-footer-email a:hover {
    color: #a2f301 !important;
}

.tl-footer-social {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.tl-footer-social a {
    color: #0097b2 !important;
    font-size: 20px;
    transition: color 0.3s ease;
}

.tl-footer-social a:hover {
    color: #a2f301 !important;
}

.tl-footer-social svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.tl-footer-copyright {
    color: #6a6d7e;
    font-size: 12px;
}

/* Bloques con fondo */
.has-background {
    padding: 0 !important;
}

/* Links generales */
a {
    color: var(--tl-cyan);
}

a:hover {
    color: var(--tl-accent);
}

/* Botones */
.wp-block-button__link {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700 !important;
}

/* Quitar padding del tema */
.wp-site-blocks > * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Reducir gap entre header y contenido */
.wp-site-blocks {
    gap: 0 !important;
}

main.wp-block-group,
.wp-block-post-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

main > .wp-block-group.has-global-padding {
    padding-top: 15px !important;
}

/* Admin bar fix */
body.admin-bar {
    margin-top: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .wp-site-blocks,
    .entry-content {
        padding: 0 !important;
    }
}

/* ===== SECCIÓN FORMACIONES ===== */

/* Quitar cualquier fondo de las imágenes */
.wp-block-image,
.wp-block-image figure,
.wp-block-image img {
    background: transparent !important;
    background-color: transparent !important;
}

/* Imágenes de banner al 100% del ancho */
.wp-block-column > .wp-block-image:first-child img {
    width: 100% !important;
    height: auto !important;
}

/* Botones de imagen centrados y más pequeños */
.wp-block-image.aligncenter {
    display: flex !important;
    justify-content: center !important;
}

.wp-block-image.aligncenter img {
    max-width: 200px !important;
    height: auto !important;
}

/* Botones de descuento en fila */
.wp-block-columns .wp-block-column .wp-block-image.aligncenter img {
    max-width: 180px !important;
}

/* ===== USER NAVIGATION STYLES ===== */
.tl-user-nav {
    position: relative;
    z-index: 1000;
}

/* Botón de Login (usuario no logueado) */
.tl-login-nav-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.1) 0%, rgba(0, 151, 178, 0.1) 100%) !important;
    border: 1px solid var(--tl-cyan) !important;
    color: var(--tl-cyan) !important;
    padding: 10px 22px !important;
    border-radius: 9999px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    font-family: 'Poppins', sans-serif !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.tl-login-nav-btn:hover {
    background: linear-gradient(135deg, #a2f301 0%, #8ad001 100%) !important;
    color: #0f0f11 !important;
    box-shadow: 0 4px 20px rgba(162, 243, 1, 0.3) !important;
    transform: translateY(-1px) !important;
}

.tl-login-nav-btn svg {
    stroke: currentColor !important;
    width: 18px !important;
    height: 18px !important;
}

/* Dropdown de usuario (usuario logueado) */
.tl-user-dropdown {
    position: relative;
}

.tl-user-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    background: linear-gradient(135deg, rgba(0, 191, 255, 0.15) 0%, rgba(0, 151, 178, 0.1) 100%) !important;
    border: 1px solid rgba(0, 191, 255, 0.4) !important;
    color: var(--tl-text) !important;
    padding: 10px 18px !important;
    border-radius: 9999px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    font-family: 'Poppins', sans-serif !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.tl-user-btn:hover {
    background: linear-gradient(135deg, rgba(162, 243, 1, 0.25) 0%, rgba(162, 243, 1, 0.15) 100%) !important;
    border-color: #a2f301 !important;
    box-shadow: 0 4px 15px rgba(162, 243, 1, 0.2) !important;
}

.tl-user-btn svg {
    stroke: var(--tl-cyan) !important;
    flex-shrink: 0 !important;
}

.tl-user-btn svg:first-child {
    width: 20px !important;
    height: 20px !important;
}

.tl-user-btn svg:last-child {
    width: 14px !important;
    height: 14px !important;
    transition: transform 0.2s ease !important;
}

.tl-user-dropdown:hover .tl-user-btn svg:last-child {
    transform: rotate(180deg) !important;
}

.tl-user-btn span {
    max-width: 120px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    color: var(--tl-text) !important;
}

/* Menú dropdown */
.tl-dropdown-menu {
    position: absolute !important;
    top: calc(100% + 12px) !important;
    right: 0 !important;
    background: linear-gradient(180deg, #1a1d30 0%, #171a2b 100%) !important;
    border: 1px solid rgba(0, 191, 255, 0.2) !important;
    border-radius: 16px !important;
    padding: 8px !important;
    min-width: 200px !important;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 191, 255, 0.1) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px) scale(0.95) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 10000 !important;
}

/* Flecha del dropdown */
.tl-dropdown-menu::before {
    content: '' !important;
    position: absolute !important;
    top: -8px !important;
    right: 24px !important;
    width: 16px !important;
    height: 16px !important;
    background: #1a1d30 !important;
    border-left: 1px solid rgba(0, 191, 255, 0.2) !important;
    border-top: 1px solid rgba(0, 191, 255, 0.2) !important;
    transform: rotate(45deg) !important;
}

.tl-user-dropdown:hover .tl-dropdown-menu,
.tl-user-dropdown:focus-within .tl-dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
}

.tl-dropdown-menu a {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 14px 18px !important;
    color: var(--tl-text) !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    font-family: 'Poppins', sans-serif !important;
    transition: all 0.2s ease !important;
    border-radius: 10px !important;
    margin: 2px 0 !important;
}

.tl-dropdown-menu a:hover {
    background: rgba(162, 243, 1, 0.15) !important;
    color: #a2f301 !important;
    transform: translateX(4px) !important;
}

/* Mi Panel - con icono cyan */
.tl-dropdown-menu a:first-child::before {
    content: '' !important;
    width: 8px !important;
    height: 8px !important;
    background: var(--tl-cyan) !important;
    border-radius: 50% !important;
    box-shadow: 0 0 8px var(--tl-cyan) !important;
}

/* Cerrar Sesión - con estilo de peligro */
.tl-dropdown-menu a:last-child {
    margin-top: 6px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding-top: 14px !important;
    border-radius: 0 0 10px 10px !important;
    color: #ff6b6b !important;
}

.tl-dropdown-menu a:last-child::before {
    content: '' !important;
    width: 8px !important;
    height: 8px !important;
    background: #ff6b6b !important;
    border-radius: 50% !important;
    box-shadow: 0 0 8px rgba(255, 107, 107, 0.5) !important;
}

.tl-dropdown-menu a:last-child:hover {
    background: rgba(255, 107, 107, 0.15) !important;
    color: #ff6b6b !important;
}

/* ===== WORDPRESS ADMIN BAR OVERRIDE ===== */
#wpadminbar {
    background: #171a2b !important;
    border-bottom: 1px solid rgba(0, 191, 255, 0.2) !important;
}

#wpadminbar .ab-top-menu > li > .ab-item,
#wpadminbar .ab-top-menu > li > a,
#wpadminbar .ab-icon,
#wpadminbar .ab-label {
    color: var(--tl-text) !important;
}

#wpadminbar .ab-top-menu > li:hover > .ab-item,
#wpadminbar .ab-top-menu > li:hover > a {
    color: var(--tl-cyan) !important;
    background: rgba(0, 191, 255, 0.1) !important;
}

#wpadminbar .ab-sub-wrapper,
#wpadminbar ul#wp-admin-bar-root-default > li .ab-sub-wrapper,
#wpadminbar .quicklinks .menupop ul.ab-sub-secondary {
    background: #1a1d30 !important;
    border: 1px solid rgba(0, 191, 255, 0.2) !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

#wpadminbar .quicklinks .menupop ul li a,
#wpadminbar .quicklinks .menupop ul li .ab-item {
    color: var(--tl-text) !important;
    font-family: 'Poppins', sans-serif !important;
}

#wpadminbar .quicklinks .menupop ul li a:hover,
#wpadminbar .quicklinks .menupop ul li .ab-item:hover {
    background: rgba(0, 191, 255, 0.15) !important;
    color: var(--tl-cyan) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .tl-login-nav-btn span,
    .tl-user-btn span {
        display: none !important;
    }

    .tl-login-nav-btn,
    .tl-user-btn {
        padding: 10px 12px !important;
    }

    .tl-user-btn svg:last-child {
        display: none !important;
    }

    .tl-dropdown-menu {
        right: -10px !important;
        min-width: 180px !important;
    }

    .tl-dropdown-menu::before {
        right: 20px !important;
    }
}
