/* Navbar & Footer Styles */
.header-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    height: 80px;
    background: rgba(248, 250, 252, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-dark);
}

.header-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

@media (min-width: 769px) {
    .header-nav .container {
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
    }
    .header-nav .logo {
        position: absolute;
        left: 24px;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.08);
    padding: 6px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: var(--transition);
}
.logo:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(255, 107, 0, 0.15);
}

.logo span {
    color: var(--primary);
}

.logo img {
    height: 72px;
    transition: var(--transition);
}

.logo:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-gray);
    position: relative;
    padding: 8px 4px;
    transition: var(--transition);
    display: inline-block;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #FF3D00);
    border-radius: 2px;
    transform: translateX(-50%);
    transition: var(--transition);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 24px;
}

/* Solutions Submenu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--bg-card-dark);
    border: 1px solid var(--border-dark);
    border-radius: var(--border-radius);
    width: 280px;
    padding: 12px;
    display: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    z-index: 110;
}

/* Pseudo-element bridge to prevent hover loss between solutions menu link and dropdown menu list */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 15px;
    background: transparent;
}

.dropdown:hover .dropdown-menu {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.dropdown-menu.open {
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.dropdown-menu a {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-gray);
}

.dropdown-menu a:hover {
    background-color: rgba(255, 107, 0, 0.08);
    color: var(--primary);
}

/* Horizontal Methodology Timeline */
@media (min-width: 769px) {
    .timeline-container::before {
        content: '';
        position: absolute;
        top: 23px;
        left: 8%;
        right: 8%;
        height: 2px;
        background-color: var(--border-dark);
        z-index: 0;
    }
    .timeline-step {
        z-index: 1;
    }
}

/* Responsive Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    border: none;
    background: none;
    padding: 4px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-white);
    transition: var(--transition);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    .nav-links {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--bg-dark);
        border-bottom: 1px solid var(--border-dark);
        padding: 24px;
        gap: 20px;
        z-index: 99;
    }
    .nav-links.open {
        display: flex;
    }
    .dropdown-menu {
        position: static;
        transform: none;
        width: 100%;
        box-shadow: none;
        border: none;
        padding-left: 16px;
        background: transparent;
    }
    .dropdown:hover .dropdown-menu {
        display: block;
    }
}

/* Footer Section */
.footer {
    background-color: #050507;
    border-top: 1px solid var(--border-dark);
    padding: 30px 0 25px 0;
    color: #E2E8F0;
    font-size: 0.9rem;
}

.footer p {
    color: #E2E8F0 !important;
}

.footer h4 {
    color: #FFFFFF;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col a {
    color: #CBD5E1;
    transition: var(--transition);
    align-self: flex-start;
}

.footer-col a:hover {
    color: var(--primary);
    transform: translateX(3px);
}

.footer-socials {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

.footer-socials a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--border-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 1.1rem;
}

.footer-socials a:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.8rem;
}

.footer-legal-links {
    display: flex;
    gap: 20px;
}

.footer-legal-links a:hover {
    color: var(--text-white);
    text-decoration: underline;
}

/* Floating AI Agent Widget */
.ai-agent-widget {
    position: fixed;
    bottom: 15px;
    right: 15px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.ai-avatar-trigger {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #FF3D00);
    border: 3px solid var(--bg-dark);
    box-shadow: 0 4px 20px rgba(255, 107, 0, 0.4), 0 0 10px var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: relative;
}

.ai-avatar-trigger::before {
    content: '';
    position: absolute;
    top: -3px; left: -3px; right: -3px; bottom: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #FF3D00);
    z-index: -1;
    animation: pulseGlow 2s infinite;
}

.ai-avatar-trigger:hover {
    transform: scale(1.1);
}

.ai-avatar-trigger.pulse-alert {
    animation: pulseGlow 2s infinite, heartbeat 1.2s infinite ease-in-out !important;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.08); }
    28% { transform: scale(1); }
    42% { transform: scale(1.08); }
    70% { transform: scale(1); }
}

.ai-avatar-trigger img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.ai-avatar-trigger .status-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #4ADE80;
    border: 2px solid var(--bg-dark);
}

.ai-chat-window {
    position: fixed;
    right: 75px;
    bottom: 5px;
    width: 380px;
    height: 500px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #FFFFFF;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    border: 1px solid #E2E8F0;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.ai-chat-window.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.ai-chat-window.bounce-in {
    animation: chatBounceIn 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

@keyframes chatBounceIn {
    0% {
        transform: translateY(20px) scale(0.8);
        opacity: 0;
    }
    60% {
        transform: translateY(-5px) scale(1.02);
        opacity: 1;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

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

.ai-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--primary);
}

.ai-header-name {
    font-size: 0.95rem;
    font-weight: 700;
}

.ai-header-subtitle {
    font-size: 0.75rem;
    color: var(--text-gray);
}

.ai-close-btn {
    background: none;
    border: none;
    color: var(--text-gray);
    font-size: 1.3rem;
    cursor: pointer;
}

.ai-close-btn:hover { color: var(--text-white); }

.ai-chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.chat-bubble {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.88rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.bubble-ai {
    background-color: #F1F5F9;
    border: 1px solid #E2E8F0;
    color: #1E293B;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.bubble-user {
    background-color: var(--primary);
    color: #FFFFFF;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-bubble .lead-form {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-color: rgba(0,0,0,0.3);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-dark);
}

.chat-bubble .lead-form input {
    font-size: 0.8rem;
    padding: 8px;
}

.ai-chat-input-area {
    padding: 12px 16px;
    border-top: 1px solid var(--border-dark);
    display: flex;
    gap: 10px;
}

.ai-chat-input-area input {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-dark);
    border-radius: 20px;
    padding: 10px 16px;
    color: var(--text-white);
    outline: none;
    font-size: 0.85rem;
}

.ai-chat-input-area input:focus {
    border-color: var(--primary);
}

.ai-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--primary);
    border: none;
    color: var(--text-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.ai-send-btn:hover {
    background-color: var(--primary-hover);
    transform: scale(1.05);
}

/* Floating Agenda/Meet Book Widget Modal - Trigger merged into the unified 3D sidebar */

/* General Modals (e.g., Booking Agenda) */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-dark);
    box-shadow: 0 15px 50px rgba(0,0,0,0.8);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.open .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 24px;
}

/* Scheduler / Booking System Specifics */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin: 20px 0;
}

.calendar-header-day {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.calendar-day-btn {
    aspect-ratio: 1;
    background: none;
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    color: var(--text-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: var(--transition);
}

.calendar-day-btn:hover:not(:disabled) {
    border-color: var(--primary);
    background-color: rgba(255,107,0,0.05);
}

.calendar-day-btn.selected {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--text-white);
}

.calendar-day-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 16px;
}

.time-slot-btn {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border-dark);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-white);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-size: 0.85rem;
}

.time-slot-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.time-slot-btn.selected {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--text-white);
}

.time-slot-btn:disabled {
    opacity: 0.3;
    text-decoration: line-through;
    cursor: not-allowed;
}

/* BackOffice Portal Grid */
.admin-layout {
    display: flex;
    height: calc(100vh - 80px);
    overflow: hidden;
}

.admin-sidebar {
    width: 200px;
    min-width: 50px;
    background-color: #0F172A;
    border-right: 1px solid var(--border-dark);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: width 0.25s ease, padding 0.25s ease;
    overflow-y: auto;
    position: sticky;
    top: 0;
    align-self: stretch;
    max-height: 100%;
}

.admin-sidebar.collapsed {
    width: 50px;
    padding: 24px 4px;
    align-items: center;
}

.admin-sidebar.collapsed .admin-menu-item {
    padding: 8px;
    justify-content: center;
    font-size: 1.2rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    gap: 0;
    white-space: nowrap;
}

.admin-content {
    flex: 1;
    min-width: 0;
    padding: 32px 40px;
    background-color: var(--bg-dark);
    overflow-y: auto;
}

.admin-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 500;
    color: #94A3B8; /* Slate-400 for high contrast on dark sidebar */
    cursor: pointer;
    transition: var(--transition);
}

.admin-menu-item:hover, .admin-menu-item.active {
    background-color: rgba(255, 107, 0, 0.12);
    color: var(--primary);
}

.admin-menu-item svg {
    width: 20px;
    height: 20px;
}


.sidebar-toggle-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.85);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
    flex-shrink: 0;
    line-height: 1;
}
.sidebar-toggle-btn:hover {
    background: rgba(255,107,0,0.25);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 16px rgba(255,107,0,0.3);
}
.sidebar-toggle-btn:active {
    transform: scale(0.92);
}

#toast-container {
    position: fixed;
    top: 90px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.toast {
    pointer-events: auto;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
    background: #1E293B;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 420px;
    animation: toastIn 0.3s ease;
    border-left: 4px solid var(--primary);
}
.toast.toast-success { border-left-color: #4ADE80; }
.toast.toast-error { border-left-color: #EF4444; }
.toast.toast-info { border-left-color: var(--primary); }
.toast.toast-out {
    animation: toastOut 0.3s ease forwards;
}
.toast-close {
    margin-left: auto;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0 0 0 8px;
    line-height: 1;
}
.toast-close:hover { color: #fff; }
@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes toastOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

@media (max-width: 900px) {
    .admin-layout {
        flex-direction: column;
    }
    .admin-sidebar {
        flex-direction: row;
        overflow-x: auto;
        padding: 12px;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-dark);
    }
    .admin-menu-item {
        white-space: nowrap;
    }
}

/* Dashboard Metric Cards */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 992px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }
}

.metric-card {
    padding: 20px;
    background-color: var(--bg-card-dark);
    border: 1px solid var(--border-dark);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.metric-title {
    font-size: 0.85rem;
    color: var(--text-gray);
    font-weight: 500;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 700;
}

.metric-trend {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.trend-up { color: #4ADE80; }
.trend-down { color: #F87171; }

/* Interactive Tables */
.table-container {
    overflow-x: auto;
    margin-top: 16px;
    border: 1px solid var(--border-dark);
    border-radius: 8px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.data-table th {
    background-color: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-dark);
    padding: 14px 18px;
    font-weight: 600;
    color: var(--text-gray);
}

.data-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-dark);
    color: var(--text-white);
}

.data-table tr:hover {
    background-color: rgba(255, 255, 255, 0.01);
}

/* Table statuses badges */
.status-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-pill.nuevo { background-color: rgba(59, 130, 246, 0.15); color: #60A5FA; }
.status-pill.contactado { background-color: rgba(245, 158, 11, 0.15); color: #FBBF24; }
.status-pill.cotizado { background-color: rgba(139, 92, 246, 0.15); color: #A78BFA; }
.status-pill.activo { background-color: rgba(74, 222, 128, 0.15); color: #4ADE80; }
.status-pill.vencido { background-color: rgba(248, 113, 113, 0.15); color: #F87171; }

/* Custom Lead Details Drawer / View Pane */
.detail-pane {
    background-color: var(--bg-card-dark);
    border: 1px solid var(--border-dark);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.timeline {
    position: relative;
    padding-left: 24px;
    margin-top: 12px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 4px; left: 4px; width: 2px; height: 100%;
    background-color: var(--border-dark);
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 4px; left: -24px; width: 10px; height: 10px;
    border-radius: 50%;
    background-color: var(--primary);
    border: 2px solid var(--bg-card-dark);
}

.timeline-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.timeline-title {
    font-size: 0.85rem;
    font-weight: 600;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, 5px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes pulseGlow {
    0% { transform: scale(0.95); opacity: 0.5; }
    50% { transform: scale(1.05); opacity: 0.8; box-shadow: 0 0 20px var(--primary); }
    100% { transform: scale(0.95); opacity: 0.5; }
}

/* HTML Embed styling override to remove PDF24 exports styling tags visually */
.demo-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #E2E8F0;
    color: #4A5568;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
}

/* Floating Demo Helper Panel */
.demo-helper-panel {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 9999;
    padding: 16px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--primary);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(255, 107, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 260px;
}

.demo-helper-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.demo-helper-btn {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-dark);
    background: #FFFFFF;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.demo-helper-btn.admin {
    background-color: var(--primary);
    color: #FFFFFF;
    border-color: var(--primary);
}

.demo-helper-btn.admin:hover {
    background-color: var(--primary-hover);
}

.demo-helper-btn.client:hover {
    background-color: #E2E8F0;
}

.demo-helper-btn.reset {
    color: #EF4444;
    border-color: #FCA5A5;
}

.demo-helper-btn.reset:hover {
    background-color: #FEF2F2;
}

/* Floating Social Sidebar 3D */
.floating-social-sidebar {
    position: fixed;
    right: 10px;
    top: 50%;
    transform: translateY(-50%) perspective(600px);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
}

.social-3d-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    text-decoration: none;
    box-shadow: -3px 3px 0px rgba(0, 0, 0, 0.3), -6px 6px 10px rgba(0, 0, 0, 0.2);
    transform: rotateX(15deg) rotateY(-20deg) rotateZ(10deg);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.social-3d-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.social-3d-btn svg {
    width: 18px;
    height: 18px;
    filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.3));
    transition: transform 0.3s ease;
}

/* Specific Brand Colors with Premium Gradients */
.social-3d-btn.facebook {
    background: linear-gradient(135deg, #1877F2 0%, #0F52B8 100%);
}
.social-3d-btn.instagram {
    background: linear-gradient(135deg, #F9CE34 0%, #EE2A7B 50%, #6228D7 100%);
}
.social-3d-btn.youtube {
    background: linear-gradient(135deg, #FF0000 0%, #B80000 100%);
}
.social-3d-btn.linkedin {
    background: linear-gradient(135deg, #0077B5 0%, #004D77 100%);
}
.social-3d-btn.calendar {
    background: linear-gradient(135deg, var(--primary) 0%, #FF3D00 100%);
    box-shadow: -3px 3px 0px rgba(0, 0, 0, 0.3), -6px 6px 10px rgba(255, 107, 0, 0.2);
}
.social-3d-btn.whatsapp {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    box-shadow: -5px 5px 0px rgba(0, 0, 0, 0.3), -10px 10px 15px rgba(37, 211, 102, 0.3);
    animation: whatsapp-pulse 2s infinite ease-in-out;
}
.social-3d-btn.whatsapp svg {
    width: 24px;
    height: 24px;
}

/* Vibrate / Pulsing Animation for WhatsApp */
@keyframes whatsapp-pulse {
    0% {
        transform: rotateX(15deg) rotateY(-20deg) rotateZ(10deg) scale(1);
        box-shadow: -5px 5px 0px rgba(0, 0, 0, 0.3), -10px 10px 15px rgba(37, 211, 102, 0.2), 0 0 0 rgba(37, 211, 102, 0);
    }
    50% {
        transform: rotateX(15deg) rotateY(-20deg) rotateZ(10deg) scale(1.12);
        box-shadow: -6px 6px 0px rgba(0, 0, 0, 0.3), -12px 12px 20px rgba(37, 211, 102, 0.4), 0 0 15px rgba(37, 211, 102, 0.6);
    }
    100% {
        transform: rotateX(15deg) rotateY(-20deg) rotateZ(10deg) scale(1);
        box-shadow: -5px 5px 0px rgba(0, 0, 0, 0.3), -10px 10px 15px rgba(37, 211, 102, 0.2), 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Hover States with 3D Pop Out Effect */
.social-3d-btn:hover {
    transform: rotateX(5deg) rotateY(-5deg) rotateZ(0deg) translate(-10px, -5px) scale(1.1);
    box-shadow: -15px 15px 25px rgba(0, 0, 0, 0.4), -5px 5px 0px rgba(0, 0, 0, 0.2);
    border-color: rgba(255,255,255,0.3);
}

.social-3d-btn:hover svg {
    transform: scale(1.15) rotate(-5deg);
}

/* Responsive adjustments for mobile so they don't block content */
@media (max-width: 768px) {
    .floating-social-sidebar {
        right: 10px;
        gap: 10px;
    }
    .social-3d-btn {
        width: 40px;
        height: 40px;
        border-radius: 8px;
        box-shadow: -3px 3px 0px rgba(0, 0, 0, 0.3), -5px 5px 10px rgba(0, 0, 0, 0.2);
    }
    .social-3d-btn svg {
        width: 18px;
        height: 18px;
    }
}/* Premium image panels and hover effects */
.premium-img-panel {
    padding: 10px;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid var(--border-dark);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: var(--transition);
    overflow: hidden;
}
.premium-img-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(255, 107, 0, 0.08), 0 0 20px var(--primary-glow);
    border-color: rgba(255, 107, 0, 0.2);
}
.premium-img {
    width: 100%;
    border-radius: 12px;
    display: block;
    object-fit: cover;
    transition: var(--transition);
}
.premium-img-panel:hover .premium-img {
    transform: scale(1.02);
}

/* AI Notification Bubble */
.ai-notification-bubble {
    position: fixed;
    bottom: 95px;
    right: 30px;
    width: 240px;
    background: var(--bg-card-dark);
    border: 1px solid var(--border-dark);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 0.82rem;
    color: var(--text-gray);
    z-index: 10000;
    transform: translateY(15px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-notification-bubble.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.ai-notification-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 28px;
    width: 10px;
    height: 10px;
    background: var(--bg-card-dark);
    border-right: 1px solid var(--border-dark);
    border-bottom: 1px solid var(--border-dark);
    transform: rotate(45deg);
}

.ai-bubble-close {
    position: absolute;
    top: 4px;
    right: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 700;
    line-height: 1;
}

.ai-bubble-close:hover {
    color: var(--primary);
}

#ai-bubble-text {
    line-height: 1.4;
    padding-right: 8px;
}

/* ==========================================================================
   Mejoras de Glassmorphism Premium y Elementos de IA Avanzada
   ========================================================================== */

/* Efecto Glassmorphism Premium para la ventana del Chat */
.ai-chat-window.glass-panel {
    background: #FFFFFF !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15) !important;
}

.ai-chat-window.glass-panel .ai-chat-header {
    background-color: rgba(255, 107, 0, 0.08) !important;
    border-bottom: 1px solid rgba(255, 107, 0, 0.15) !important;
}

.ai-chat-window.glass-panel .ai-header-name {
    color: #1E293B !important;
}

.ai-chat-window.glass-panel .ai-header-subtitle {
    color: #64748B !important;
}

.ai-chat-window.glass-panel .ai-close-btn {
    color: #64748B !important;
}

.ai-chat-window.glass-panel .ai-close-btn:hover {
    color: #1E293B !important;
}

.ai-chat-window.glass-panel .ai-chat-input-area {
    border-top: 1px solid #E2E8F0 !important;
    background-color: #F8FAFC !important;
}

.ai-chat-window.glass-panel .ai-chat-input-area input {
    background-color: #FFFFFF !important;
    border: 1px solid #CBD5E1 !important;
    color: #1E293B !important;
}

.ai-chat-window.glass-panel .ai-chat-input-area input::placeholder {
    color: #94A3B8 !important;
}

.chat-bubble.bubble-ai {
    background-color: #F1F5F9 !important;
    border: 1px solid #E2E8F0 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    color: #1E293B !important;
    box-shadow: none;
}

.chat-bubble.bubble-user {
    background: linear-gradient(135deg, var(--primary) 0%, #FF3D00 100%) !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.25);
    border: none !important;
}

/* Formularios Embebidos en Chat */
.chat-form-container {
    margin-top: 12px;
    padding: 14px;
    border-radius: 10px !important;
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: inset 0 1px 10px rgba(0, 0, 0, 0.3);
}

.chat-form-container .form-control {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #F8FAFC !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
}

.chat-form-container .form-control:focus {
    border-color: var(--primary) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    outline: none !important;
    box-shadow: 0 0 6px rgba(255, 107, 0, 0.3) !important;
}

.chat-form-container .form-control::placeholder {
    color: rgba(255, 255, 255, 0.35) !important;
}

.chat-form-container select.form-control option {
    background-color: #0F172A !important;
    color: #F8FAFC !important;
}

.chat-form-container .btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #FF3D00 100%) !important;
    border: none !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    color: #FFFFFF !important;
    cursor: pointer;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 10px rgba(255, 107, 0, 0.2);
}

.chat-form-container .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(255, 107, 0, 0.35);
}

/* Drag and Drop Zone del BackOffice */
.drag-drop-zone {
    border: 2px dashed rgba(255, 255, 255, 0.15) !important;
    border-radius: 10px !important;
    padding: 32px 24px !important;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.01) !important;
    cursor: pointer;
    transition: all 0.2s ease-in-out !important;
}

.drag-drop-zone:hover {
    border-color: var(--primary) !important;
    background-color: rgba(255, 107, 0, 0.04) !important;
    box-shadow: 0 0 15px rgba(255, 107, 0, 0.05);
}

.drag-drop-zone span {
    transition: transform 0.2s ease;
}

.drag-drop-zone:hover span {
    transform: translateY(-2px) scale(1.05);
}

/* Media Recubrimientos en Chat */
.chat-shared-media audio {
    outline: none;
    border-radius: 30px;
    height: 36px;
    background-color: #0F172A;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.chat-shared-media video {
    outline: none;
    box-shadow: 0 6px 15px rgba(0,0,0,0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* CMS Protection: text overflow & image containment */
.cms-content,
.glass-panel p,
.glass-panel h1, .glass-panel h2, .glass-panel h3, .glass-panel h4,
.solution-card,
.plan-card,
.faq-item {
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.solution-card p,
.plan-card p {
    max-width: 100%;
    overflow-wrap: break-word;
}

.solution-card,
.plan-card {
    min-height: 0;
}

.premium-img-panel img,
.glass-panel .cms-content img,
.glass-panel .solution-card img,
.glass-panel .plan-card img {
    object-fit: cover;
    width: 100%;
    height: auto;
    max-height: 500px;
}

.glass-panel .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .solution-card,
    .plan-card {
        padding: 20px !important;
    }
    .solution-card h3,
    .plan-card h3 {
        font-size: 1.1rem;
    }
    .solution-card p,
    .plan-card p {
        font-size: 0.82rem;
    }
}

/* CMS Image Uploader */
.cms-img-upload {
    margin-bottom: 20px;
}
.cms-img-upload > label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: var(--text-gray);
    font-weight: 600;
}
.cms-img-preview {
    width: 100%;
    max-width: 400px;
    height: 180px;
    border-radius: 8px;
    border: 1px solid var(--border-dark);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    transition: all 0.2s;
    overflow: hidden;
}
.cms-img-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.cms-img-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

