/* Reset y variables CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --text-primary: #000000;
    --text-secondary: #1a1a1a;
    --text-light: #333333;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-dark: #0f172a;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Tipografía */
body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    letter-spacing: -0.02em;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Contenedores */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2.5rem;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 0.75rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    line-height: 1;
    letter-spacing: 0.02em;
    position: relative;
    z-index: 15;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 15;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    position: relative;
    z-index: 15;
}

.btn-secondary:hover {
    background: var(--bg-dark);
    color: white;
    border-color: var(--bg-dark);
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
    padding: 1rem 2rem;
}

/* Header y Navegación */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-logo .logo-main {
    height: 43px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s ease;
    position: relative;
    letter-spacing: 0.01em;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-cta {
    margin-left: 2rem;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 2px;
}

/* Estado activo del menú */
body.menu-open {
    overflow: hidden;
}

body.menu-open .header {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1) !important;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 6rem 0 4rem;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    max-width: 500px;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 2rem;
    color: #1f2937;
}

.title-line-1 {
    display: block;
    font-size: 3rem;
    color: #374151;
    margin-bottom: 0.5rem;
}

.title-line-2 {
    display: block;
    font-size: 4.8rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 0.5rem;
}

.title-line-3 {
    display: block;
    font-size: 2.5rem;
    color: #374151;
    margin-bottom: 1rem;
}

.fenix-brand {
    color: #10b981;
    font-weight: 800;
}

.highlight {
    position: relative;
    display: inline-block;
    color: #000000;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
    text-shadow: none;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}



.hero-subtitle {
    font-size: 1.2rem;
    line-height: 1.7;
    color: #000000;
    margin-bottom: 2.5rem;
    max-width: 480px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.hero-logo {
    margin-top: 2rem;
}

.ciade-logo {
    height: 60px;
    width: auto;
}

.erp-small {
    font-size: 0.6em;
    vertical-align: super;
    font-weight: 600;
    color: #3b82f6;
}

.fenix-logo-title {
    height: 3.5rem;
    width: auto;
    vertical-align: middle;
    margin-left: 0.5rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

/* Hero Visual */
.hero-visual {
    position: relative;
    height: 650px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.background-shapes {
    position: relative;
    width: 100%;
    height: 100%;
}

.shape-circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    opacity: 0.6;
}

.shape-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 10%;
    animation: float 6s ease-in-out infinite;
}

.shape-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    left: 5%;
    animation: float 8s ease-in-out infinite reverse;
}

.shape-arc {
    position: absolute;
    width: 300px;
    height: 300px;
    top: 20%;
    right: 10%;
    border: 3px solid #e0f2fe;
    border-radius: 50%;
    border-top: transparent;
    border-right: transparent;
    opacity: 0.4;
    animation: rotate 20s linear infinite;
}

.hero-main-image {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.professional-img {
    width: 450px;
    height: 550px;
    object-fit: cover;
    border-radius: 25px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    filter: brightness(1.05) contrast(1.1);
    position: relative;
}

.professional-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.08) 50%, rgba(16, 185, 129, 0.05) 100%);
    border-radius: 25px;
    z-index: 1;
    pointer-events: none;
}

.professional-img:hover {
    transform: scale(1.02);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
}

.professional-placeholder {
    width: 400px;
    height: 500px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #bae6fd;
    color: #0ea5e9;
}

.professional-placeholder i {
    margin-bottom: 1rem;
    opacity: 0.7;
}

.placeholder-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0369a1;
    text-align: center;
}



/* Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.chat-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
    transition: all 0.3s ease;
    animation: bounce 2s infinite;
}

.chat-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.4);
    color: white;
}

.chat-button i {
    font-size: 1.5rem;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    text-align: center;
    }
    
    .hero-text {
        max-width: 100%;
    }
    
    .hero-title {
        font-size: 3rem;
}

.title-line-1 {
        font-size: 2.8rem;
}

.title-line-2 {
        font-size: 3.8rem;
    }
    
    .title-line-3 {
        font-size: 2.2rem;
    }
    
    .hero-visual {
        height: 550px;
    }
    
    .professional-img {
        width: 400px;
        height: 500px;
    }
    
    .fenix-logo-title {
        height: 3rem;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 4rem 0 2rem;
    }
    
    .hero-container {
        padding: 0 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .title-line-1 {
        font-size: 2.2rem;
    }
    
    .title-line-2 {
        font-size: 3rem;
    }
    
    .title-line-3 {
        font-size: 1.8rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-visual {
        height: 450px;
    }
    
    .professional-img {
        width: 320px;
        height: 400px;
    }
    
    .fenix-logo-title {
        height: 2.5rem;
    }
    
    .stat-card {
        min-width: 120px;
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .chat-button {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .chat-button span {
        display: none;
    }
}

.fenix-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.5));
}

.fenix-brand {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 50%, #0e7490 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    position: relative;
    animation: slideIn 1s ease-out, shimmer 3s ease-in-out infinite;
}

.fenix-brand::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes glow {
    0% {
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
    }
    100% {
        filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.8));
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.5;
    }
    100% {
        transform: scale(1);
        opacity: 0.3;
    }
}

@keyframes slideIn {
    0% {
        transform: translateX(-50px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.hero-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.35rem;
    margin-bottom: 4rem;
    color: #000000 !important;
    font-weight: 500;
    line-height: 1.7;
    text-shadow: none;
    animation: none;
    letter-spacing: 0.01em;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}



.hero-buttons {
    display: flex;
    gap: 2rem;
    margin-bottom: 5rem;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    z-index: 10;
    width: 100%;
    background: transparent;
}

.hero-buttons .btn {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 200px;
    justify-content: center;
}

.hero-buttons .btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.hero-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.hero-stats {
    position: fixed;
    top: 10rem;
    right: 3rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.15);
    padding: 2.5rem;
    border-radius: 1.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.hero-stats.hidden {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

.stat {
    text-align: center;
    position: relative;
    padding: 1.2rem 1.5rem;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 160px;
    overflow: hidden;
}

.stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #06b6d4, #fbbf24, #06b6d4);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

.stat::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
    border-radius: 50%;
}

.stat:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

.stat:hover::after {
    width: 200px;
    height: 200px;
}

.stat-number {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ffffff 0%, #fbbf24 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 2;
    animation: statCount 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    letter-spacing: -0.03em;
}

.stat-label {
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 2;
    line-height: 1.2;
}

.stat-icon {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #06b6d4, #fbbf24);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.7rem;
    opacity: 0.9;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.stat:hover .stat-icon {
    transform: scale(1.3) rotate(15deg);
    opacity: 1;
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
}

/* Iconos específicos para cada estadística */
.stat:nth-child(1) .stat-icon::before {
    content: '🏢';
    font-size: 0.8rem;
}

.stat:nth-child(2) .stat-icon::before {
    content: '⏰';
    font-size: 0.8rem;
}

.stat:nth-child(3) .stat-icon::before {
    content: '📊';
    font-size: 0.8rem;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes statCount {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-10deg);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1) rotate(5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Responsive para estadísticas */
@media (max-width: 768px) {
    .hero-stats {
        top: 5rem;
        right: 1rem;
        gap: 2rem;
    }
    
    .stat {
        min-width: 120px;
        padding: 1.25rem 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.6rem;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        top: 4rem;
        right: 0.5rem;
        gap: 1.5rem;
    }
    
    .stat {
        min-width: 100px;
        padding: 1rem 0.75rem;
    }
    
    .stat-number {
        font-size: 1.2rem;
    }
    
    .stat-label {
        font-size: 0.5rem;
    }
}

.hero-visual {
    position: relative;
}

.hero-image {
    position: relative;
}

.dashboard-img {
    width: 100%;
    height: auto;
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
}

.dashboard-text {
    position: absolute;
    top: 5%;
    left: -5cm;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
    z-index: 10;
}

.floating-card {
    position: absolute;
    background: white;
    color: var(--text-primary);
    padding: 1.25rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    animation: float 3s ease-in-out infinite;
    min-width: 140px;
}

.floating-card i {
    color: var(--success-color);
    font-size: 3.1rem;
    margin-right: 0.25rem;
}

.floating-card span {
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.card-1 {
    top: 10%;
    left: 55%;
    animation-delay: 0s;
}

.card-2 {
    bottom: 255%;
    right: 85%;
    animation-delay: 1.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    55% { transform: translateY(-10px); }
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.hero-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 120px;
}

.hero-wave .shape-fill {
    fill: var(--bg-primary);
}

/* Secciones */
section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: 'Playfair Display', serif;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.section-logo {
    height: 2.5rem;
    width: auto;
    vertical-align: middle;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
}

.section-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Productos */
.products {
    background: var(--bg-secondary);
    padding-top: 4rem;
    padding-bottom: 2rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.product-card {
    background: white;
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.product-card.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-card.clickable:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.product-card.clickable:hover .product-image img {
    transform: scale(1.05);
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.product-image {
    width: 80px;
    height: 80px;
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    transition: all 0.3s ease;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    transition: all 0.3s ease;
}

.product-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.product-actions .btn {
    flex: 1;
    justify-content: center;
}

.product-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.product-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.product-features {
    list-style: none;
    margin-bottom: 2.5rem;
    flex-grow: 1;
}

.product-features li {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.product-price {
    margin-bottom: 2rem;
}

/* Toggle de Planes */
.plan-toggle-container {
    margin-top: 2rem;
    text-align: center;
}

.plan-toggle {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 0.5rem;
    border-radius: 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1rem;
}

.plan-label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.plan-label.active {
    color: var(--primary-color);
}

.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
    background: var(--border-color);
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.toggle-switch.active {
    background: var(--primary-color);
}

.toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.toggle-switch.active .toggle-slider {
    transform: translateX(30px);
}

.plan-toggle-info {
    font-size: 0.875rem;
    color: var(--text-light);
    font-style: italic;
}

/* Estilos para la tarjeta destacada - texto blanco */
.product-card.featured {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: 2px solid var(--primary-color);
    transform: scale(1.05);
}



.product-card.featured .product-title,
.product-card.featured .product-description,
.product-card.featured .product-features li,
.product-card.featured .price-label,
.product-card.featured .price-period {
    color: white;
}

.product-card.featured .price-amount {
    color: #fbbf24; /* Color dorado para el precio */
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

.product-card.featured .annual-savings {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
}

.product-card.featured .savings-amount {
    color: #d97706;
}

.product-card.featured .savings-text {
    color: #92400e;
}

.product-card.featured .annual-total {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.product-card.featured .total-amount {
    color: #fbbf24;
}

.product-card.featured .product-features i {
    color: #10b981; /* Color verde para los checkmarks */
}

.product-card.featured::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-primary);
    border-radius: 1rem;
    z-index: -1;
}

.product-badge {
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.product-features {
    list-style: none;
}

.product-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.product-features i {
    color: var(--success-color);
    font-size: 0.875rem;
}

.product-price {
    text-align: center;
    margin-bottom: 1.5rem;
}

.price-monthly,
.price-annual {
    transition: all 0.3s ease;
}

.price-monthly.active,
.price-annual.active {
    display: block;
}

.price-monthly:not(.active),
.price-annual:not(.active) {
    display: none;
}

.price-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.price-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.price-period {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Estilos para precios anuales */
.annual-savings {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 0.5rem;
    border: 1px solid #f59e0b;
}

.savings-amount {
    display: block;
    font-size: 1.125rem;
    font-weight: 700;
    color: #d97706;
    margin-bottom: 0.25rem;
}

.savings-text {
    font-size: 0.75rem;
    color: #92400e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.annual-total {
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.total-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.total-amount {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Featured Products Hero Section */
.featured-products {
    margin-bottom: 80px;
}

.product-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 24px;
    padding: 60px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.product-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 50%;
    opacity: 0.1;
    transform: translate(100px, -100px);
}

.product-hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.product-hero-text {
    max-width: 500px;
}

.product-hero .product-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: #1e293b;
    margin-bottom: 20px;
    font-family: 'Playfair Display', serif;
    line-height: 1.1;
}

.product-hero-message {
    font-size: 1.5rem;
    font-weight: 600;
    color: #000000;
    margin-bottom: 20px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.product-hero-description {
    font-size: 1.1rem;
    color: #ffffff;
    line-height: 1.7;
    margin-bottom: 20px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.product-hero-benefit {
    font-size: 1.1rem;
    color: #10b981;
    font-weight: 600;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
}

.product-hero-cta {
    font-size: 1.2rem;
    color: #dc2626;
    font-weight: 700;
    margin-bottom: 30px;
}

.product-features-list {
    margin-bottom: 40px;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #374151;
}

.feature-item i {
    width: 24px;
    height: 24px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 0.875rem;
}

.feature-item:last-child i {
    background: #3b82f6;
}

.product-hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* Product Hero Visual */
.product-hero-visual {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 20px;
    overflow: hidden;
}

.hero-scene {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-people {
    display: flex;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 10;
}

.person {
    text-align: center;
    background: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    border: 2px solid transparent;
}

.person:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: #3b82f6;
}

.person-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: white;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.person-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.person-name {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.1rem;
    font-family: 'Montserrat', sans-serif;
}

.person-role {
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Elementos gráficos abstractos */
.graphic-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.arc-element {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    border: 3px dashed #3b82f6;
    border-radius: 50%;
    opacity: 0.3;
    animation: rotate 20s linear infinite;
}

.cloud-element {
    position: absolute;
    top: 30px;
    right: 60px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
    animation: float 6s ease-in-out infinite;
}

.shield-element {
    position: absolute;
    bottom: 100px;
    right: 100px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
    animation: float 6s ease-in-out infinite 2s;
}

.chart-element {
    position: absolute;
    top: 80px;
    left: 60px;
    width: 70px;
    height: 70px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    animation: float 6s ease-in-out infinite 4s;
}

.chart-bars {
    display: flex;
    align-items: end;
    gap: 4px;
    height: 40px;
}

.chart-bars .bar {
    width: 8px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 2px;
    animation: chartGrow 3s ease-in-out infinite;
}

.chart-bars .bar:nth-child(1) { height: 20px; animation-delay: 0s; }
.chart-bars .bar:nth-child(2) { height: 30px; animation-delay: 0.5s; }
.chart-bars .bar:nth-child(3) { height: 25px; animation-delay: 1s; }

.data-element {
    position: absolute;
    bottom: 60px;
    left: 80px;
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    animation: float 6s ease-in-out infinite 1s;
}

.data-circle {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 50%;
    margin-bottom: 8px;
}

.data-lines {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.data-lines .line {
    width: 20px;
    height: 3px;
    background: #3b82f6;
    border-radius: 2px;
}

/* Etiqueta del producto */
.product-label {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.3);
    animation: float 6s ease-in-out infinite 3s;
}

.label-text {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    font-family: 'Montserrat', sans-serif;
}

.label-subtitle {
    display: block;
    font-size: 0.75rem;
    opacity: 0.9;
    margin-top: 2px;
}

/* Animaciones */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

@keyframes rotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes chartGrow {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(1.2); }
}

/* Responsive Design para Product Hero */
@media (max-width: 1024px) {
    .product-hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .product-hero {
        padding: 40px;
    }
    
    .product-hero-title {
        font-size: 2.5rem;
    }
    
    .product-hero-buttons {
        justify-content: center;
    }
    
    .product-hero-visual {
        height: 400px;
    }
    
    .hero-people {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .product-hero {
        padding: 30px 20px;
    }
    
    .product-hero-title {
        font-size: 2rem;
    }
    
    .product-hero-visual {
        height: 350px;
    }
    
    .hero-people {
        flex-direction: column;
        gap: 20px;
    }
    
    .product-hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .product-hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .arc-element {
        width: 200px;
        height: 200px;
    }
    
    .cloud-element,
    .shield-element,
    .chart-element,
    .data-element {
        transform: scale(0.8);
    }
    
    .product-label {
        top: 20px;
        padding: 10px 16px;
    }
}

@media (max-width: 480px) {
    .product-hero-visual {
        height: 300px;
    }
    
    .person {
        padding: 20px;
    }
    
    .person-avatar {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .arc-element {
        width: 150px;
        height: 150px;
    }
}

/* Beneficios */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.benefit-item {
    text-align: center;
    padding: 3rem 2.5rem;
    background: white;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.benefit-item:hover {
    transform: translateY(-5px);
}

.benefit-icon {
    width: 90px;
    height: 90px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    color: white;
    font-size: 2.25rem;
}

.benefit-item h3 {
    font-family: 'Playfair Display', serif;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    font-size: 1.4rem;
}

.benefit-item p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1.05rem;
}

/* Casos de Éxito */
.success-cases {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.use-cases-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid #e2e8f0;
}

.use-cases-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-family: var(--font-heading);
}

.use-cases-subtitle {
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.use-case-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.use-case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--primary-color);
}

.use-case-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.use-case-icon i {
    font-size: 1.5rem;
    color: white;
}

.use-case-card h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-family: var(--font-heading);
}

.use-case-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.use-case-card li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.use-case-card li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.1rem;
}

/* Responsive para casos de uso */
@media (max-width: 768px) {
    .use-cases-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .use-case-card {
        padding: 1.5rem;
    }
    
    .use-cases-title {
        font-size: 2rem;
    }
}

/* Demo Section */
.demo {
    background: var(--gradient-primary);
    color: white;
}

.demo-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.demo-text h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    color: white;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.demo-text p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    color: white;
}

.demo-features {
    list-style: none;
}

.demo-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: white;
}

.demo-features i {
    color: var(--success-color);
}

.demo-form {
    background: white;
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
    margin: 0 auto;
    max-width: 500px;
    width: 100%;
}

.demo-form h3 {
    font-family: 'Playfair Display', serif;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 2.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    font-size: 2rem;
}

.form-group {
    margin-bottom: 2.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    background: #f8fafc;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

/* Estados de error para formularios */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: var(--error-color);
    background: #fef2f2;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group.error input:focus,
.form-group.error select:focus,
.form-group.error textarea:focus {
    border-color: var(--error-color);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* Mensajes de error de campos */
.field-error {
    color: var(--error-color);
    font-size: 0.9rem;
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideInError 0.3s ease-out;
}

.field-error::before {
    content: '⚠';
    font-size: 1rem;
}

@keyframes slideInError {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Indicador de campo requerido */
.form-group.required label::after {
    content: ' *';
    color: var(--error-color);
    font-weight: 600;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Logos en la sección de demo */
.demo-logo-top,
.demo-logo-bottom {
    text-align: center;
    margin: 2rem 0;
    padding: 1rem;
    transition: all 0.3s ease;
}

.demo-logo-top:hover,
.demo-logo-bottom:hover {
    transform: translateY(-2px);
}

.demo-logo {
    height: 70px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.demo-logo-top .demo-logo {
    filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.2));
}

.demo-logo-bottom .demo-logo {
    filter: drop-shadow(0 2px 4px rgba(6, 182, 212, 0.2));
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 5rem 0 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-logo .logo-footer {
    height: 50px;
    width: auto;
    margin-bottom: 1rem;
}

.footer-section h4 {
    font-family: 'Playfair Display', serif;
    color: white;
    margin-bottom: 2rem;
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.footer-section p {
    color: white;
    line-height: 1.7;
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #e0e7ff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.social-link {
    width: 45px;
    height: 45px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-light);
}

.contact-info i {
    color: var(--primary-color);
    width: 20px;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-partners {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
}

.partner-logo {
    height: 40px;
    width: auto;
}

.footer-copyright {
    color: white;
}

/* Estilos para iconos del footer */
.footer .contact-info p {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: white;
}

.footer .contact-info i {
    color: #e0e7ff;
    width: 16px;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .section-title {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .section-logo {
        height: 2rem;
    }
    
    .plan-toggle {
        gap: 0.75rem;
        padding: 0.4rem;
    }
    
    .plan-label {
        font-size: 0.8rem;
    }
    
    .toggle-switch {
        width: 50px;
        height: 25px;
    }
    
    .toggle-slider {
        width: 20px;
        height: 20px;
        top: 2.5px;
        left: 2.5px;
    }
    
    .toggle-switch.active .toggle-slider {
        transform: translateX(25px);
    }
    
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        width: 100%;
        height: calc(100vh - 70px);
        text-align: center;
        transition: all 0.4s cubic-bezier(0.175, 0885, 0.32, 1.275);
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
        overflow-y: auto;
        z-index: 1000;
    }

    .nav-menu.active {
        left: 0;
        transform: translateX(0);
    }

    .nav-menu .nav-item {
        margin: 1rem 0;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.3s ease;
    }

    .nav-menu.active .nav-item {
        opacity: 1;
        transform: translateY(0);
    }

    .nav-menu .nav-item:nth-child(1) { transition-delay: 0.1s; }
    .nav-menu .nav-item:nth-child(2) { transition-delay: 0.2s; }
    .nav-menu .nav-item:nth-child(3) { transition-delay: 0.3s; }
    .nav-menu .nav-item:nth-child(4) { transition-delay: 0.4s; }
    .nav-menu .nav-item:nth-child(5) { transition-delay: 0.5s; }

    .nav-menu .nav-link {
        font-size: 1.2rem;
        padding: 1rem 2rem;
        display: block;
        border-radius: 0.5rem;
        margin: 0.5rem 1rem;
        transition: all 0.3s ease;
    }

    .nav-menu .nav-link:hover {
        background: var(--bg-secondary);
        transform: translateX(10px);
    }

    .nav-menu .nav-cta {
        margin: 2rem 1rem 0;
    }

    .nav-menu .nav-cta .btn {
        width: 100%;
        justify-content: center;
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }

    .nav-cta {
        margin-left: 0;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 4rem;
        justify-items: center;
        align-items: center;
        justify-content: center;
        padding: 1rem;
    }

    .hero-title {
        font-size: 2.8rem;
        letter-spacing: -0.01em;
        margin-top: 1rem;
    }
    
    .title-line-1 {
        font-size: 2.6rem;
    }
    
    .title-line-2 {
        font-size: 3rem;
    }
    
    .fenix-logo {
        height: 3.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .demo-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .cases-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .floating-card {
        display: none;
    }
}

/* Sistema de Fidelización para Contadores */
.loyalty-program {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.loyalty-program::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="loyalty-pattern" width="50" height="50" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="2" fill="%23667eea" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23loyalty-pattern)"/></svg>');
    opacity: 0.3;
}

.loyalty-content {
    position: relative;
    z-index: 1;
}

.loyalty-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 5rem;
}

.loyalty-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.loyalty-text h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.loyalty-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.loyalty-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.loyalty-benefits .benefit-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.loyalty-benefits .benefit-item:hover {
    transform: translateY(-3px);
}

.loyalty-benefits .benefit-item:hover i {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: scale(1.1);
}

.loyalty-benefits .benefit-item i {
    font-size: 2.5rem;
    color: #667eea;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 15px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.benefit-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.benefit-content p {
    color: var(--text-secondary);
    margin: 0;
}

/* Calculadora de Comisiones */
.commission-calculator {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.commission-calculator h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--text-primary);
    text-align: center;
}

.calculator-form .form-group {
    margin-bottom: 1.5rem;
}

.calculator-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.calculator-form input,
.calculator-form select {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.calculator-form input:focus,
.calculator-form select:focus {
    outline: none;
    border-color: #667eea;
}

.commission-result {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    margin-top: 2rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.result-item:last-child {
    margin-bottom: 0;
}

.result-label {
    font-weight: 500;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Niveles del Programa */
.loyalty-levels {
    margin-bottom: 5rem;
}

.loyalty-levels h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.level-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    transition: transform 0.3s ease;
}

.level-card:hover {
    transform: translateY(-5px);
}

.level-card.featured {
    border: 2px solid #667eea;
    transform: scale(1.05);
}

.level-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
}

.level-header {
    text-align: center;
    margin-bottom: 2rem;
}

.level-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.level-icon i {
    font-size: 2rem;
    color: white;
}

.level-header h4 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.level-commission {
    font-size: 3rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 1rem;
}

.level-benefits {
    list-style: none;
    margin-bottom: 2rem;
}

.level-benefits li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    position: relative;
    padding-left: 2rem;
}

.level-benefits li:last-child {
    border-bottom: none;
}

.level-benefits li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: 600;
}

.level-requirements {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* CTA del Programa */
.loyalty-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 2rem;
    border-radius: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.loyalty-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="cta-pattern" width="30" height="30" patternUnits="userSpaceOnUse"><circle cx="15" cy="15" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23cta-pattern)"/></svg>');
    opacity: 0.3;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.loyalty-cta h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.loyalty-cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .btn {
    min-width: 200px;
}

/* Modal de Registro para Contadores */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 600;
}

.close {
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 2.5rem;
}

.register-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.checkbox-group {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.checkbox-label a {
    color: #667eea;
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.form-actions .btn {
    min-width: 120px;
}

/* Loading personalizado con logo CIADE */
.ciade-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
}

.ciade-loading .logo-container {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ciade-loading .logo-container img {
    width: 60px;
    height: 60px;
    animation: logoPulse 2s ease-in-out infinite;
    filter: brightness(0) invert(1);
}

.ciade-loading .logo-container::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: logoSpin 1s linear infinite;
}

.ciade-loading .loading-text {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    animation: textFade 2s ease-in-out infinite;
}

.ciade-loading .loading-dots {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.ciade-loading .loading-dots span {
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
    animation: dotBounce 1.4s ease-in-out infinite both;
}

.ciade-loading .loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.ciade-loading .loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

.ciade-loading .loading-dots span:nth-child(3) {
    animation-delay: 0s;
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes logoSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes textFade {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

@keyframes dotBounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .loyalty-hero {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .levels-grid {
        grid-template-columns: 1fr;
    }
    
    .level-card.featured {
        transform: none;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .loyalty-benefits {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .loyalty-benefits .benefit-item {
        padding: 1rem;
    }
    
    .loyalty-benefits .benefit-item i {
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .modal-header {
        padding: 1.5rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    .ciade-loading .logo-container {
        width: 60px;
        height: 60px;
    }
    
    .ciade-loading .logo-container img {
        width: 40px;
        height: 40px;
    }
    
    .ciade-loading .loading-text {
        font-size: 1rem;
    }
}

/* Sección de Contacto */
.contact {
    background: var(--bg-secondary);
    padding: 6rem 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr; /* El formulario tiene un poco más de espacio */
    gap: 4rem; /* Espacio profesional entre secciones */
    align-items: start;
    max-width: 1200px; /* Limitamos el ancho total para mejor legibilidad */
    margin: 0 auto;
}

/* Tarjeta consolidada de información de contacto */
.contact-info-consolidated {
    display: flex;
    justify-content: center;
}

.contact-card-consolidated {
    background: white;
    padding: 3rem; /* Padding profesional */
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    width: 100%;
    max-width: 100%;
    position: relative;
    overflow: hidden;
}

.contact-card-consolidated::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
}

.contact-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
}

.contact-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 1px;
}

.contact-header h3 {
    font-family: 'Playfair Display', serif;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.8rem;
}

.contact-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr; /* Una columna para mejor legibilidad */
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    min-width: 0;
    position: relative;
}

.contact-item:hover {
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: #3b82f6;
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 12px;
    display: flex;
        align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.contact-details h4 {
    font-family: 'Inter', sans-serif;
    color: #1f2937;
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-size: 1.125rem;
    letter-spacing: -0.025em;
}

.contact-details p {
    color: #6b7280;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
    font-weight: 400;
}

.contact-details strong {
    color: #1f2937;
    font-weight: 600;
}

.contact-details {
    flex: 1; /* Permite que ocupe todo el espacio disponible */
    min-width: 0; /* Evita problemas de desbordamiento */
}

/* Formulario mejorado */
.contact-form-container {
    background: white;
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
}

.contact-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #06b6d4, #3b82f6, #8b5cf6);
}

.contact-form h3 {
    font-family: 'Playfair Display', serif;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.75rem;
}

.form-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Estilos específicos para el formulario de contacto */
.contact-form .form-group {
    margin-bottom: 2.5rem;
}

.contact-form .form-group input,
.contact-form .form-group select,
.contact-form .form-group textarea {
    padding: 1.75rem;
    font-size: 1.05rem;
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.contact-form .form-group input:focus,
.contact-form .form-group select:focus,
.contact-form .form-group textarea:focus {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
}

.contact-form .form-group textarea {
    min-height: 140px;
    resize: vertical;
}

.contact-form .btn {
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
    border-radius: 1rem;
    margin-top: 1rem;
        width: 100%;
    justify-content: center;
    transition: all 0.3s ease;
}

.contact-form .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
}

/* Responsive para contacto */
@media (max-width: 1024px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr; /* Una columna en tablets */
    }
    
    .contact-card-consolidated {
        max-width: 100%;
    }
    
    .contact-form-container {
        padding: 2.5rem;
    }
}

@media (max-width: 768px) {
    .contact-content {
        gap: 3rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .contact-item {
        padding: 1.25rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .contact-form-container {
        padding: 2.5rem 2rem;
    }
    
    .contact-card-consolidated {
        padding: 2rem;
    }
    
    .contact-header {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }
    
    .contact-form h3 {
        font-size: 1.75rem;
    }
    
    .form-subtitle {
        margin-bottom: 2rem;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .contact-content {
        gap: 2rem;
    }
    
    .contact-card-consolidated {
        padding: 1.5rem;
    }
    
    .contact-form-container {
        padding: 2rem 1.5rem;
    }
    
    .contact-item {
        padding: 1rem;
        gap: 1rem;
    }
    
    .contact-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .contact-details h4 {
        font-size: 1.1rem;
    }
    
    .contact-details p {
        font-size: 0.9rem;
    }
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Scroll suave */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Ajustar el scroll offset para el header fijo */
}

/* Ajustar el padding superior de la primera sección después del hero */
.products {
    padding-top: 4rem;
}

/* Asegurar que las secciones tengan el padding correcto */
section:not(.hero) {
    padding-top: 5rem;
    padding-bottom: 6rem;
}

/* Estados de hover mejorados */
.product-card:hover .product-icon {
    transform: scale(1.1);
}

.benefit-item:hover .benefit-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Efectos de carga */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Sistema de notificaciones */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--border-color);
    min-width: 320px;
    max-width: 400px;
    z-index: 10000;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.notification.show {
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    gap: 0.75rem;
}

.notification-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.notification-message {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.notification-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.notification-progress {
    height: 3px;
    background: var(--primary-color);
    width: 100%;
    transition: width 0.1s linear;
}

/* Tipos de notificaciones */
.notification-success {
    border-left: 4px solid var(--success-color);
}

.notification-success .notification-icon {
    color: var(--success-color);
}

.notification-error {
    border-left: 4px solid var(--error-color);
}

.notification-error .notification-icon {
    color: var(--error-color);
}

.notification-warning {
    border-left: 4px solid var(--warning-color);
}

.notification-warning .notification-icon {
    color: var(--warning-color);
}

.notification-info {
    border-left: 4px solid var(--accent-color);
}

.notification-info .notification-icon {
    color: var(--accent-color);
}

/* Responsive para notificaciones */
@media (max-width: 768px) {
    .notification {
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
}

/* Mensajes de éxito/error */
.message {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.message.success {
    background: var(--success-color);
    color: white;
}

.message.error {
    background: var(--error-color);
    color: white;
}

/* Botón flotante de WhatsApp */
.whatsapp-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    animation: bounce 2s infinite;
}

.whatsapp-button a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    text-decoration: none;
    padding: 1rem 1.5rem;
    border-radius: 3rem;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.95rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.whatsapp-button a:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(37, 211, 102, 0.4);
}

.whatsapp-button i {
    font-size: 1.5rem;
    color: white;
}

.whatsapp-text {
    white-space: nowrap;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Responsive para el botón de WhatsApp */
@media (max-width: 768px) {
    .whatsapp-button {
        bottom: 1.5rem;
        right: 1.5rem;
    }
    
    .whatsapp-button a {
        padding: 0.875rem 1.25rem;
        gap: 0.5rem;
    }
    
    .whatsapp-text {
        display: none;
    }
    
    .whatsapp-button i {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .whatsapp-button {
        bottom: 1rem;
        right: 1rem;
    }
    
    .whatsapp-button a {
        padding: 0.75rem;
        border-radius: 50%;
        width: 3.5rem;
        height: 3.5rem;
        justify-content: center;
    }
}

/* ===== GALERÍA DE PRODUCTOS ===== */

.gallery {
    background: var(--bg-primary);
    padding: 6rem 0;
}

/* Iconos ERP personalizados */
.erp-icon-container {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.erp-icon-container:hover {
    transform: scale(1.05);
}

.erp-icon {
    width: 120px;
    height: 120px;
    transition: all 0.3s ease;
}

.erp-icon:hover {
    transform: scale(1.1);
}

.gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 2rem;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.gallery-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.view-toggle {
    display: flex;
    background: white;
    border-radius: 0.5rem;
    padding: 0.25rem;
    box-shadow: var(--shadow-sm);
}

.view-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

.view-btn.active {
    background: var(--primary-color);
    color: white;
}

.gallery-search {
    position: relative;
    max-width: 300px;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.gallery-container {
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    transition: all 0.3s ease;
}

.gallery-grid.list-view {
    grid-template-columns: 1fr;
}

.gallery-item {
    background: white;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    min-height: 280px;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.gallery-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-actions {
    display: flex;
    gap: 1rem;
}

.gallery-btn {
    width: 3rem;
    height: 3rem;
    border: none;
    border-radius: 50%;
    background: white;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.gallery-info {
    padding: 2rem;
}

.gallery-info h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.3rem;
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}

.gallery-info p {
    margin: 0 0 1.5rem 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.gallery-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.25rem 0.75rem;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.gallery-no-results {
    text-align: center;
    padding: 3rem;
}

.no-results-content i {
    font-size: 3rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.no-results-content h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.no-results-content p {
    color: var(--text-secondary);
}

.gallery-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    background: white;
    color: var(--text-secondary);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    gap: 0.5rem;
}

.page-number {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: var(--text-secondary);
}

.page-number:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-number.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* ===== LIGHTBOX MODAL ===== */

.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 2rem;
}

.lightbox-modal.show {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 3rem;
    height: 3rem;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.lightbox-nav.prev {
    left: 1rem;
}

.lightbox-nav.next {
    right: 1rem;
}

.lightbox-image-container {
    display: flex;
    flex-direction: column;
}

.lightbox-image {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
}

.lightbox-info {
    padding: 2rem;
    background: var(--bg-secondary);
}

.lightbox-info h3 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.lightbox-info p {
    margin: 0 0 1rem 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.lightbox-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.lightbox-tags .tag {
    background: var(--primary-color);
    color: white;
}

/* ===== RESPONSIVE GALERÍA ===== */

@media (max-width: 768px) {
    .gallery-filters {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    
    .gallery-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .gallery-search {
        max-width: none;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .lightbox-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .lightbox-nav {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .lightbox-close {
        width: 2.5rem;
        height: 2.5rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .gallery-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-btn {
        justify-content: center;
    }
    
    .pagination-numbers {
        display: none;
    }
}

/* Estilos para páginas de productos detalladas */
.product-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
    width: 100%; /* Usar todo el ancho disponible */
}

.product-hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1400px; /* Aumentar el ancho máximo */
    margin: 0 auto;
    padding: 0 2rem;
}

.product-description {
    padding: 5rem 0;
    background: var(--bg-dark);
    width: 100%; /* Usar todo el ancho disponible */
}

.description-content {
    max-width: 1400px; /* Aumentar el ancho máximo */
    margin: 0 auto;
    padding: 0 2rem;
}

.company-types {
    padding: 5rem 0;
    background: white;
    width: 100%; /* Usar todo el ancho disponible */
}

.company-types .container {
    max-width: 1400px; /* Aumentar el ancho máximo */
}

.product-features-detailed {
    padding: 5rem 0;
    background: var(--bg-secondary);
    width: 100%; /* Usar todo el ancho disponible */
}

.product-features-detailed .container {
    max-width: 1400px; /* Aumentar el ancho máximo */
}

.product-modules {
    padding: 5rem 0;
    background: white;
    width: 100%; /* Usar todo el ancho disponible */
}

.product-modules .container {
    max-width: 1400px; /* Aumentar el ancho máximo */
}

.product-cta {
    padding: 5rem 0;
    background: var(--bg-dark);
    color: white;
    width: 100%; /* Usar todo el ancho disponible */
}

.cta-content {
    text-align: center;
    max-width: 1400px; /* Aumentar el ancho máximo */
    margin: 0 auto;
    padding: 0 2rem;
}

.cta-content {
    text-align: center;
    max-width: 1400px; /* Aumentar el ancho máximo */
    margin: 0 auto;
    padding: 0 2rem;
}

.product-hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    line-height: 1.2;
    color: #ffffff !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.product-hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.7;
    margin-bottom: 3rem;
    color: #000000 !important;
    font-weight: 600;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.product-hero-actions {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.product-hero-image {
    text-align: center;
}

.hero-product-img {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
}

.description-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: white !important;
    font-weight: 700;
}

.description-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: white !important;
    font-weight: 400;
}

.company-types h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-align: center;
    font-weight: 700;
}

.company-types > p {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
    font-weight: 500;
}

.types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.type-category {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}

.type-category h3 {
    font-family: 'Playfair Display', serif;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.type-category ul {
    list-style: none;
}

.type-category li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 400;
}

.type-category li:last-child {
    border-bottom: none;
}

.product-features-detailed h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-align: center;
    font-weight: 700;
}

.product-features-detailed > p {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
    font-weight: 500;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-item {
    background: white;
    padding: 2.5rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

.feature-item h3 {
    font-family: 'Playfair Display', serif;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.feature-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.product-modules h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
    text-align: center;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2.5rem;
}

.module-item {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.module-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.module-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
    font-size: 1.75rem;
}

.module-item h3 {
    font-family: 'Playfair Display', serif;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.module-item p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.module-item ul {
    list-style: none;
}

.module-item li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.module-item li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.cta-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.cta-content p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.cta-actions {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive para páginas de productos */
@media (max-width: 1024px) {
    .product-hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .types-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .modules-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .product-hero-title {
        font-size: 2.5rem;
    }
    
    .product-hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .types-grid {
        grid-template-columns: 1fr;
    }
}

/* Personalización Avanzada y Recomendaciones */

.recommendations-dropdown {
    position: relative;
    margin-left: 2rem;
}

.recommendations-title {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.recommendation-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.recommendation-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.recommendation-link i {
    font-size: 1rem;
    color: var(--primary-color);
}

/* Responsive para recomendaciones */
@media (max-width: 1024px) {
    .recommendations-dropdown {
        margin-left: 1rem;
    }
    
    .recommendations-title {
        font-size: 0.75rem;
    }
    
    .recommendation-link {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
}

@media (max-width: 768px) {
    .recommendations-dropdown {
        margin-left: 0;
        margin-top: 1rem;
        width: 100%;
    }
    
    .recommendations-list {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .recommendation-link {
        min-width: 120px;
        justify-content: center;
    }
}

/* Notificaciones Inteligentes */

.smart-notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 400px;
    max-width: 90vw;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.smart-notification.show {
    transform: translateX(0);
}

.notification-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.notification-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s ease;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.notification-content {
    padding: 1.5rem;
}

.notification-content p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.notification-actions {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    gap: 0.75rem;
}

.notification-actions .btn {
    flex: 1;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Responsive para notificaciones */
@media (max-width: 768px) {
    .smart-notification {
        right: 1rem;
        left: 1rem;
        width: auto;
        max-width: none;
    }
    
    .notification-actions {
        flex-direction: column;
    }
    
    .notification-actions .btn {
        width: 100%;
    }
}

/* Animaciones para notificaciones */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.smart-notification.show {
    animation: slideInRight 0.3s ease forwards;
}

.smart-notification.hide {
    animation: slideOutRight 0.3s ease forwards;
}

/* Chatbot Inteligente */

.chatbot-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 380px;
    max-width: 90vw;
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
    z-index: 10000;
    overflow: hidden;
    transition: all 0.3s ease;
    transform: translateY(100%);
}

.chatbot-container.open {
    transform: translateY(0);
}

.chatbot-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.chatbot-info {
    flex: 1;
}

.chatbot-info h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.chatbot-info .status {
    font-size: 0.75rem;
    opacity: 0.8;
}

.chatbot-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease;
}

.chatbot-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chatbot-body {
    display: none;
    height: 500px;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-message {
    max-width: 80%;
    animation: fadeInUp 0.3s ease;
}

.chat-message.bot-message {
    align-self: flex-start;
}

.chat-message.user-message {
    align-self: flex-end;
}

.message-content {
    background: #f8fafc;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    position: relative;
}

.chat-message.user-message .message-content {
    background: var(--primary-color);
    color: white;
}

.message-content p {
    margin: 0;
    line-height: 1.5;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.6;
    margin-top: 0.25rem;
    display: block;
}

.chat-input-container {
    padding: 1rem;
    border-top: 1px solid #e2e8f0;
}

.quick-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.quick-action-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.quick-action-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.quick-action-btn i {
    font-size: 0.875rem;
}

.input-group {
    display: flex;
    gap: 0.5rem;
}

#chatInput {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s ease;
}

#chatInput:focus {
    border-color: var(--primary-color);
}

.send-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Indicador de escritura */
.typing-indicator {
    align-self: flex-start;
}

.typing-dots {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #94a3b8;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive para chatbot */
@media (max-width: 768px) {
    .chatbot-container {
        right: 1rem;
        left: 1rem;
        width: auto;
        max-width: none;
    }
    
    .chatbot-body {
        height: 400px;
    }
    
    .quick-actions {
        justify-content: center;
    }
    
    .quick-action-btn {
        min-width: 80px;
        justify-content: center;
    }
}

/* Animaciones para el chatbot */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar personalizado para el chat */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Dashboard de Analytics en Tiempo Real */

.analytics-dashboard {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 800px;
    max-width: 90vw;
    max-height: 80vh;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid #e2e8f0;
    z-index: 10001;
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.analytics-dashboard.visible {
    transform: translateX(0);
}

.dashboard-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-toggle,
.dashboard-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease;
}

.dashboard-toggle:hover,
.dashboard-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.dashboard-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(80vh - 80px);
}

/* Grid de métricas */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.metric-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.metric-content h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.metric-change {
    font-size: 0.75rem;
    font-weight: 600;
}

.metric-change.positive {
    color: #10b981;
}

.metric-change.negative {
    color: #ef4444;
}

.metric-change.neutral {
    color: #6b7280;
}

/* Sección de gráficos */
.charts-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem;
}

.chart-container h4 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* Gráficos de barras */
.product-bars,
.behavior-bars {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.product-bar,
.behavior-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.product-label,
.behavior-label {
    min-width: 120px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.bar-container {
    flex: 1;
    position: relative;
    height: 20px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    transition: width 0.5s ease;
}

.bar-value {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Sección de insights */
.insights-section {
    margin-bottom: 2rem;
}

.insights-section h4 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.insight-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.insight-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.insight-content h5 {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 600;
}

.insight-content p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Feed de actividad en tiempo real */
.realtime-activity h4 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.activity-feed {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem;
    max-height: 200px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    margin-top: 0.5rem;
    flex-shrink: 0;
}

.activity-content p {
    margin: 0 0 0.25rem 0;
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Responsive para dashboard */
@media (max-width: 1024px) {
    .analytics-dashboard {
        width: 90vw;
        right: 1rem;
        left: 1rem;
    }
    
    .charts-section {
        grid-template-columns: 1fr;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .analytics-dashboard {
        top: 1rem;
        max-height: 90vh;
    }
    
    .dashboard-body {
        padding: 1rem;
        max-height: calc(90vh - 80px);
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .product-label,
    .behavior-label {
        min-width: 80px;
        font-size: 0.75rem;
    }
}

/* Scrollbar personalizado para dashboard */
.dashboard-body::-webkit-scrollbar,
.activity-feed::-webkit-scrollbar {
    width: 6px;
}

.dashboard-body::-webkit-scrollbar-track,
.activity-feed::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.dashboard-body::-webkit-scrollbar-thumb,
.activity-feed::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.dashboard-body::-webkit-scrollbar-thumb:hover,
.activity-feed::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Animaciones para dashboard */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.analytics-dashboard.visible {
    animation: slideInRight 0.3s ease forwards;
}

/* Indicador de dashboard en el header */
.dashboard-toggle {
    position: relative;
}

.dashboard-toggle::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 1;
    }
    70% {
        transform: scale(1);
        opacity: 0.7;
    }
    100% {
        transform: scale(0.95);
        opacity: 1;
    }
}

/* Sistema de Gamificación y Recompensas */

/* Barra de progreso en el header */
.gamification-progress {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 0.75rem 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 200px;
    z-index: 1000;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.progress-info .level {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.875rem;
}

.progress-info .points {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-text {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Paneles de gamificación */
.achievements-panel,
.leaderboard-panel {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid #e2e8f0;
    z-index: 10000;
    overflow: hidden;
    transition: all 0.3s ease;
    max-height: 80vh;
}

.achievements-panel {
    left: 2rem;
    width: 400px;
    max-width: 90vw;
}

.leaderboard-panel {
    right: 2rem;
    width: 350px;
    max-width: 90vw;
}

.panel-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.panel-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease;
}

.panel-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.panel-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(80vh - 80px);
    transition: max-height 0.3s ease;
}

.panel-body:not(.expanded) {
    max-height: 0;
    padding: 0 1.5rem;
    overflow: hidden;
}

/* Grid de logros */
.achievements-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.achievement {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

.achievement.unlocked {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.achievement.locked {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    opacity: 0.7;
}

.achievement-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.achievement.unlocked .achievement-icon {
    background: var(--primary-color);
    color: white;
}

.achievement.locked .achievement-icon {
    background: #94a3b8;
    color: white;
}

.achievement-info {
    flex: 1;
}

.achievement-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.achievement-info p {
    margin: 0 0 0.5rem 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.achievement-points {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-color);
}

.achievement-status {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.achievement.unlocked .achievement-status i {
    color: #10b981;
    font-size: 1.2rem;
}

.achievement.locked .achievement-status i {
    color: #94a3b8;
    font-size: 1rem;
}

/* Lista de leaderboard */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.leaderboard-item:hover {
    background: #f1f5f9;
    transform: translateX(4px);
}

.leaderboard-item.medal-1 {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    border-color: #d97706;
}

.leaderboard-item.medal-2 {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
    color: white;
    border-color: #4b5563;
}

.leaderboard-item.medal-3 {
    background: linear-gradient(135deg, #cd7f32, #b8860b);
    color: white;
    border-color: #a0522d;
}

.position {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.medal-1 .position,
.medal-2 .position,
.medal-3 .position {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.username {
    font-weight: 600;
    font-size: 0.875rem;
}

.level {
    font-size: 0.75rem;
    opacity: 0.8;
}

.user-score {
    text-align: right;
}

.points {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--primary-color);
}

.medal-1 .points,
.medal-2 .points,
.medal-3 .points {
    color: white;
}

/* Notificaciones de logros */
.achievement-notification,
.level-up-notification,
.reward-notification {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    background: white;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid #e2e8f0;
    z-index: 10001;
    padding: 1.5rem;
    max-width: 400px;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.3s ease;
}

.achievement-notification.show,
.level-up-notification.show,
.reward-notification.show {
    transform: translateX(-50%) translateY(0);
}

.achievement-icon,
.level-up-icon,
.reward-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.achievement-notification .achievement-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.level-up-notification .level-up-icon {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
}

.reward-notification .reward-icon {
    background: linear-gradient(135deg, #c4b5fd, #a78bfa);
    color: white;
}

.achievement-content,
.level-up-content,
.reward-content {
    flex: 1;
}

.achievement-content h4,
.level-up-content h4,
.reward-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.achievement-content p,
.level-up-content p,
.reward-content p {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.points-earned {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.reward-benefits {
    margin-top: 0.75rem;
}

.reward-benefits strong {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.reward-benefits ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.25rem;
}

.reward-benefits li {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

/* Responsive para gamificación */
@media (max-width: 1024px) {
    .achievements-panel,
    .leaderboard-panel {
        position: fixed;
        top: auto;
        bottom: 2rem;
        transform: none;
        max-height: 60vh;
    }
    
    .achievements-panel {
        left: 1rem;
        width: calc(50vw - 1.5rem);
    }
    
    .leaderboard-panel {
        right: 1rem;
        width: calc(50vw - 1.5rem);
    }
    
    .gamification-progress {
        position: relative;
        top: auto;
        right: auto;
        margin: 1rem auto;
        width: fit-content;
    }
}

@media (max-width: 768px) {
    .achievements-panel,
    .leaderboard-panel {
        width: calc(100vw - 2rem);
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        max-height: 50vh;
    }
    
    .achievement-notification,
    .level-up-notification,
    .reward-notification {
        left: 1rem;
        right: 1rem;
        transform: translateX(0) translateY(-100%);
        max-width: none;
    }
    
    .achievement-notification.show,
    .level-up-notification.show,
    .reward-notification.show {
        transform: translateX(0) translateY(0);
    }
    
    .panel-body {
        padding: 1rem;
    }
    
    .achievement {
        padding: 0.75rem;
    }
    
    .achievement-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Scrollbar personalizado para paneles */
.panel-body::-webkit-scrollbar {
    width: 6px;
}

.panel-body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.panel-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.panel-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Animaciones para gamificación */
@keyframes achievementUnlock {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.achievement.unlocked {
    animation: achievementUnlock 0.5s ease;
}

@keyframes levelUpGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(251, 191, 36, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(251, 191, 36, 0.8);
    }
}

.level-up-notification {
    animation: levelUpGlow 2s ease-in-out infinite;
}

/* Estados especiales para logros */
.achievement.unlocked:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1);
}

.leaderboard-item.medal-1:hover {
    transform: translateX(4px) scale(1.02);
    box-shadow: 0 8px 25px -5px rgba(251, 191, 36, 0.3);
}

.leaderboard-item.medal-2:hover {
    transform: translateX(4px) scale(1.02);
    box-shadow: 0 8px 25px -5px rgba(156, 163, 175, 0.3);
}

.leaderboard-item.medal-3:hover {
    transform: translateX(4px) scale(1.02);
    box-shadow: 0 8px 25px -5px rgba(205, 127, 50, 0.3);
}

/* Sistema de Blog Integrado con Redes Sociales */

/* Sección de blog */
.blog-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.blog-section .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.blog-section .section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.blog-section .section-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Grid de blog con sidebar */
.blog-section .container.with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: start;
}

/* Grid de posts */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

/* Post individual */
.blog-post {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.blog-post:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.blog-post.featured {
    border: 2px solid var(--primary-color);
}

.featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Imagen del post */
.post-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-post:hover .post-image img {
    transform: scale(1.05);
}

/* Contenido del post */
.post-content {
    padding: 1.5rem;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.post-category,
.post-date,
.post-read-time {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.post-category {
    color: var(--primary-color);
    font-weight: 600;
}

.post-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.post-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Footer del post */
.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.post-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.action-btn.read-more {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn.read-more:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Acciones sociales */
.social-actions {
    display: flex;
    gap: 0.5rem;
}

.social-btn {
    background: none;
    border: 1px solid #e2e8f0;
    padding: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    min-width: 60px;
    justify-content: center;
}

.social-btn.facebook:hover {
    background: #1877f2;
    color: white;
    border-color: #1877f2;
}

.social-btn.twitter:hover {
    background: #1da1f2;
    color: white;
    border-color: #1da1f2;
}

.social-btn.linkedin:hover {
    background: #0077b5;
    color: white;
    border-color: #0077b5;
}

.social-btn.whatsapp:hover {
    background: #25d366;
    color: white;
    border-color: #25d366;
}

/* Sidebar del blog */
.blog-sidebar {
    position: sticky;
    top: 2rem;
}

.sidebar-widget {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.sidebar-widget h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Widget de categorías */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-item:last-child {
    border-bottom: none;
}

.category-item:hover {
    color: var(--primary-color);
    transform: translateX(4px);
}

.category-item.active {
    color: var(--primary-color);
    font-weight: 600;
}

.category-item i {
    width: 20px;
    margin-right: 0.5rem;
}

.post-count {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Widget de posts populares */
.popular-posts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.popular-post {
    display: flex;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.popular-post:hover {
    transform: translateX(4px);
}

.popular-post img {
    width: 60px;
    height: 60px;
    border-radius: 0.5rem;
    object-fit: cover;
}

.popular-post .post-info h5 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.popular-post .post-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Widget de newsletter */
.newsletter-widget p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter-form input {
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.newsletter-form button {
    padding: 0.75rem;
    font-size: 0.875rem;
}

/* Paginación */
.blog-pagination {
    text-align: center;
    margin-top: 3rem;
}

/* Modal de post completo */
.blog-post-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 1rem;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    margin: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    z-index: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f1f5f9;
    color: var(--text-primary);
}

/* Contenido del modal */
.full-post .post-header {
    position: relative;
    height: 300px;
}

.full-post .post-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.full-post .post-body {
    padding: 2rem;
}

.full-post h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.full-post .post-author {
    font-size: 1rem;
    margin-bottom: 2rem;
}

.full-post .post-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.full-post .post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tag {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Botones sociales en modal */
.post-social h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.post-social .social-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.post-social .social-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    min-width: auto;
}

/* Notificaciones del blog */
.blog-notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    z-index: 10001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.blog-notification.show {
    transform: translateX(0);
}

.blog-notification .notification-content {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.blog-notification i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

/* Responsive para blog */
@media (max-width: 1024px) {
    .blog-section .container.with-sidebar {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .blog-sidebar {
        position: static;
        order: -1;
    }
    
    .blog-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .blog-section {
        padding: 3rem 0;
    }
    
    .blog-section .section-header h2 {
        font-size: 2rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .post-content {
        padding: 1rem;
    }
    
    .post-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .post-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .modal-content {
        margin: 1rem;
        max-height: 95vh;
    }
    
    .full-post .post-body {
        padding: 1.5rem;
    }
    
    .full-post h1 {
        font-size: 1.5rem;
    }
    
    .post-social .social-buttons {
        flex-direction: column;
    }
    
    .blog-notification {
        right: 1rem;
        left: 1rem;
        transform: translateY(-100%);
    }
    
    .blog-notification.show {
        transform: translateY(0);
    }
}

/* Scrollbar personalizado para modal */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Animaciones para blog */
@keyframes blogPostFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-post {
    animation: blogPostFadeIn 0.6s ease;
}

.blog-post:nth-child(2) {
    animation-delay: 0.1s;
}

.blog-post:nth-child(3) {
    animation-delay: 0.2s;
}

/* Estados especiales para posts */
.blog-post.featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.category-item:hover i {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

.popular-post:hover img {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

/* Sistema de CRM Integrado */

/* Sección de CRM */
.crm-dashboard-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    display: none; /* Oculto por defecto, solo visible para usuarios autenticados */
}

.crm-dashboard-section .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.crm-dashboard-section .section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.crm-dashboard-section .section-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Estadísticas generales */
.overview-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-content h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.stat-change {
    font-size: 0.875rem;
    font-weight: 600;
    color: #10b981;
}

/* Pipeline de ventas */
.pipeline-view {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.pipeline-view h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pipeline-stages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.pipeline-stage {
    background: #f8fafc;
    border-radius: 0.75rem;
    padding: 1.5rem;
    border-left: 4px solid #e2e8f0;
    transition: all 0.3s ease;
}

.pipeline-stage:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
}

.stage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-left: 1rem;
}

.stage-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.stage-count {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.stage-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
}

.stage-leads {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stage-lead {
    background: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
}

.stage-lead:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(4px);
}

.lead-name {
    font-weight: 600;
    font-size: 0.875rem;
    display: block;
}

.lead-company {
    font-size: 0.75rem;
    opacity: 0.8;
}

.more-leads {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
    padding: 0.5rem;
}

/* Gestión de leads */
.leads-management {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.leads-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.leads-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Filtros de leads */
.leads-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

.leads-filters select,
.leads-filters input {
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    min-width: 150px;
}

.leads-filters input {
    flex: 1;
    min-width: 200px;
}

/* Tabla de leads */
.leads-table {
    overflow-x: auto;
}

.leads-table-content {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.leads-table-content th {
    background: #f8fafc;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid #e2e8f0;
}

.leads-table-content td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.leads-table-content tr:hover {
    background: #f8fafc;
}

/* Información del lead */
.lead-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.lead-name {
    font-weight: 600;
    color: var(--text-primary);
}

.lead-email {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Badges de estado */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.new {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.qualified {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.proposal {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.negotiation {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.closed_won {
    background: #dcfce7;
    color: #166534;
}

.status-badge.closed_lost {
    background: #f3f4f6;
    color: #374151;
}

/* Barra de score */
.score-bar {
    position: relative;
    width: 60px;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.score-value {
    position: absolute;
    top: -20px;
    right: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Acciones del lead */
.lead-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
}

.btn-sm:hover {
    transform: translateY(-2px);
}

/* Oportunidades */
.deals-overview {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.deals-overview h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.deal-card {
    background: #f8fafc;
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.deal-card:hover {
    background: white;
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.deal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.deal-header h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
}

.deal-value {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-size: 1rem;
    font-weight: 700;
}

.deal-info {
    margin-bottom: 1.5rem;
}

.deal-stage {
    margin-bottom: 1rem;
}

.stage-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stage-badge.proposal {
    background: #fef3c7;
    color: #92400e;
}

.stage-badge.negotiation {
    background: #fee2e2;
    color: #991b1b;
}

.stage-badge.closed_won {
    background: #dcfce7;
    color: #166534;
}

.probability-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-right: 0.5rem;
}

.probability-value {
    font-weight: 600;
    color: var(--text-primary);
}

.deal-products {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.deal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.expected-close {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.deal-actions {
    display: flex;
    gap: 0.5rem;
}

/* Modal de CRM */
.crm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crm-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.crm-modal .modal-content {
    position: relative;
    background: white;
    border-radius: 1rem;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    margin: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 2rem;
}

.crm-modal .modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    z-index: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.crm-modal .modal-close:hover {
    background: #f1f5f9;
    color: var(--text-primary);
}

.crm-modal h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

/* Formulario de lead */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Responsive para CRM */
@media (max-width: 1024px) {
    .overview-stats {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .pipeline-stages {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    
    .deals-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .crm-dashboard-section {
        padding: 3rem 0;
    }
    
    .crm-dashboard-section .section-header h2 {
        font-size: 2rem;
    }
    
    .overview-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .pipeline-stages {
        grid-template-columns: 1fr;
    }
    
    .deals-grid {
        grid-template-columns: 1fr;
    }
    
    .leads-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .leads-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .leads-filters select,
    .leads-filters input {
        min-width: auto;
    }
    
    .leads-table {
        font-size: 0.75rem;
    }
    
    .leads-table-content th,
    .leads-table-content td {
        padding: 0.75rem 0.5rem;
    }
    
    .lead-actions {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .deal-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .crm-modal .modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

/* Scrollbar personalizado para modales */
.crm-modal .modal-content::-webkit-scrollbar {
    width: 6px;
}

.crm-modal .modal-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.crm-modal .modal-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.crm-modal .modal-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Sistema de Autenticación */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.auth-modal-content {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-header h2 {
    margin: 0;
    color: #1f2937;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.auth-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.auth-body {
    padding: 2rem;
}

.auth-body .form-group {
    margin-bottom: 1.5rem;
}

.auth-body label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.auth-body input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.auth-body input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.auth-info {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    border-left: 4px solid #3b82f6;
}

.auth-info h4 {
    margin: 0 0 1rem 0;
    color: #1f2937;
    font-size: 1rem;
}

.auth-info p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: #6b7280;
}

.auth-info strong {
    color: #1f2937;
}

/* Notificaciones */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 10001;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    border-left: 4px solid #3b82f6;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-success {
    border-left-color: #10b981;
}

.notification-success i {
    color: #10b981;
}

.notification-error {
    border-left-color: #ef4444;
}

.notification-error i {
    color: #ef4444;
}

.notification-info i {
    color: #3b82f6;
}

/* Botón de logout */
#logout-btn {
    margin-left: 1rem;
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

#logout-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* Animaciones para CRM */
@keyframes crmCardSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card {
    animation: crmCardSlideIn 0.6s ease;
}

.stat-card:nth-child(2) {
    animation-delay: 0.1s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.2s;
}

.stat-card:nth-child(4) {
    animation-delay: 0.3s;
}

.pipeline-stage {
    animation: crmCardSlideIn 0.6s ease;
}

.pipeline-stage:nth-child(2) {
    animation-delay: 0.1s;
}

.pipeline-stage:nth-child(3) {
    animation-delay: 0.2s;
}

.pipeline-stage:nth-child(4) {
    animation-delay: 0.3s;
}

.pipeline-stage:nth-child(5) {
    animation-delay: 0.4s;
}

.pipeline-stage:nth-child(6) {
    animation-delay: 0.5s;
}

/* Estados especiales para CRM */
.pipeline-stage:hover .stage-lead {
    border-color: var(--primary-color);
}

.deal-card:hover .deal-value {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

.leads-table-content tr:hover .lead-actions {
    opacity: 1;
}

.lead-actions {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

/* Indicadores de actividad */
.stage-lead.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.deal-card.high-priority {
    border-left: 4px solid #ef4444;
}

.deal-card.medium-priority {
    border-left: 4px solid #f59e0b;
}

.deal-card.low-priority {
    border-left: 4px solid #10b981;
}

/* Sistema de Business Intelligence */

/* Sección de BI */
.bi-dashboard-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.bi-dashboard-section .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.bi-dashboard-section .section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.bi-dashboard-section .section-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Selector de dashboard */
.dashboard-selector {
    margin-bottom: 3rem;
}

.selector-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: white;
    border: 2px solid #e2e8f0;
    padding: 1rem 2rem;
    border-radius: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tab-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.3);
}

/* Grid de KPIs */
.kpi-overview {
    margin-bottom: 3rem;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.kpi-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.kpi-card.up::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #10b981, #34d399);
}

.kpi-card.down::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.kpi-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.kpi-trend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
}

.kpi-trend.up {
    background: #dcfce7;
    color: #166534;
}

.kpi-trend.down {
    background: #fee2e2;
    color: #991b1b;
}

.kpi-value {
    margin-bottom: 1.5rem;
}

.kpi-value .value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.kpi-value .target {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.kpi-progress {
    position: relative;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
}

/* Widgets del dashboard */
.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.widget {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.widget-header h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.widget-actions {
    display: flex;
    gap: 0.5rem;
}

/* Tamaños de widgets */
.widget-full {
    grid-column: 1 / -1;
}

.widget-large {
    grid-column: span 2;
}

.widget-medium {
    grid-column: span 1;
}

/* Contenido de widgets */
.widget-content {
    min-height: 200px;
}

/* Widget de resumen */
.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.summary-item {
    text-align: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
}

.summary-item .label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.summary-item .value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.summary-item .change {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
}

.summary-item .change.positive {
    background: #dcfce7;
    color: #166534;
}

.summary-item .change.negative {
    background: #fee2e2;
    color: #991b1b;
}

/* Widget de gráficos */
.chart-container {
    position: relative;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

/* Widget de ranking */
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
}

.ranking-item .rank {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.ranking-item .name {
    flex: 1;
    font-weight: 600;
    color: var(--text-primary);
}

.ranking-item .value {
    font-weight: 600;
    color: var(--primary-color);
}

.ranking-item .change {
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
}

.ranking-item .change.positive {
    background: #dcfce7;
    color: #166534;
}

.ranking-item .change.negative {
    background: #fee2e2;
    color: #991b1b;
}

/* Widget de embudo */
.funnel-chart {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.funnel-stage {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    position: relative;
}

.funnel-stage::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
    border-radius: 0 2px 2px 0;
}

.stage-label {
    font-weight: 600;
    color: var(--text-primary);
}

.stage-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stage-percentage {
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
}

/* Widget de gauge */
.gauge-container {
    text-align: center;
}

.gauge-chart {
    margin-bottom: 1.5rem;
}

.gauge-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.gauge-label {
    font-size: 1rem;
    color: var(--text-secondary);
}

.gauge-metrics {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
}

.metric {
    text-align: center;
}

.metric .label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.metric .value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Widget de pronóstico */
.forecast-container {
    text-align: center;
}

.forecast-header {
    margin-bottom: 1.5rem;
}

.forecast-header h5 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.confidence {
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: #f8fafc;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
}

.forecast-chart {
    margin-bottom: 1.5rem;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 0.75rem;
}

.forecast-summary {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
}

.forecast-item {
    text-align: center;
}

.forecast-item .month {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.forecast-item .value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Widget de mapa */
.map-container {
    text-align: center;
}

.map-placeholder {
    height: 150px;
    background: #f8fafc;
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    border: 2px dashed #cbd5e1;
}

.map-placeholder i {
    font-size: 2rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.map-placeholder p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.territory-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.territory-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.territory-item .region {
    font-weight: 600;
    color: var(--text-primary);
}

.territory-item .performance {
    font-weight: 700;
    color: var(--primary-color);
}

/* Sección de reportes */
.reports-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.reports-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.reports-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.report-card {
    background: #f8fafc;
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.report-card:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.report-header h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.report-type {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.report-type.chart {
    background: #dbeafe;
    color: #1e40af;
}

.report-type.funnel {
    background: #fef3c7;
    color: #92400e;
}

.report-type.heatmap {
    background: #fee2e2;
    color: #991b1b;
}

.report-type.forecast {
    background: #dcfce7;
    color: #166534;
}

.report-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.report-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.report-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.report-actions {
    display: flex;
    gap: 0.75rem;
}

/* Sección de insights */
.insights-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.insights-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.insights-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.insight-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.insight-card:hover {
    background: white;
    transform: translateX(4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.insight-card.trend {
    border-left: 4px solid #10b981;
}

.insight-card.alert {
    border-left: 4px solid #f59e0b;
}

.insight-card.opportunity {
    border-left: 4px solid #3b82f6;
}

.insight-card.high {
    background: #fef2f2;
    border-color: #fecaca;
}

.insight-card.medium {
    background: #fffbeb;
    border-color: #fed7aa;
}

.insight-card.low {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.insight-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.insight-content {
    flex: 1;
}

.insight-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.insight-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.insight-action {
    font-size: 0.875rem;
    color: var(--text-primary);
    background: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.insight-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Notificaciones de BI */
.bi-notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    z-index: 10001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.bi-notification.show {
    transform: translateX(0);
}

.bi-notification.success {
    border-left: 4px solid #10b981;
}

.bi-notification.error {
    border-left: 4px solid #ef4444;
}

.bi-notification.info {
    border-left: 4px solid #3b82f6;
}

.bi-notification.warning {
    border-left: 4px solid #f59e0b;
}

.bi-notification .notification-content {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.bi-notification i {
    font-size: 1.25rem;
}

.bi-notification.success i {
    color: #10b981;
}

.bi-notification.error i {
    color: #ef4444;
}

.bi-notification.info i {
    color: #3b82f6;
}

.bi-notification.warning i {
    color: #f59e0b;
}

/* Estados especiales */
.insight-card.applied {
    background: #dcfce7;
    border-color: #bbf7d0;
}

.insight-card.applied .insight-icon {
    background: #10b981;
}

/* Loading state */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    color: var(--text-secondary);
    font-style: italic;
}

/* Responsive para BI */
@media (max-width: 1024px) {
    .dashboard-widgets {
        grid-template-columns: 1fr;
    }
    
    .widget-large {
        grid-column: span 1;
    }
    
    .kpi-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .bi-dashboard-section {
        padding: 3rem 0;
    }
    
    .bi-dashboard-section .section-header h2 {
        font-size: 2rem;
    }
    
    .selector-tabs {
        flex-direction: column;
        align-items: stretch;
    }
    
    .tab-btn {
        justify-content: center;
    }
    
    .kpi-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .summary-stats {
        grid-template-columns: 1fr;
    }
    
    .reports-grid {
        grid-template-columns: 1fr;
    }
    
    .reports-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .insight-card {
        flex-direction: column;
        text-align: center;
    }
    
    .insight-actions {
        justify-content: center;
    }
    
    .bi-notification {
        right: 1rem;
        left: 1rem;
        transform: translateY(-100%);
    }
    
    .bi-notification.show {
        transform: translateY(0);
    }
}

/* Scrollbar personalizado para widgets */
.widget-content::-webkit-scrollbar {
    width: 6px;
}

.widget-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.widget-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.widget-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Animaciones para BI */
@keyframes biCardSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kpi-card {
    animation: biCardSlideIn 0.6s ease;
}

.kpi-card:nth-child(2) {
    animation-delay: 0.1s;
}

.kpi-card:nth-child(3) {
    animation-delay: 0.2s;
}

.kpi-card:nth-child(4) {
    animation-delay: 0.3s;
}

.widget {
    animation: biCardSlideIn 0.6s ease;
}

.widget:nth-child(2) {
    animation-delay: 0.1s;
}

.widget:nth-child(3) {
    animation-delay: 0.2s;
}

.widget:nth-child(4) {
    animation-delay: 0.3s;
}

/* Estados especiales para BI */
.widget:hover .widget-header {
    border-bottom-color: var(--primary-color);
}

.report-card:hover .report-type {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

.insight-card:hover .insight-icon {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Sistema de Integración con APIs Externas */

/* Sección de APIs */
.api-integration-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.api-integration-section .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.api-integration-section .section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.api-integration-section .section-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Estadísticas generales */
.api-overview .overview-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.api-overview .stat-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.api-overview .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.api-overview .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.api-overview .stat-content {
    flex: 1;
}

.api-overview .stat-content h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.api-overview .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.api-overview .stat-change {
    font-size: 0.875rem;
    font-weight: 600;
    color: #10b981;
}

/* Gestión de APIs */
.api-management {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.management-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Grid de APIs */
.api-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.api-card {
    background: #f8fafc;
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.api-card:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.api-card.connected {
    border-left: 4px solid #10b981;
}

.api-card.pending {
    border-left: 4px solid #f59e0b;
}

.api-card.error {
    border-left: 4px solid #ef4444;
}

.api-card.disconnected {
    border-left: 4px solid #6b7280;
}

.api-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.api-info h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.api-type {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    background: #f1f5f9;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
}

.api-status .status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.connected {
    background: #dcfce7;
    color: #166534;
}

.status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.error {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.disconnected {
    background: #f3f4f6;
    color: #374151;
}

/* Detalles de la API */
.api-details {
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.detail-item .label {
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-item .value {
    color: var(--text-primary);
    font-weight: 600;
}

/* Acciones de la API */
.api-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Sección de conexiones */
.connections-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.connections-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.connections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.connection-card {
    background: #f8fafc;
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.connection-card:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.connection-card.active {
    border-left: 4px solid #10b981;
}

.connection-card.pending {
    border-left: 4px solid #f59e0b;
}

.connection-card.error {
    border-left: 4px solid #ef4444;
}

.connection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.connection-header h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.connection-type {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    background: #f1f5f9;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
}

/* Flujo de conexión */
.connection-flow {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
}

.flow-source,
.flow-target {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.flow-arrow {
    color: var(--primary-color);
    font-size: 1.25rem;
}

/* Reglas de conexión */
.connection-rules {
    margin-bottom: 1.5rem;
}

.connection-rules h5 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.connection-rules ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.connection-rules li {
    font-size: 0.875rem;
    color: var(--text-primary);
    padding: 0.5rem;
    background: white;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid #e2e8f0;
}

/* Meta información de conexión */
.connection-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.meta-item .label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
}

.meta-item .value {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* Acciones de conexión */
.connection-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Sección de webhooks */
.webhooks-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.webhooks-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.webhooks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.webhook-card {
    background: #f8fafc;
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.webhook-card:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.webhook-card.active {
    border-left: 4px solid #10b981;
}

.webhook-card.pending {
    border-left: 4px solid #f59e0b;
}

.webhook-card.error {
    border-left: 4px solid #ef4444;
}

.webhook-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.webhook-header h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.webhook-status {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    background: #f1f5f9;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
}

/* URL del webhook */
.webhook-url {
    margin-bottom: 1rem;
}

.webhook-url .label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-right: 0.5rem;
}

.webhook-url code {
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: monospace;
    font-size: 0.875rem;
    color: var(--text-primary);
}

/* Eventos del webhook */
.webhook-events {
    margin-bottom: 1rem;
}

.webhook-events .label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: block;
}

.event-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.event-tag {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Meta información del webhook */
.webhook-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Acciones del webhook */
.webhook-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Sección de monitoreo */
.monitoring-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.monitoring-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.monitoring-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.monitoring-card {
    background: #f8fafc;
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
}

.monitoring-card h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

/* Lista de estado de APIs */
.api-status-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.status-item .api-name {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.status-indicator.connected {
    background: #10b981;
}

.status-indicator.pending {
    background: #f59e0b;
}

.status-indicator.error {
    background: #ef4444;
}

.status-indicator.disconnected {
    background: #6b7280;
}

/* Métricas de rendimiento */
.performance-metrics {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.performance-metrics .metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.performance-metrics .label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.performance-metrics .value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Feed de actividad */
.activity-feed {
    max-height: 200px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    margin-bottom: 0.5rem;
}

.activity-item.success {
    border-left: 4px solid #10b981;
}

.activity-item.warning {
    border-left: 4px solid #f59e0b;
}

.activity-item.info {
    border-left: 4px solid #3b82f6;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.activity-text {
    font-size: 0.875rem;
    color: var(--text-primary);
}

/* Lista de alertas */
.alerts-list {
    max-height: 200px;
    overflow-y: auto;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    margin-bottom: 0.5rem;
}

.alert-item.error {
    border-left: 4px solid #ef4444;
}

.alert-item.warning {
    border-left: 4px solid #f59e0b;
}

.alert-item.info {
    border-left: 4px solid #3b82f6;
}

.alert-item.success {
    border-left: 4px solid #10b981;
}

.alert-icon {
    color: var(--text-secondary);
    font-size: 1rem;
}

.alert-text {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.alert-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Modal de APIs */
.api-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.api-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.api-modal .modal-content {
    position: relative;
    background: white;
    border-radius: 1rem;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    margin: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 2rem;
}

.api-modal .modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    z-index: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.api-modal .modal-close:hover {
    background: #f1f5f9;
    color: var(--text-primary);
}

.api-modal h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

/* Formulario de API */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Notificaciones de API */
.api-notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    z-index: 10001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.api-notification.show {
    transform: translateX(0);
}

.api-notification.success {
    border-left: 4px solid #10b981;
}

.api-notification.error {
    border-left: 4px solid #ef4444;
}

.api-notification.info {
    border-left: 4px solid #3b82f6;
}

.api-notification .notification-content {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.api-notification i {
    font-size: 1.25rem;
}

.api-notification.success i {
    color: #10b981;
}

.api-notification.error i {
    color: #ef4444;
}

.api-notification.info i {
    color: #3b82f6;
}

/* Responsive para APIs */
@media (max-width: 1024px) {
    .api-grid,
    .connections-grid,
    .webhooks-grid,
    .monitoring-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .api-overview .overview-stats {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .api-integration-section {
        padding: 3rem 0;
    }
    
    .api-integration-section .section-header h2 {
        font-size: 2rem;
    }
    
    .api-overview .overview-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .api-grid,
    .connections-grid,
    .webhooks-grid,
    .monitoring-grid {
        grid-template-columns: 1fr;
    }
    
    .management-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .connection-flow {
        flex-direction: column;
        text-align: center;
    }
    
    .flow-arrow {
        transform: rotate(90deg);
    }
    
    .connection-meta,
    .webhook-meta {
        grid-template-columns: 1fr;
    }
    
    .api-modal .modal-content {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .api-notification {
        right: 1rem;
        left: 1rem;
        transform: translateY(-100%);
    }
    
    .api-notification.show {
        transform: translateY(0);
    }
}

/* Scrollbar personalizado para monitoreo */
.activity-feed::-webkit-scrollbar,
.alerts-list::-webkit-scrollbar {
    width: 6px;
}

.activity-feed::-webkit-scrollbar-track,
.alerts-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.activity-feed::-webkit-scrollbar-thumb,
.alerts-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.activity-feed::-webkit-scrollbar-thumb:hover,
.alerts-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Animaciones para APIs */
@keyframes apiCardSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.api-card {
    animation: apiCardSlideIn 0.6s ease;
}

.api-card:nth-child(2) {
    animation-delay: 0.1s;
}

.api-card:nth-child(3) {
    animation-delay: 0.2s;
}

.api-card:nth-child(4) {
    animation-delay: 0.3s;
}

.connection-card {
    animation: apiCardSlideIn 0.6s ease;
}

.connection-card:nth-child(2) {
    animation-delay: 0.1s;
}

.connection-card:nth-child(3) {
    animation-delay: 0.2s;
}

.webhook-card {
    animation: apiCardSlideIn 0.6s ease;
}

.webhook-card:nth-child(2) {
    animation-delay: 0.1s;
}

.webhook-card:nth-child(3) {
    animation-delay: 0.2s;
}

/* Estados especiales para APIs */
.api-card:hover .api-header {
    transform: translateY(-2px);
    transition: transform 0.2s ease;
}

.connection-card:hover .connection-flow {
    border-color: var(--primary-color);
    transition: border-color 0.2s ease;
}

.webhook-card:hover .webhook-url code {
    background: var(--primary-color);
    color: white;
    transition: all 0.2s ease;
}

/* Indicadores de estado en tiempo real */
.status-indicator.connected {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Sistema de Seguridad y Compliance */

/* Sección de Seguridad */
.security-compliance-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.security-compliance-section .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.security-compliance-section .section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.security-compliance-section .section-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Estadísticas de seguridad */
.security-overview .overview-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.security-overview .stat-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.security-overview .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.security-overview .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.security-overview .stat-content {
    flex: 1;
}

.security-overview .stat-content h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.security-overview .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.security-overview .stat-change {
    font-size: 0.875rem;
    font-weight: 600;
    color: #10b981;
}

/* Dashboard de seguridad */
.security-dashboard {
    margin-bottom: 3rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.dashboard-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dashboard-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Estado de seguridad */
.status-overview {
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
}

.status-overview.excellent {
    background: #f0fdf4;
    border-color: #10b981;
}

.status-overview.good {
    background: #fef3c7;
    border-color: #f59e0b;
}

.status-overview.medium {
    background: #fef3c7;
    border-color: #f59e0b;
}

.status-overview.low {
    background: #fee2e2;
    border-color: #ef4444;
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.excellent {
    background: #dcfce7;
    color: #166534;
}

.status-badge.good {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.medium {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.low {
    background: #fee2e2;
    color: #991b1b;
}

.status-score {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.status-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.status-item .label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.status-item .value {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
}

.status-item .value.good {
    background: #dcfce7;
    color: #166534;
}

.status-item .value.bad {
    background: #fee2e2;
    color: #991b1b;
}

/* Estado de compliance */
.compliance-overview {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.compliance-score {
    text-align: center;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.score-value {
    font-size: 2rem;
    font-weight: 700;
}

.score-label {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.compliance-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.compliance-item {
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.compliance-item.compliant {
    border-left: 4px solid #10b981;
}

.compliance-item.in_progress {
    border-left: 4px solid #f59e0b;
}

.compliance-item.pending {
    border-left: 4px solid #6b7280;
}

.compliance-item.non_compliant {
    border-left: 4px solid #ef4444;
}

.rule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.rule-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.rule-status {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
}

.rule-status.compliant {
    background: #dcfce7;
    color: #166534;
}

.rule-status.in_progress {
    background: #fef3c7;
    color: #92400e;
}

.rule-status.pending {
    background: #f3f4f6;
    color: #374151;
}

.rule-status.non_compliant {
    background: #fee2e2;
    color: #991b1b;
}

.rule-progress {
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.progress-fill.compliant {
    background: #10b981;
}

.progress-fill.in_progress {
    background: #f59e0b;
}

.progress-fill.pending {
    background: #6b7280;
}

.progress-fill.non_compliant {
    background: #ef4444;
}

.rule-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Amenazas */
.threats-overview {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.threats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
}

.summary-item {
    text-align: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
}

.summary-item .label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.summary-item .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.summary-item .value.good {
    color: #10b981;
}

.summary-item .value.warning {
    color: #f59e0b;
}

.threats-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.threat-item {
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.threat-item.critical {
    border-left: 4px solid #ef4444;
}

.threat-item.high {
    border-left: 4px solid #f97316;
}

.threat-item.medium {
    border-left: 4px solid #f59e0b;
}

.threat-item.low {
    border-left: 4px solid #10b981;
}

.threat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.threat-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.threat-severity {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
}

.threat-severity.critical {
    background: #fee2e2;
    color: #991b1b;
}

.threat-severity.high {
    background: #fed7aa;
    color: #9a3412;
}

.threat-severity.medium {
    background: #fef3c7;
    color: #92400e;
}

.threat-severity.low {
    background: #dcfce7;
    color: #166534;
}

.threat-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.threat-status .status {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
}

.threat-status .status.blocked {
    background: #dcfce7;
    color: #166534;
}

.threat-status .status.monitoring {
    background: #fef3c7;
    color: #92400e;
}

.threat-status .status.detected {
    background: #fee2e2;
    color: #991b1b;
}

.threat-status .status.resolved {
    background: #dbeafe;
    color: #1e40af;
}

.threat-status .occurrences {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.threat-protection {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.protection-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.protection-value {
    font-size: 0.75rem;
    color: var(--text-primary);
    background: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid #e2e8f0;
}

/* Auditoría */
.audit-overview {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.audit-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
}

.total-events {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.last-24h {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.audit-events {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
}

.audit-event {
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: white;
}

.audit-event.success {
    border-left: 4px solid #10b981;
}

.audit-event.warning {
    border-left: 4px solid #f59e0b;
}

.audit-event.error {
    border-left: 4px solid #ef4444;
}

.audit-event.info {
    border-left: 4px solid #3b82f6;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.event-type {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.event-status {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
}

.event-status.success {
    background: #dcfce7;
    color: #166534;
}

.event-status.warning {
    background: #fef3c7;
    color: #92400e;
}

.event-status.error {
    background: #fee2e2;
    color: #991b1b;
}

.event-status.info {
    background: #dbeafe;
    color: #1e40af;
}

.event-details {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.event-description {
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.4;
}

/* Acciones de seguridad */
.security-actions {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.actions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.actions-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.action-card {
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    transition: all 0.3s ease;
}

.action-card:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.action-card h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.action-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}   

/* Animación de brillo para el texto verde */
@keyframes glow {
    from {
        text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    }
    to {
        text-shadow: 0 0 20px rgba(16, 185, 129, 0.8), 0 0 30px rgba(16, 185, 129, 0.6);
    }
}

/* ===== ESTILOS DEL BLOG ===== */

/* Hero del Blog */
.blog-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.blog-hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.blog-hero-content {
    max-width: 600px;
}

.blog-hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    font-family: 'Playfair Display', serif;
}

.blog-hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.blog-hero-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.blog-stat {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.blog-stat i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #fbbf24;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-hero-visual {
    text-align: center;
}

.blog-hero-image {
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.3);
}

/* Categorías del Blog */
.blog-categories {
    padding: 5rem 0;
    background: white;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.category-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.category-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.category-card p {
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Artículos Destacados */
.featured-articles {
    padding: 5rem 0;
    background: var(--bg-secondary);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.article-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.article-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.article-content {
    padding: 1.5rem;
}

.article-category {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.article-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.article-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
}

.read-more:hover {
    text-decoration: underline;
}

/* Artículos Recientes */
.recent-articles {
    padding: 5rem 0;
    background: white;
}

.articles-list {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.article-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.article-item:hover {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin: 0 -1.5rem;
}

.article-thumbnail {
    width: 150px;
    height: 100px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.article-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.article-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.article-info p {
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

/* Newsletter */
.newsletter {
    padding: 5rem 0;
    background: var(--bg-dark);
    color: white;
}

.newsletter-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 2rem;
}

.newsletter-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.newsletter-content p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
}

.newsletter-form button {
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Responsive del Blog */
@media (max-width: 1024px) {
    .blog-hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .blog-hero-title {
        font-size: 3rem;
    }
    
    .blog-hero-stats {
        justify-content: center;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .articles-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 4rem 0;
    }
    
    .blog-hero-title {
        font-size: 2.5rem;
    }
    
    .blog-hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .blog-stat {
        padding: 1rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .article-item {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .article-thumbnail {
        width: 100%;
        height: 150px;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .blog-hero-title {
        font-size: 2rem;
    }
    
    .blog-hero-subtitle {
        font-size: 1rem;
    }
    
    .newsletter-content h2 {
        font-size: 2rem;
    }
}

/* Estilos para validación de formularios */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group input.error,
.form-group textarea.error,
.form-group select.error {
    border-color: var(--error-color);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.field-error {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Estilos para modales */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--bg-primary);
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: var(--text-primary);
}

.close {
    color: var(--text-light);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--error-color);
}

.modal-body {
    padding: 2rem;
}

/* Estilos para el formulario de registro */
.register-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.register-form .form-group {
    margin-bottom: 1rem;
}

.register-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.register-form input,
.register-form select,
.register-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.register-form .checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Estilos para la calculadora de comisiones */
.commission-calculator {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.commission-calculator h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.calculator-form .form-group {
    margin-bottom: 1rem;
}

.calculator-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.calculator-form input,
.calculator-form select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
}

.commission-result {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.result-item:last-child {
    margin-bottom: 0;
}

.result-label {
    font-weight: 500;
}

.result-value {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Responsive adicional para modales */
@media (max-width: 768px) {
    .register-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .modal-header,
    .modal-body {
        padding: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
}