* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    padding: 20px;
}

.gantt-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.gantt-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.gantt-header h1 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #2a2a2a;
}

.gantt-header h2 {
    font-size: 18px;
    font-weight: normal;
    color: #555;
    margin-bottom: 8px;
}

.gantt-header p {
    color: #666;
}

/* Vista general del Gantt */
.gantt-overview-container {
    margin-bottom: 40px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 20px;
    background-color: #f9f9f9;
}

.gantt-overview-container h3 {
    margin-bottom: 15px;
    color: #444;
}

.gantt-overview {
    position: relative;
    height: 250px; /* Aumentado para dar espacio suficiente */
    overflow: hidden;
}

.overview-phases {
    position: relative;
    height: 210px; /* Aumentado para dar espacio suficiente */
    margin-top: 10px;
}

.overview-phase {
    position: absolute;
    height: 30px; /* Altura fija para cada barra de fase */
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.9;
}

.overview-phase:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.overview-title {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 20px);
}

/* Slider horizontal */
.slider-container {
    margin-top: 10px;
}

.slider {
    width: 100%;
    height: 15px;
    border-radius: 5px;  
    background: #d3d3d3;
    outline: none;
    opacity: 0.7;
    transition: opacity .2s;
}

.slider:hover {
    opacity: 1;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 25px;
    height: 25px;
    border-radius: 50%; 
    background: #4472C4;
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #4472C4;
    cursor: pointer;
}

/* Vista detallada del Gantt */
.gantt-detailed-wrapper {
    overflow-x: auto;
    margin-bottom: 40px;
}

.gantt-chart {
    position: relative;
    min-width: 1500px; /* Ancho mínimo para formato apaisado */
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 20px;
}

.timeline-header {
    position: relative;
    height: 50px;
    margin-bottom: 20px;
}

.timeline-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: #333;
    top: 30px;
}

.timeline-label {
    position: absolute;
    text-align: center;
    font-size: 10px;
    transform: translateX(-50%);
}

.timeline-tick {
    width: 1px;
    height: 10px;
    background-color: #333;
    margin: 0 auto;
}

.timeline-text {
    margin-top: 5px;
}

.phase-section {
    margin-bottom: 30px;
}

.phase-header {
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #e0e0e0;
}

.phase-header h3 {
    font-size: 16px;
    margin: 0;
    display: inline-block;
    color: #444;
}

.phase-period {
    font-size: 12px;
    color: #666;
    margin-left: 10px;
}

.tasks-container {
    padding-left: 20px;
}

.task-row {
    display: flex;
    margin-bottom: 15px;
    align-items: center;
}

.task-info {
    width: 30%;
    padding-right: 15px;
}

.task-title {
    font-size: 12px;
    margin-bottom: 4px;
}

.task-milestone {
    font-size: 11px;
    color: #666;
    font-style: italic;
}

.task-timeline {
    position: relative;
    width: 70%;
    height: 30px;
}

.task-bar {
    position: absolute;
    height: 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.task-bar:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.milestone-marker {
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ff0000;
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

.task-details-popup {
    position: fixed;
    background-color: white;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-width: 350px;
    border-left: 4px solid #4472C4;
    display: none;
}

.task-details-popup h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

.task-details-popup p {
    margin-bottom: 8px;
    font-size: 14px;
}

.gantt-legend {
    margin-top: 30px;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
}

.gantt-legend h3 {
    margin-bottom: 15px;
    color: #444;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-right: 20px;
    font-size: 13px;
}

.legend-color {
    width: 20px;
    height: 15px;
    margin-right: 8px;
    border-radius: 3px;
}

.legend-milestone {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ff0000;
    margin-right: 8px;
}

.phase1-color { background-color: #4472C4; }
.phase2-color { background-color: #ED7D31; }
.phase3-color { background-color: #A5A5A5; }
.phase4-color { background-color: #70AD47; }

/* Responsive adjustments */
@media (max-width: 992px) {
    .gantt-container {
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .task-row {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 25px;
    }
    
    .task-info {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .task-timeline {
        width: 100%;
    }
    
    .legend-items {
        flex-direction: column;
        gap: 10px;
    }
    
    .gantt-overview {
        height: 280px;
    }
    
    .overview-phases {
        height: 240px;
    }
}

@media (max-width: 576px) {
    .gantt-header h1 {
        font-size: 20px;
    }
    
    .gantt-header h2 {
        font-size: 16px;
    }
    
    .phase-header h3 {
        display: block;
        margin-bottom: 5px;
    }
    
    .phase-period {
        display: block;
        margin-left: 0;
    }
}
.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.ayudala-logo {
    max-width: 200px;
    height: auto;
}