/* Estilos para la página de Power BI */

/* Hero section con imagen de fondo */
.powerbi-hero {
    position: relative;
    background-image: url('../img/powerbi-hero.jpg');
    background-size: cover;
    background-position: center;
    padding: 100px 0;
    color: #fff;
    text-align: center;
    margin-bottom: 0;
}

.powerbi-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65);
    z-index: 1;
}

.powerbi-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
}

.powerbi-subtitle {
    font-size: 1.3rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.powerbi-cta {
    margin-top: 30px;
}

.powerbi-cta .btn {
    margin: 0 10px;
    padding: 12px 30px;
    font-weight: 600;
}

.btn-outline {
    background-color: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Sección de informes Power BI */
.powerbi-section {
    padding: 0;
    background-color: #f8f9fa;
    min-height: 700px;
}

/* Estilos para la barra lateral */
.report-sidebar {
    background-color: #fff;
    border-right: 1px solid #e9ecef;
    padding: 30px 0;
    height: 100%;
    min-height: 700px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.report-sidebar h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    padding: 0 20px;
    margin-bottom: 20px;
}

.sidebar-separator {
    height: 1px;
    background-color: #e9ecef;
    margin: 15px 0;
}

.report-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.report-nav .nav-item {
    margin-bottom: 5px;
}

.report-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.report-nav .nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.report-nav .nav-item.active .nav-link {
    background-color: #f1f8ff;
    color: #007bff;
    border-left: 3px solid #007bff;
}

.report-nav .nav-link:hover {
    background-color: #f8f9fa;
}

.sidebar-info {
    padding: 20px;
    font-size: 0.9rem;
    color: #6c757d;
}

.sidebar-info p {
    margin-bottom: 15px;
}

/* Estilos para el contenedor de informes */
.report-container {
    background-color: #fff;
    border-radius: 0;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    height: 100%;
    min-height: 1000px;
}

.report-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.report-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
    color: #333;
}

.report-actions {
    display: flex;
    gap: 10px;
}

.report-content {
    padding: 0;
    height: calc(100% - 70px);
    min-height: 900px;
}

.tab-pane {
    height: 100%;
    display: none;
}

.tab-pane.show.active {
    display: block;
}

.report-placeholder {
    height: 100%;
    min-height: 900px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #6c757d;
}

.embedContainer {
    width: 100%;
    height: 100%;
    min-height: 900px;
}

/* Estilos para mocks de informes (visualización temporal) */
.mock-report {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

/* Estilos para el contenedor de iframe */
.iframe-container {
    width: 100%;
    height: 100%;
    min-height: 900px;
    position: relative;
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Estilos para el contenedor de errores */
.error-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px;
    color: #dc3545;
}

.error-container i {
    font-size: 3rem;
    margin-bottom: 20px;
}

.error-container h3 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.mock-report-header {
    margin-bottom: 20px;
    text-align: center;
}

.mock-report-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.mock-report-header p {
    color: #6c757d;
}

.mock-report-content {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto;
    gap: 20px;
    height: calc(100% - 150px);
}

.mock-report-content.centered {
    display: flex;
    justify-content: center;
    align-items: center;
}

.mock-kpi-container {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.mock-kpi {
    flex: 1;
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.kpi-value {
    font-size: 2rem;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 5px;
}

.kpi-label {
    color: #6c757d;
    font-size: 0.9rem;
}

.mock-chart, .mock-table {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.chart-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    font-size: 1rem;
}

/* Estilos específicos para los diferentes tipos de gráficos */
.pie-chart::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    background: conic-gradient(#007bff 0% 25%, #28a745 25% 55%, #ffc107 55% 70%, #dc3545 70% 100%);
    border-radius: 50%;
    z-index: 1;
}

.pie-chart::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: #fff;
    border-radius: 50%;
    z-index: 2;
}

.bar-chart::after, .column-chart::after {
    content: "";
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 100%;
    height: 60%;
    background: repeating-linear-gradient(
        to right,
        transparent,
        transparent 19%,
        #e9ecef 19%,
        #e9ecef 20%
    );
    z-index: 1;
}

.bar-chart::before {
    content: "";
    position: absolute;
    bottom: 40px;
    left: 40px;
    width: calc(100% - 80px);
    height: 60%;
    background: repeating-linear-gradient(
        to right,
        #007bff 0% 15%,
        transparent 15% 25%,
        #28a745 25% 40%,
        transparent 40% 50%,
        #ffc107 50% 65%,
        transparent 65% 75%,
        #dc3545 75% 90%,
        transparent 90% 100%
    );
    z-index: 2;
}

.column-chart::before {
    content: "";
    position: absolute;
    bottom: 40px;
    left: 40px;
    width: calc(100% - 80px);
    height: 60%;
    z-index: 2;
    background-image: 
        linear-gradient(to top, #007bff, #007bff),
        linear-gradient(to top, #28a745, #28a745),
        linear-gradient(to top, #ffc107, #ffc107),
        linear-gradient(to top, #dc3545, #dc3545),
        linear-gradient(to top, #6610f2, #6610f2);
    background-position: 
        10% bottom,
        30% bottom,
        50% bottom,
        70% bottom,
        90% bottom;
    background-size: 
        10% 85%,
        10% 65%,
        10% 45%,
        10% 75%,
        10% 55%;
    background-repeat: no-repeat;
}

.line-chart::after {
    content: "";
    position: absolute;
    bottom: 40px;
    left: 40px;
    width: calc(100% - 80px);
    height: 60%;
    background: 
        linear-gradient(to top, rgba(0,123,255,0.1), transparent),
        repeating-linear-gradient(
            to right,
            transparent,
            transparent 19%,
            #e9ecef 19%,
            #e9ecef 20%
        );
    z-index: 1;
}

.line-chart::before {
    content: "";
    position: absolute;
    bottom: 40px;
    left: 40px;
    width: calc(100% - 80px);
    height: 60%;
    background-image: 
        linear-gradient(to right, transparent, #007bff 20%, #007bff 40%, #007bff 60%, #007bff 80%, transparent);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center calc(50% - 20px);
    z-index: 2;
    clip-path: path('M0,50 Q25,20 50,40 T100,30');
}

.area-chart::after {
    content: "";
    position: absolute;
    bottom: 40px;
    left: 40px;
    width: calc(100% - 80px);
    height: 60%;
    background: 
        repeating-linear-gradient(
            to right,
            transparent,
            transparent 19%,
            #e9ecef 19%,
            #e9ecef 20%
        );
    z-index: 1;
}

.area-chart::before {
    content: "";
    position: absolute;
    bottom: 40px;
    left: 40px;
    width: calc(100% - 80px);
    height: 60%;
    background: linear-gradient(to top, rgba(0,123,255,0.2), transparent);
    z-index: 2;
    clip-path: polygon(0% 100%, 0% 50%, 20% 40%, 40% 60%, 60% 50%, 80% 30%, 100% 40%, 100% 100%);
}

.gauge-chart::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -30%);
    width: 180px;
    height: 90px;
    background: conic-gradient(#dc3545 0% 20%, #ffc107 20% 40%, #28a745 40% 100%);
    border-radius: 180px 180px 0 0;
    z-index: 1;
}

.gauge-chart::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -30%) rotate(25deg);
    transform-origin: bottom;
    width: 6px;
    height: 80px;
    background-color: #333;
    border-radius: 3px 3px 0 0;
    z-index: 2;
}

.bubble-chart::before {
    content: "";
    position: absolute;
    bottom: 40px;
    left: 40px;
    width: calc(100% - 80px);
    height: 60%;
    z-index: 2;
    background-image: 
        radial-gradient(circle at center, #007bff 0%, #007bff 100%),
        radial-gradient(circle at center, #28a745 0%, #28a745 100%),
        radial-gradient(circle at center, #ffc107 0%, #ffc107 100%),
        radial-gradient(circle at center, #dc3545 0%, #dc3545 100%);
    background-position: 
        20% 30%,
        70% 60%,
        30% 70%,
        80% 40%;
    background-size: 
        40px 40px,
        60px 60px,
        30px 30px,
        50px 50px;
    background-repeat: no-repeat;
}

.mock-table::before {
    content: "";
    position: absolute;
    top: 50px;
    left: 20px;
    width: calc(100% - 40px);
    height: calc(100% - 70px);
    background: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 29px,
        #e9ecef 29px,
        #e9ecef 30px
    );
    z-index: 1;
}

.mock-table::after {
    content: "";
    position: absolute;
    top: 50px;
    left: 20px;
    width: calc(100% - 40px);
    height: 30px;
    background-color: rgba(0, 123, 255, 0.1);
    z-index: 2;
}

.mock-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #6c757d;
}

.mock-placeholder i {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.7;
}

.embed-info {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #6c757d;
    text-align: center;
}

/* Indicador de carga */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #007bff;
}

.loading-indicator i {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* Sección de beneficios */
.benefits-section {
    padding: 80px 0;
    background-color: #fff;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-subtitle {
    font-size: 1rem;
    color: #007bff;
    font-weight: 600;
    display: block;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.title-separator {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.title-separator span {
    width: 80px;
    height: 3px;
    background-color: #007bff;
    display: block;
}

.benefits-row {
    margin-bottom: 40px;
}

.benefit-card {
    text-align: center;
    padding: 30px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    height: 100%;
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.benefit-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 123, 255, 0.1);
    border-radius: 50%;
    color: #007bff;
}

.benefit-icon i {
    font-size: 2rem;
}

.benefit-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.benefit-card p {
    color: #6c757d;
    font-size: 0.95rem;
}

/* Call to Action */
.powerbi-cta-section {
    position: relative;
    padding: 80px 0;
    background: linear-gradient(135deg, #0062cc 0%, #007bff 100%);
    color: #fff;
    overflow: hidden;
}

.cta-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-buttons {
    margin-top: 30px;
}

.cta-buttons .btn {
    margin: 0 10px 10px;
    padding: 12px 30px;
    font-weight: 600;
}

.overlay-diagonal {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: skewY(-3deg);
    transform-origin: top right;
    z-index: 1;
}

/* Responsive */
@media (max-width: 991px) {
    .report-sidebar {
        min-height: auto;
        padding: 20px 0;
    }
    
    .report-nav .nav-item {
        margin-bottom: 3px;
    }
    
    .report-nav .nav-link {
        padding: 10px 15px;
    }
    
    .report-container {
        min-height: 600px;
    }
    
    .report-placeholder, .embedContainer {
        min-height: 530px;
    }
    
    .mock-report-content {
        grid-template-columns: 1fr;
    }
    
    .mock-kpi-container {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 767px) {
    .powerbi-hero {
        padding: 60px 0;
    }
    
    .powerbi-title {
        font-size: 2.2rem;
    }
    
    .powerbi-subtitle {
        font-size: 1.1rem;
    }
    
    .report-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .report-container {
        min-height: 500px;
    }
    
    .report-placeholder, .embedContainer {
        min-height: 430px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
    
    .cta-content p {
        font-size: 1.1rem;
    }
}