/* Least-invasive fixes scoped ONLY to Tablero de datos */
#main-analytics-section, #main-analytics-section .container { min-width: 0 !important; }
#main-analytics-section { overflow-y: auto; -webkit-overflow-scrolling: touch; }
#main-analytics-section .analytics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
@media (max-width: 1200px) { #main-analytics-section .analytics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 680px)  { #main-analytics-section .analytics-grid { grid-template-columns: 1fr !important; } }

/* Ensure charts inside this section never overflow in narrow screens */
#main-analytics-section .chart-container { width: 100% !important; height: auto; min-height: 260px; }
#main-analytics-section .chart-container canvas { max-width: 100% !important; height: auto !important; }
/* Final small fixes: avoid overflow and guarantee scroll */
.analytics-card, .chart-container, .analytics-grid { min-width: 0 !important; }
.chart-container { width: 100% !important; }
.chart-container canvas { max-width: 100% !important; height: auto !important; }

/* Ensure parent containers can scroll in frame mode */
.page-content, .main-content { min-height: 0 !important; min-width: 0 !important; }
.slides-viewport .page-content, .slides-viewport .main-content {
  overflow-y: auto !important; -webkit-overflow-scrolling: touch;
}

/* When very narrow, force single column to prevent cut tiles */
@media (max-width: 900px) {
  .analytics-grid { grid-template-columns: repeat(2, minmax(280px, 1fr)) !important; }
}
@media (max-width: 640px) {
  .analytics-grid { grid-template-columns: 1fr !important; }
}
/* Final overrides for Analytics layout and scrolling */
.analytics-grid {
  /* Prevent half-cut columns at intermediate widths */
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
}

@media (max-width: 360px) {
  .analytics-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important; }
}

/* Ensure section itself can scroll inside frames on small screens */
.analytics-dashboard { min-height: 0 !important; overflow-y: visible; }
.analytics-dashboard .container { min-height: 0 !important; overflow: visible; }

/* As a last resort, allow scroll on the page-content when inside a slide/frame */
.slides-viewport .page-content,
.slides-viewport .analytics-dashboard { overflow-y: auto !important; -webkit-overflow-scrolling: touch; }
/* Frame wrapper scroll fallback */
.slides-viewport {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  height: auto;
  max-height: none;
}

html.embedded, body.embedded { height: 100%; overflow-y: auto; }

/* Compact gaps on very narrow screens */
@media (max-width: 680px) {
  .analytics-grid { gap: 1rem !important; }
  .analytics-card { padding: 1rem !important; }
}
/* =========================
   Analytics responsive + frame scroll fixes (override)
   ========================= */
/* Ensure containers can shrink inside frames and do not clip content */
.analytics-dashboard,
.analytics-dashboard .container,
.analytics-grid { min-width: 0 !important; }

/* Strong responsive grid: 3 -> 2 -> 1 columns */
@media (min-width: 1201px) {
  .analytics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (min-width: 681px) and (max-width: 1200px) {
  .analytics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 680px) {
  .analytics-grid { grid-template-columns: 1fr !important; }
}

/* Allow vertical scroll when embedded in frames/iframes/sliders */
html.embedded .analytics-dashboard,
body.embedded .analytics-dashboard,
.slides-viewport .analytics-dashboard,
.analytics-dashboard.frame-mode {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

html.embedded .analytics-dashboard .container,
body.embedded .analytics-dashboard .container,
.slides-viewport .analytics-dashboard .container,
.analytics-dashboard.frame-mode .container {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  max-height: none !important;
}

/* Improve chart responsiveness in very narrow screens */
@media (max-width: 680px) {
  .chart-container { height: auto !important; min-height: 260px !important; }
}
.analytics-dashboard .container {
    /* Ensure the grid can shrink nicely inside frames */
    min-width: 0;
}

/* Breakpoints: 3 -> 2 -> 1 columns */
@media (max-width: 1200px) {
  .analytics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

/* Embedded/frame view: allow vertical scroll to reach all 6 charts */
html.embedded .analytics-dashboard,
body.embedded .analytics-dashboard {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

html.embedded .analytics-dashboard .container,
body.embedded .analytics-dashboard .container {
  max-height: calc(100vh - 140px); /* keep title + paddings visible */
  overflow-y: auto !important;
}
/* Importar tipografía Parabolica (usando Google Fonts como alternativa) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap');

/* Variables CSS para la nueva paleta de ONE Social */
:root {
    --one-cream: #F0EAE9;
    --one-orange-primary: #FF5600;
    --one-orange-secondary: #FF3D03;
    --one-pink-primary: #EF2686;
    --one-pink-light: #FF6075;
    --one-pink-lighter: #FF929E;
    --one-purple-dark: #400C2A;
    --one-purple-medium: #7B3B8B;
    --one-purple-light: #CA66FB;
    --one-white: #FFFFFF;
    --one-text-dark: #2D2D2D;
    --one-text-light: #6B7280;
}

/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--one-cream) 0%, #FFFFFF 100%);
    color: var(--one-text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background: linear-gradient(135deg, var(--one-purple-dark) 0%, var(--one-purple-medium) 100%);
    color: white;
    transition: all 0.3s ease;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar.collapsed {
    width: 80px;
}

.logo-container {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: #EC5C2A;
}

.logo-container h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--one-cream);
}

.logo-container h1 span {
    color: var(--one-orange-primary);
}

.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin: 0.5rem 0;
    border-radius: 0 25px 25px 0;
    margin-right: 1rem;
    transition: all 0.3s ease;
}

.sidebar-nav li:hover,
.sidebar-nav li.active {
    background: linear-gradient(90deg, var(--one-orange-primary), var(--one-pink-primary));
    transform: translateX(5px);
}

.sidebar-nav li:hover a,
.sidebar-nav li.active a {
    color: white;
    font-weight: 600;
}

.sidebar-nav ul li.active a {
    color: white;
    background: linear-gradient(135deg, var(--primary-light), rgba(239, 38, 134, 0.05));
    font-weight: 600;
    border-left: 4px solid var(--one-orange-primary);
    transform: translateX(4px);
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--one-cream);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar-nav i {
    width: 20px;
    height: 20px;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--one-orange-primary);
}

.user-name {
    font-weight: 600;
    color: var(--one-cream);
}

.user-role {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    transition: all 0.3s ease;
}

.main-content.expanded {
    margin-left: 80px;
}

/* Header */
.main-header {
    background: linear-gradient(135deg, var(--one-cream) 0%, var(--one-white) 100%);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 86, 0, 0.1);
    display: flex;
    justify-content: flex-start;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.main-header.expanded {
    margin-left: -200px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#sidebar-toggle {
    background: none;
    border: none;
    color: var(--one-orange-primary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#sidebar-toggle:hover {
    background: rgba(255, 86, 0, 0.1);
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--one-text-dark);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filters-container {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.filter label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--one-text-dark);
    margin-bottom: 0.25rem;
    display: block;
}

.filter select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--one-cream);
    border-radius: 8px;
    background: white;
    color: var(--one-text-dark);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter select:focus {
    outline: none;
    border-color: var(--one-orange-primary);
}

.btn-export {
    background: linear-gradient(135deg, var(--one-orange-primary), var(--one-pink-primary));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 86, 0, 0.3);
}

/* Page Content */
.page-content {
    padding: 2rem;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Welcome Message */
.welcome-message {
    background: linear-gradient(135deg, var(--one-orange-primary) 0%, var(--one-pink-primary) 50%, var(--one-purple-medium) 100%);
    color: white;
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.welcome-message::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="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.welcome-message h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 2;
}

.welcome-message p {
    font-size: 1.1rem;
    opacity: 0.95;
    position: relative;
    z-index: 2;
}

/* KPI Cards */
.kpi-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background: var(--one-white);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-top: 4px solid var(--one-orange-primary);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.kpi-card:nth-child(2) {
    border-top-color: var(--one-pink-primary);
}

.kpi-card:nth-child(3) {
    border-top-color: var(--one-purple-medium);
}

.kpi-card:nth-child(4) {
    border-top-color: var(--one-pink-light);
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--one-orange-primary), var(--one-pink-primary));
    opacity: 0.05;
    border-radius: 50%;
    transform: translate(30px, -30px);
}

.kpi-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--one-orange-primary), var(--one-pink-primary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.kpi-icon i {
    color: white;
    width: 24px;
    height: 24px;
}

.kpi-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--one-text-light);
    margin-bottom: 0.5rem;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--one-text-dark);
    margin-bottom: 0.5rem;
}

.kpi-trend {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.kpi-trend.positive {
    color: #10B981;
}

.kpi-trend i {
    width: 16px;
    height: 16px;
}

/* Section Container */
.section-container {
    background: var(--one-white);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 86, 0, 0.1);
}

.section-header {
    margin-bottom: 1.5rem;
}

.section-header h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--one-text-dark);
    margin-bottom: 0.5rem;
}

/* Analytics Grid */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.analytics-card {
    background: var(--one-white);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.analytics-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--one-orange-primary), var(--one-pink-primary), var(--one-purple-light));
}

.analytics-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--one-orange-primary);
}

.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.analytics-header h4 {
    color: var(--one-text-dark);
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.expand-icon {
    color: var(--one-orange-primary);
    width: 20px;
    height: 20px;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.analytics-card:hover .expand-icon {
    opacity: 1;
    transform: scale(1.1);
}

.chart-container {
    display: flex;
    flex-direction: column;
    height: 350px;
    margin-bottom: 1rem;
    background: var(--one-white);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--one-cream);
}

.analytics-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--one-cream);
}

.highlight-stat {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--one-orange-primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--one-text-light);
}

/* Chart Modal */
.chart-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.chart-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--one-white);
    border-radius: 20px;
    padding: 2rem;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--one-cream);
}

.modal-header h3 {
    color: var(--one-text-dark);
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--one-text-light);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--one-cream);
    color: var(--one-text-dark);
}

.modal-content {
    height: 400px;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--one-white);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--one-cream);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--one-orange-primary);
}

.project-card-header {
    margin-bottom: 1rem;
}

.project-org {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--one-text-light);
}

.organization-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    display: block;
}

.org-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    display: block;
}

.project-card-body h5 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--one-text-dark);
    margin-bottom: 0.5rem;
}

.project-card-body p {
    color: var(--one-text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Mejoras para el contenido de las tarjetas */
.project-card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-details-preview {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--one-text-light);
}

.detail-item i {
    width: 16px;
    height: 16px;
    color: var(--one-orange-primary);
}

.project-card-footer {
    margin-top: auto;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--one-cream);
}

.btn-view-details {
    background: linear-gradient(135deg, var(--one-orange-primary), var(--one-pink-primary));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.btn-view-details:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 86, 0, 0.3);
}

.btn-view-details i {
    width: 16px;
    height: 16px;
}

/* Estilos mejorados para filtros de proyectos */
.projects-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--one-white);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--one-cream);
}

.projects-filters .filter {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.projects-filters .filter label {
    font-weight: 600;
    color: var(--one-text-dark);
    font-size: 0.875rem;
}

.projects-filters .filter select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--one-cream);
    border-radius: 8px;
    background: white;
    color: var(--one-text-dark);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.projects-filters .filter select:hover {
    border-color: var(--one-orange-light);
}

.projects-filters .filter select:focus {
    outline: none;
    border-color: var(--one-orange-primary);
    box-shadow: 0 0 0 3px rgba(255, 86, 0, 0.1);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    grid-column: 1 / -1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--one-cream);
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--one-orange-primary);
    box-shadow: 0 0 0 3px rgba(255, 86, 0, 0.1);
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.9rem;
    color: var(--one-text-dark);
}

.search-box input::placeholder {
    color: var(--one-text-light);
}

.results-counter {
    grid-column: 1 / -1;
    text-align: center;
    padding-top: 0.5rem;
    border-top: 1px solid var(--one-cream);
    margin-top: 0.5rem;
}

.projects-results-counter {
    font-weight: 600;
    color: var(--one-orange-primary);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .projects-filters {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
}

.project-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.metric {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.metric i {
    color: var(--one-orange-primary);
    width: 16px;
    height: 16px;
}

/* Environmental Impact Card */
.environmental-impact-card {
    background: var(--one-white);
    color: var(--one-text-dark);
    border-radius: 20px;
    padding: 2rem;
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--one-cream);
}

.environmental-impact-card::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="eco-pattern" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="2" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23eco-pattern)"/></svg>');
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.card-header h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--one-text-dark);
}

.earth-day-counter {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.earth-icon {
    font-size: 2rem;
}

.earth-day-text {
    text-align: right;
}

.counter {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--one-orange-primary);
}

.label {
    font-size: 0.9rem;
    color: var(--one-text-light);
}

.environmental-story {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 2;
}

.story-section {
    background: var(--one-cream);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 86, 0, 0.1);
}

.story-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.story-icon {
    font-size: 1.5rem;
}

.story-header h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--one-text-dark);
}

.eco-metric {
    text-align: center;
}

.eco-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--one-orange-primary);
    margin-bottom: 0.25rem;
}

.eco-label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--one-text-light);
}

.eco-impact {
    font-size: 0.8rem;
    color: var(--one-text-light);
    font-style: italic;
}

/* Charts Container */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.chart-wrapper {
    background: var(--one-white);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--one-cream);
}

.chart-header {
    flex-shrink: 0;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--one-cream);
    text-align: center;
}

.chart-header h3,
.chart-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--one-text-dark);
    margin: 0;
}

.chart-body {
    flex: 1;
    position: relative;
    min-height: 250px;
}

.chart-body canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Estilos específicos para ODS Progress Rings */
.ods-progress-container {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.ods-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    min-width: 150px;
}

.ods-progress svg {
    transform: rotate(-90deg);
    margin-bottom: 1rem;
}

.progress-ring-circle-bg {
    fill: none;
    stroke: var(--one-cream);
    stroke-width: 8;
}

.progress-ring-circle-progress {
    fill: none;
    stroke: var(--one-orange-primary);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 251.2;
    stroke-dashoffset: 75.36; /* Para 70% de progreso */
    transition: stroke-dashoffset 0.5s ease-in-out;
}

.progress-text {
    position: absolute;
    top: 35px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--one-orange-primary);
}

.ods-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--one-text-dark);
    max-width: 120px;
    line-height: 1.3;
}

/* Estilos para reportes */
.reports-options-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 3rem 0;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 25px;
    padding: 3rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 86, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.reports-options-container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 86, 0, 0.02) 0%, transparent 70%);
    pointer-events: none;
}

.report-type-selection,
.report-format-selection {
    background: rgba(255, 255, 255, 0.8);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
}

.report-type-selection h4,
.report-format-selection h4 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--one-text-dark);
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
    padding-bottom: 0.75rem;
}

.report-type-selection h4::after,
.report-format-selection h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--one-orange-primary), var(--one-pink-primary));
    border-radius: 2px;
}

.report-type-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.report-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem 1.5rem;
    border: 3px solid transparent;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 1rem;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.report-type-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.report-type-btn:hover::before {
    left: 100%;
}

.report-type-btn:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(255, 86, 0, 0.15);
    border-color: var(--one-orange-primary);
}

.report-type-btn.active {
    border-color: var(--one-orange-primary);
    background: linear-gradient(145deg, var(--one-orange-primary), var(--one-pink-primary));
    color: white;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 15px 35px rgba(255, 86, 0, 0.3);
}

.report-type-btn i,
.report-type-btn svg {
    width: 2.5rem;
    height: 2.5rem;
    transition: all 0.3s ease;
}

.report-type-btn:hover i,
.report-type-btn:hover svg,
.report-type-btn.active i,
.report-type-btn.active svg {
    transform: scale(1.1);
}

.report-format-options {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
    justify-content: center;
}

.format-option {
    flex: 1;
    max-width: 200px;
}

.format-option input[type="radio"] {
    display: none;
}

.format-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    border: 3px solid var(--one-cream);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    font-weight: 600;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.format-option label::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.format-option:hover label::before {
    left: 100%;
}

.format-option:hover label {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(255, 86, 0, 0.1);
    border-color: var(--one-orange-primary);
}

.format-option input[type="radio"]:checked + label {
    border-color: var(--one-orange-primary);
    background: linear-gradient(145deg, rgba(255, 86, 0, 0.1), rgba(239, 38, 134, 0.05));
    color: var(--one-orange-primary);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(255, 86, 0, 0.2);
}

.format-option label i,
.format-option label svg {
    width: 2rem;
    height: 2rem;
    transition: all 0.3s ease;
}

.format-option:hover label i,
.format-option:hover label svg,
.format-option input[type="radio"]:checked + label i,
.format-option input[type="radio"]:checked + label svg {
    transform: scale(1.1);
}

.report-preview-container {
    margin: 3rem 0;
}

.report-preview {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border: 3px dashed var(--one-cream);
    border-radius: 20px;
    padding: 3rem 2rem;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
}

.report-preview::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 86, 0, 0.03) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.1; }
}

.report-preview-placeholder {
    text-align: center;
    color: var(--one-text-light);
    position: relative;
    z-index: 1;
}

.report-preview-placeholder i,
.report-preview-placeholder svg {
    width: 4rem;
    height: 4rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.report-preview-placeholder p {
    font-size: 1.1rem;
    font-weight: 500;
}

.report-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.btn-primary {
    background: linear-gradient(145deg, var(--one-orange-primary), var(--one-pink-primary));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 8px 25px rgba(255, 86, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.last-news__title {
    background: #faf7f7 !important;
    background: var(--white, #faf7f7) !important;
    border: 1px solid #101010 !important;
    border: 1px solid var(--black, #101010) !important;
    box-shadow: clamp(.25rem, .16346153846153846rem + .38461538461538464vw, .625rem) clamp(.25rem, .16346153846153846rem + .38461538461538464vw, .625rem) 0 0 #ff601a !important;
    display: inline-block !important;
    font-size: clamp(1.375rem, 1.1153846153846154rem + 1.153846153846154vw, 2.5rem) !important;
    font-weight: 500 !important;
    line-height: clamp(2rem, 1.7403846153846154rem + 1.153846153846154vw, 3.125rem) !important;
    margin-bottom: 1rem !important;
    margin-top: 0 !important;
    max-width: 100% !important;
    padding: 0.4rem 1rem !important;
    text-align: center !important;
    width: 640px !important;
}

/* Ultra-específico para que gane siempre en ES/EN (según data-i18n) */
h2.section-title.last-news__title[data-i18n="environmental.title"],
h2.section-title.last-news__title[data-i18n="analytics.title"],
h2.section-title.last-news__title[data-i18n="indicators.title"] {
    background: #faf7f7 !important;
    background: var(--white, #faf7f7) !important;
    border: 1px solid #101010 !important;
    border: 1px solid var(--black, #101010) !important;
    box-shadow: clamp(.25rem, .16346153846153846rem + .38461538461538464vw, .625rem) clamp(.25rem, .16346153846153846rem + .38461538461538464vw, .625rem) 0 0 #ff601a !important;
    display: inline-block !important;
    font-size: clamp(1.375rem, 1.1153846153846154rem + 1.153846153846154vw, 2.5rem) !important;
    font-weight: 500 !important;
    line-height: clamp(2rem, 1.7403846153846154rem + 1.153846153846154vw, 3.125rem) !important;
    margin-bottom: 0.75rem !important;
    margin-top: 0 !important;
    max-width: 100% !important;
    padding: 0.4rem 1rem !important;
    text-align: center !important;
    width: 640px !important;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 20px 40px rgba(255, 86, 0, 0.4);
}

.btn-primary:active {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 20px rgba(255, 86, 0, 0.3);
}

.btn-primary i,
.btn-primary svg {
    width: 1.25rem;
    height: 1.25rem;
    transition: all 0.3s ease;
}

.btn-primary:hover i,
.btn-primary:hover svg {
    transform: scale(1.1);
}

/* Filtros multi-proyecto */
.filter-multi {
    background: var(--one-white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.filter-multi label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--one-text-dark);
    margin-bottom: 1rem;
    display: block;
}

.projects-checkbox-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-item input[type="checkbox"] {
    accent-color: var(--one-orange-primary);
}

.checkbox-item label {
    font-size: 0.9rem;
    color: var(--one-text-dark);
    cursor: pointer;
    margin: 0;
}

.btn-apply-filters {
    background: linear-gradient(135deg, var(--one-orange-primary), var(--one-pink-primary));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-apply-filters:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 86, 0, 0.3);
}

/* Secciones específicas */
.governance-container,
.social-container,
.environmental-container {
    margin-top: 2rem;
}

.governance-charts,
.social-charts,
.environmental-charts {
    margin-bottom: 3rem;
}

.governance-section,
.social-section,
.environmental-section {
    margin-bottom: 2rem;
}

.governance-section h4,
.social-section h4,
.environmental-section h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--one-text-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--one-orange-primary);
}

.governance-charts-row,
.social-charts-row,
.environmental-charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Tablas modernas */
.modern-table-container {
    background: var(--one-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--one-cream);
}

.modern-comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-comparison-table th {
    background: linear-gradient(135deg, var(--one-orange-primary), var(--one-pink-primary));
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.modern-comparison-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--one-cream);
    font-size: 0.9rem;
    color: var(--one-text-dark);
    background: var(--one-white);
}

.modern-comparison-table tbody tr:hover {
    background: rgba(255, 86, 0, 0.05);
}

.modern-comparison-table tbody tr:hover td {
    color: var(--one-text-dark);
}

.indicator-column {
    font-weight: 600;
    color: var(--one-text-dark) !important;
    background: var(--one-cream) !important;
}

/* Mapa redirect */
.map-redirect-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.map-redirect-message {
    text-align: center;
    background: var(--one-white);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--one-cream);
}

.redirect-icon {
    font-size: 3rem;
    color: var(--one-orange-primary);
    margin-bottom: 1rem;
}

.map-redirect-message h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--one-text-dark);
    margin-bottom: 1rem;
}

.map-redirect-message p {
    color: var(--one-text-light);
    margin-bottom: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .main-header {
        padding: 1rem;
    }
    
    .filters-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .analytics-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-container {
        grid-template-columns: 1fr;
    }
    
    .governance-charts-row,
    .social-charts-row,
    .environmental-charts-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .chart-container {
        height: 300px;
        padding: 0.75rem;
    }
    
    .chart-body {
        min-height: 200px;
    }
    
    .reports-options-container {
        grid-template-columns: 1fr;
    }
    
    .projects-checkbox-container {
        grid-template-columns: 1fr;
    }
}

/* Modal de Proyectos */
.project-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(5px);
    z-index: 2000 !important;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    pointer-events: auto !important;
}

.project-modal-overlay.active {
    display: flex;
}

.project-modal {
    background: var(--one-white);
    border-radius: 20px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
    opacity: 1 !important;
}

@keyframes modalSlideIn {
    from {
        opacity: 1;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.project-modal-header {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

.project-modal-close {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.project-modal-close:hover {
    background: var(--one-white);
    transform: scale(1.1);
}

.project-modal-close i {
    color: var(--one-text-dark);
    width: 20px;
    height: 20px;
}

.project-modal-content {
    overflow-y: auto;
    max-height: 90vh;
    padding: 0;
}

/* Estilos para el contenido del proyecto en el modal */
.project-hero-modal {
    background: linear-gradient(135deg, var(--one-orange-primary), var(--one-pink-primary));
    color: white;
    padding: 3rem 2rem 2rem;
    position: relative;
    overflow: hidden;
}

.project-hero-modal::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="project-pattern" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="2" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23project-pattern)"/></svg>');
    opacity: 0.3;
}

.project-hero-content {
    position: relative;
    z-index: 2;
}

.project-org-modal {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.project-org-modal img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.project-org-modal span {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.9;
}

.project-title-modal {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.project-description-modal {
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.95;
    margin-bottom: 2rem;
}

.project-stats-modal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.project-stat-modal {
    background: rgba(255, 255, 255, 0.15);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.project-stat-value-modal {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.project-stat-label-modal {
    font-size: 0.9rem;
    opacity: 0.9;
}

.project-body-modal {
    padding: 2rem;
}

.project-section-modal {
    margin-bottom: 2.5rem;
}

.project-section-title-modal {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--one-text-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--one-orange-primary);
}

.testimonials-grid-modal {
    display: grid;
    gap: 1.5rem;
}

.testimonial-card-modal {
    background: var(--one-cream);
    padding: 1.5rem;
    border-radius: 15px;
    border-left: 4px solid var(--one-orange-primary);
}

.testimonial-header-modal {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.testimonial-avatar-modal {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--one-orange-primary);
}

.testimonial-info-modal h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--one-text-dark);
    margin-bottom: 0.25rem;
}

.testimonial-info-modal p {
    font-size: 0.9rem;
    color: var(--one-text-light);
}

.testimonial-quote-modal {
    font-style: italic;
    color: var(--one-text-dark);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.testimonial-tags-modal {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.testimonial-tag-modal {
    background: var(--one-orange-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.indicators-grid-modal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.indicator-card-modal {
    background: var(--one-white);
    border: 1px solid var(--one-cream);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.indicator-icon-modal {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--one-orange-primary), var(--one-pink-primary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
}

.indicator-value-modal {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--one-orange-primary);
    margin-bottom: 0.5rem;
}

.indicator-label-modal {
    font-size: 0.9rem;
    color: var(--one-text-light);
}

/* Correcciones adicionales de contraste */
table {
    background: var(--one-white) !important;
    color: var(--one-text-dark) !important;
}

table td,
table th {
    color: var(--one-text-dark) !important;
    background: var(--one-white) !important;
}

table thead th {
    background: linear-gradient(135deg, var(--one-orange-primary), var(--one-pink-primary)) !important;
    color: white !important;
}

table tbody tr:nth-child(even) {
    background: rgba(240, 234, 233, 0.3) !important;
}

table tbody tr:hover {
    background: rgba(255, 86, 0, 0.05) !important;
}

table tbody tr:hover td {
    color: var(--one-text-dark) !important;
}

/* Utilidades */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-2 {
    margin-top: 1rem;
}

.full-width {
    width: 100%;
}

/* Estilos para Organizaciones Aliadas */
.organizations-section {
    padding: 4rem 0;
    background: var(--one-cream);
}

.organizations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.organization-card {
    background: var(--one-white);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 86, 0, 0.1);
    transition: all 0.3s ease;
}

.organization-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--one-orange-primary);
}

.org-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.org-logo {
    flex-shrink: 0;
}

.org-logo img {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    object-fit: cover;
}

.org-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--one-text-dark);
    margin-bottom: 0.5rem;
}

.org-slogan {
    font-size: 0.9rem;
    color: var(--one-text-light);
    line-height: 1.4;
}

.org-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.org-metric {
    text-align: center;
    padding: 1.25rem 0.75rem;
    background: var(--one-cream);
    border-radius: 12px;
    border: 1px solid rgba(255, 86, 0, 0.1);
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.org-metric-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--one-orange-primary);
    margin-bottom: 0.5rem;
    word-break: break-word;
    line-height: 1.1;
    overflow-wrap: break-word;
    hyphens: auto;
}

.org-metric-label {
    font-size: 0.75rem;
    color: var(--one-text-light);
    font-weight: 500;
    line-height: 1.2;
}

/* Proyectos Destacados */
.projects-section {
    padding: 4rem 0;
    background: var(--one-white);
}

/* Métricas Ambientales */
.environmental-section {
    padding: 4rem 0;
}

.environmental-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Override para pantallas pequeñas - forzar 1 columna */
@media (max-width: 600px) {
    .environmental-grid,
    .environmental-section .environmental-grid,
    #main-environmental-section .environmental-grid,
    section.environmental-section .environmental-grid,
    div.environmental-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
}

.environmental-card {
    background: var(--one-white);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 86, 0, 0.1);
    transition: all 0.3s ease;
}

.environmental-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.environmental-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.environmental-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #FF5600;
    margin-bottom: 0.5rem;
}

.environmental-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--one-text-dark);
    margin-bottom: 0.5rem;
}

.environmental-equivalence {
    font-size: 0.9rem;
    color: var(--one-text-light);
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .organizations-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .org-metrics {
        gap: 0.5rem;
    }
    
    .org-metric {
        padding: 1rem 0.5rem;
        min-height: 70px;
    }
    
    .org-metric-value {
        font-size: 0.95rem;
        margin-bottom: 0.25rem;
    }
    
    .org-metric-label {
        font-size: 0.7rem;
    }
    
    /* Environmental grid en 1 columna en tablets también */
    .environmental-grid,
    .environmental-section .environmental-grid,
    #main-environmental-section .environmental-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
}

@media (max-width: 480px) {
    .organizations-grid {
        grid-template-columns: 1fr;
    }
    
    .org-metrics {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .org-metric {
        padding: 1rem;
        min-height: 60px;
    }
    
    .org-metric-value {
        font-size: 1.1rem;
    }
    
    .org-metric-label {
        font-size: 0.8rem;
    }
    
    /* Forzar environmental-grid a una sola columna en móvil */
    .environmental-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
}



/* ============================================
   SOLUCIÓN SIMPLE Y DIRECTA PARA MÓVIL
   ============================================ */

/* Forzar 1 columna en móvil - SIMPLE Y DIRECTO */
@media screen and (max-width: 600px) {
    /* En modo embedded, hacer que hero y environmental se posicionen uno debajo del otro */
    html.embedded section.hero-section[data-embed-slide="0"],
    html.embedded section#main-hero-section[data-embed-slide="0"] {
        position: relative !important;
        min-height: auto !important;
        height: auto !important;
        padding: 15px !important;
        margin: 0 !important;
    }
    
    /* Posicionar environmental justo debajo del hero */
    html.embedded section.environmental-section[data-embed-slide="0"],
    html.embedded section#main-environmental-section[data-embed-slide="0"] {
        position: absolute !important;
        top: 550px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        min-height: auto !important;
        height: auto !important;
        padding: 15px !important;
        margin: 0 !important;
        z-index: 10 !important;
    }
    
    /* FORZAR 1 COLUMNA - ULTRA SIMPLE */
    .environmental-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .environmental-card {
        width: 100% !important;
    }
}

/* Estilos para el header con información del usuario */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--one-cream) 0%, var(--one-white) 100%);
    border-bottom: 1px solid rgba(255, 86, 0, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--one-white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--one-cream);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--one-orange-primary), var(--one-pink-primary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--one-text-dark);
    line-height: 1.2;
}

.user-role {
    font-size: 0.75rem;
    color: var(--one-text-light);
    line-height: 1.2;
}

.logout-btn,
.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--one-orange-primary), var(--one-pink-primary));
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 86, 0, 0.2);
}

.logout-btn:hover,
.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 86, 0, 0.3);
}

.logout-btn i,
.login-btn i {
    width: 18px;
    height: 18px;
}

/* Responsive para el header */
@media (max-width: 768px) {
    .main-header {
        padding: 1rem;
    }
    
    .user-info {
        padding: 0.4rem 0.8rem;
        gap: 0.5rem;
    }
    
    .user-avatar {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
    
    .user-name {
        font-size: 0.8rem;
    }
    
    .user-role {
        font-size: 0.7rem;
    }
    
    .logout-btn,
    .login-btn {
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 480px) {
    .user-details {
        display: none;
    }
    
    .user-info {
        padding: 0.5rem;
    }
}

/* Botón de administración */
.admin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--one-purple-medium), var(--one-purple-dark));
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(123, 59, 139, 0.3);
    margin-right: 0.5rem;
}

.admin-btn:hover {
    background: linear-gradient(135deg, var(--one-purple-light), var(--one-purple-medium));
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(123, 59, 139, 0.4);
}

.admin-btn i,
.admin-btn svg {
    width: 18px;
    height: 18px;
}

.admin-btn svg {
    stroke: currentColor;
    fill: none;
}

@media (max-width: 768px) {
    .admin-btn {
        width: 35px;
        height: 35px;
    }
}

/* ===============================================
   ESTILOS PARA REPORTES PDF Y WORD - DISEÑO PROFESIONAL
   =============================================== */

.report-pdf-container,
.report-word-container {
    font-family: 'Arial', 'Helvetica', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #ffffff;
    margin: 0;
    padding: 0;
}

.report-preview-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    background: #ffffff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

/* Header del reporte */
.report-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    background: linear-gradient(135deg, #FF5600, #EF2686);
    color: white;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.report-header::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="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.report-header h1 {
    margin: 0 0 15px 0;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.report-header p {
    margin: 5px 0;
    font-size: 1.1rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

/* Logo de ONE Social */
.report-logo {
    width: 120px;
    height: auto;
    margin: 0 auto 20px auto;
    display: block;
}

/* Secciones del reporte */
.report-section {
    margin-bottom: 40px;
    page-break-inside: avoid;
}

.report-section h2 {
    color: #FF5600;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #FF5600;
    position: relative;
}

.report-section h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #EF2686, #FF5600);
}

.report-section h3 {
    color: #333;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 25px 0 15px 0;
    padding-left: 15px;
    border-left: 4px solid #FF5600;
}

.report-section p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 15px;
    text-align: justify;
    color: #555;
}

/* Métricas del proyecto */
.project-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin: 30px 0;
    padding: 25px;
    background: linear-gradient(145deg, #f8f9fa, #ffffff);
    border-radius: 15px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.metric-item {
    text-align: center;
    padding: 20px 15px;
    background: #ffffff;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.metric-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FF5600, #EF2686);
}

.metric-item:hover {
    border-color: #FF5600;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 86, 0, 0.15);
}

.metric-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: #FF5600;
    margin-bottom: 8px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.metric-label {
    font-size: 0.95rem;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tablas */
.report-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.report-table th {
    background: linear-gradient(135deg, #FF5600, #EF2686);
    color: white;
    padding: 15px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 0.95rem;
}

.report-table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
    color: #555;
}

.report-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.report-table tbody tr:hover {
    background: #fff3e0;
}

/* Gráficos y visualizaciones */
.chart-placeholder {
    background: linear-gradient(145deg, #f8f9fa, #ffffff);
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    margin: 25px 0;
    color: #6c757d;
    font-style: italic;
}

/* Destacados y callouts */
.report-highlight {
    background: linear-gradient(135deg, rgba(255, 86, 0, 0.1), rgba(239, 38, 134, 0.05));
    border-left: 5px solid #FF5600;
    padding: 20px 25px;
    margin: 25px 0;
    border-radius: 0 10px 10px 0;
    position: relative;
}

.report-highlight::before {
    content: '💡';
    position: absolute;
    left: -15px;
    top: 15px;
    background: #FF5600;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

/* Footer del reporte */
.report-footer {
    margin-top: 50px;
    padding: 30px 0;
    border-top: 2px solid #e9ecef;
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
}

.report-footer .logo-text {
    font-weight: 700;
    color: #FF5600;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

/* Estilos específicos para impresión */
@media print {
    .report-preview-content {
        box-shadow: none;
        border-radius: 0;
        max-width: none;
        margin: 0;
        padding: 20px;
    }
    
    .report-section {
        page-break-inside: avoid;
    }
    
    .project-card {
        page-break-inside: avoid;
    }
    
    .project-metrics {
        page-break-inside: avoid;
    }
}

/* Responsive para diferentes tamaños */
@media (max-width: 768px) {
    .report-preview-content {
        padding: 20px;
    }
    
    .report-header h1 {
        font-size: 2rem;
    }
    
    .project-metrics {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 15px;
        padding: 20px;
    }
    
    .metric-value {
        font-size: 1.8rem;
    }
    
    .project-card {
        padding: 20px;
    }
}

/* Estilos para diferentes tipos de reporte */
.report-type-executive .report-header {
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
}

.report-type-impact .report-header {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.report-type-environmental .report-header {
    background: linear-gradient(135deg, #17a2b8, #6f42c1);
}

/* Animaciones sutiles para la vista previa */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.report-section {
    animation: fadeInUp 0.6s ease-out;
}

.report-section:nth-child(2) { animation-delay: 0.1s; }
.report-section:nth-child(3) { animation-delay: 0.2s; }
.report-section:nth-child(4) { animation-delay: 0.3s; }
.report-section:nth-child(5) { animation-delay: 0.4s; }

/* ===============================================
   CHATBOT IA - DISEÑO MODERNO Y ANIMADO
   =============================================== */

/* Modal del Chatbot */
.ai-chatbot-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-chatbot-modal.active {
    opacity: 1;
    visibility: visible;
}

/* Contenedor del Chatbot */
.ai-chatbot-container {
    width: 420px;
    max-width: 90vw;
    height: 600px;
    max-height: 80vh;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 20px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-chatbot-modal.active .ai-chatbot-container {
    transform: scale(1) translateY(0);
}

/* Header del Chatbot */
.ai-chatbot-header {
    background: linear-gradient(135deg, #4A90E2, #7B68EE);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    overflow: hidden;
}

.ai-chatbot-header::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="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.3;
}

/* Avatar del Bot */
.ai-chatbot-avatar {
    position: relative;
    z-index: 1;
}

.ai-avatar-circle {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 2;
}

.ai-avatar-icon {
    width: 24px;
    height: 24px;
    color: white;
}

.ai-avatar-pulse {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    animation: aiPulse 2s infinite;
}

@keyframes aiPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

/* Info del Bot */
.ai-chatbot-info {
    flex: 1;
    z-index: 1;
}

.ai-chatbot-info h3 {
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 5px 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.ai-status {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: aiStatusBlink 2s infinite;
}

@keyframes aiStatusBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* Botón Cerrar */
.ai-chatbot-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1;
}

.ai-chatbot-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.ai-chatbot-close i {
    width: 18px;
    height: 18px;
    color: white;
}

/* Área de Mensajes */
.ai-chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #f8f9fa;
}

.ai-chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.ai-chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.ai-chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(74, 144, 226, 0.3);
    border-radius: 3px;
}

.ai-chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(74, 144, 226, 0.5);
}

/* Mensajes */
.ai-message {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    animation: aiMessageSlide 0.3s ease-out;
}

@keyframes aiMessageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-message-user {
    flex-direction: row-reverse;
}

.ai-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4A90E2, #7B68EE);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ai-message-user .ai-message-avatar {
    background: linear-gradient(135deg, #FF5600, #EF2686);
}

.ai-message-avatar i {
    width: 16px;
    height: 16px;
    color: white;
}

.ai-message-content {
    background: white;
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 280px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

.ai-message-user .ai-message-content {
    background: linear-gradient(135deg, #4A90E2, #7B68EE);
    color: white;
}

.ai-message-content p {
    margin: 0;
    line-height: 1.4;
    font-size: 0.95rem;
}

/* Sugerencias */
.ai-message-suggestions {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ai-suggestion {
    background: rgba(74, 144, 226, 0.1);
    border: 1px solid rgba(74, 144, 226, 0.2);
    color: #4A90E2;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.ai-suggestion:hover {
    background: rgba(74, 144, 226, 0.2);
    transform: translateX(5px);
}

/* Input del Chat */
.ai-chatbot-input {
    padding: 20px;
    background: white;
    border-top: 1px solid #e9ecef;
}

.ai-input-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

#ai-chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

#ai-chat-input:focus {
    border-color: #4A90E2;
    background: white;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

#ai-send-btn {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #4A90E2, #7B68EE);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

#ai-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

#ai-send-btn:active {
    transform: scale(0.95);
}

#ai-send-btn i {
    width: 18px;
    height: 18px;
    color: white;
}

/* Indicador de Escritura */
.ai-typing-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    color: #6c757d;
    font-size: 0.85rem;
}

.ai-typing-dots {
    display: flex;
    gap: 3px;
}

.ai-typing-dots span {
    width: 6px;
    height: 6px;
    background: #4A90E2;
    border-radius: 50%;
    animation: aiTyping 1.4s infinite;
}

.ai-typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.ai-typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes aiTyping {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.3;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .ai-chatbot-container {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        border-radius: 0;
    }
    
    .ai-chatbot-modal.active .ai-chatbot-container {
        transform: none;
    }
    
    .ai-message-content {
        max-width: 240px;
    }
}

/* Estados del botón del chatbot */
#ai-chatbot-btn {
    position: relative;
    overflow: hidden;
}

#ai-chatbot-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.6s ease;
}

#ai-chatbot-btn:hover::before {
    width: 100px;
    height: 100px;
}

/* Animación de aparición del modal */
@keyframes aiModalAppear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
} 